mediatek: 6.6: refresh patches
authorDaniel Golle <daniel@makrotopia.org>
Fri, 1 Mar 2024 02:22:25 +0000 (02:22 +0000)
committerDaniel Golle <daniel@makrotopia.org>
Mon, 11 Mar 2024 21:22:12 +0000 (21:22 +0000)
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>
55 files changed:
target/linux/mediatek/patches-6.6/041-block-fit-partition-parser.patch
target/linux/mediatek/patches-6.6/100-dts-update-mt7622-rfb1.patch
target/linux/mediatek/patches-6.6/101-dts-update-mt7629-rfb.patch
target/linux/mediatek/patches-6.6/105-dts-mt7622-enable-pstore.patch
target/linux/mediatek/patches-6.6/110-dts-fix-bpi2-console.patch
target/linux/mediatek/patches-6.6/112-dts-fix-bpi64-lan-names.patch
target/linux/mediatek/patches-6.6/114-dts-bpi64-disable-rtc.patch
target/linux/mediatek/patches-6.6/130-dts-mt7629-add-snand-support.patch
target/linux/mediatek/patches-6.6/131-dts-mt7622-add-snand-support.patch
target/linux/mediatek/patches-6.6/140-dts-fix-wmac-support-for-mt7622-rfb1.patch
target/linux/mediatek/patches-6.6/150-dts-mt7623-eip97-inside-secure-support.patch
target/linux/mediatek/patches-6.6/160-dts-mt7623-bpi-r2-earlycon.patch
target/linux/mediatek/patches-6.6/161-dts-mt7623-bpi-r2-mmc-device-order.patch
target/linux/mediatek/patches-6.6/162-dts-mt7623-bpi-r2-led-aliases.patch
target/linux/mediatek/patches-6.6/163-dts-mt7623-bpi-r2-ethernet-alias.patch
target/linux/mediatek/patches-6.6/164-dts-mt7623-bpi-r2-rootdisk-for-fitblk.patch
target/linux/mediatek/patches-6.6/190-arm64-dts-mediatek-mt7622-fix-GICv2-range.patch
target/linux/mediatek/patches-6.6/193-dts-mt7623-thermal_zone_fix.patch
target/linux/mediatek/patches-6.6/200-phy-phy-mtk-tphy-Add-hifsys-support.patch
target/linux/mediatek/patches-6.6/232-clk-mediatek-mt7981-topckgen-flag-SGM_REG_SEL-as-cri.patch
target/linux/mediatek/patches-6.6/240-pinctrl-mediatek-add-support-for-MT7988-SoC.patch
target/linux/mediatek/patches-6.6/248-v6.8-clk-mediatek-add-pcw_chg_bit-control-for-PLLs-of-MT7.patch
target/linux/mediatek/patches-6.6/249-v6.8-clk-mediatek-add-drivers-for-MT7988-SoC.patch
target/linux/mediatek/patches-6.6/251-v6.8-watchdog-mediatek-mt7988-add-wdt-support.patch
target/linux/mediatek/patches-6.6/330-snand-mtk-bmt-support.patch
target/linux/mediatek/patches-6.6/331-mt7622-rfb1-enable-bmt.patch
target/linux/mediatek/patches-6.6/340-mtd-spinand-Add-support-for-the-Fidelix-FM35X1GA.patch
target/linux/mediatek/patches-6.6/350-21-cpufreq-mediatek-Add-support-for-MT7988.patch
target/linux/mediatek/patches-6.6/400-crypto-add-eip97-inside-secure-support.patch
target/linux/mediatek/patches-6.6/401-crypto-fix-eip97-cache-incoherent.patch
target/linux/mediatek/patches-6.6/410-bt-mtk-serial-fix.patch
target/linux/mediatek/patches-6.6/431-drivers-spi-mt65xx-Move-chip_config-to-driver-s-priv.patch
target/linux/mediatek/patches-6.6/432-drivers-spi-Add-support-for-dynamic-calibration.patch
target/linux/mediatek/patches-6.6/433-drivers-spi-mem-Add-spi-calibration-hook.patch
target/linux/mediatek/patches-6.6/435-drivers-mtd-spinand-Add-calibration-support-for-spin.patch
target/linux/mediatek/patches-6.6/436-drivers-mtd-spi-nor-Add-calibration-support-for-spi-.patch
target/linux/mediatek/patches-6.6/500-gsw-rtl8367s-mt7622-support.patch
target/linux/mediatek/patches-6.6/732-net-phy-mxl-gpy-don-t-use-SGMII-AN-if-using-phylink.patch
target/linux/mediatek/patches-6.6/733-net-phy-add-driver-for-MediaTek-2.5G-PHY.patch
target/linux/mediatek/patches-6.6/831-thermal-drivers-mediatek-Fix-control-buffer-enablement-on-MT7896.patch
target/linux/mediatek/patches-6.6/855-i2c-mt65xx-allow-optional-pmic-clock.patch
target/linux/mediatek/patches-6.6/864-arm64-dts-mt7986-add-sound-overlay-for-bpi-r3.patch
target/linux/mediatek/patches-6.6/900-dts-mt7622-bpi-r64-aliases-for-dtoverlay.patch
target/linux/mediatek/patches-6.6/901-arm-add-cmdline-override.patch
target/linux/mediatek/patches-6.6/910-dts-mt7622-bpi-r64-wifi-eeprom.patch
target/linux/mediatek/patches-6.6/911-dts-mt7622-bpi-r64-add-rootdisk.patch
target/linux/mediatek/patches-6.6/930-spi-mt65xx-enable-sel-clk.patch
target/linux/mediatek/patches-6.6/941-arm64-dts-mt7986-move-cpuboot-in-a-dedicated-node.patch
target/linux/mediatek/patches-6.6/944-net-ethernet-mtk_wed-move-dlm-a-dedicated-dts-node.patch
target/linux/mediatek/patches-6.6/945-arm64-dts-mt7986-move-ilm-in-a-dedicated-node.patch
target/linux/mediatek/patches-6.6/946-arm64-dts-mt7986-move-dlm-in-a-dedicated-node.patch
target/linux/mediatek/patches-6.6/950-smartrg-i2c-led-driver.patch
target/linux/mediatek/patches-6.6/961-net-ethernet-mediatek-split-tx-and-rx-fields-in-mtk_.patch
target/linux/mediatek/patches-6.6/962-net-ethernet-mediatek-use-QDMA-instead-of-ADMAv2-on-.patch
target/linux/mediatek/patches-6.6/963-net-ethernet-mtk_eth_soc-fix-WED-wifi-reset.patch

