From 8b66f1a06d05afbc1450978f6e20516c8308da25 Mon Sep 17 00:00:00 2001 From: Daniel Golle Date: Tue, 23 Apr 2024 12:14:07 +0100 Subject: [PATCH] mediatek: correct address of MT753x switch IC For all boards currently working with the mt7530 DSA driver we can be sure that the address of the switch on the MDIO bus is 31 -- simply because that address is hard-coded in the driver and the address from the Device Tree is being ignore. An upcoming patch will add support for MT753x ICs which are programmed to addresses different from 0x1f using bootstrap pins. As a result the address from the Device Tree will then be taken into account, which will break currently working boards which got the address set to anything else than 31. While at it also unify the syntax in Device Tree to always us a decimal value for the 'reg' property. * mt7622-buffalo-wsr-3200ax4s.dts Cosmetic change 'reg = <0x1f>' -> 'reg = <31>' * mt7622-dlink-eagle-pro-ai-ax3200-a1.dtsi Wrong address: 0 -> 31 * mt7622-elecom-wrc-x3200gst3.dts Wrong address: 0 -> 31 * mt7622-linksys-e8450.dtsi Wrong address: 0 -> 31 * mt7622-ruijie-rg-ew3200.dtsi Wrong address: 0 -> 31 * mt7622-xiaomi-redmi-router-ax6s.dts Wrong address: 0 -> 31 * mt7629-iptime-a6004mx.dts Wrong address: 2 -> 31 * mt7981b-zbtlink-zbt-z8102ax.dts Cosmetic change 'reg = <0x1f>' -> 'reg = <31>' Signed-off-by: Daniel Golle --- target/linux/mediatek/dts/mt7622-buffalo-wsr-3200ax4s.dts | 2 +- .../mediatek/dts/mt7622-dlink-eagle-pro-ai-ax3200-a1.dtsi | 4 ++-- target/linux/mediatek/dts/mt7622-elecom-wrc-x3200gst3.dts | 4 ++-- target/linux/mediatek/dts/mt7622-linksys-e8450.dtsi | 4 ++-- target/linux/mediatek/dts/mt7622-ruijie-rg-ew3200.dtsi | 4 ++-- target/linux/mediatek/dts/mt7622-xiaomi-redmi-router-ax6s.dts | 4 ++-- target/linux/mediatek/dts/mt7629-iptime-a6004mx.dts | 4 ++-- target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8102ax.dts | 2 +- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/target/linux/mediatek/dts/mt7622-buffalo-wsr-3200ax4s.dts b/target/linux/mediatek/dts/mt7622-buffalo-wsr-3200ax4s.dts index 678c31b711b7..82cc970fddae 100644 --- a/target/linux/mediatek/dts/mt7622-buffalo-wsr-3200ax4s.dts +++ b/target/linux/mediatek/dts/mt7622-buffalo-wsr-3200ax4s.dts @@ -39,7 +39,7 @@ &mdio { switch@1f { compatible = "mediatek,mt7531"; - reg = <0x1f>; + reg = <31>; reset-gpios = <&pio 54 GPIO_ACTIVE_HIGH>; ports { diff --git a/target/linux/mediatek/dts/mt7622-dlink-eagle-pro-ai-ax3200-a1.dtsi b/target/linux/mediatek/dts/mt7622-dlink-eagle-pro-ai-ax3200-a1.dtsi index 10cee7bceff7..0560bbd33e0a 100644 --- a/target/linux/mediatek/dts/mt7622-dlink-eagle-pro-ai-ax3200-a1.dtsi +++ b/target/linux/mediatek/dts/mt7622-dlink-eagle-pro-ai-ax3200-a1.dtsi @@ -76,9 +76,9 @@ #address-cells = <1>; #size-cells = <0>; - switch: switch@0 { + switch: switch@1f { compatible = "mediatek,mt7531"; - reg = <0>; + reg = <31>; interrupt-controller; #interrupt-cells = <1>; interrupt-parent = <&pio>; diff --git a/target/linux/mediatek/dts/mt7622-elecom-wrc-x3200gst3.dts b/target/linux/mediatek/dts/mt7622-elecom-wrc-x3200gst3.dts index f3a688b2d684..2bf4a33a50c8 100644 --- a/target/linux/mediatek/dts/mt7622-elecom-wrc-x3200gst3.dts +++ b/target/linux/mediatek/dts/mt7622-elecom-wrc-x3200gst3.dts @@ -209,9 +209,9 @@ #address-cells = <1>; #size-cells = <0>; - switch@0 { + switch@1f { compatible = "mediatek,mt7531"; - reg = <0>; + reg = <31>; interrupt-controller; #interrupt-cells = <1>; interrupt-parent = <&pio>; diff --git a/target/linux/mediatek/dts/mt7622-linksys-e8450.dtsi b/target/linux/mediatek/dts/mt7622-linksys-e8450.dtsi index bd686073cbce..48b25f7a4a04 100644 --- a/target/linux/mediatek/dts/mt7622-linksys-e8450.dtsi +++ b/target/linux/mediatek/dts/mt7622-linksys-e8450.dtsi @@ -138,9 +138,9 @@ #address-cells = <1>; #size-cells = <0>; - switch@0 { + switch@1f { compatible = "mediatek,mt7531"; - reg = <0>; + reg = <31>; interrupt-controller; #interrupt-cells = <1>; interrupt-parent = <&pio>; diff --git a/target/linux/mediatek/dts/mt7622-ruijie-rg-ew3200.dtsi b/target/linux/mediatek/dts/mt7622-ruijie-rg-ew3200.dtsi index a240f9bfcec1..24ed92788ef9 100644 --- a/target/linux/mediatek/dts/mt7622-ruijie-rg-ew3200.dtsi +++ b/target/linux/mediatek/dts/mt7622-ruijie-rg-ew3200.dtsi @@ -97,9 +97,9 @@ #address-cells = <1>; #size-cells = <0>; - switch@0 { + switch@1f { compatible = "mediatek,mt7531"; - reg = <0>; + reg = <31>; reset-gpios = <&pio 54 GPIO_ACTIVE_HIGH>; interrupt-controller; #interrupt-cells = <2>; diff --git a/target/linux/mediatek/dts/mt7622-xiaomi-redmi-router-ax6s.dts b/target/linux/mediatek/dts/mt7622-xiaomi-redmi-router-ax6s.dts index c0db31fd3ae5..ebc8731bc708 100644 --- a/target/linux/mediatek/dts/mt7622-xiaomi-redmi-router-ax6s.dts +++ b/target/linux/mediatek/dts/mt7622-xiaomi-redmi-router-ax6s.dts @@ -164,9 +164,9 @@ #address-cells = <1>; #size-cells = <0>; - switch@0 { + switch@1f { compatible = "mediatek,mt7531"; - reg = <0>; + reg = <31>; interrupt-controller; #interrupt-cells = <1>; interrupt-parent = <&pio>; diff --git a/target/linux/mediatek/dts/mt7629-iptime-a6004mx.dts b/target/linux/mediatek/dts/mt7629-iptime-a6004mx.dts index 78286714eafa..7a3fa4deffbc 100644 --- a/target/linux/mediatek/dts/mt7629-iptime-a6004mx.dts +++ b/target/linux/mediatek/dts/mt7629-iptime-a6004mx.dts @@ -127,9 +127,9 @@ reg = <0>; }; - switch@2 { + switch@1f { compatible = "mediatek,mt7531"; - reg = <2>; + reg = <31>; reset-gpios = <&pio 28 0>; interrupt-controller; #interrupt-cells = <1>; diff --git a/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8102ax.dts b/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8102ax.dts index de35d150980e..f4d5271f9777 100644 --- a/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8102ax.dts +++ b/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8102ax.dts @@ -161,7 +161,7 @@ &mdio_bus { switch: switch@1f { compatible = "mediatek,mt7531"; - reg = <0x1f>; + reg = <31>; reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>; interrupt-controller; #interrupt-cells = <1>; -- 2.30.2