mediatek: 6.6: refresh patches

Refresh patches and fix changed path for 32-bit mediatek boards
'arch/arm/dts' -> 'arch/arm/dts/mediatek'

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
Daniel Golle 2024-03-01 02:22:25 +00:00
parent f4223abd8f
commit 5b4bbd1097
55 changed files with 209 additions and 214 deletions

View file

@ -19,7 +19,7 @@ Subject: [PATCH] kernel: add block fit partition parser
--- a/block/blk.h --- a/block/blk.h
+++ b/block/blk.h +++ b/block/blk.h
@@ -414,6 +414,8 @@ void blk_free_ext_minor(unsigned int min @@ -423,6 +423,8 @@ void blk_free_ext_minor(unsigned int min
#define ADDPART_FLAG_NONE 0 #define ADDPART_FLAG_NONE 0
#define ADDPART_FLAG_RAID 1 #define ADDPART_FLAG_RAID 1
#define ADDPART_FLAG_WHOLEDISK 2 #define ADDPART_FLAG_WHOLEDISK 2
@ -82,7 +82,7 @@ Subject: [PATCH] kernel: add block fit partition parser
#include "check.h" #include "check.h"
@@ -48,6 +51,9 @@ static int (*check_part[])(struct parsed @@ -48,6 +51,9 @@ static int (*const check_part[])(struct
#ifdef CONFIG_EFI_PARTITION #ifdef CONFIG_EFI_PARTITION
efi_partition, /* this must come before msdos */ efi_partition, /* this must come before msdos */
#endif #endif
@ -92,7 +92,7 @@ Subject: [PATCH] kernel: add block fit partition parser
#ifdef CONFIG_SGI_PARTITION #ifdef CONFIG_SGI_PARTITION
sgi_partition, sgi_partition,
#endif #endif
@@ -439,6 +445,11 @@ static struct block_device *add_partitio @@ -433,6 +439,11 @@ static struct block_device *add_partitio
goto out_del; goto out_del;
} }
@ -104,7 +104,7 @@ Subject: [PATCH] kernel: add block fit partition parser
/* everything is up and running, commence */ /* everything is up and running, commence */
err = xa_insert(&disk->part_tbl, partno, bdev, GFP_KERNEL); err = xa_insert(&disk->part_tbl, partno, bdev, GFP_KERNEL);
if (err) if (err)
@@ -631,6 +642,11 @@ static bool blk_add_partition(struct gen @@ -625,6 +636,11 @@ static bool blk_add_partition(struct gen
(state->parts[p].flags & ADDPART_FLAG_RAID)) (state->parts[p].flags & ADDPART_FLAG_RAID))
md_autodetect_dev(part->bd_dev); md_autodetect_dev(part->bd_dev);
@ -193,7 +193,7 @@ Subject: [PATCH] kernel: add block fit partition parser
set_capacity(gd, ((u64)new->size * tr->blksize) >> 9); set_capacity(gd, ((u64)new->size * tr->blksize) >> 9);
--- a/drivers/mtd/ubi/block.c --- a/drivers/mtd/ubi/block.c
+++ b/drivers/mtd/ubi/block.c +++ b/drivers/mtd/ubi/block.c
@@ -432,7 +432,9 @@ int ubiblock_create(struct ubi_volume_in @@ -411,7 +411,9 @@ int ubiblock_create(struct ubi_volume_in
ret = -ENODEV; ret = -ENODEV;
goto out_cleanup_disk; goto out_cleanup_disk;
} }

View file

@ -68,7 +68,7 @@
}; };
port@4 { port@4 {
@@ -240,7 +239,22 @@ @@ -239,7 +238,22 @@
status = "okay"; status = "okay";
}; };
@ -91,7 +91,7 @@
/* eMMC is shared pin with parallel NAND */ /* eMMC is shared pin with parallel NAND */
emmc_pins_default: emmc-pins-default { emmc_pins_default: emmc-pins-default {
mux { mux {
@@ -517,11 +531,11 @@ @@ -516,11 +530,11 @@
}; };
&sata { &sata {

View file

@ -1,5 +1,5 @@
--- a/arch/arm/boot/dts/mt7629-rfb.dts --- a/arch/arm/boot/dts/mediatek/mt7629-rfb.dts
+++ b/arch/arm/boot/dts/mt7629-rfb.dts +++ b/arch/arm/boot/dts/mediatek/mt7629-rfb.dts
@@ -18,6 +18,7 @@ @@ -18,6 +18,7 @@
chosen { chosen {

View file

@ -1,6 +1,6 @@
--- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi --- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
@@ -134,6 +134,13 @@ @@ -135,6 +135,13 @@
#size-cells = <2>; #size-cells = <2>;
ranges; ranges;

View file

@ -1,5 +1,5 @@
--- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts --- a/arch/arm/boot/dts/mediatek/mt7623n-bananapi-bpi-r2.dts
+++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts +++ b/arch/arm/boot/dts/mediatek/mt7623n-bananapi-bpi-r2.dts
@@ -19,6 +19,7 @@ @@ -19,6 +19,7 @@
chosen { chosen {

View file

@ -8,7 +8,7 @@
}; };
chosen { chosen {
@@ -160,22 +161,22 @@ @@ -164,22 +165,22 @@
port@1 { port@1 {
reg = <1>; reg = <1>;

View file

@ -1,6 +1,6 @@
--- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts --- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts +++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
@@ -556,12 +556,16 @@ @@ -587,6 +587,10 @@
status = "okay"; status = "okay";
}; };
@ -9,13 +9,5 @@
+}; +};
+ +
&sata { &sata {
- status = "disable"; status = "disabled";
+ status = "disabled";
}; };
&sata_phy {
- status = "disable";
+ status = "disabled";
};
&spi0 {

View file

@ -5,13 +5,13 @@ Subject: [PATCH] spi: spi-mem: Mediatek: Add SPI Nand support for MT7629
Signed-off-by: Xiangsheng Hou <xiangsheng.hou@mediatek.com> Signed-off-by: Xiangsheng Hou <xiangsheng.hou@mediatek.com>
--- ---
arch/arm/boot/dts/mt7629-rfb.dts | 45 ++++++++++++++++++++++++++++++++ arch/arm/boot/dts/mediatek/mt7629-rfb.dts | 45 ++++++++++++++++++++++++++++++++
arch/arm/boot/dts/mt7629.dtsi | 22 ++++++++++++++++ arch/arm/boot/dts/mediatek/mt7629.dtsi | 22 ++++++++++++++++
3 files changed, 79 insertions(+) 3 files changed, 79 insertions(+)
--- a/arch/arm/boot/dts/mt7629.dtsi --- a/arch/arm/boot/dts/mediatek/mt7629.dtsi
+++ b/arch/arm/boot/dts/mt7629.dtsi +++ b/arch/arm/boot/dts/mediatek/mt7629.dtsi
@@ -272,6 +272,27 @@ @@ -271,6 +271,27 @@
status = "disabled"; status = "disabled";
}; };
@ -39,8 +39,8 @@ Signed-off-by: Xiangsheng Hou <xiangsheng.hou@mediatek.com>
spi: spi@1100a000 { spi: spi@1100a000 {
compatible = "mediatek,mt7629-spi", compatible = "mediatek,mt7629-spi",
"mediatek,mt7622-spi"; "mediatek,mt7622-spi";
--- a/arch/arm/boot/dts/mt7629-rfb.dts --- a/arch/arm/boot/dts/mediatek/mt7629-rfb.dts
+++ b/arch/arm/boot/dts/mt7629-rfb.dts +++ b/arch/arm/boot/dts/mediatek/mt7629-rfb.dts
@@ -255,6 +255,50 @@ @@ -255,6 +255,50 @@
}; };
}; };

View file

@ -1,6 +1,6 @@
--- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts --- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts +++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
@@ -534,6 +534,65 @@ @@ -533,6 +533,65 @@
status = "disabled"; status = "disabled";
}; };

View file

@ -1,6 +1,6 @@
--- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts --- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts +++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
@@ -575,7 +575,7 @@ @@ -574,7 +574,7 @@
reg = <0x140000 0x0080000>; reg = <0x140000 0x0080000>;
}; };
@ -9,7 +9,7 @@
label = "Factory"; label = "Factory";
reg = <0x1c0000 0x0100000>; reg = <0x1c0000 0x0100000>;
}; };
@@ -636,5 +636,6 @@ @@ -635,5 +635,6 @@
&wmac { &wmac {
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&wmac_pins>; pinctrl-0 = <&wmac_pins>;

View file

@ -1,6 +1,6 @@
--- a/arch/arm/boot/dts/mt7623.dtsi --- a/arch/arm/boot/dts/mediatek/mt7623.dtsi
+++ b/arch/arm/boot/dts/mt7623.dtsi +++ b/arch/arm/boot/dts/mediatek/mt7623.dtsi
@@ -984,17 +984,15 @@ @@ -995,17 +995,15 @@
}; };
crypto: crypto@1b240000 { crypto: crypto@1b240000 {

View file

@ -1,5 +1,5 @@
--- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts --- a/arch/arm/boot/dts/mediatek/mt7623n-bananapi-bpi-r2.dts
+++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts +++ b/arch/arm/boot/dts/mediatek/mt7623n-bananapi-bpi-r2.dts
@@ -19,7 +19,7 @@ @@ -19,7 +19,7 @@
chosen { chosen {

View file

@ -1,5 +1,5 @@
--- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts --- a/arch/arm/boot/dts/mediatek/mt7623n-bananapi-bpi-r2.dts
+++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts +++ b/arch/arm/boot/dts/mediatek/mt7623n-bananapi-bpi-r2.dts
@@ -15,6 +15,8 @@ @@ -15,6 +15,8 @@
aliases { aliases {

View file

@ -1,5 +1,5 @@
--- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts --- a/arch/arm/boot/dts/mediatek/mt7623n-bananapi-bpi-r2.dts
+++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts +++ b/arch/arm/boot/dts/mediatek/mt7623n-bananapi-bpi-r2.dts
@@ -17,6 +17,10 @@ @@ -17,6 +17,10 @@
serial2 = &uart2; serial2 = &uart2;
mmc0 = &mmc0; mmc0 = &mmc0;

View file

@ -1,5 +1,5 @@
--- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts --- a/arch/arm/boot/dts/mediatek/mt7623n-bananapi-bpi-r2.dts
+++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts +++ b/arch/arm/boot/dts/mediatek/mt7623n-bananapi-bpi-r2.dts
@@ -15,6 +15,7 @@ @@ -15,6 +15,7 @@
aliases { aliases {

View file

@ -1,5 +1,5 @@
--- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts --- a/arch/arm/boot/dts/mediatek/mt7623n-bananapi-bpi-r2.dts
+++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts +++ b/arch/arm/boot/dts/mediatek/mt7623n-bananapi-bpi-r2.dts
@@ -26,7 +26,9 @@ @@ -26,7 +26,9 @@
chosen { chosen {
@ -11,7 +11,7 @@
}; };
connector { connector {
@@ -315,6 +317,20 @@ @@ -338,6 +340,20 @@
vmmc-supply = <&reg_3p3v>; vmmc-supply = <&reg_3p3v>;
vqmmc-supply = <&reg_1p8v>; vqmmc-supply = <&reg_1p8v>;
non-removable; non-removable;
@ -32,7 +32,7 @@
}; };
&mmc1 { &mmc1 {
@@ -328,6 +344,20 @@ @@ -351,6 +367,20 @@
cd-gpios = <&pio 261 GPIO_ACTIVE_LOW>; cd-gpios = <&pio 261 GPIO_ACTIVE_LOW>;
vmmc-supply = <&reg_3p3v>; vmmc-supply = <&reg_3p3v>;
vqmmc-supply = <&reg_3p3v>; vqmmc-supply = <&reg_3p3v>;
@ -52,4 +52,4 @@
+ }; + };
}; };
&mt6323_leds { &mt6323keys {

View file

@ -95,7 +95,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
--- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi --- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
@@ -346,7 +346,7 @@ @@ -347,7 +347,7 @@
#interrupt-cells = <3>; #interrupt-cells = <3>;
interrupt-parent = <&gic>; interrupt-parent = <&gic>;
reg = <0 0x10310000 0 0x1000>, reg = <0 0x10310000 0 0x1000>,

View file

@ -25,11 +25,11 @@ zone, and gives some operational headroom.
Signed-off-by: Bruno Umuarama <anonimou_eu@hotmail.com> Signed-off-by: Bruno Umuarama <anonimou_eu@hotmail.com>
--- ---
arch/arm/boot/dts/mt7623.dtsi | 4 ++-- arch/arm/boot/dts/mediatek/mt7623.dtsi | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-) 1 file changed, 2 insertions(+), 2 deletions(-)
--- a/arch/arm/boot/dts/mt7623.dtsi --- a/arch/arm/boot/dts/mediatek/mt7623.dtsi
+++ b/arch/arm/boot/dts/mt7623.dtsi +++ b/arch/arm/boot/dts/mediatek/mt7623.dtsi
@@ -160,13 +160,13 @@ @@ -160,13 +160,13 @@
trips { trips {

View file

@ -9,7 +9,7 @@ Subject: [PATCH] phy: phy-mtk-tphy: Add hifsys-support
--- a/drivers/phy/mediatek/phy-mtk-tphy.c --- a/drivers/phy/mediatek/phy-mtk-tphy.c
+++ b/drivers/phy/mediatek/phy-mtk-tphy.c +++ b/drivers/phy/mediatek/phy-mtk-tphy.c
@@ -17,6 +17,8 @@ @@ -18,6 +18,8 @@
#include <linux/phy/phy.h> #include <linux/phy/phy.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/regmap.h> #include <linux/regmap.h>
@ -18,9 +18,9 @@ Subject: [PATCH] phy: phy-mtk-tphy: Add hifsys-support
#include "phy-mtk-io.h" #include "phy-mtk-io.h"
@@ -264,6 +266,9 @@ @@ -267,6 +269,9 @@
#define TPHY_CLKS_CNT 2 #define USER_BUF_LEN(count) min_t(size_t, 8, (count))
+#define HIF_SYSCFG1 0x14 +#define HIF_SYSCFG1 0x14
+#define HIF_SYSCFG1_PHY2_MASK (0x3 << 20) +#define HIF_SYSCFG1_PHY2_MASK (0x3 << 20)
@ -28,7 +28,7 @@ Subject: [PATCH] phy: phy-mtk-tphy: Add hifsys-support
enum mtk_phy_version { enum mtk_phy_version {
MTK_PHY_V1 = 1, MTK_PHY_V1 = 1,
MTK_PHY_V2, MTK_PHY_V2,
@@ -331,6 +336,7 @@ struct mtk_tphy { @@ -334,6 +339,7 @@ struct mtk_tphy {
void __iomem *sif_base; /* only shared sif */ void __iomem *sif_base; /* only shared sif */
const struct mtk_phy_pdata *pdata; const struct mtk_phy_pdata *pdata;
struct mtk_phy_instance **phys; struct mtk_phy_instance **phys;
@ -36,7 +36,7 @@ Subject: [PATCH] phy: phy-mtk-tphy: Add hifsys-support
int nphys; int nphys;
int src_ref_clk; /* MHZ, reference clock for slew rate calibrate */ int src_ref_clk; /* MHZ, reference clock for slew rate calibrate */
int src_coef; /* coefficient for slew rate calibrate */ int src_coef; /* coefficient for slew rate calibrate */
@@ -596,6 +602,10 @@ static void pcie_phy_instance_init(struc @@ -951,6 +957,10 @@ static void pcie_phy_instance_init(struc
if (tphy->pdata->version != MTK_PHY_V1) if (tphy->pdata->version != MTK_PHY_V1)
return; return;
@ -47,7 +47,7 @@ Subject: [PATCH] phy: phy-mtk-tphy: Add hifsys-support
mtk_phy_update_bits(phya + U3P_U3_PHYA_DA_REG0, mtk_phy_update_bits(phya + U3P_U3_PHYA_DA_REG0,
P3A_RG_XTAL_EXT_PE1H | P3A_RG_XTAL_EXT_PE2H, P3A_RG_XTAL_EXT_PE1H | P3A_RG_XTAL_EXT_PE2H,
FIELD_PREP(P3A_RG_XTAL_EXT_PE1H, 0x2) | FIELD_PREP(P3A_RG_XTAL_EXT_PE1H, 0x2) |
@@ -1241,6 +1251,16 @@ static int mtk_tphy_probe(struct platfor @@ -1597,6 +1607,16 @@ static int mtk_tphy_probe(struct platfor
&tphy->src_coef); &tphy->src_coef);
} }

View file

@ -16,7 +16,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
--- a/drivers/clk/mediatek/clk-mt7981-topckgen.c --- a/drivers/clk/mediatek/clk-mt7981-topckgen.c
+++ b/drivers/clk/mediatek/clk-mt7981-topckgen.c +++ b/drivers/clk/mediatek/clk-mt7981-topckgen.c
@@ -359,8 +359,9 @@ static const struct mtk_mux top_muxes[] @@ -357,8 +357,9 @@ static const struct mtk_mux top_muxes[]
MUX_GATE_CLR_SET_UPD(CLK_TOP_SGM_325M_SEL, "sgm_325m_sel", MUX_GATE_CLR_SET_UPD(CLK_TOP_SGM_325M_SEL, "sgm_325m_sel",
sgm_325m_parents, 0x050, 0x054, 0x058, 8, 1, 15, sgm_325m_parents, 0x050, 0x054, 0x058, 8, 1, 15,
0x1C0, 21), 0x1C0, 21),

View file

@ -1,6 +1,6 @@
--- a/drivers/pinctrl/mediatek/Kconfig --- a/drivers/pinctrl/mediatek/Kconfig
+++ b/drivers/pinctrl/mediatek/Kconfig +++ b/drivers/pinctrl/mediatek/Kconfig
@@ -141,6 +141,13 @@ config PINCTRL_MT7986 @@ -187,6 +187,13 @@ config PINCTRL_MT7986
default ARM64 && ARCH_MEDIATEK default ARM64 && ARCH_MEDIATEK
select PINCTRL_MTK_MOORE select PINCTRL_MTK_MOORE
@ -12,15 +12,15 @@
+ select PINCTRL_MTK_MOORE + select PINCTRL_MTK_MOORE
+ +
config PINCTRL_MT8167 config PINCTRL_MT8167
bool "Mediatek MT8167 pin control" bool "MediaTek MT8167 pin control"
depends on OF depends on OF
--- a/drivers/pinctrl/mediatek/Makefile --- a/drivers/pinctrl/mediatek/Makefile
+++ b/drivers/pinctrl/mediatek/Makefile +++ b/drivers/pinctrl/mediatek/Makefile
@@ -20,6 +20,7 @@ obj-$(CONFIG_PINCTRL_MT7623) += pinctrl- @@ -27,6 +27,7 @@ obj-$(CONFIG_PINCTRL_MT7623) += pinctrl
obj-$(CONFIG_PINCTRL_MT7629) += pinctrl-mt7629.o obj-$(CONFIG_PINCTRL_MT7629) += pinctrl-mt7629.o
obj-$(CONFIG_PINCTRL_MT7981) += pinctrl-mt7981.o obj-$(CONFIG_PINCTRL_MT7981) += pinctrl-mt7981.o
obj-$(CONFIG_PINCTRL_MT7986) += pinctrl-mt7986.o obj-$(CONFIG_PINCTRL_MT7986) += pinctrl-mt7986.o
+obj-$(CONFIG_PINCTRL_MT7988) += pinctrl-mt7988.o +obj-$(CONFIG_PINCTRL_MT7988) += pinctrl-mt7988.o
obj-$(CONFIG_PINCTRL_MT8167) += pinctrl-mt8167.o obj-$(CONFIG_PINCTRL_MT8167) += pinctrl-mt8167.o
obj-$(CONFIG_PINCTRL_MT8173) += pinctrl-mt8173.o obj-$(CONFIG_PINCTRL_MT8173) += pinctrl-mt8173.o
obj-$(CONFIG_PINCTRL_MT8183) += pinctrl-mt8183.o obj-$(CONFIG_PINCTRL_MT8183) += pinctrl-mt8183.o

View file

@ -28,7 +28,7 @@ Signed-off-by: Stephen Boyd <sboyd@kernel.org>
#define AUDPLL_TUNER_EN BIT(31) #define AUDPLL_TUNER_EN BIT(31)
@@ -141,7 +141,8 @@ static void mtk_pll_set_rate_regs(struct @@ -114,7 +114,8 @@ static void mtk_pll_set_rate_regs(struct
pll->data->pcw_shift); pll->data->pcw_shift);
val |= pcw << pll->data->pcw_shift; val |= pcw << pll->data->pcw_shift;
writel(val, pll->pcw_addr); writel(val, pll->pcw_addr);
@ -40,11 +40,11 @@ Signed-off-by: Stephen Boyd <sboyd@kernel.org>
writel(val + 1, pll->tuner_addr); writel(val + 1, pll->tuner_addr);
--- a/drivers/clk/mediatek/clk-pll.h --- a/drivers/clk/mediatek/clk-pll.h
+++ b/drivers/clk/mediatek/clk-pll.h +++ b/drivers/clk/mediatek/clk-pll.h
@@ -46,6 +46,7 @@ struct mtk_pll_data { @@ -48,6 +48,7 @@ struct mtk_pll_data {
const char *parent_name; const char *parent_name;
u32 en_reg; u32 en_reg;
u8 pll_en_bit; /* Assume 0, indicates BIT(0) by default */ u8 pll_en_bit; /* Assume 0, indicates BIT(0) by default */
+ u8 pcw_chg_bit; + u8 pcw_chg_bit;
}; };
int mtk_clk_register_plls(struct device_node *node, /*

View file

@ -33,7 +33,7 @@ Signed-off-by: Stephen Boyd <sboyd@kernel.org>
--- a/drivers/clk/mediatek/Kconfig --- a/drivers/clk/mediatek/Kconfig
+++ b/drivers/clk/mediatek/Kconfig +++ b/drivers/clk/mediatek/Kconfig
@@ -415,6 +415,15 @@ config COMMON_CLK_MT7986_ETHSYS @@ -423,6 +423,15 @@ config COMMON_CLK_MT7986_ETHSYS
This driver adds support for clocks for Ethernet and SGMII This driver adds support for clocks for Ethernet and SGMII
required on MediaTek MT7986 SoC. required on MediaTek MT7986 SoC.
@ -47,11 +47,11 @@ Signed-off-by: Stephen Boyd <sboyd@kernel.org>
+ required for various periperals found on this SoC. + required for various periperals found on this SoC.
+ +
config COMMON_CLK_MT8135 config COMMON_CLK_MT8135
bool "Clock driver for MediaTek MT8135" tristate "Clock driver for MediaTek MT8135"
depends on (ARCH_MEDIATEK && ARM) || COMPILE_TEST depends on (ARCH_MEDIATEK && ARM) || COMPILE_TEST
--- a/drivers/clk/mediatek/Makefile --- a/drivers/clk/mediatek/Makefile
+++ b/drivers/clk/mediatek/Makefile +++ b/drivers/clk/mediatek/Makefile
@@ -60,6 +60,11 @@ obj-$(CONFIG_COMMON_CLK_MT7986) += clk-m @@ -62,6 +62,11 @@ obj-$(CONFIG_COMMON_CLK_MT7986) += clk-m
obj-$(CONFIG_COMMON_CLK_MT7986) += clk-mt7986-topckgen.o obj-$(CONFIG_COMMON_CLK_MT7986) += clk-mt7986-topckgen.o
obj-$(CONFIG_COMMON_CLK_MT7986) += clk-mt7986-infracfg.o obj-$(CONFIG_COMMON_CLK_MT7986) += clk-mt7986-infracfg.o
obj-$(CONFIG_COMMON_CLK_MT7986_ETHSYS) += clk-mt7986-eth.o obj-$(CONFIG_COMMON_CLK_MT7986_ETHSYS) += clk-mt7986-eth.o
@ -60,8 +60,8 @@ Signed-off-by: Stephen Boyd <sboyd@kernel.org>
+obj-$(CONFIG_COMMON_CLK_MT7988) += clk-mt7988-infracfg.o +obj-$(CONFIG_COMMON_CLK_MT7988) += clk-mt7988-infracfg.o
+obj-$(CONFIG_COMMON_CLK_MT7988) += clk-mt7988-eth.o +obj-$(CONFIG_COMMON_CLK_MT7988) += clk-mt7988-eth.o
+obj-$(CONFIG_COMMON_CLK_MT7988) += clk-mt7988-xfipll.o +obj-$(CONFIG_COMMON_CLK_MT7988) += clk-mt7988-xfipll.o
obj-$(CONFIG_COMMON_CLK_MT8135) += clk-mt8135.o obj-$(CONFIG_COMMON_CLK_MT8135) += clk-mt8135-apmixedsys.o clk-mt8135.o
obj-$(CONFIG_COMMON_CLK_MT8167) += clk-mt8167.o obj-$(CONFIG_COMMON_CLK_MT8167) += clk-mt8167-apmixedsys.o clk-mt8167.o
obj-$(CONFIG_COMMON_CLK_MT8167_AUDSYS) += clk-mt8167-aud.o obj-$(CONFIG_COMMON_CLK_MT8167_AUDSYS) += clk-mt8167-aud.o
--- /dev/null --- /dev/null
+++ b/drivers/clk/mediatek/clk-mt7988-apmixed.c +++ b/drivers/clk/mediatek/clk-mt7988-apmixed.c

View file

@ -18,7 +18,7 @@ Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
--- a/drivers/watchdog/mtk_wdt.c --- a/drivers/watchdog/mtk_wdt.c
+++ b/drivers/watchdog/mtk_wdt.c +++ b/drivers/watchdog/mtk_wdt.c
@@ -56,9 +56,13 @@ @@ -58,9 +58,13 @@
#define WDT_SWSYSRST 0x18U #define WDT_SWSYSRST 0x18U
#define WDT_SWSYS_RST_KEY 0x88000000 #define WDT_SWSYS_RST_KEY 0x88000000
@ -32,10 +32,10 @@ Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
static bool nowayout = WATCHDOG_NOWAYOUT; static bool nowayout = WATCHDOG_NOWAYOUT;
static unsigned int timeout; static unsigned int timeout;
@@ -68,10 +72,12 @@ struct mtk_wdt_dev { @@ -71,10 +75,12 @@ struct mtk_wdt_dev {
spinlock_t lock; /* protects WDT_SWSYSRST reg */
struct reset_controller_dev rcdev; struct reset_controller_dev rcdev;
bool disable_wdt_extrst; bool disable_wdt_extrst;
bool reset_by_toprgu;
+ bool has_swsysrst_en; + bool has_swsysrst_en;
}; };
@ -45,7 +45,7 @@ Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
}; };
static const struct mtk_wdt_data mt2712_data = { static const struct mtk_wdt_data mt2712_data = {
@@ -82,6 +88,11 @@ static const struct mtk_wdt_data mt7986_ @@ -89,6 +95,11 @@ static const struct mtk_wdt_data mt7986_
.toprgu_sw_rst_num = MT7986_TOPRGU_SW_RST_NUM, .toprgu_sw_rst_num = MT7986_TOPRGU_SW_RST_NUM,
}; };
@ -57,7 +57,7 @@ Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
static const struct mtk_wdt_data mt8183_data = { static const struct mtk_wdt_data mt8183_data = {
.toprgu_sw_rst_num = MT8183_TOPRGU_SW_RST_NUM, .toprgu_sw_rst_num = MT8183_TOPRGU_SW_RST_NUM,
}; };
@@ -98,6 +109,28 @@ static const struct mtk_wdt_data mt8195_ @@ -109,6 +120,28 @@ static const struct mtk_wdt_data mt8195_
.toprgu_sw_rst_num = MT8195_TOPRGU_SW_RST_NUM, .toprgu_sw_rst_num = MT8195_TOPRGU_SW_RST_NUM,
}; };
@ -86,7 +86,7 @@ Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
static int toprgu_reset_update(struct reset_controller_dev *rcdev, static int toprgu_reset_update(struct reset_controller_dev *rcdev,
unsigned long id, bool assert) unsigned long id, bool assert)
{ {
@@ -108,6 +141,9 @@ static int toprgu_reset_update(struct re @@ -119,6 +152,9 @@ static int toprgu_reset_update(struct re
spin_lock_irqsave(&data->lock, flags); spin_lock_irqsave(&data->lock, flags);
@ -96,7 +96,7 @@ Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
tmp = readl(data->wdt_base + WDT_SWSYSRST); tmp = readl(data->wdt_base + WDT_SWSYSRST);
if (assert) if (assert)
tmp |= BIT(id); tmp |= BIT(id);
@@ -116,6 +152,9 @@ static int toprgu_reset_update(struct re @@ -127,6 +163,9 @@ static int toprgu_reset_update(struct re
tmp |= WDT_SWSYS_RST_KEY; tmp |= WDT_SWSYS_RST_KEY;
writel(tmp, data->wdt_base + WDT_SWSYSRST); writel(tmp, data->wdt_base + WDT_SWSYSRST);
@ -106,7 +106,7 @@ Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
spin_unlock_irqrestore(&data->lock, flags); spin_unlock_irqrestore(&data->lock, flags);
return 0; return 0;
@@ -393,6 +432,8 @@ static int mtk_wdt_probe(struct platform @@ -406,6 +445,8 @@ static int mtk_wdt_probe(struct platform
wdt_data->toprgu_sw_rst_num); wdt_data->toprgu_sw_rst_num);
if (err) if (err)
return err; return err;
@ -115,11 +115,11 @@ Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
} }
mtk_wdt->disable_wdt_extrst = mtk_wdt->disable_wdt_extrst =
@@ -427,6 +468,7 @@ static const struct of_device_id mtk_wdt @@ -444,6 +485,7 @@ static const struct of_device_id mtk_wdt
{ .compatible = "mediatek,mt2712-wdt", .data = &mt2712_data },
{ .compatible = "mediatek,mt6589-wdt" }, { .compatible = "mediatek,mt6589-wdt" },
{ .compatible = "mediatek,mt6795-wdt", .data = &mt6795_data },
{ .compatible = "mediatek,mt7986-wdt", .data = &mt7986_data }, { .compatible = "mediatek,mt7986-wdt", .data = &mt7986_data },
+ { .compatible = "mediatek,mt7988-wdt", .data = &mt7988_data }, + { .compatible = "mediatek,mt7988-wdt", .data = &mt7988_data },
{ .compatible = "mediatek,mt8183-wdt", .data = &mt8183_data }, { .compatible = "mediatek,mt8183-wdt", .data = &mt8183_data },
{ .compatible = "mediatek,mt8186-wdt", .data = &mt8186_data }, { .compatible = "mediatek,mt8186-wdt", .data = &mt8186_data },
{ .compatible = "mediatek,mt8192-wdt", .data = &mt8192_data }, { .compatible = "mediatek,mt8188-wdt", .data = &mt8188_data },

View file

@ -8,7 +8,7 @@
static int spinand_read_reg_op(struct spinand_device *spinand, u8 reg, u8 *val) static int spinand_read_reg_op(struct spinand_device *spinand, u8 reg, u8 *val)
{ {
@@ -1344,6 +1345,7 @@ static int spinand_probe(struct spi_mem @@ -1345,6 +1346,7 @@ static int spinand_probe(struct spi_mem
if (ret) if (ret)
return ret; return ret;
@ -16,7 +16,7 @@
ret = mtd_device_register(mtd, NULL, 0); ret = mtd_device_register(mtd, NULL, 0);
if (ret) if (ret)
goto err_spinand_cleanup; goto err_spinand_cleanup;
@@ -1351,6 +1353,7 @@ static int spinand_probe(struct spi_mem @@ -1352,6 +1354,7 @@ static int spinand_probe(struct spi_mem
return 0; return 0;
err_spinand_cleanup: err_spinand_cleanup:
@ -24,7 +24,7 @@
spinand_cleanup(spinand); spinand_cleanup(spinand);
return ret; return ret;
@@ -1369,6 +1372,7 @@ static int spinand_remove(struct spi_mem @@ -1370,6 +1373,7 @@ static int spinand_remove(struct spi_mem
if (ret) if (ret)
return ret; return ret;

View file

@ -1,6 +1,6 @@
--- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts --- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts +++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
@@ -548,6 +548,7 @@ @@ -547,6 +547,7 @@
spi-tx-bus-width = <4>; spi-tx-bus-width = <4>;
spi-rx-bus-width = <4>; spi-rx-bus-width = <4>;
nand-ecc-engine = <&snfi>; nand-ecc-engine = <&snfi>;

View file

@ -16,15 +16,16 @@ Signed-off-by: Davide Fioravanti <pantanastyle@gmail.com>
--- a/drivers/mtd/nand/spi/Makefile --- a/drivers/mtd/nand/spi/Makefile
+++ b/drivers/mtd/nand/spi/Makefile +++ b/drivers/mtd/nand/spi/Makefile
@@ -1,3 +1,3 @@ @@ -1,4 +1,4 @@
# SPDX-License-Identifier: GPL-2.0 # SPDX-License-Identifier: GPL-2.0
-spinand-objs := core.o ato.o esmt.o etron.o gigadevice.o macronix.o micron.o paragon.o toshiba.o winbond.o xtx.o -spinand-objs := core.o alliancememory.o ato.o esmt.o etron.o gigadevice.o
+spinand-objs := core.o ato.o esmt.o etron.o fidelix.o gigadevice.o macronix.o micron.o paragon.o toshiba.o winbond.o xtx.o +spinand-objs := core.o alliancememory.o ato.o esmt.o etron.o fidelix.o gigadevice.o
spinand-objs += macronix.o micron.o paragon.o toshiba.o winbond.o xtx.o
obj-$(CONFIG_MTD_SPI_NAND) += spinand.o obj-$(CONFIG_MTD_SPI_NAND) += spinand.o
--- a/drivers/mtd/nand/spi/core.c --- a/drivers/mtd/nand/spi/core.c
+++ b/drivers/mtd/nand/spi/core.c +++ b/drivers/mtd/nand/spi/core.c
@@ -940,6 +940,7 @@ static const struct nand_ops spinand_ops @@ -941,6 +941,7 @@ static const struct spinand_manufacturer
static const struct spinand_manufacturer *spinand_manufacturers[] = { &alliancememory_spinand_manufacturer,
&ato_spinand_manufacturer, &ato_spinand_manufacturer,
&esmt_c8_spinand_manufacturer, &esmt_c8_spinand_manufacturer,
+ &fidelix_spinand_manufacturer, + &fidelix_spinand_manufacturer,
@ -112,7 +113,7 @@ Signed-off-by: Davide Fioravanti <pantanastyle@gmail.com>
+}; +};
--- a/include/linux/mtd/spinand.h --- a/include/linux/mtd/spinand.h
+++ b/include/linux/mtd/spinand.h +++ b/include/linux/mtd/spinand.h
@@ -263,6 +263,7 @@ struct spinand_manufacturer { @@ -264,6 +264,7 @@ extern const struct spinand_manufacturer
extern const struct spinand_manufacturer ato_spinand_manufacturer; extern const struct spinand_manufacturer ato_spinand_manufacturer;
extern const struct spinand_manufacturer esmt_c8_spinand_manufacturer; extern const struct spinand_manufacturer esmt_c8_spinand_manufacturer;
extern const struct spinand_manufacturer etron_spinand_manufacturer; extern const struct spinand_manufacturer etron_spinand_manufacturer;

View file

@ -15,7 +15,7 @@ Signed-off-by: Sam Shih <sam.shih@mediatek.com>
--- a/drivers/cpufreq/mediatek-cpufreq.c --- a/drivers/cpufreq/mediatek-cpufreq.c
+++ b/drivers/cpufreq/mediatek-cpufreq.c +++ b/drivers/cpufreq/mediatek-cpufreq.c
@@ -709,6 +709,15 @@ static const struct mtk_cpufreq_platform @@ -707,6 +707,15 @@ static const struct mtk_cpufreq_platform
.ccifreq_supported = false, .ccifreq_supported = false,
}; };
@ -31,7 +31,7 @@ Signed-off-by: Sam Shih <sam.shih@mediatek.com>
static const struct mtk_cpufreq_platform_data mt8183_platform_data = { static const struct mtk_cpufreq_platform_data mt8183_platform_data = {
.min_volt_shift = 100000, .min_volt_shift = 100000,
.max_volt_shift = 200000, .max_volt_shift = 200000,
@@ -742,6 +751,7 @@ static const struct of_device_id mtk_cpu @@ -740,6 +749,7 @@ static const struct of_device_id mtk_cpu
{ .compatible = "mediatek,mt2712", .data = &mt2701_platform_data }, { .compatible = "mediatek,mt2712", .data = &mt2701_platform_data },
{ .compatible = "mediatek,mt7622", .data = &mt7622_platform_data }, { .compatible = "mediatek,mt7622", .data = &mt7622_platform_data },
{ .compatible = "mediatek,mt7623", .data = &mt7623_platform_data }, { .compatible = "mediatek,mt7623", .data = &mt7623_platform_data },

View file

@ -1,6 +1,6 @@
--- a/drivers/crypto/inside-secure/safexcel.c --- a/drivers/crypto/inside-secure/safexcel.c
+++ b/drivers/crypto/inside-secure/safexcel.c +++ b/drivers/crypto/inside-secure/safexcel.c
@@ -600,6 +600,14 @@ static int safexcel_hw_init(struct safex @@ -608,6 +608,14 @@ static int safexcel_hw_init(struct safex
val |= EIP197_MST_CTRL_TX_MAX_CMD(5); val |= EIP197_MST_CTRL_TX_MAX_CMD(5);
writel(val, EIP197_HIA_AIC(priv) + EIP197_HIA_MST_CTRL); writel(val, EIP197_HIA_AIC(priv) + EIP197_HIA_MST_CTRL);
} }

View file

@ -1,6 +1,6 @@
--- a/drivers/crypto/inside-secure/safexcel.h --- a/drivers/crypto/inside-secure/safexcel.h
+++ b/drivers/crypto/inside-secure/safexcel.h +++ b/drivers/crypto/inside-secure/safexcel.h
@@ -737,6 +737,9 @@ enum safexcel_eip_version { @@ -743,6 +743,9 @@ struct safexcel_priv_data {
/* Priority we use for advertising our algorithms */ /* Priority we use for advertising our algorithms */
#define SAFEXCEL_CRA_PRIORITY 300 #define SAFEXCEL_CRA_PRIORITY 300

View file

@ -19,7 +19,7 @@
}, },
[PORT_NPCM] = { [PORT_NPCM] = {
.name = "Nuvoton 16550", .name = "Nuvoton 16550",
@@ -2773,6 +2773,11 @@ serial8250_do_set_termios(struct uart_po @@ -2780,6 +2780,11 @@ serial8250_do_set_termios(struct uart_po
unsigned long flags; unsigned long flags;
unsigned int baud, quot, frac = 0; unsigned int baud, quot, frac = 0;

View file

@ -94,9 +94,9 @@ Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com>
- if (!spi->controller_data) - if (!spi->controller_data)
- spi->controller_data = (void *)&mtk_default_chip_info; - spi->controller_data = (void *)&mtk_default_chip_info;
- -
if (mdata->dev_comp->need_pad_sel && spi->cs_gpiod) if (mdata->dev_comp->need_pad_sel && spi_get_csgpiod(spi, 0))
/* CS de-asserted, gpiolib will handle inversion */ /* CS de-asserted, gpiolib will handle inversion */
gpiod_direction_output(spi->cs_gpiod, 0); gpiod_direction_output(spi_get_csgpiod(spi, 0), 0);
@@ -1138,6 +1126,10 @@ static int mtk_spi_probe(struct platform @@ -1138,6 +1126,10 @@ static int mtk_spi_probe(struct platform
mdata = spi_master_get_devdata(master); mdata = spi_master_get_devdata(master);
mdata->dev_comp = device_get_match_data(dev); mdata->dev_comp = device_get_match_data(dev);

View file

@ -11,7 +11,7 @@ Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com>
--- a/drivers/spi/spi.c --- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c +++ b/drivers/spi/spi.c
@@ -1385,6 +1385,70 @@ static int spi_transfer_wait(struct spi_ @@ -1366,6 +1366,70 @@ static int spi_transfer_wait(struct spi_
return 0; return 0;
} }
@ -82,7 +82,7 @@ Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com>
static void _spi_transfer_delay_ns(u32 ns) static void _spi_transfer_delay_ns(u32 ns)
{ {
if (!ns) if (!ns)
@@ -2223,6 +2287,75 @@ void spi_flush_queue(struct spi_controll @@ -2211,6 +2275,75 @@ void spi_flush_queue(struct spi_controll
/*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/
#if defined(CONFIG_OF) #if defined(CONFIG_OF)
@ -155,10 +155,10 @@ Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com>
+ return 0; + return 0;
+} +}
+ +
static int of_spi_parse_dt(struct spi_controller *ctlr, struct spi_device *spi, static void of_spi_parse_dt_cs_delay(struct device_node *nc,
struct device_node *nc) struct spi_delay *delay, const char *prop)
{ {
@@ -2341,6 +2474,10 @@ of_register_spi_device(struct spi_contro @@ -2350,6 +2483,10 @@ of_register_spi_device(struct spi_contro
if (rc) if (rc)
goto err_out; goto err_out;
@ -168,10 +168,10 @@ Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com>
+ +
/* Store a pointer to the node in the device structure */ /* Store a pointer to the node in the device structure */
of_node_get(nc); of_node_get(nc);
spi->dev.of_node = nc;
--- a/include/linux/spi/spi.h --- a/include/linux/spi/spi.h
+++ b/include/linux/spi/spi.h +++ b/include/linux/spi/spi.h
@@ -318,6 +318,40 @@ struct spi_driver { @@ -330,6 +330,40 @@ struct spi_driver {
struct device_driver driver; struct device_driver driver;
}; };
@ -212,7 +212,7 @@ Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com>
static inline struct spi_driver *to_spi_driver(struct device_driver *drv) static inline struct spi_driver *to_spi_driver(struct device_driver *drv)
{ {
return drv ? container_of(drv, struct spi_driver, driver) : NULL; return drv ? container_of(drv, struct spi_driver, driver) : NULL;
@@ -703,6 +737,11 @@ struct spi_controller { @@ -727,6 +761,11 @@ struct spi_controller {
void *dummy_rx; void *dummy_rx;
void *dummy_tx; void *dummy_tx;
@ -224,13 +224,13 @@ Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com>
int (*fw_translate_cs)(struct spi_controller *ctlr, unsigned cs); int (*fw_translate_cs)(struct spi_controller *ctlr, unsigned cs);
/* /*
@@ -1510,6 +1549,9 @@ spi_register_board_info(struct spi_board @@ -1600,6 +1639,9 @@ spi_register_board_info(struct spi_board
{ return 0; } { return 0; }
#endif #endif
+extern int spi_do_calibration(struct spi_controller *ctlr, +extern int spi_do_calibration(struct spi_controller *ctlr,
+ struct spi_device *spi, int (*cal_read)(void *, u32 *, int, u8 *, int), void *drv_priv); + struct spi_device *spi, int (*cal_read)(void *, u32 *, int, u8 *, int), void *drv_priv);
+ +
/* If you're hotplugging an adapter with devices (parport, usb, etc) /*
* If you're hotplugging an adapter with devices (parport, USB, etc)
* use spi_new_device() to describe each device. You can also call * use spi_new_device() to describe each device. You can also call
* spi_unregister_device() to start making that device vanish, but

View file

@ -28,7 +28,7 @@ Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com>
* upper layer if necessary * upper layer if necessary
--- a/include/linux/spi/spi-mem.h --- a/include/linux/spi/spi-mem.h
+++ b/include/linux/spi/spi-mem.h +++ b/include/linux/spi/spi-mem.h
@@ -366,6 +366,10 @@ bool spi_mem_supports_op(struct spi_mem @@ -370,6 +370,10 @@ bool spi_mem_supports_op(struct spi_mem
int spi_mem_exec_op(struct spi_mem *mem, int spi_mem_exec_op(struct spi_mem *mem,
const struct spi_mem_op *op); const struct spi_mem_op *op);

View file

@ -11,7 +11,7 @@ Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com>
--- a/drivers/mtd/nand/spi/core.c --- a/drivers/mtd/nand/spi/core.c
+++ b/drivers/mtd/nand/spi/core.c +++ b/drivers/mtd/nand/spi/core.c
@@ -978,6 +978,56 @@ static int spinand_manufacturer_match(st @@ -979,6 +979,56 @@ static int spinand_manufacturer_match(st
return -ENOTSUPP; return -ENOTSUPP;
} }
@ -68,7 +68,7 @@ Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com>
static int spinand_id_detect(struct spinand_device *spinand) static int spinand_id_detect(struct spinand_device *spinand)
{ {
u8 *id = spinand->id.data; u8 *id = spinand->id.data;
@@ -1228,6 +1278,10 @@ static int spinand_init(struct spinand_d @@ -1229,6 +1279,10 @@ static int spinand_init(struct spinand_d
if (!spinand->scratchbuf) if (!spinand->scratchbuf)
return -ENOMEM; return -ENOMEM;

View file

@ -12,7 +12,7 @@ Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com>
--- a/drivers/mtd/nand/spi/core.c --- a/drivers/mtd/nand/spi/core.c
+++ b/drivers/mtd/nand/spi/core.c +++ b/drivers/mtd/nand/spi/core.c
@@ -1019,7 +1019,10 @@ int spinand_cal_read(void *priv, u32 *ad @@ -1020,7 +1020,10 @@ int spinand_cal_read(void *priv, u32 *ad
if (ret) if (ret)
return ret; return ret;
@ -26,7 +26,7 @@ Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com>
--- a/drivers/mtd/spi-nor/core.c --- a/drivers/mtd/spi-nor/core.c
+++ b/drivers/mtd/spi-nor/core.c +++ b/drivers/mtd/spi-nor/core.c
@@ -2900,6 +2900,18 @@ static const struct flash_info *spi_nor_ @@ -3378,6 +3378,18 @@ static const struct flash_info *spi_nor_
return NULL; return NULL;
} }
@ -45,9 +45,9 @@ Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com>
static const struct flash_info *spi_nor_get_flash_info(struct spi_nor *nor, static const struct flash_info *spi_nor_get_flash_info(struct spi_nor *nor,
const char *name) const char *name)
{ {
@@ -3003,6 +3015,9 @@ int spi_nor_scan(struct spi_nor *nor, co @@ -3506,6 +3518,9 @@ int spi_nor_scan(struct spi_nor *nor, co
if (!nor->bouncebuf) if (ret)
return -ENOMEM; return ret;
+ if(nor->spimem) + if(nor->spimem)
+ spi_mem_do_calibration(nor->spimem, spi_nor_cal_read, nor); + spi_mem_do_calibration(nor->spimem, spi_nor_cal_read, nor);

View file

@ -1,6 +1,6 @@
--- a/drivers/net/phy/Kconfig --- a/drivers/net/phy/Kconfig
+++ b/drivers/net/phy/Kconfig +++ b/drivers/net/phy/Kconfig
@@ -384,6 +384,12 @@ config ROCKCHIP_PHY @@ -419,6 +419,12 @@ config ROCKCHIP_PHY
help help
Currently supports the integrated Ethernet PHY. Currently supports the integrated Ethernet PHY.
@ -12,10 +12,10 @@
+ +
config SMSC_PHY config SMSC_PHY
tristate "SMSC PHYs" tristate "SMSC PHYs"
help select CRC16
--- a/drivers/net/phy/Makefile --- a/drivers/net/phy/Makefile
+++ b/drivers/net/phy/Makefile +++ b/drivers/net/phy/Makefile
@@ -95,6 +95,7 @@ obj-$(CONFIG_QSEMI_PHY) += qsemi.o @@ -102,6 +102,7 @@ obj-$(CONFIG_QSEMI_PHY) += qsemi.o
obj-$(CONFIG_REALTEK_PHY) += realtek.o obj-$(CONFIG_REALTEK_PHY) += realtek.o
obj-$(CONFIG_RENESAS_PHY) += uPD60620.o obj-$(CONFIG_RENESAS_PHY) += uPD60620.o
obj-$(CONFIG_ROCKCHIP_PHY) += rockchip.o obj-$(CONFIG_ROCKCHIP_PHY) += rockchip.o

View file

@ -14,7 +14,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
--- a/drivers/net/phy/mxl-gpy.c --- a/drivers/net/phy/mxl-gpy.c
+++ b/drivers/net/phy/mxl-gpy.c +++ b/drivers/net/phy/mxl-gpy.c
@@ -371,8 +371,11 @@ static bool gpy_2500basex_chk(struct phy @@ -386,8 +386,11 @@ static bool gpy_2500basex_chk(struct phy
phydev->speed = SPEED_2500; phydev->speed = SPEED_2500;
phydev->interface = PHY_INTERFACE_MODE_2500BASEX; phydev->interface = PHY_INTERFACE_MODE_2500BASEX;
@ -28,7 +28,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
return true; return true;
} }
@@ -396,6 +399,14 @@ static int gpy_config_aneg(struct phy_de @@ -438,6 +441,14 @@ static int gpy_config_aneg(struct phy_de
u32 adv; u32 adv;
int ret; int ret;
@ -43,7 +43,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
if (phydev->autoneg == AUTONEG_DISABLE) { if (phydev->autoneg == AUTONEG_DISABLE) {
/* Configure half duplex with genphy_setup_forced, /* Configure half duplex with genphy_setup_forced,
* because genphy_c45_pma_setup_forced does not support. * because genphy_c45_pma_setup_forced does not support.
@@ -486,6 +497,8 @@ static void gpy_update_interface(struct @@ -560,6 +571,8 @@ static int gpy_update_interface(struct p
switch (phydev->speed) { switch (phydev->speed) {
case SPEED_2500: case SPEED_2500:
phydev->interface = PHY_INTERFACE_MODE_2500BASEX; phydev->interface = PHY_INTERFACE_MODE_2500BASEX;
@ -51,8 +51,8 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
+ break; + break;
ret = phy_modify_mmd(phydev, MDIO_MMD_VEND1, VSPEC1_SGMII_CTRL, ret = phy_modify_mmd(phydev, MDIO_MMD_VEND1, VSPEC1_SGMII_CTRL,
VSPEC1_SGMII_CTRL_ANEN, 0); VSPEC1_SGMII_CTRL_ANEN, 0);
if (ret < 0) if (ret < 0) {
@@ -497,7 +510,7 @@ static void gpy_update_interface(struct @@ -573,7 +586,7 @@ static int gpy_update_interface(struct p
case SPEED_100: case SPEED_100:
case SPEED_10: case SPEED_10:
phydev->interface = PHY_INTERFACE_MODE_SGMII; phydev->interface = PHY_INTERFACE_MODE_SGMII;

View file

@ -13,7 +13,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
--- a/drivers/net/phy/Kconfig --- a/drivers/net/phy/Kconfig
+++ b/drivers/net/phy/Kconfig +++ b/drivers/net/phy/Kconfig
@@ -326,6 +326,13 @@ config MEDIATEK_GE_SOC_PHY @@ -330,6 +330,13 @@ config MEDIATEK_GE_SOC_PHY
present in the SoCs efuse and will dynamically calibrate VCM present in the SoCs efuse and will dynamically calibrate VCM
(common-mode voltage) during startup. (common-mode voltage) during startup.
@ -29,8 +29,8 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
depends on PTP_1588_CLOCK_OPTIONAL depends on PTP_1588_CLOCK_OPTIONAL
--- a/drivers/net/phy/Makefile --- a/drivers/net/phy/Makefile
+++ b/drivers/net/phy/Makefile +++ b/drivers/net/phy/Makefile
@@ -79,6 +79,7 @@ obj-$(CONFIG_MARVELL_10G_PHY) += marvell @@ -82,6 +82,7 @@ obj-$(CONFIG_MARVELL_PHY) += marvell.o
obj-$(CONFIG_MARVELL_PHY) += marvell.o obj-$(CONFIG_MARVELL_88Q2XXX_PHY) += marvell-88q2xxx.o
obj-$(CONFIG_MARVELL_88X2222_PHY) += marvell-88x2222.o obj-$(CONFIG_MARVELL_88X2222_PHY) += marvell-88x2222.o
obj-$(CONFIG_MAXLINEAR_GPHY) += mxl-gpy.o obj-$(CONFIG_MAXLINEAR_GPHY) += mxl-gpy.o
+obj-$(CONFIG_MEDIATEK_2P5G_PHY) += mediatek-2p5ge.o +obj-$(CONFIG_MEDIATEK_2P5G_PHY) += mediatek-2p5ge.o

View file

@ -47,7 +47,7 @@ Reviewed-by: Markus Schneider-Pargmann <msp@baylibre.com>
--- a/drivers/thermal/mediatek/auxadc_thermal.c --- a/drivers/thermal/mediatek/auxadc_thermal.c
+++ b/drivers/thermal/mediatek/auxadc_thermal.c +++ b/drivers/thermal/mediatek/auxadc_thermal.c
@@ -691,6 +691,9 @@ static const struct mtk_thermal_data mt7 @@ -690,6 +690,9 @@ static const struct mtk_thermal_data mt7
.adcpnp = mt7986_adcpnp, .adcpnp = mt7986_adcpnp,
.sensor_mux_values = mt7986_mux_values, .sensor_mux_values = mt7986_mux_values,
.version = MTK_THERMAL_V3, .version = MTK_THERMAL_V3,

View file

@ -19,7 +19,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
--- a/drivers/i2c/busses/i2c-mt65xx.c --- a/drivers/i2c/busses/i2c-mt65xx.c
+++ b/drivers/i2c/busses/i2c-mt65xx.c +++ b/drivers/i2c/busses/i2c-mt65xx.c
@@ -1444,15 +1444,19 @@ static int mtk_i2c_probe(struct platform @@ -1442,15 +1442,19 @@ static int mtk_i2c_probe(struct platform
if (IS_ERR(i2c->clocks[I2C_MT65XX_CLK_ARB].clk)) if (IS_ERR(i2c->clocks[I2C_MT65XX_CLK_ARB].clk))
return PTR_ERR(i2c->clocks[I2C_MT65XX_CLK_ARB].clk); return PTR_ERR(i2c->clocks[I2C_MT65XX_CLK_ARB].clk);

View file

@ -65,7 +65,7 @@
+}; +};
--- a/arch/arm64/boot/dts/mediatek/Makefile --- a/arch/arm64/boot/dts/mediatek/Makefile
+++ b/arch/arm64/boot/dts/mediatek/Makefile +++ b/arch/arm64/boot/dts/mediatek/Makefile
@@ -12,6 +12,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-b @@ -13,6 +13,7 @@ dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-b
dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-bananapi-bpi-r3-nand.dtbo dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-bananapi-bpi-r3-nand.dtbo
dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-bananapi-bpi-r3-nor.dtbo dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-bananapi-bpi-r3-nor.dtbo
dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-bananapi-bpi-r3-sd.dtbo dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-bananapi-bpi-r3-sd.dtbo

View file

@ -1,6 +1,6 @@
--- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts --- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts +++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
@@ -312,7 +312,7 @@ @@ -311,7 +311,7 @@
/* Attention: GPIO 90 is used to switch between PCIe@1,0 and /* Attention: GPIO 90 is used to switch between PCIe@1,0 and
* SATA functions. i.e. output-high: PCIe, output-low: SATA * SATA functions. i.e. output-high: PCIe, output-low: SATA
*/ */

View file

@ -1,6 +1,6 @@
--- a/arch/arm/Kconfig --- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig +++ b/arch/arm/Kconfig
@@ -1589,6 +1589,14 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEN @@ -1568,6 +1568,14 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEN
endchoice endchoice
@ -17,7 +17,7 @@
default "" default ""
--- a/drivers/of/fdt.c --- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c +++ b/drivers/of/fdt.c
@@ -1187,6 +1187,17 @@ int __init early_init_dt_scan_chosen(cha @@ -1189,6 +1189,17 @@ int __init early_init_dt_scan_chosen(cha
if (p != NULL && l > 0) if (p != NULL && l > 0)
strlcat(cmdline, p, min_t(int, strlen(cmdline) + (int)l, COMMAND_LINE_SIZE)); strlcat(cmdline, p, min_t(int, strlen(cmdline) + (int)l, COMMAND_LINE_SIZE));
@ -37,7 +37,7 @@
* CONFIG_CMDLINE is meant to be a default in case nothing else * CONFIG_CMDLINE is meant to be a default in case nothing else
--- a/arch/arm64/Kconfig --- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig
@@ -2240,6 +2240,14 @@ config CMDLINE_FORCE @@ -2269,6 +2269,14 @@ config CMDLINE_FORCE
endchoice endchoice

View file

@ -1,6 +1,6 @@
--- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts --- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
+++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts +++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
@@ -639,5 +639,28 @@ @@ -638,5 +638,28 @@
}; };
&wmac { &wmac {

View file

@ -37,7 +37,7 @@
}; };
&mmc1 { &mmc1 {
@@ -249,6 +272,26 @@ @@ -248,6 +271,26 @@
vqmmc-supply = <&reg_3p3v>; vqmmc-supply = <&reg_3p3v>;
assigned-clocks = <&topckgen CLK_TOP_MSDC30_1_SEL>; assigned-clocks = <&topckgen CLK_TOP_MSDC30_1_SEL>;
assigned-clock-parents = <&topckgen CLK_TOP_UNIV48M>; assigned-clock-parents = <&topckgen CLK_TOP_UNIV48M>;
@ -64,16 +64,18 @@
}; };
&nandc { &nandc {
@@ -283,14 +326,29 @@ @@ -281,15 +324,30 @@
read-only;
}; };
partition@80000 { - partition@80000 {
- label = "fip"; - label = "fip";
- reg = <0x80000 0x200000>; - reg = <0x80000 0x200000>;
- read-only; - read-only;
- }; - };
- -
- ubi: partition@280000 { - ubi: partition@280000 {
+ ubi: partition@80000 {
label = "ubi"; label = "ubi";
- reg = <0x280000 0x7d80000>; - reg = <0x280000 0x7d80000>;
+ reg = <0x80000 0x7f80000>; + reg = <0x80000 0x7f80000>;

View file

@ -1,6 +1,6 @@
--- a/drivers/spi/spi-mt65xx.c --- a/drivers/spi/spi-mt65xx.c
+++ b/drivers/spi/spi-mt65xx.c +++ b/drivers/spi/spi-mt65xx.c
@@ -1225,8 +1225,15 @@ static int mtk_spi_probe(struct platform @@ -1226,8 +1226,15 @@ static int mtk_spi_probe(struct platform
if (ret < 0) if (ret < 0)
return dev_err_probe(dev, ret, "failed to enable hclk\n"); return dev_err_probe(dev, ret, "failed to enable hclk\n");

View file

@ -24,7 +24,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
}; };
timer { timer {
@@ -540,10 +534,11 @@ @@ -544,10 +538,11 @@
interrupt-parent = <&gic>; interrupt-parent = <&gic>;
interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>;
memory-region = <&wo_emi0>, <&wo_ilm0>, <&wo_dlm0>, memory-region = <&wo_emi0>, <&wo_ilm0>, <&wo_dlm0>,
@ -38,7 +38,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
}; };
wed1: wed@15011000 { wed1: wed@15011000 {
@@ -553,10 +548,11 @@ @@ -557,10 +552,11 @@
interrupt-parent = <&gic>; interrupt-parent = <&gic>;
interrupts = <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>;
memory-region = <&wo_emi1>, <&wo_ilm1>, <&wo_dlm1>, memory-region = <&wo_emi1>, <&wo_ilm1>, <&wo_dlm1>,
@ -52,7 +52,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
}; };
wo_ccif0: syscon@151a5000 { wo_ccif0: syscon@151a5000 {
@@ -573,6 +569,11 @@ @@ -577,6 +573,11 @@
interrupts = <GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH>;
}; };

View file

@ -22,7 +22,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
--- a/drivers/net/ethernet/mediatek/mtk_wed.c --- a/drivers/net/ethernet/mediatek/mtk_wed.c
+++ b/drivers/net/ethernet/mediatek/mtk_wed.c +++ b/drivers/net/ethernet/mediatek/mtk_wed.c
@@ -1320,6 +1320,24 @@ mtk_wed_rro_alloc(struct mtk_wed_device @@ -1321,6 +1321,24 @@ mtk_wed_rro_alloc(struct mtk_wed_device
struct device_node *np; struct device_node *np;
int index; int index;
@ -47,7 +47,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
index = of_property_match_string(dev->hw->node, "memory-region-names", index = of_property_match_string(dev->hw->node, "memory-region-names",
"wo-dlm"); "wo-dlm");
if (index < 0) if (index < 0)
@@ -1336,6 +1354,7 @@ mtk_wed_rro_alloc(struct mtk_wed_device @@ -1337,6 +1355,7 @@ mtk_wed_rro_alloc(struct mtk_wed_device
return -ENODEV; return -ENODEV;
dev->rro.miod_phys = rmem->base; dev->rro.miod_phys = rmem->base;

View file

@ -34,7 +34,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
wo_data: wo-data@4fd80000 { wo_data: wo-data@4fd80000 {
reg = <0 0x4fd80000 0 0x240000>; reg = <0 0x4fd80000 0 0x240000>;
no-map; no-map;
@@ -533,11 +523,10 @@ @@ -537,11 +527,10 @@
reg = <0 0x15010000 0 0x1000>; reg = <0 0x15010000 0 0x1000>;
interrupt-parent = <&gic>; interrupt-parent = <&gic>;
interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>;
@ -49,7 +49,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
mediatek,wo-cpuboot = <&wo_cpuboot>; mediatek,wo-cpuboot = <&wo_cpuboot>;
}; };
@@ -547,11 +536,10 @@ @@ -551,11 +540,10 @@
reg = <0 0x15011000 0 0x1000>; reg = <0 0x15011000 0 0x1000>;
interrupt-parent = <&gic>; interrupt-parent = <&gic>;
interrupts = <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>;
@ -64,7 +64,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
mediatek,wo-cpuboot = <&wo_cpuboot>; mediatek,wo-cpuboot = <&wo_cpuboot>;
}; };
@@ -569,6 +557,16 @@ @@ -573,6 +561,16 @@
interrupts = <GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH>;
}; };

View file

@ -34,7 +34,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
}; };
timer { timer {
@@ -523,10 +513,11 @@ @@ -527,10 +517,11 @@
reg = <0 0x15010000 0 0x1000>; reg = <0 0x15010000 0 0x1000>;
interrupt-parent = <&gic>; interrupt-parent = <&gic>;
interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>;
@ -48,7 +48,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
mediatek,wo-cpuboot = <&wo_cpuboot>; mediatek,wo-cpuboot = <&wo_cpuboot>;
}; };
@@ -536,10 +527,11 @@ @@ -540,10 +531,11 @@
reg = <0 0x15011000 0 0x1000>; reg = <0 0x15011000 0 0x1000>;
interrupt-parent = <&gic>; interrupt-parent = <&gic>;
interrupts = <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>; interrupts = <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>;
@ -62,7 +62,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
mediatek,wo-cpuboot = <&wo_cpuboot>; mediatek,wo-cpuboot = <&wo_cpuboot>;
}; };
@@ -567,6 +559,16 @@ @@ -571,6 +563,16 @@
reg = <0 0x151f0000 0 0x8000>; reg = <0 0x151f0000 0 0x8000>;
}; };

View file

@ -5,7 +5,7 @@
--- a/drivers/leds/Kconfig --- a/drivers/leds/Kconfig
+++ b/drivers/leds/Kconfig +++ b/drivers/leds/Kconfig
@@ -874,6 +874,16 @@ source "drivers/leds/flash/Kconfig" @@ -901,6 +901,16 @@ source "drivers/leds/flash/Kconfig"
comment "RGB LED drivers" comment "RGB LED drivers"
source "drivers/leds/rgb/Kconfig" source "drivers/leds/rgb/Kconfig"
@ -24,9 +24,9 @@
--- a/drivers/leds/Makefile --- a/drivers/leds/Makefile
+++ b/drivers/leds/Makefile +++ b/drivers/leds/Makefile
@@ -76,6 +76,7 @@ obj-$(CONFIG_LEDS_PWM) += leds-pwm.o @@ -78,6 +78,7 @@ obj-$(CONFIG_LEDS_POWERNV) += leds-powe
obj-$(CONFIG_LEDS_PWM) += leds-pwm.o
obj-$(CONFIG_LEDS_REGULATOR) += leds-regulator.o obj-$(CONFIG_LEDS_REGULATOR) += leds-regulator.o
obj-$(CONFIG_LEDS_S3C24XX) += leds-s3c24xx.o
obj-$(CONFIG_LEDS_SC27XX_BLTC) += leds-sc27xx-bltc.o obj-$(CONFIG_LEDS_SC27XX_BLTC) += leds-sc27xx-bltc.o
+obj-$(CONFIG_LEDS_SMARTRG_LED) += leds-smartrg-system.o +obj-$(CONFIG_LEDS_SMARTRG_LED) += leds-smartrg-system.o
obj-$(CONFIG_LEDS_SUNFIRE) += leds-sunfire.o obj-$(CONFIG_LEDS_SUNFIRE) += leds-sunfire.o

View file

@ -15,7 +15,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -1264,7 +1264,7 @@ static int mtk_init_fq_dma(struct mtk_et @@ -1281,7 +1281,7 @@ static int mtk_init_fq_dma(struct mtk_et
eth->scratch_ring = eth->sram_base; eth->scratch_ring = eth->sram_base;
else else
eth->scratch_ring = dma_alloc_coherent(eth->dma_dev, eth->scratch_ring = dma_alloc_coherent(eth->dma_dev,
@ -24,7 +24,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
&eth->phy_scratch_ring, &eth->phy_scratch_ring,
GFP_KERNEL); GFP_KERNEL);
if (unlikely(!eth->scratch_ring)) if (unlikely(!eth->scratch_ring))
@@ -1280,16 +1280,16 @@ static int mtk_init_fq_dma(struct mtk_et @@ -1297,16 +1297,16 @@ static int mtk_init_fq_dma(struct mtk_et
if (unlikely(dma_mapping_error(eth->dma_dev, dma_addr))) if (unlikely(dma_mapping_error(eth->dma_dev, dma_addr)))
return -ENOMEM; return -ENOMEM;
@ -44,7 +44,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
txd->txd3 = TX_DMA_PLEN0(MTK_QDMA_PAGE_SIZE); txd->txd3 = TX_DMA_PLEN0(MTK_QDMA_PAGE_SIZE);
txd->txd4 = 0; txd->txd4 = 0;
@@ -1538,7 +1538,7 @@ static int mtk_tx_map(struct sk_buff *sk @@ -1555,7 +1555,7 @@ static int mtk_tx_map(struct sk_buff *sk
if (itxd == ring->last_free) if (itxd == ring->last_free)
return -ENOMEM; return -ENOMEM;
@ -53,7 +53,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
memset(itx_buf, 0, sizeof(*itx_buf)); memset(itx_buf, 0, sizeof(*itx_buf));
txd_info.addr = dma_map_single(eth->dma_dev, skb->data, txd_info.size, txd_info.addr = dma_map_single(eth->dma_dev, skb->data, txd_info.size,
@@ -1579,7 +1579,7 @@ static int mtk_tx_map(struct sk_buff *sk @@ -1596,7 +1596,7 @@ static int mtk_tx_map(struct sk_buff *sk
memset(&txd_info, 0, sizeof(struct mtk_tx_dma_desc_info)); memset(&txd_info, 0, sizeof(struct mtk_tx_dma_desc_info));
txd_info.size = min_t(unsigned int, frag_size, txd_info.size = min_t(unsigned int, frag_size,
@ -62,7 +62,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
txd_info.qid = queue; txd_info.qid = queue;
txd_info.last = i == skb_shinfo(skb)->nr_frags - 1 && txd_info.last = i == skb_shinfo(skb)->nr_frags - 1 &&
!(frag_size - txd_info.size); !(frag_size - txd_info.size);
@@ -1592,7 +1592,7 @@ static int mtk_tx_map(struct sk_buff *sk @@ -1609,7 +1609,7 @@ static int mtk_tx_map(struct sk_buff *sk
mtk_tx_set_dma_desc(dev, txd, &txd_info); mtk_tx_set_dma_desc(dev, txd, &txd_info);
tx_buf = mtk_desc_to_tx_buf(ring, txd, tx_buf = mtk_desc_to_tx_buf(ring, txd,
@ -71,7 +71,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
if (new_desc) if (new_desc)
memset(tx_buf, 0, sizeof(*tx_buf)); memset(tx_buf, 0, sizeof(*tx_buf));
tx_buf->data = (void *)MTK_DMA_DUMMY_DESC; tx_buf->data = (void *)MTK_DMA_DUMMY_DESC;
@@ -1635,7 +1635,7 @@ static int mtk_tx_map(struct sk_buff *sk @@ -1652,7 +1652,7 @@ static int mtk_tx_map(struct sk_buff *sk
} else { } else {
int next_idx; int next_idx;
@ -80,7 +80,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
ring->dma_size); ring->dma_size);
mtk_w32(eth, next_idx, MT7628_TX_CTX_IDX0); mtk_w32(eth, next_idx, MT7628_TX_CTX_IDX0);
} }
@@ -1644,7 +1644,7 @@ static int mtk_tx_map(struct sk_buff *sk @@ -1661,7 +1661,7 @@ static int mtk_tx_map(struct sk_buff *sk
err_dma: err_dma:
do { do {
@ -89,7 +89,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
/* unmap dma */ /* unmap dma */
mtk_tx_unmap(eth, tx_buf, NULL, false); mtk_tx_unmap(eth, tx_buf, NULL, false);
@@ -1669,7 +1669,7 @@ static int mtk_cal_txd_req(struct mtk_et @@ -1686,7 +1686,7 @@ static int mtk_cal_txd_req(struct mtk_et
for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) { for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) {
frag = &skb_shinfo(skb)->frags[i]; frag = &skb_shinfo(skb)->frags[i];
nfrags += DIV_ROUND_UP(skb_frag_size(frag), nfrags += DIV_ROUND_UP(skb_frag_size(frag),
@ -98,7 +98,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
} }
} else { } else {
nfrags += skb_shinfo(skb)->nr_frags; nfrags += skb_shinfo(skb)->nr_frags;
@@ -1810,7 +1810,7 @@ static struct mtk_rx_ring *mtk_get_rx_ri @@ -1827,7 +1827,7 @@ static struct mtk_rx_ring *mtk_get_rx_ri
ring = &eth->rx_ring[i]; ring = &eth->rx_ring[i];
idx = NEXT_DESP_IDX(ring->calc_idx, ring->dma_size); idx = NEXT_DESP_IDX(ring->calc_idx, ring->dma_size);
@ -107,7 +107,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
if (rxd->rxd2 & RX_DMA_DONE) { if (rxd->rxd2 & RX_DMA_DONE) {
ring->calc_idx_update = true; ring->calc_idx_update = true;
return ring; return ring;
@@ -1978,7 +1978,7 @@ static int mtk_xdp_submit_frame(struct m @@ -1995,7 +1995,7 @@ static int mtk_xdp_submit_frame(struct m
} }
htxd = txd; htxd = txd;
@ -116,7 +116,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
memset(tx_buf, 0, sizeof(*tx_buf)); memset(tx_buf, 0, sizeof(*tx_buf));
htx_buf = tx_buf; htx_buf = tx_buf;
@@ -1997,7 +1997,7 @@ static int mtk_xdp_submit_frame(struct m @@ -2014,7 +2014,7 @@ static int mtk_xdp_submit_frame(struct m
goto unmap; goto unmap;
tx_buf = mtk_desc_to_tx_buf(ring, txd, tx_buf = mtk_desc_to_tx_buf(ring, txd,
@ -125,7 +125,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
memset(tx_buf, 0, sizeof(*tx_buf)); memset(tx_buf, 0, sizeof(*tx_buf));
n_desc++; n_desc++;
} }
@@ -2035,7 +2035,7 @@ static int mtk_xdp_submit_frame(struct m @@ -2052,7 +2052,7 @@ static int mtk_xdp_submit_frame(struct m
} else { } else {
int idx; int idx;
@ -134,7 +134,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
mtk_w32(eth, NEXT_DESP_IDX(idx, ring->dma_size), mtk_w32(eth, NEXT_DESP_IDX(idx, ring->dma_size),
MT7628_TX_CTX_IDX0); MT7628_TX_CTX_IDX0);
} }
@@ -2046,7 +2046,7 @@ static int mtk_xdp_submit_frame(struct m @@ -2063,7 +2063,7 @@ static int mtk_xdp_submit_frame(struct m
unmap: unmap:
while (htxd != txd) { while (htxd != txd) {
@ -143,7 +143,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
mtk_tx_unmap(eth, tx_buf, NULL, false); mtk_tx_unmap(eth, tx_buf, NULL, false);
htxd->txd3 = TX_DMA_LS0 | TX_DMA_OWNER_CPU; htxd->txd3 = TX_DMA_LS0 | TX_DMA_OWNER_CPU;
@@ -2177,7 +2177,7 @@ static int mtk_poll_rx(struct napi_struc @@ -2194,7 +2194,7 @@ static int mtk_poll_rx(struct napi_struc
goto rx_done; goto rx_done;
idx = NEXT_DESP_IDX(ring->calc_idx, ring->dma_size); idx = NEXT_DESP_IDX(ring->calc_idx, ring->dma_size);
@ -152,7 +152,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
data = ring->data[idx]; data = ring->data[idx];
if (!mtk_rx_get_desc(eth, &trxd, rxd)) if (!mtk_rx_get_desc(eth, &trxd, rxd))
@@ -2312,7 +2312,7 @@ static int mtk_poll_rx(struct napi_struc @@ -2329,7 +2329,7 @@ static int mtk_poll_rx(struct napi_struc
rxdcsum = &trxd.rxd4; rxdcsum = &trxd.rxd4;
} }
@ -161,7 +161,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
skb->ip_summed = CHECKSUM_UNNECESSARY; skb->ip_summed = CHECKSUM_UNNECESSARY;
else else
skb_checksum_none_assert(skb); skb_checksum_none_assert(skb);
@@ -2436,7 +2436,7 @@ static int mtk_poll_tx_qdma(struct mtk_e @@ -2453,7 +2453,7 @@ static int mtk_poll_tx_qdma(struct mtk_e
break; break;
tx_buf = mtk_desc_to_tx_buf(ring, desc, tx_buf = mtk_desc_to_tx_buf(ring, desc,
@ -170,7 +170,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
if (!tx_buf->data) if (!tx_buf->data)
break; break;
@@ -2487,7 +2487,7 @@ static int mtk_poll_tx_pdma(struct mtk_e @@ -2504,7 +2504,7 @@ static int mtk_poll_tx_pdma(struct mtk_e
} }
mtk_tx_unmap(eth, tx_buf, &bq, true); mtk_tx_unmap(eth, tx_buf, &bq, true);
@ -179,7 +179,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
ring->last_free = desc; ring->last_free = desc;
atomic_inc(&ring->free_count); atomic_inc(&ring->free_count);
@@ -2577,7 +2577,7 @@ static int mtk_napi_rx(struct napi_struc @@ -2594,7 +2594,7 @@ static int mtk_napi_rx(struct napi_struc
do { do {
int rx_done; int rx_done;
@ -188,7 +188,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
reg_map->pdma.irq_status); reg_map->pdma.irq_status);
rx_done = mtk_poll_rx(napi, budget - rx_done_total, eth); rx_done = mtk_poll_rx(napi, budget - rx_done_total, eth);
rx_done_total += rx_done; rx_done_total += rx_done;
@@ -2593,10 +2593,10 @@ static int mtk_napi_rx(struct napi_struc @@ -2610,10 +2610,10 @@ static int mtk_napi_rx(struct napi_struc
return budget; return budget;
} while (mtk_r32(eth, reg_map->pdma.irq_status) & } while (mtk_r32(eth, reg_map->pdma.irq_status) &
@ -201,7 +201,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
return rx_done_total; return rx_done_total;
} }
@@ -2605,7 +2605,7 @@ static int mtk_tx_alloc(struct mtk_eth * @@ -2622,7 +2622,7 @@ static int mtk_tx_alloc(struct mtk_eth *
{ {
const struct mtk_soc_data *soc = eth->soc; const struct mtk_soc_data *soc = eth->soc;
struct mtk_tx_ring *ring = &eth->tx_ring; struct mtk_tx_ring *ring = &eth->tx_ring;
@ -210,7 +210,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
struct mtk_tx_dma_v2 *txd; struct mtk_tx_dma_v2 *txd;
int ring_size; int ring_size;
u32 ofs, val; u32 ofs, val;
@@ -2728,14 +2728,14 @@ static void mtk_tx_clean(struct mtk_eth @@ -2745,14 +2745,14 @@ static void mtk_tx_clean(struct mtk_eth
} }
if (!MTK_HAS_CAPS(soc->caps, MTK_SRAM) && ring->dma) { if (!MTK_HAS_CAPS(soc->caps, MTK_SRAM) && ring->dma) {
dma_free_coherent(eth->dma_dev, dma_free_coherent(eth->dma_dev,
@ -227,7 +227,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
ring->dma_pdma, ring->phys_pdma); ring->dma_pdma, ring->phys_pdma);
ring->dma_pdma = NULL; ring->dma_pdma = NULL;
} }
@@ -2790,15 +2790,15 @@ static int mtk_rx_alloc(struct mtk_eth * @@ -2807,15 +2807,15 @@ static int mtk_rx_alloc(struct mtk_eth *
if (!MTK_HAS_CAPS(eth->soc->caps, MTK_SRAM) || if (!MTK_HAS_CAPS(eth->soc->caps, MTK_SRAM) ||
rx_flag != MTK_RX_FLAGS_NORMAL) { rx_flag != MTK_RX_FLAGS_NORMAL) {
ring->dma = dma_alloc_coherent(eth->dma_dev, ring->dma = dma_alloc_coherent(eth->dma_dev,
@ -247,7 +247,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
} }
if (!ring->dma) if (!ring->dma)
@@ -2809,7 +2809,7 @@ static int mtk_rx_alloc(struct mtk_eth * @@ -2826,7 +2826,7 @@ static int mtk_rx_alloc(struct mtk_eth *
dma_addr_t dma_addr; dma_addr_t dma_addr;
void *data; void *data;
@ -256,7 +256,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
if (ring->page_pool) { if (ring->page_pool) {
data = mtk_page_pool_get_buff(ring->page_pool, data = mtk_page_pool_get_buff(ring->page_pool,
&dma_addr, GFP_KERNEL); &dma_addr, GFP_KERNEL);
@@ -2900,7 +2900,7 @@ static void mtk_rx_clean(struct mtk_eth @@ -2917,7 +2917,7 @@ static void mtk_rx_clean(struct mtk_eth
if (!ring->data[i]) if (!ring->data[i])
continue; continue;
@ -265,7 +265,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
if (!rxd->rxd1) if (!rxd->rxd1)
continue; continue;
@@ -2917,7 +2917,7 @@ static void mtk_rx_clean(struct mtk_eth @@ -2934,7 +2934,7 @@ static void mtk_rx_clean(struct mtk_eth
if (!in_sram && ring->dma) { if (!in_sram && ring->dma) {
dma_free_coherent(eth->dma_dev, dma_free_coherent(eth->dma_dev,
@ -274,7 +274,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
ring->dma, ring->phys); ring->dma, ring->phys);
ring->dma = NULL; ring->dma = NULL;
} }
@@ -3280,7 +3280,7 @@ static void mtk_dma_free(struct mtk_eth @@ -3297,7 +3297,7 @@ static void mtk_dma_free(struct mtk_eth
netdev_reset_queue(eth->netdev[i]); netdev_reset_queue(eth->netdev[i]);
if (!MTK_HAS_CAPS(soc->caps, MTK_SRAM) && eth->scratch_ring) { if (!MTK_HAS_CAPS(soc->caps, MTK_SRAM) && eth->scratch_ring) {
dma_free_coherent(eth->dma_dev, dma_free_coherent(eth->dma_dev,
@ -283,7 +283,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
eth->scratch_ring, eth->phy_scratch_ring); eth->scratch_ring, eth->phy_scratch_ring);
eth->scratch_ring = NULL; eth->scratch_ring = NULL;
eth->phy_scratch_ring = 0; eth->phy_scratch_ring = 0;
@@ -3330,7 +3330,7 @@ static irqreturn_t mtk_handle_irq_rx(int @@ -3347,7 +3347,7 @@ static irqreturn_t mtk_handle_irq_rx(int
eth->rx_events++; eth->rx_events++;
if (likely(napi_schedule_prep(&eth->rx_napi))) { if (likely(napi_schedule_prep(&eth->rx_napi))) {
@ -292,7 +292,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
__napi_schedule(&eth->rx_napi); __napi_schedule(&eth->rx_napi);
} }
@@ -3356,9 +3356,9 @@ static irqreturn_t mtk_handle_irq(int ir @@ -3373,9 +3373,9 @@ static irqreturn_t mtk_handle_irq(int ir
const struct mtk_reg_map *reg_map = eth->soc->reg_map; const struct mtk_reg_map *reg_map = eth->soc->reg_map;
if (mtk_r32(eth, reg_map->pdma.irq_mask) & if (mtk_r32(eth, reg_map->pdma.irq_mask) &
@ -304,7 +304,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
mtk_handle_irq_rx(irq, _eth); mtk_handle_irq_rx(irq, _eth);
} }
if (mtk_r32(eth, reg_map->tx_irq_mask) & MTK_TX_DONE_INT) { if (mtk_r32(eth, reg_map->tx_irq_mask) & MTK_TX_DONE_INT) {
@@ -3376,10 +3376,10 @@ static void mtk_poll_controller(struct n @@ -3393,10 +3393,10 @@ static void mtk_poll_controller(struct n
struct mtk_eth *eth = mac->hw; struct mtk_eth *eth = mac->hw;
mtk_tx_irq_disable(eth, MTK_TX_DONE_INT); mtk_tx_irq_disable(eth, MTK_TX_DONE_INT);
@ -317,7 +317,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
} }
#endif #endif
@@ -3545,7 +3545,7 @@ static int mtk_open(struct net_device *d @@ -3563,7 +3563,7 @@ static int mtk_open(struct net_device *d
napi_enable(&eth->tx_napi); napi_enable(&eth->tx_napi);
napi_enable(&eth->rx_napi); napi_enable(&eth->rx_napi);
mtk_tx_irq_enable(eth, MTK_TX_DONE_INT); mtk_tx_irq_enable(eth, MTK_TX_DONE_INT);
@ -326,7 +326,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
refcount_set(&eth->dma_refcnt, 1); refcount_set(&eth->dma_refcnt, 1);
} }
else else
@@ -3628,7 +3628,7 @@ static int mtk_stop(struct net_device *d @@ -3647,7 +3647,7 @@ static int mtk_stop(struct net_device *d
mtk_gdm_config(eth, MTK_GDMA_DROP_ALL); mtk_gdm_config(eth, MTK_GDMA_DROP_ALL);
mtk_tx_irq_disable(eth, MTK_TX_DONE_INT); mtk_tx_irq_disable(eth, MTK_TX_DONE_INT);
@ -335,7 +335,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
napi_disable(&eth->tx_napi); napi_disable(&eth->tx_napi);
napi_disable(&eth->rx_napi); napi_disable(&eth->rx_napi);
@@ -4107,9 +4107,9 @@ static int mtk_hw_init(struct mtk_eth *e @@ -4126,9 +4126,9 @@ static int mtk_hw_init(struct mtk_eth *e
/* FE int grouping */ /* FE int grouping */
mtk_w32(eth, MTK_TX_DONE_INT, reg_map->pdma.int_grp); mtk_w32(eth, MTK_TX_DONE_INT, reg_map->pdma.int_grp);
@ -347,7 +347,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
mtk_w32(eth, 0x21021000, MTK_FE_INT_GRP); mtk_w32(eth, 0x21021000, MTK_FE_INT_GRP);
if (mtk_is_netsys_v3_or_greater(eth)) { if (mtk_is_netsys_v3_or_greater(eth)) {
@@ -5270,11 +5270,15 @@ static const struct mtk_soc_data mt2701_ @@ -5305,11 +5305,15 @@ static const struct mtk_soc_data mt2701_
.required_clks = MT7623_CLKS_BITMAP, .required_clks = MT7623_CLKS_BITMAP,
.required_pctl = true, .required_pctl = true,
.version = 1, .version = 1,
@ -368,7 +368,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
.dma_max_len = MTK_TX_DMA_BUF_LEN, .dma_max_len = MTK_TX_DMA_BUF_LEN,
.dma_len_offset = 16, .dma_len_offset = 16,
}, },
@@ -5290,11 +5294,15 @@ static const struct mtk_soc_data mt7621_ @@ -5325,11 +5329,15 @@ static const struct mtk_soc_data mt7621_
.offload_version = 1, .offload_version = 1,
.hash_offset = 2, .hash_offset = 2,
.foe_entry_size = MTK_FOE_ENTRY_V1_SIZE, .foe_entry_size = MTK_FOE_ENTRY_V1_SIZE,
@ -389,7 +389,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
.dma_max_len = MTK_TX_DMA_BUF_LEN, .dma_max_len = MTK_TX_DMA_BUF_LEN,
.dma_len_offset = 16, .dma_len_offset = 16,
}, },
@@ -5312,11 +5320,15 @@ static const struct mtk_soc_data mt7622_ @@ -5347,11 +5355,15 @@ static const struct mtk_soc_data mt7622_
.hash_offset = 2, .hash_offset = 2,
.has_accounting = true, .has_accounting = true,
.foe_entry_size = MTK_FOE_ENTRY_V1_SIZE, .foe_entry_size = MTK_FOE_ENTRY_V1_SIZE,
@ -410,7 +410,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
.dma_max_len = MTK_TX_DMA_BUF_LEN, .dma_max_len = MTK_TX_DMA_BUF_LEN,
.dma_len_offset = 16, .dma_len_offset = 16,
}, },
@@ -5333,11 +5345,15 @@ static const struct mtk_soc_data mt7623_ @@ -5368,11 +5380,15 @@ static const struct mtk_soc_data mt7623_
.hash_offset = 2, .hash_offset = 2,
.foe_entry_size = MTK_FOE_ENTRY_V1_SIZE, .foe_entry_size = MTK_FOE_ENTRY_V1_SIZE,
.disable_pll_modes = true, .disable_pll_modes = true,
@ -431,7 +431,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
.dma_max_len = MTK_TX_DMA_BUF_LEN, .dma_max_len = MTK_TX_DMA_BUF_LEN,
.dma_len_offset = 16, .dma_len_offset = 16,
}, },
@@ -5352,11 +5368,15 @@ static const struct mtk_soc_data mt7629_ @@ -5387,11 +5403,15 @@ static const struct mtk_soc_data mt7629_
.required_pctl = false, .required_pctl = false,
.has_accounting = true, .has_accounting = true,
.version = 1, .version = 1,
@ -452,7 +452,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
.dma_max_len = MTK_TX_DMA_BUF_LEN, .dma_max_len = MTK_TX_DMA_BUF_LEN,
.dma_len_offset = 16, .dma_len_offset = 16,
}, },
@@ -5374,11 +5394,15 @@ static const struct mtk_soc_data mt7981_ @@ -5409,11 +5429,15 @@ static const struct mtk_soc_data mt7981_
.hash_offset = 4, .hash_offset = 4,
.has_accounting = true, .has_accounting = true,
.foe_entry_size = MTK_FOE_ENTRY_V2_SIZE, .foe_entry_size = MTK_FOE_ENTRY_V2_SIZE,
@ -473,7 +473,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
.dma_max_len = MTK_TX_DMA_BUF_LEN_V2, .dma_max_len = MTK_TX_DMA_BUF_LEN_V2,
.dma_len_offset = 8, .dma_len_offset = 8,
}, },
@@ -5396,11 +5420,15 @@ static const struct mtk_soc_data mt7986_ @@ -5431,11 +5455,15 @@ static const struct mtk_soc_data mt7986_
.hash_offset = 4, .hash_offset = 4,
.has_accounting = true, .has_accounting = true,
.foe_entry_size = MTK_FOE_ENTRY_V2_SIZE, .foe_entry_size = MTK_FOE_ENTRY_V2_SIZE,
@ -494,7 +494,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
.dma_max_len = MTK_TX_DMA_BUF_LEN_V2, .dma_max_len = MTK_TX_DMA_BUF_LEN_V2,
.dma_len_offset = 8, .dma_len_offset = 8,
}, },
@@ -5418,11 +5446,15 @@ static const struct mtk_soc_data mt7988_ @@ -5453,11 +5481,15 @@ static const struct mtk_soc_data mt7988_
.hash_offset = 4, .hash_offset = 4,
.has_accounting = true, .has_accounting = true,
.foe_entry_size = MTK_FOE_ENTRY_V3_SIZE, .foe_entry_size = MTK_FOE_ENTRY_V3_SIZE,
@ -515,7 +515,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
.dma_max_len = MTK_TX_DMA_BUF_LEN_V2, .dma_max_len = MTK_TX_DMA_BUF_LEN_V2,
.dma_len_offset = 8, .dma_len_offset = 8,
}, },
@@ -5435,11 +5467,15 @@ static const struct mtk_soc_data rt5350_ @@ -5470,11 +5502,15 @@ static const struct mtk_soc_data rt5350_
.required_clks = MT7628_CLKS_BITMAP, .required_clks = MT7628_CLKS_BITMAP,
.required_pctl = false, .required_pctl = false,
.version = 1, .version = 1,

View file

@ -17,7 +17,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -110,16 +110,16 @@ static const struct mtk_reg_map mt7986_r @@ -113,16 +113,16 @@ static const struct mtk_reg_map mt7986_r
.tx_irq_mask = 0x461c, .tx_irq_mask = 0x461c,
.tx_irq_status = 0x4618, .tx_irq_status = 0x4618,
.pdma = { .pdma = {
@ -44,7 +44,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
}, },
.qdma = { .qdma = {
.qtx_cfg = 0x4400, .qtx_cfg = 0x4400,
@@ -1232,7 +1232,7 @@ static bool mtk_rx_get_desc(struct mtk_e @@ -1249,7 +1249,7 @@ static bool mtk_rx_get_desc(struct mtk_e
rxd->rxd1 = READ_ONCE(dma_rxd->rxd1); rxd->rxd1 = READ_ONCE(dma_rxd->rxd1);
rxd->rxd3 = READ_ONCE(dma_rxd->rxd3); rxd->rxd3 = READ_ONCE(dma_rxd->rxd3);
rxd->rxd4 = READ_ONCE(dma_rxd->rxd4); rxd->rxd4 = READ_ONCE(dma_rxd->rxd4);
@ -53,7 +53,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
rxd->rxd5 = READ_ONCE(dma_rxd->rxd5); rxd->rxd5 = READ_ONCE(dma_rxd->rxd5);
rxd->rxd6 = READ_ONCE(dma_rxd->rxd6); rxd->rxd6 = READ_ONCE(dma_rxd->rxd6);
} }
@@ -2184,7 +2184,7 @@ static int mtk_poll_rx(struct napi_struc @@ -2201,7 +2201,7 @@ static int mtk_poll_rx(struct napi_struc
break; break;
/* find out which mac the packet come from. values start at 1 */ /* find out which mac the packet come from. values start at 1 */
@ -62,7 +62,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
u32 val = RX_DMA_GET_SPORT_V2(trxd.rxd5); u32 val = RX_DMA_GET_SPORT_V2(trxd.rxd5);
switch (val) { switch (val) {
@@ -2296,7 +2296,7 @@ static int mtk_poll_rx(struct napi_struc @@ -2313,7 +2313,7 @@ static int mtk_poll_rx(struct napi_struc
skb->dev = netdev; skb->dev = netdev;
bytes += skb->len; bytes += skb->len;
@ -71,7 +71,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
reason = FIELD_GET(MTK_RXD5_PPE_CPU_REASON, trxd.rxd5); reason = FIELD_GET(MTK_RXD5_PPE_CPU_REASON, trxd.rxd5);
hash = trxd.rxd5 & MTK_RXD5_FOE_ENTRY; hash = trxd.rxd5 & MTK_RXD5_FOE_ENTRY;
if (hash != MTK_RXD5_FOE_ENTRY) if (hash != MTK_RXD5_FOE_ENTRY)
@@ -2846,7 +2846,7 @@ static int mtk_rx_alloc(struct mtk_eth * @@ -2863,7 +2863,7 @@ static int mtk_rx_alloc(struct mtk_eth *
rxd->rxd3 = 0; rxd->rxd3 = 0;
rxd->rxd4 = 0; rxd->rxd4 = 0;
@ -80,7 +80,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
rxd->rxd5 = 0; rxd->rxd5 = 0;
rxd->rxd6 = 0; rxd->rxd6 = 0;
rxd->rxd7 = 0; rxd->rxd7 = 0;
@@ -4053,7 +4053,7 @@ static int mtk_hw_init(struct mtk_eth *e @@ -4072,7 +4072,7 @@ static int mtk_hw_init(struct mtk_eth *e
else else
mtk_hw_reset(eth); mtk_hw_reset(eth);
@ -89,7 +89,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
/* Set FE to PDMAv2 if necessary */ /* Set FE to PDMAv2 if necessary */
val = mtk_r32(eth, MTK_FE_GLO_MISC); val = mtk_r32(eth, MTK_FE_GLO_MISC);
mtk_w32(eth, val | BIT(4), MTK_FE_GLO_MISC); mtk_w32(eth, val | BIT(4), MTK_FE_GLO_MISC);
@@ -5400,11 +5400,11 @@ static const struct mtk_soc_data mt7981_ @@ -5435,11 +5435,11 @@ static const struct mtk_soc_data mt7981_
.dma_len_offset = 8, .dma_len_offset = 8,
}, },
.rx = { .rx = {
@ -105,7 +105,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
}, },
}; };
@@ -5426,11 +5426,11 @@ static const struct mtk_soc_data mt7986_ @@ -5461,11 +5461,11 @@ static const struct mtk_soc_data mt7986_
.dma_len_offset = 8, .dma_len_offset = 8,
}, },
.rx = { .rx = {

View file

@ -14,7 +14,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/drivers/net/ethernet/mediatek/mtk_wed.c --- a/drivers/net/ethernet/mediatek/mtk_wed.c
+++ b/drivers/net/ethernet/mediatek/mtk_wed.c +++ b/drivers/net/ethernet/mediatek/mtk_wed.c
@@ -1071,13 +1071,13 @@ mtk_wed_dma_disable(struct mtk_wed_devic @@ -1072,13 +1072,13 @@ mtk_wed_dma_disable(struct mtk_wed_devic
static void static void
mtk_wed_stop(struct mtk_wed_device *dev) mtk_wed_stop(struct mtk_wed_device *dev)
{ {
@ -29,7 +29,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (!mtk_wed_get_rx_capa(dev)) if (!mtk_wed_get_rx_capa(dev))
return; return;
@@ -1090,7 +1090,6 @@ static void @@ -1091,7 +1091,6 @@ static void
mtk_wed_deinit(struct mtk_wed_device *dev) mtk_wed_deinit(struct mtk_wed_device *dev)
{ {
mtk_wed_stop(dev); mtk_wed_stop(dev);
@ -37,7 +37,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
wed_clr(dev, MTK_WED_CTRL, wed_clr(dev, MTK_WED_CTRL,
MTK_WED_CTRL_WDMA_INT_AGENT_EN | MTK_WED_CTRL_WDMA_INT_AGENT_EN |
@@ -2621,9 +2620,6 @@ mtk_wed_irq_get(struct mtk_wed_device *d @@ -2622,9 +2621,6 @@ mtk_wed_irq_get(struct mtk_wed_device *d
static void static void
mtk_wed_irq_set_mask(struct mtk_wed_device *dev, u32 mask) mtk_wed_irq_set_mask(struct mtk_wed_device *dev, u32 mask)
{ {