index bb87c20a91e15e12c6511b136945060ff4ab2b45..feb50c157b97e830d1bb47c7e90563d0eb2291cd 100644 (file)
@@ -19,7 +19,7 @@ Subject: [PATCH] kernel: add block fit partition parser
 
 --- a/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_RAID     1
  #define ADDPART_FLAG_WHOLEDISK        2
@@ -82,7 +82,7 @@ Subject: [PATCH] kernel: add block fit partition parser
  
  #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
        efi_partition,          /* this must come before msdos */
  #endif
@@ -92,7 +92,7 @@ Subject: [PATCH] kernel: add block fit partition parser
  #ifdef CONFIG_SGI_PARTITION
        sgi_partition,
  #endif
-@@ -439,6 +445,11 @@ static struct block_device *add_partitio
+@@ -433,6 +439,11 @@ static struct block_device *add_partitio
                        goto out_del;
        }
  
@@ -104,7 +104,7 @@ Subject: [PATCH] kernel: add block fit partition parser
        /* everything is up and running, commence */
        err = xa_insert(&disk->part_tbl, partno, bdev, GFP_KERNEL);
        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))
                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);
 --- a/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;
                goto out_cleanup_disk;
        }
index d5bd9a316b18ff2511a09738a942ba3f4e71896b..ed07eb367dcb6a2252bf21c58369fecd044545b6 100644 (file)
@@ -68,7 +68,7 @@
                                };
  
                                port@4 {
-@@ -240,7 +239,22 @@
+@@ -239,7 +238,22 @@
        status = "okay";
  };
  
@@ -91,7 +91,7 @@
        /* eMMC is shared pin with parallel NAND */
        emmc_pins_default: emmc-pins-default {
                mux {
-@@ -517,11 +531,11 @@
+@@ -516,11 +530,11 @@
  };
  
  &sata {
index b1770371b00f63e57c523e391b792215cceb2be3..166d97ab01ae5a812f5c63f04fd6c84b9f45d91f 100644 (file)
@@ -1,5 +1,5 @@
---- a/arch/arm/boot/dts/mt7629-rfb.dts
-+++ b/arch/arm/boot/dts/mt7629-rfb.dts
+--- a/arch/arm/boot/dts/mediatek/mt7629-rfb.dts
++++ b/arch/arm/boot/dts/mediatek/mt7629-rfb.dts
 @@ -18,6 +18,7 @@
  
        chosen {
index 93da722e72419cbee272526e5f43d9873a188872..3e36a503ed2747ad51d449b7563b69af02535daf 100644 (file)
@@ -1,6 +1,6 @@
 --- a/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>;
                ranges;
  
index 8dc53d2985fac528f4754d6eb37652c5fbbd0cfc..d96d3b95810ca1a4914972990701de070ce00a3f 100644 (file)
@@ -1,5 +1,5 @@
---- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
-+++ b/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/mediatek/mt7623n-bananapi-bpi-r2.dts
 @@ -19,6 +19,7 @@
  
        chosen {
index b012a48d752e3d6856c64de2341748985da5d31c..816683e6267abef4cb5f69c5472872dec7adbfb9 100644 (file)
@@ -8,7 +8,7 @@
        };
  
        chosen {
-@@ -160,22 +161,22 @@
+@@ -164,22 +165,22 @@
  
                                port@1 {
                                        reg = <1>;
index 0d324084b1ca731f97bb84743dec47dba761cb4a..5a2c60348611e2c53b3c065af8db6eca60fcdf24 100644 (file)
@@ -1,6 +1,6 @@
 --- a/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";
  };
  
@@ -9,13 +9,5 @@
 +};
 +
  &sata {
--      status = "disable";
-+      status = "disabled";
+       status = "disabled";
  };
- &sata_phy {
--      status = "disable";
-+      status = "disabled";
- };
- &spi0 {
index 82654e683c360524d7a95736131568301487ee5b..c7cd525a5c0e9d892aec278149a16f29c46e7d3c 100644 (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>
 ---
- arch/arm/boot/dts/mt7629-rfb.dts | 45 ++++++++++++++++++++++++++++++++
- arch/arm/boot/dts/mt7629.dtsi    | 22 ++++++++++++++++
+ arch/arm/boot/dts/mediatek/mt7629-rfb.dts | 45 ++++++++++++++++++++++++++++++++
+ arch/arm/boot/dts/mediatek/mt7629.dtsi    | 22 ++++++++++++++++
  3 files changed, 79 insertions(+)
 
---- a/arch/arm/boot/dts/mt7629.dtsi
-+++ b/arch/arm/boot/dts/mt7629.dtsi
-@@ -272,6 +272,27 @@
+--- a/arch/arm/boot/dts/mediatek/mt7629.dtsi
++++ b/arch/arm/boot/dts/mediatek/mt7629.dtsi
+@@ -271,6 +271,27 @@
                        status = "disabled";
                };
  
@@ -39,8 +39,8 @@ Signed-off-by: Xiangsheng Hou <xiangsheng.hou@mediatek.com>
                spi: spi@1100a000 {
                        compatible = "mediatek,mt7629-spi",
                                     "mediatek,mt7622-spi";
---- a/arch/arm/boot/dts/mt7629-rfb.dts
-+++ b/arch/arm/boot/dts/mt7629-rfb.dts
+--- a/arch/arm/boot/dts/mediatek/mt7629-rfb.dts
++++ b/arch/arm/boot/dts/mediatek/mt7629-rfb.dts
 @@ -255,6 +255,50 @@
        };
  };
index d6e0ab1d41ca900c1d0ee299674429614b95782e..a8040873675a564c649d502ead2deaded1916833 100644 (file)
@@ -1,6 +1,6 @@
 --- a/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";
  };
  
index 117d5abde66c1cb3884ab2204d718416a97f3a02..6d1e2f1ed22169111cd1a181608944000981ec27 100644 (file)
@@ -1,6 +1,6 @@
 --- a/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>;
                        };
  
@@ -9,7 +9,7 @@
                                label = "Factory";
                                reg = <0x1c0000 0x0100000>;
                        };
