From: Sungbo Eo Date: Wed, 1 Jan 2020 12:34:10 +0000 (+0900) Subject: ramips: mt76x8: fix bogus mediatek,portmap X-Git-Tag: v19.07.1~23 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=1d56a7b75db0558c9aafaac9c94bfd8b1a1b7ed7;p=oweals%2Fopenwrt.git ramips: mt76x8: fix bogus mediatek,portmap mt76x8 uses esw_rt3050 driver, which does not accept mediatek,portmap with string values. Convert the strings to integers to make it work. According to its switch setup, WRTnode 2P/2R have a WAN port at port 0, so the correct value should be 0x3e. tplink_8m.dtsi uses "llllw", but it does not match switch setups of any device using the DTSI. Remove it from the DTSI and add correct value to DTS for each device. These devices have a WAN port at port 0. Set the value to 0x3e. - tplink,archer-c20-v4 - tplink,archer-c50-v3 - tplink,tl-mr3420-v5 - tplink,tl-wr840n-v4 - tplink,tl-wr841n-v13 - tplink,tl-wr842n-v5 These devices have only one ethernet port. They don't need portmap setting. - tplink,tl-wa801nd-v5 - tplink,tl-wr802n-v4 - tplink,tl-wr902ac-v3 Signed-off-by: Sungbo Eo (backported from commit 7a387bf9a0d73f7c581e2c9aeae6476588100e2c) [removed TL-WR841N v14 which is not present in 19.07] Signed-off-by: Adrian Schmutzler --- diff --git a/target/linux/ramips/dts/ArcherC20v4.dts b/target/linux/ramips/dts/ArcherC20v4.dts index 1103573641..b2a1591df9 100644 --- a/target/linux/ramips/dts/ArcherC20v4.dts +++ b/target/linux/ramips/dts/ArcherC20v4.dts @@ -79,8 +79,8 @@ mtd-mac-address-increment = <(-2)>; }; -ðernet { - mediatek,portmap = "wllll"; +&esw { + mediatek,portmap = <0x3e>; }; &pinctrl { diff --git a/target/linux/ramips/dts/ArcherC50V3.dts b/target/linux/ramips/dts/ArcherC50V3.dts index cc4e72819f..0aa03b814b 100644 --- a/target/linux/ramips/dts/ArcherC50V3.dts +++ b/target/linux/ramips/dts/ArcherC50V3.dts @@ -83,6 +83,10 @@ }; }; +&esw { + mediatek,portmap = <0x3e>; +}; + &pcie { status = "okay"; }; diff --git a/target/linux/ramips/dts/MAC1200RV2.dts b/target/linux/ramips/dts/MAC1200RV2.dts index 7d13621135..190dcf1b0d 100644 --- a/target/linux/ramips/dts/MAC1200RV2.dts +++ b/target/linux/ramips/dts/MAC1200RV2.dts @@ -86,7 +86,10 @@ ðernet { pinctrl-names = "default"; mtd-mac-address = <&factory 0xd>; - mediatek,portmap = "llllw"; +}; + +&esw { + mediatek,portmap = <0x2f>; }; &wmac { diff --git a/target/linux/ramips/dts/TL-MR3420V5.dts b/target/linux/ramips/dts/TL-MR3420V5.dts index a528152d38..dc3f980ae6 100644 --- a/target/linux/ramips/dts/TL-MR3420V5.dts +++ b/target/linux/ramips/dts/TL-MR3420V5.dts @@ -91,3 +91,7 @@ }; }; }; + +&esw { + mediatek,portmap = <0x3e>; +}; diff --git a/target/linux/ramips/dts/TL-WR802NV4.dts b/target/linux/ramips/dts/TL-WR802NV4.dts index 668da700c3..c1324212e8 100644 --- a/target/linux/ramips/dts/TL-WR802NV4.dts +++ b/target/linux/ramips/dts/TL-WR802NV4.dts @@ -49,5 +49,4 @@ ðernet { mtd-mac-address = <&factory 0xf100>; - mediatek,portmap = "l"; }; diff --git a/target/linux/ramips/dts/TL-WR840NV4.dts b/target/linux/ramips/dts/TL-WR840NV4.dts index 5f5bb4fa47..431bba7485 100644 --- a/target/linux/ramips/dts/TL-WR840NV4.dts +++ b/target/linux/ramips/dts/TL-WR840NV4.dts @@ -65,3 +65,7 @@ }; }; }; + +&esw { + mediatek,portmap = <0x3e>; +}; diff --git a/target/linux/ramips/dts/TL-WR840NV5.dts b/target/linux/ramips/dts/TL-WR840NV5.dts index 773839098b..849d264723 100644 --- a/target/linux/ramips/dts/TL-WR840NV5.dts +++ b/target/linux/ramips/dts/TL-WR840NV5.dts @@ -101,7 +101,10 @@ ðernet { mtd-mac-address = <&factory 0xf100>; - mediatek,portmap = "wllll"; +}; + +&esw { + mediatek,portmap = <0x3e>; }; &pinctrl { diff --git a/target/linux/ramips/dts/TL-WR841NV13.dts b/target/linux/ramips/dts/TL-WR841NV13.dts index 3dea063286..ded09407a9 100644 --- a/target/linux/ramips/dts/TL-WR841NV13.dts +++ b/target/linux/ramips/dts/TL-WR841NV13.dts @@ -91,3 +91,7 @@ }; }; }; + +&esw { + mediatek,portmap = <0x3e>; +}; diff --git a/target/linux/ramips/dts/TL-WR842NV5.dts b/target/linux/ramips/dts/TL-WR842NV5.dts index 0610b20250..b1352a2ee6 100644 --- a/target/linux/ramips/dts/TL-WR842NV5.dts +++ b/target/linux/ramips/dts/TL-WR842NV5.dts @@ -91,3 +91,7 @@ }; }; }; + +&esw { + mediatek,portmap = <0x3e>; +}; diff --git a/target/linux/ramips/dts/TPLINK-8M-SPLIT-UBOOT.dtsi b/target/linux/ramips/dts/TPLINK-8M-SPLIT-UBOOT.dtsi index 1014e48782..ff98da79fa 100644 --- a/target/linux/ramips/dts/TPLINK-8M-SPLIT-UBOOT.dtsi +++ b/target/linux/ramips/dts/TPLINK-8M-SPLIT-UBOOT.dtsi @@ -85,5 +85,8 @@ ðernet { mtd-mac-address = <&rom 0xf100>; - mediatek,portmap = "wllll"; +}; + +&esw { + mediatek,portmap = <0x3e>; }; diff --git a/target/linux/ramips/dts/TPLINK-8M.dtsi b/target/linux/ramips/dts/TPLINK-8M.dtsi index 9f7f7ccd6c..8ae75ab506 100644 --- a/target/linux/ramips/dts/TPLINK-8M.dtsi +++ b/target/linux/ramips/dts/TPLINK-8M.dtsi @@ -67,5 +67,4 @@ ðernet { mtd-mac-address = <&factory 0xf100>; - mediatek,portmap = "llllw"; }; diff --git a/target/linux/ramips/dts/WL-WN570HA1.dts b/target/linux/ramips/dts/WL-WN570HA1.dts index a07490b853..3336a38341 100644 --- a/target/linux/ramips/dts/WL-WN570HA1.dts +++ b/target/linux/ramips/dts/WL-WN570HA1.dts @@ -131,5 +131,8 @@ ðernet { mtd-mac-address = <&factory 0x2e>; - mediatek,portmap = "llllw"; +}; + +&esw { + mediatek,portmap = <0x2f>; }; diff --git a/target/linux/ramips/dts/WL-WN575A3.dts b/target/linux/ramips/dts/WL-WN575A3.dts index 76923d5cf6..8cadd7e427 100644 --- a/target/linux/ramips/dts/WL-WN575A3.dts +++ b/target/linux/ramips/dts/WL-WN575A3.dts @@ -126,5 +126,8 @@ ðernet { mtd-mac-address = <&factory 0x28>; - mediatek,portmap = "llllw"; +}; + +&esw { + mediatek,portmap = <0x2f>; }; diff --git a/target/linux/ramips/dts/WR1000.dts b/target/linux/ramips/dts/WR1000.dts index a582172aca..c06f9b8f72 100644 --- a/target/linux/ramips/dts/WR1000.dts +++ b/target/linux/ramips/dts/WR1000.dts @@ -139,5 +139,8 @@ ðernet { mtd-mac-address = <&factory 0x2e>; - mediatek,portmap = "llllw"; +}; + +&esw { + mediatek,portmap = <0x2f>; }; diff --git a/target/linux/ramips/dts/WRTNODE2.dtsi b/target/linux/ramips/dts/WRTNODE2.dtsi index 9bac822872..471533b48d 100644 --- a/target/linux/ramips/dts/WRTNODE2.dtsi +++ b/target/linux/ramips/dts/WRTNODE2.dtsi @@ -80,7 +80,10 @@ ðernet { mtd-mac-address = <&factory 0x4>; - mediatek,portmap = "llllw"; +}; + +&esw { + mediatek,portmap = <0x3e>; }; &sdhci { diff --git a/target/linux/ramips/dts/ZBT-WE1226.dts b/target/linux/ramips/dts/ZBT-WE1226.dts index e5873def0a..52de96b554 100644 --- a/target/linux/ramips/dts/ZBT-WE1226.dts +++ b/target/linux/ramips/dts/ZBT-WE1226.dts @@ -115,5 +115,8 @@ ðernet { mtd-mac-address = <&factory 0x2e>; - mediatek,portmap = "llllw"; +}; + +&esw { + mediatek,portmap = <0x2f>; }; diff --git a/target/linux/ramips/dts/ki_rb.dts b/target/linux/ramips/dts/ki_rb.dts index 56912a786e..7a647f96c9 100644 --- a/target/linux/ramips/dts/ki_rb.dts +++ b/target/linux/ramips/dts/ki_rb.dts @@ -185,7 +185,10 @@ ðernet { mtd-mac-address = <&factory 0x4>; - mediatek,portmap = "wllll"; +}; + +&esw { + mediatek,portmap = <0x3e>; }; &wmac {