From: Tony Ambardar Date: Mon, 16 Jan 2023 11:18:00 +0000 (-0800) Subject: ath79: use gpios for switch management in WZR-HP-G300NH variants X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=70000ab509a0730e842c4b56dd1a505dd53deaa3;p=openwrt%2Fstaging%2Fblocktrron.git ath79: use gpios for switch management in WZR-HP-G300NH variants The RTL8366S/RB switch node in DTS defines "mii-bus = <&mdio0>" to permit management via SMI but this has likely never worked, instead falling back to using GPIOs in the past: rtl8366s switch: cannot find mdio bus from bus handle (yet) rtl8366s switch: using GPIO pins 19 (SDA) and 20 (SCK) rtl8366s switch: RTL8366 ver. 1 chip found Recently, the rtl8366s and rtl8366_smi drivers were changed from built-in to loadable modules. This affected driver probing order and caused switch initialization (and network access) to fail: rtl8366s switch: using MDIO bus 'ag71xx_mdio' rtl8366s switch: unknown chip id (ffff) rtl8366s switch: chip detection failed, err=-19 Force using GPIOs to manage the switch by dropping the "mii-bus" DTS definition, which works for both built-in and loadable switch drivers. Fixes: 6e0f0eae5b ("ath79: use rtl8366s and rtl8366_smi as a module") Fixes: 575ec7a4b1 ("ath79: use rtl8366rb as a module") Tested-by: Tony Ambardar # WZR-HP-G300NH (RTL8366S) Signed-off-by: Tony Ambardar --- diff --git a/target/linux/ath79/dts/ar9132_buffalo_wzr-hp-g300nh.dtsi b/target/linux/ath79/dts/ar9132_buffalo_wzr-hp-g300nh.dtsi index 4443ba583e..ac3af13457 100644 --- a/target/linux/ath79/dts/ar9132_buffalo_wzr-hp-g300nh.dtsi +++ b/target/linux/ath79/dts/ar9132_buffalo_wzr-hp-g300nh.dtsi @@ -178,7 +178,6 @@ gpio-sda = <&gpio 19 GPIO_ACTIVE_HIGH>; gpio-sck = <&gpio 20 GPIO_ACTIVE_HIGH>; - mii-bus = <&mdio0>; mdio-bus { status = "okay";