-@@ -636,5 +636,6 @@
+@@ -635,5 +635,6 @@
  &wmac {
        pinctrl-names = "default";
        pinctrl-0 = <&wmac_pins>;
index 0860a22c37fae2fe3faaa0b55da4284b70a3d4fa..d54e3ed1fde8d9a408b073f3b4b8a05678122e8c 100644 (file)
@@ -1,6 +1,6 @@
---- a/arch/arm/boot/dts/mt7623.dtsi
-+++ b/arch/arm/boot/dts/mt7623.dtsi
-@@ -984,17 +984,15 @@
+--- a/arch/arm/boot/dts/mediatek/mt7623.dtsi
++++ b/arch/arm/boot/dts/mediatek/mt7623.dtsi
+@@ -995,17 +995,15 @@
        };
  
        crypto: crypto@1b240000 {
index 091cffc3c07c1f4d5ea67e4c3d3b5cf4b110521e..5e02fb56ac88d8ba64560148b0560fd28dab479b 100644 (file)
@@ -1,5 +1,5 @@
---- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
-+++ b/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/mediatek/mt7623n-bananapi-bpi-r2.dts
 @@ -19,7 +19,7 @@
  
        chosen {
index d1bafc1526090356217143453ee7776918e8c8cd..4b4821996673f18625ca995dc6bde6ace1d79127 100644 (file)
@@ -1,5 +1,5 @@
---- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
-+++ b/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/mediatek/mt7623n-bananapi-bpi-r2.dts
 @@ -15,6 +15,8 @@
  
        aliases {
index f6745add5b380d3d39cc280932bfe447bea0d869..2d02a760f032efc474e55ec30b1e9f3d34e93a52 100644 (file)
@@ -1,5 +1,5 @@
---- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
-+++ b/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/mediatek/mt7623n-bananapi-bpi-r2.dts
 @@ -17,6 +17,10 @@
                serial2 = &uart2;
                mmc0 = &mmc0;
index b1dd75a41400a62debe1fe65c9d28b6afca2df1e..b7e4a8c5cc5bb589042b7a2453b4927c19ce43a9 100644 (file)
@@ -1,5 +1,5 @@
---- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
-+++ b/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/mediatek/mt7623n-bananapi-bpi-r2.dts
 @@ -15,6 +15,7 @@
  
        aliases {
index 2675aa2589abd06764c58346099c6354ab90cdb1..f1a182b04441f0a0af1c913a8de24567704ce06f 100644 (file)
@@ -1,5 +1,5 @@
---- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts
-+++ b/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/mediatek/mt7623n-bananapi-bpi-r2.dts
 @@ -26,7 +26,9 @@
  
        chosen {
@@ -11,7 +11,7 @@
        };
  
        connector {
-@@ -315,6 +317,20 @@
+@@ -338,6 +340,20 @@
        vmmc-supply = <&reg_3p3v>;
        vqmmc-supply = <&reg_1p8v>;
        non-removable;
@@ -32,7 +32,7 @@
  };
  
  &mmc1 {
-@@ -328,6 +344,20 @@
+@@ -351,6 +367,20 @@
        cd-gpios = <&pio 261 GPIO_ACTIVE_LOW>;
        vmmc-supply = <&reg_3p3v>;
        vqmmc-supply = <&reg_3p3v>;
@@ -52,4 +52,4 @@
 +      };
  };
  
- &mt6323_leds {
+ &mt6323keys {
index 1e04d23a0e9804d11d0b280d100c03ad547ba73e..bd0c785fdee5b332b755c93d7c7f6975a10dacc6 100644 (file)
@@ -95,7 +95,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
 
 --- a/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-parent = <&gic>;
                reg = <0 0x10310000 0 0x1000>,
index 1cfb53d6208918dc7f833168b9fbee2954396bf7..da9ba5f305e3fd17fa0c9bcdc0c7fd27248bebfc 100644 (file)
@@ -25,11 +25,11 @@ zone, and gives some operational headroom.
 
 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(-)
 
---- a/arch/arm/boot/dts/mt7623.dtsi
-+++ b/arch/arm/boot/dts/mt7623.dtsi
+--- a/arch/arm/boot/dts/mediatek/mt7623.dtsi
++++ b/arch/arm/boot/dts/mediatek/mt7623.dtsi
 @@ -160,13 +160,13 @@
  
                                trips {
index 6347533aa8f88352969d3311b850579b9199ac8c..e07aa5662bc472ed9e6715d5bebc62153e26cd7f 100644 (file)
@@ -9,7 +9,7 @@ Subject: [PATCH] phy: phy-mtk-tphy: Add hifsys-support
 
 --- a/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/platform_device.h>
  #include <linux/regmap.h>
@@ -18,9 +18,9 @@ Subject: [PATCH] phy: phy-mtk-tphy: Add hifsys-support
  
  #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_PHY2_MASK         (0x3 << 20)
@@ -28,7 +28,7 @@ Subject: [PATCH] phy: phy-mtk-tphy: Add hifsys-support
  enum mtk_phy_version {
        MTK_PHY_V1 = 1,
        MTK_PHY_V2,
-@@ -331,6 +336,7 @@ struct mtk_tphy {
+@@ -334,6 +339,7 @@ struct mtk_tphy {
        void __iomem *sif_base; /* only shared sif */
        const struct mtk_phy_pdata *pdata;
        struct mtk_phy_instance **phys;
@@ -36,7 +36,7 @@ Subject: [PATCH] phy: phy-mtk-tphy: Add hifsys-support
        int nphys;
        int src_ref_clk; /* MHZ, reference clock 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)
                return;
  
@@ -47,7 +47,7 @@ Subject: [PATCH] phy: phy-mtk-tphy: Add hifsys-support
        mtk_phy_update_bits(phya + U3P_U3_PHYA_DA_REG0,
                            P3A_RG_XTAL_EXT_PE1H | P3A_RG_XTAL_EXT_PE2H,
                            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);
        }
  
index 8820d57f01fe35ea135a37af9d7a8205f213f55b..dd06c4e096ab0000cdc9893d8f4af4d440de0b43 100644 (file)
@@ -16,7 +16,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
 
 --- a/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",
                             sgm_325m_parents, 0x050, 0x054, 0x058, 8, 1, 15,
                             0x1C0, 21),
index a365f0860bbc335c7fb9f22e7ce4e67ff66d4525..c63510b5e2b0a4d025c6aefee48fe784c6867f40 100644 (file)
@@ -1,6 +1,6 @@
 --- a/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
        select PINCTRL_MTK_MOORE
  
 +      select PINCTRL_MTK_MOORE
 +
  config PINCTRL_MT8167
-       bool "Mediatek MT8167 pin control"
+       bool "MediaTek MT8167 pin control"
        depends on OF
 --- a/drivers/pinctrl/mediatek/Makefile
 +++ b/drivers/pinctrl/mediatek/Makefile
-@@ -20,6 +20,7 @@ obj-$(CONFIG_PINCTRL_MT7623) += pinctrl-
- obj-$(CONFIG_PINCTRL_MT7629)  += pinctrl-mt7629.o
- obj-$(CONFIG_PINCTRL_MT7981)  += pinctrl-mt7981.o
- obj-$(CONFIG_PINCTRL_MT7986)  += pinctrl-mt7986.o
-+obj-$(CONFIG_PINCTRL_MT7988)  += pinctrl-mt7988.o
- obj-$(CONFIG_PINCTRL_MT8167)  += pinctrl-mt8167.o
- obj-$(CONFIG_PINCTRL_MT8173)  += pinctrl-mt8173.o
- obj-$(CONFIG_PINCTRL_MT8183)  += pinctrl-mt8183.o
+@@ -27,6 +27,7 @@ obj-$(CONFIG_PINCTRL_MT7623)         += pinctrl
+ obj-$(CONFIG_PINCTRL_MT7629)          += pinctrl-mt7629.o
+ obj-$(CONFIG_PINCTRL_MT7981)          += pinctrl-mt7981.o
+ obj-$(CONFIG_PINCTRL_MT7986)          += pinctrl-mt7986.o
++obj-$(CONFIG_PINCTRL_MT7988)          += pinctrl-mt7988.o
+ obj-$(CONFIG_PINCTRL_MT8167)          += pinctrl-mt8167.o
+ obj-$(CONFIG_PINCTRL_MT8173)          += pinctrl-mt8173.o
+ obj-$(CONFIG_PINCTRL_MT8183)          += pinctrl-mt8183.o
index ca37fc793a791a8113d908ff9a199ca8834598d9..40e87bddfb31696789942c24323b87efac41762f 100644 (file)
@@ -28,7 +28,7 @@ Signed-off-by: Stephen Boyd <sboyd@kernel.org>
  
  #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);
        val |= pcw << pll->data->pcw_shift;
        writel(val, pll->pcw_addr);
@@ -40,11 +40,11 @@ Signed-off-by: Stephen Boyd <sboyd@kernel.org>
                writel(val + 1, pll->tuner_addr);
 --- a/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;
        u32 en_reg;
        u8 pll_en_bit; /* Assume 0, indicates BIT(0) by default */
 +      u8 pcw_chg_bit;
  };
  
- int mtk_clk_register_plls(struct device_node *node,
+ /*
index 61664b934cbb633d4b18f432ae0bf8b73e95ff9f..dab08a5a39701ea5387b412855dc4dab8c86a88e 100644 (file)
@@ -33,7 +33,7 @@ Signed-off-by: Stephen Boyd <sboyd@kernel.org>
 
 --- a/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
          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.
 +
  config COMMON_CLK_MT8135
-       bool "Clock driver for MediaTek MT8135"
+       tristate "Clock driver for MediaTek MT8135"
        depends on (ARCH_MEDIATEK && ARM) || COMPILE_TEST
 --- a/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-infracfg.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-eth.o
 +obj-$(CONFIG_COMMON_CLK_MT7988) += clk-mt7988-xfipll.o
- obj-$(CONFIG_COMMON_CLK_MT8135) += clk-mt8135.o
- obj-$(CONFIG_COMMON_CLK_MT8167) += clk-mt8167.o
+ obj-$(CONFIG_COMMON_CLK_MT8135) += clk-mt8135-apmixedsys.o clk-mt8135.o
+ obj-$(CONFIG_COMMON_CLK_MT8167) += clk-mt8167-apmixedsys.o clk-mt8167.o
  obj-$(CONFIG_COMMON_CLK_MT8167_AUDSYS) += clk-mt8167-aud.o
 --- /dev/null
 +++ b/drivers/clk/mediatek/clk-mt7988-apmixed.c
index cb49ce1d253139763f889cbd2429460b94fec0ae..b89b385eeb466f3470041fe4312570faefb258e0 100644 (file)
@@ -18,7 +18,7 @@ Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
 
 --- a/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_SWSYS_RST_KEY     0x88000000
  
@@ -32,10 +32,10 @@ Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
  static bool nowayout = WATCHDOG_NOWAYOUT;
  static unsigned int timeout;
  
-@@ -68,10 +72,12 @@ struct mtk_wdt_dev {
-       spinlock_t lock; /* protects WDT_SWSYSRST reg */
+@@ -71,10 +75,12 @@ struct mtk_wdt_dev {
        struct reset_controller_dev rcdev;
        bool disable_wdt_extrst;
+       bool reset_by_toprgu;
 +      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 = {
-@@ -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,
  };
  
@@ -57,7 +57,7 @@ Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
  static const struct mtk_wdt_data mt8183_data = {
        .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,
  };
  
@@ -86,7 +86,7 @@ Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
  static int toprgu_reset_update(struct reset_controller_dev *rcdev,
                               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);
  
@@ -96,7 +96,7 @@ Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
        tmp = readl(data->wdt_base + WDT_SWSYSRST);
        if (assert)
                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;
        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);
  
        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);
                if (err)
                        return err;
@@ -115,11 +115,11 @@ Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
        }
  
        mtk_wdt->disable_wdt_extrst =
-@@ -427,6 +468,7 @@ static const struct of_device_id mtk_wdt
-       { .compatible = "mediatek,mt2712-wdt", .data = &mt2712_data },
+@@ -444,6 +485,7 @@ static const struct of_device_id mtk_wdt
        { .compatible = "mediatek,mt6589-wdt" },
+       { .compatible = "mediatek,mt6795-wdt", .data = &mt6795_data },
        { .compatible = "mediatek,mt7986-wdt", .data = &mt7986_data },
 +      { .compatible = "mediatek,mt7988-wdt", .data = &mt7988_data },
        { .compatible = "mediatek,mt8183-wdt", .data = &mt8183_data },
        { .compatible = "mediatek,mt8186-wdt", .data = &mt8186_data },
-       { .compatible = "mediatek,mt8192-wdt", .data = &mt8192_data },
+       { .compatible = "mediatek,mt8188-wdt", .data = &mt8188_data },
index 55a308e46cfd9c33f156499891c441447d7f9bbe..8a4ec2bcbd6c7bea667203542c27aea0977a7295 100644 (file)
@@ -8,7 +8,7 @@
  
  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)
                return ret;
  
@@ -16,7 +16,7 @@
        ret = mtd_device_register(mtd, NULL, 0);
        if (ret)
                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;
  
  err_spinand_cleanup:
@@ -24,7 +24,7 @@
        spinand_cleanup(spinand);
  
        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)
                return ret;
  
index 3e956701cd3dbc282c92dc2a36d92db45a28e951..6d6463aade1b743c6b36e39d6a997a634e26bd02 100644 (file)
@@ -1,6 +1,6 @@
 --- a/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-rx-bus-width = <4>;
                nand-ecc-engine = <&snfi>;
index ec66363dc9d32a2d15ac5c435ed9f6dc086d1152..7188c254ba7dc4301cbfa59959803443a154b5e9 100644 (file)
@@ -16,15 +16,16 @@ Signed-off-by: Davide Fioravanti <pantanastyle@gmail.com>
 
 --- a/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
--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 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 gigadevice.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
 --- a/drivers/mtd/nand/spi/core.c
 +++ b/drivers/mtd/nand/spi/core.c
-@@ -940,6 +940,7 @@ static const struct nand_ops spinand_ops
- static const struct spinand_manufacturer *spinand_manufacturers[] = {
+@@ -941,6 +941,7 @@ static const struct spinand_manufacturer
+       &alliancememory_spinand_manufacturer,
        &ato_spinand_manufacturer,
        &esmt_c8_spinand_manufacturer,
 +      &fidelix_spinand_manufacturer,
@@ -112,7 +113,7 @@ Signed-off-by: Davide Fioravanti <pantanastyle@gmail.com>
 +};
 --- a/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 esmt_c8_spinand_manufacturer;
  extern const struct spinand_manufacturer etron_spinand_manufacturer;
index 49cd62d0ae54c90a84a0ebe631c021683062f8b5..f7b62f1d94f731c08ff7200e1fed08f91844890e 100644 (file)
@@ -15,7 +15,7 @@ Signed-off-by: Sam Shih <sam.shih@mediatek.com>
 
 --- a/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,
  };
  
@@ -31,7 +31,7 @@ Signed-off-by: Sam Shih <sam.shih@mediatek.com>
  static const struct mtk_cpufreq_platform_data mt8183_platform_data = {
        .min_volt_shift = 100000,
        .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,mt7622", .data = &mt7622_platform_data },
        { .compatible = "mediatek,mt7623", .data = &mt7623_platform_data },
index 25ca9485e41bd95d5f9dd60f413248bfa6579bcc..5808a934955b607cb3098536f4f328444ec4b9b3 100644 (file)
@@ -1,6 +1,6 @@
 --- a/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);
                writel(val, EIP197_HIA_AIC(priv) + EIP197_HIA_MST_CTRL);
        }
index 186c66f6878a1c92ab02f396435d4253cfc5c11a..bd22b3699b50aebe1ad3b1fe45a9f76cc7eff495 100644 (file)
@@ -1,6 +1,6 @@
 --- a/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 */
  #define SAFEXCEL_CRA_PRIORITY         300
  
index 5b94c9216d950a4f4eee74f92f91ef6fcbd0c487..f3774879750a8127c6b5997e9411918ae44aafa2 100644 (file)
@@ -19,7 +19,7 @@
        },
        [PORT_NPCM] = {
                .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 int baud, quot, frac = 0;
  
index 8c2c80d6bfd0261054fbd65764ff20fb176e6826..a0bd46c5b761ced9c9763318b39544965aebf473 100644 (file)
@@ -94,9 +94,9 @@ Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com>
 -      if (!spi->controller_data)
 -              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 */
-               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
        mdata = spi_master_get_devdata(master);
        mdata->dev_comp = device_get_match_data(dev);
index b2c9df4386a446f510d676c3b886cb5f0c2e819f..b5505c803a9685e21ab8128c064533c9a2299e26 100644 (file)
@@ -11,7 +11,7 @@ Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com>
 
 --- a/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;
  }
  
@@ -82,7 +82,7 @@ Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com>
  static void _spi_transfer_delay_ns(u32 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)
@@ -155,10 +155,10 @@ Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com>
 +      return 0;
 +}
 +
- static int of_spi_parse_dt(struct spi_controller *ctlr, struct spi_device *spi,
-                          struct device_node *nc)
+ static void of_spi_parse_dt_cs_delay(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)
                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 */
        of_node_get(nc);
-       spi->dev.of_node = nc;
 --- a/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;
  };
  
