]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
realtek: add hog for PHY reset for XS1930-10 and -12HP 23428/head
authorJonas Jelonek <jelonek.jonas@gmail.com>
Mon, 18 May 2026 13:07:36 +0000 (13:07 +0000)
committerRobert Marko <robimarko@gmail.com>
Thu, 21 May 2026 10:08:42 +0000 (12:08 +0200)
Add a GPIO hog for those two switches to avoid having a dangling GPIO
which might be pulled accidentally breaking all PHYs, and to have that
GPIO documented.

Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/23428
Signed-off-by: Robert Marko <robimarko@gmail.com>
target/linux/realtek/dts/rtl9313_zyxel_xs1930-aqr813.dtsi

index 3894753b34b1b0e1bb0baf883bb9dfd11efcfc84..6585745a6c99adcc260d1a4a9b914ac2d185f4ed 100644 (file)
        pinctrl-names = "default";
        pinctrl-0 = <&pinmux_disable_jtag>;
 
+       /*
+        * GPIO 31 is the global reset pin shared by all PHYs across all MDIO
+        * buses. It is intentionally not declared as reset-gpios on any bus:
+        * the MDIO driver / phylink only support a reset GPIO per bus, not on
+        * the parent controller. Attaching it to a single bus would still reset
+        * the PHYs on the other buses as a side effect, leaving their software
+        * state out of sync with the hardware and likely breaking them.
+        */
+       phy_reset_hog {
+               gpio-hog;
+               gpios = <31 GPIO_ACTIVE_LOW>;
+               output-low;
+               line-name = "phy-reset";
+       };
+
        sfp_enable_hog {
                gpio-hog;
                gpios = <6 GPIO_ACTIVE_LOW>,