ath79: gl-ar150: fix USB GPIO usage
authorRosen Penev <rosenp@gmail.com>
Mon, 23 Dec 2024 21:20:49 +0000 (13:20 -0800)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 12 Jan 2025 17:01:35 +0000 (18:01 +0100)
Currently, an OpenWrt hack is used to turn the GPIO on in terms of the
PHY driver when it should be the USB driver that controls it. The
chipidea USB2 driver has support for a vbus-supply property. Use it
instead of the local OpenWrt solution that just turns on the GPIO.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17356
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
target/linux/ath79/dts/ar9330_glinet_gl-ar150.dts

index fe1d3186cffda6ff8f52b384da1d7a9e86be55ab..8e38c9f5fba43140d85a64a331e3dd5b58e6be75 100644 (file)
                        gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
                };
        };
+
+       reg_power_usb: regulator {
+               compatible = "regulator-fixed";
+               regulator-name = "power_usb";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+       };
 };
 
 &usb {
-       dr_mode = "host";
        status = "okay";
+
+       dr_mode = "host";
+       vbus-supply = <&reg_power_usb>;
 };
 
 &usb_phy {
        status = "okay";
-       gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
 };
 
 &spi {