@@ -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)
  {
        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_tx;
  
@@ -224,13 +224,13 @@ Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com>
        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; }
  #endif
  
 +extern int spi_do_calibration(struct spi_controller *ctlr,
 +      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
-  * spi_unregister_device() to start making that device vanish, but
index e87d63db69850abc08fd30953f843be4e6bea4e0..d9fe480b17e3c692f38b32786356fa9d9d799f3d 100644 (file)
@@ -28,7 +28,7 @@ Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com>
   *                    upper layer if necessary
 --- a/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,
                    const struct spi_mem_op *op);
  
index 3991d8925a4a15af598f837920e6e60f47b8759d..bd8e738a37cc6a991320077e29c769d25c97bb7c 100644 (file)
@@ -11,7 +11,7 @@ Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com>
 
 --- a/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;
  }
  
@@ -68,7 +68,7 @@ Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com>
  static int spinand_id_detect(struct spinand_device *spinand)
  {
        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)
                return -ENOMEM;
  
index 1f747d1f4fd696dedad64d485f2f9b6c95b057b8..744042ae1aa56e97233181875dc7b30bb7f9dcb5 100644 (file)
@@ -12,7 +12,7 @@ Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com>
 
 --- a/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)
                return ret;
  
@@ -26,7 +26,7 @@ Signed-off-by: SkyLake.Huang <skylake.huang@mediatek.com>
  
 --- a/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;
  }
  
@@ -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,
                                                       const char *name)
  {
-@@ -3003,6 +3015,9 @@ int spi_nor_scan(struct spi_nor *nor, co
-       if (!nor->bouncebuf)
-               return -ENOMEM;
+@@ -3506,6 +3518,9 @@ int spi_nor_scan(struct spi_nor *nor, co
+       if (ret)
+               return ret;
  
 +      if(nor->spimem)
 +              spi_mem_do_calibration(nor->spimem, spi_nor_cal_read, nor);
index 487990ab77ca52fdeb58de4de43eec6acee1bfad..73f735828f110dde2be40c70c810286cc2d98544 100644 (file)
@@ -1,6 +1,6 @@
 --- a/drivers/net/phy/Kconfig
 +++ b/drivers/net/phy/Kconfig
-@@ -384,6 +384,12 @@ config ROCKCHIP_PHY
+@@ -419,6 +419,12 @@ config ROCKCHIP_PHY
        help
          Currently supports the integrated Ethernet PHY.
  
 +
  config SMSC_PHY
        tristate "SMSC PHYs"
-       help
+       select CRC16
 --- a/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_RENESAS_PHY)     += uPD60620.o
  obj-$(CONFIG_ROCKCHIP_PHY)    += rockchip.o
index 76d8b0ef008fcace65cb742f6dd761ebf8a5726d..80179cc7dc68e58e259f7b7d1794b425e1907502 100644 (file)
@@ -14,7 +14,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
 
 --- a/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->interface = PHY_INTERFACE_MODE_2500BASEX;
@@ -28,7 +28,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
        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;
        int ret;
  
@@ -43,7 +43,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
        if (phydev->autoneg == AUTONEG_DISABLE) {
                /* Configure half duplex with genphy_setup_forced,
                 * 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) {
        case SPEED_2500:
                phydev->interface = PHY_INTERFACE_MODE_2500BASEX;
@@ -51,8 +51,8 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
 +                      break;
                ret = phy_modify_mmd(phydev, MDIO_MMD_VEND1, VSPEC1_SGMII_CTRL,
                                     VSPEC1_SGMII_CTRL_ANEN, 0);
-               if (ret < 0)
-@@ -497,7 +510,7 @@ static void gpy_update_interface(struct
+               if (ret < 0) {
+@@ -573,7 +586,7 @@ static int gpy_update_interface(struct p
        case SPEED_100:
        case SPEED_10:
                phydev->interface = PHY_INTERFACE_MODE_SGMII;
index b4c07a4b1f0ad610819972af1b917e7244f154a2..74b16be1524a828b0511a3a4c107365d800730e3 100644 (file)
@@ -13,7 +13,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
 
 --- a/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
          (common-mode voltage) during startup.
  
@@ -29,8 +29,8 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
        depends on PTP_1588_CLOCK_OPTIONAL
 --- a/drivers/net/phy/Makefile
 +++ b/drivers/net/phy/Makefile
-@@ -79,6 +79,7 @@ obj-$(CONFIG_MARVELL_10G_PHY)        += marvell
- obj-$(CONFIG_MARVELL_PHY)     += marvell.o
+@@ -82,6 +82,7 @@ obj-$(CONFIG_MARVELL_PHY)    += marvell.o
+ obj-$(CONFIG_MARVELL_88Q2XXX_PHY)     += marvell-88q2xxx.o
  obj-$(CONFIG_MARVELL_88X2222_PHY)     += marvell-88x2222.o
  obj-$(CONFIG_MAXLINEAR_GPHY)  += mxl-gpy.o
 +obj-$(CONFIG_MEDIATEK_2P5G_PHY)       += mediatek-2p5ge.o
index fc173646e053f7f0c0fb925bbcd99d88f1bdcf74..bf9fa57113d8c92e9d37dcbc6695422982571834 100644 (file)
@@ -47,7 +47,7 @@ Reviewed-by: Markus Schneider-Pargmann <msp@baylibre.com>
 
 --- a/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,
        .sensor_mux_values = mt7986_mux_values,
        .version = MTK_THERMAL_V3,
index 69cc155d8d23078aba5ec74131118c1485fcc5d5..544bd4cce0016b9b7eb0ac099b89e900bb7239b2 100644 (file)
@@ -19,7 +19,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
 
 --- a/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))
                return PTR_ERR(i2c->clocks[I2C_MT65XX_CLK_ARB].clk);
  
index bddcd4bb0c0746c34b84af3b06b0f84cdb9d8c58..784ae5b6139e1cb3949e58e242a3db1afeffb5bf 100644 (file)
@@ -65,7 +65,7 @@
 +};
 --- a/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-nor.dtbo
  dtb-$(CONFIG_ARCH_MEDIATEK) += mt7986a-bananapi-bpi-r3-sd.dtbo
index 6dede02003a4ea658c99f1d7e06f59ccd61e369d..be63dbf761647898587331ddadfd17841bc4e586 100644 (file)
@@ -1,6 +1,6 @@
 --- a/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
         * SATA functions. i.e. output-high: PCIe, output-low: SATA
         */
index bfca4b63894b500df6770dbfc56dd80cde7f25f4..8397915b26a25e124eb36c652ab40ed7234a8e6b 100644 (file)
@@ -1,6 +1,6 @@
 --- a/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
  
@@ -17,7 +17,7 @@
        default ""
 --- a/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)
                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
 --- a/arch/arm64/Kconfig
 +++ b/arch/arm64/Kconfig
-@@ -2240,6 +2240,14 @@ config CMDLINE_FORCE
+@@ -2269,6 +2269,14 @@ config CMDLINE_FORCE
  
  endchoice
  
index 09ce417c3512e0d315559722f8d3efcab456a4f5..50a7e261f057091786805f2b6751e4c98f981f83 100644 (file)
@@ -1,6 +1,6 @@
 --- a/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 {
index 5d3153ded4d8975338f6d29d4fed3ce1bb5fcd93..6b958ca1d466ffb50c709a056cee94a7fd390144 100644 (file)
@@ -37,7 +37,7 @@
  };
  
  &mmc1 {
-@@ -249,6 +272,26 @@
+@@ -248,6 +271,26 @@
        vqmmc-supply = <&reg_3p3v>;
        assigned-clocks = <&topckgen CLK_TOP_MSDC30_1_SEL>;
        assigned-clock-parents = <&topckgen CLK_TOP_UNIV48M>;
  };
  
  &nandc {
-@@ -283,14 +326,29 @@
+@@ -281,15 +324,30 @@
+                               read-only;
                        };
  
-                       partition@80000 {
+-                      partition@80000 {
 -                              label = "fip";
 -                              reg = <0x80000 0x200000>;
 -                              read-only;
 -                      };
 -
 -                      ubi: partition@280000 {
++                      ubi: partition@80000 {
                                label = "ubi";
 -                              reg = <0x280000 0x7d80000>;
 +                              reg = <0x80000 0x7f80000>;
index 6e6810b42afa02e2708150bd34f1f59a162049f8..5a387e4d6c0842dd622385784ddf4688c307f543 100644 (file)
@@ -1,6 +1,6 @@
 --- a/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)
                return dev_err_probe(dev, ret, "failed to enable hclk\n");
  
index 3ba485346c7938f5d8f315d08b392ec608f03a2a..6d75d6ed2a6b7842a943f0f390e4fb8776bd066c 100644 (file)
@@ -24,7 +24,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
        };
  
        timer {
-@@ -540,10 +534,11 @@
+@@ -544,10 +538,11 @@
                        interrupt-parent = <&gic>;
                        interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>;
                        memory-region = <&wo_emi0>, <&wo_ilm0>, <&wo_dlm0>,
@@ -38,7 +38,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
                };
  
                wed1: wed@15011000 {
-@@ -553,10 +548,11 @@
+@@ -557,10 +552,11 @@
                        interrupt-parent = <&gic>;
                        interrupts = <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>;
                        memory-region = <&wo_emi1>, <&wo_ilm1>, <&wo_dlm1>,
@@ -52,7 +52,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
                };
  
                wo_ccif0: syscon@151a5000 {
-@@ -573,6 +569,11 @@
+@@ -577,6 +573,11 @@
                        interrupts = <GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH>;
                };
  
index c92fcd43cee97be0614d73d4a8bb0b76b7025321..0701743ffb18f44d5afc8272a79e4edb6c64f36e 100644 (file)
@@ -22,7 +22,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
 
 --- a/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;
        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",
                                         "wo-dlm");
        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;
  
        dev->rro.miod_phys = rmem->base;
index 0ba9bd7cf0b8a424de34a2b287ebeb5f534d210b..65c143e2f5c9b809e26875ce6c869ac541ee8404 100644 (file)
@@ -34,7 +34,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
                wo_data: wo-data@4fd80000 {
                        reg = <0 0x4fd80000 0 0x240000>;
                        no-map;
-@@ -533,11 +523,10 @@
+@@ -537,11 +527,10 @@
                        reg = <0 0x15010000 0 0x1000>;
                        interrupt-parent = <&gic>;
                        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>;
                };
  
-@@ -547,11 +536,10 @@
+@@ -551,11 +540,10 @@
                        reg = <0 0x15011000 0 0x1000>;
                        interrupt-parent = <&gic>;
                        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>;
                };
  
-@@ -569,6 +557,16 @@
+@@ -573,6 +561,16 @@
                        interrupts = <GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH>;
                };
  
index 90b2bb91a2709d9d9c95e8d7c03c581ec1a9ba2d..c8a6bdea6a8ebbff1b97822f9e6293534fb4643a 100644 (file)
@@ -34,7 +34,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
        };
  
        timer {
-@@ -523,10 +513,11 @@
+@@ -527,10 +517,11 @@
                        reg = <0 0x15010000 0 0x1000>;
                        interrupt-parent = <&gic>;
                        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>;
                };
  
-@@ -536,10 +527,11 @@
+@@ -540,10 +531,11 @@
                        reg = <0 0x15011000 0 0x1000>;
                        interrupt-parent = <&gic>;
                        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>;
                };
  
-@@ -567,6 +559,16 @@
+@@ -571,6 +563,16 @@
                        reg = <0 0x151f0000 0 0x8000>;
                };
  
index 8b86c5042972d2039d9cd8d8e8e39eb7b11eb073..cb3b394dc6a1aa3971b1c501eff3bfd1666bbece 100644 (file)
@@ -5,7 +5,7 @@
 
 --- a/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"
  source "drivers/leds/rgb/Kconfig"
  
@@ -24,9 +24,9 @@
  
 --- a/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_S3C24XX)            += leds-s3c24xx.o
  obj-$(CONFIG_LEDS_SC27XX_BLTC)                += leds-sc27xx-bltc.o
 +obj-$(CONFIG_LEDS_SMARTRG_LED)                += leds-smartrg-system.o
  obj-$(CONFIG_LEDS_SUNFIRE)            += leds-sunfire.o
index 71cb3006ab8da08d2b35777af8b26214f1d9c1cf..d4517af4474090d317363789ef56326fdb23181e 100644 (file)
@@ -15,7 +15,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
 
 --- a/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;
        else
                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,
                                                       GFP_KERNEL);
        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)))
                return -ENOMEM;
  
@@ -44,7 +44,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
  
                txd->txd3 = TX_DMA_PLEN0(MTK_QDMA_PAGE_SIZE);
                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)
                return -ENOMEM;
  
@@ -53,7 +53,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
        memset(itx_buf, 0, sizeof(*itx_buf));
  
        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));
                        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.last = i == skb_shinfo(skb)->nr_frags - 1 &&
                                        !(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);
  
                        tx_buf = mtk_desc_to_tx_buf(ring, txd,
@@ -71,7 +71,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
                        if (new_desc)
                                memset(tx_buf, 0, sizeof(*tx_buf));
                        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 {
                int next_idx;
  
@@ -80,7 +80,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
                                         ring->dma_size);
                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:
        do {
@@ -89,7 +89,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
  
                /* unmap dma */
                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++) {
                        frag = &skb_shinfo(skb)->frags[i];
                        nfrags += DIV_ROUND_UP(skb_frag_size(frag),
@@ -98,7 +98,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
                }
        } else {
                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];
                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) {
                        ring->calc_idx_update = true;
                        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;
  
@@ -116,7 +116,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
        memset(tx_buf, 0, sizeof(*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;
  
                        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));
                        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 {
                int idx;
  
@@ -134,7 +134,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
                mtk_w32(eth, NEXT_DESP_IDX(idx, ring->dma_size),
                        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:
        while (htxd != txd) {
@@ -143,7 +143,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
                mtk_tx_unmap(eth, tx_buf, NULL, false);
  
                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;
  
                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];
  
                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;
                }
  
@@ -161,7 +161,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
                        skb->ip_summed = CHECKSUM_UNNECESSARY;
                else
                        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;
  
                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)
                        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);
  
@@ -179,7 +179,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
                ring->last_free = desc;
                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 {
                int rx_done;
  
@@ -188,7 +188,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
                        reg_map->pdma.irq_status);
                rx_done = mtk_poll_rx(napi, budget - rx_done_total, eth);
                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;
  
        } 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;
  }
-@@ -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;
        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;
        int ring_size;
        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) {
                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 = 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) ||
            rx_flag != MTK_RX_FLAGS_NORMAL) {
                ring->dma = dma_alloc_coherent(eth->dma_dev,
@@ -247,7 +247,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
        }
  
        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;
                void *data;
  
@@ -256,7 +256,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
                if (ring->page_pool) {
                        data = mtk_page_pool_get_buff(ring->page_pool,
                                                      &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])
                                continue;
  
@@ -265,7 +265,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
                        if (!rxd->rxd1)
                                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) {
                dma_free_coherent(eth->dma_dev,
@@ -274,7 +274,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
                                  ring->dma, ring->phys);
                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]);
        if (!MTK_HAS_CAPS(soc->caps, MTK_SRAM) && eth->scratch_ring) {
                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 = NULL;
                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++;
        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);
        }
  
-@@ -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;
  
        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);
        }
        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;
  
        mtk_tx_irq_disable(eth, MTK_TX_DONE_INT);
@@ -317,7 +317,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
  }
  #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->rx_napi);
                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);
        }
        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_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->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 */
        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);
  
        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_pctl = true,
        .version = 1,
@@ -368,7 +368,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
                .dma_max_len = MTK_TX_DMA_BUF_LEN,
                .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,
        .hash_offset = 2,
        .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_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,
        .has_accounting = true,
        .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_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,
        .foe_entry_size = MTK_FOE_ENTRY_V1_SIZE,
        .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_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,
        .has_accounting = true,
        .version = 1,
@@ -452,7 +452,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
                .dma_max_len = MTK_TX_DMA_BUF_LEN,
                .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,
        .has_accounting = true,
        .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_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,
        .has_accounting = true,
        .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_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,
        .has_accounting = true,
        .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_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_pctl = false,
        .version = 1,
index 8b7d5c0a1c904a955e92b0bf1c86f47e59f2ba48..6b84f70110fd6fd9e0856c1178bb3a075c162614 100644 (file)
@@ -17,7 +17,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
 
 --- a/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_status          = 0x4618,
        .pdma = {
@@ -44,7 +44,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
        },
        .qdma = {
                .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->rxd3 = READ_ONCE(dma_rxd->rxd3);
        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->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;
  
                /* 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);
  
                        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;
                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);
                        hash = trxd.rxd5 & 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->rxd4 = 0;
@@ -80,7 +80,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
                        rxd->rxd5 = 0;
                        rxd->rxd6 = 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
                mtk_hw_reset(eth);
  
@@ -89,7 +89,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
                /* Set FE to PDMAv2 if necessary */
                val = mtk_r32(eth, 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,
        },
        .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,
        },
        .rx = {
index 11b52d07ab3481bbc07d20383d43fc1e2b526dba..9974073d259512c321e377575ee771d38a7253a1 100644 (file)
@@ -14,7 +14,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/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
  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))
                return;
-@@ -1090,7 +1090,6 @@ static void
+@@ -1091,7 +1091,6 @@ static void
  mtk_wed_deinit(struct mtk_wed_device *dev)
  {
        mtk_wed_stop(dev);
@@ -37,7 +37,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
        wed_clr(dev, MTK_WED_CTRL,
                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
  mtk_wed_irq_set_mask(struct mtk_wed_device *dev, u32 mask)
  {