lantiq: use regulator for USB GPIO
authorRosen Penev <rosenp@gmail.com>
Tue, 3 Dec 2024 21:29:37 +0000 (13:29 -0800)
committerJohn Crispin <john@phrozen.org>
Fri, 13 Dec 2024 14:29:03 +0000 (15:29 +0100)
One is already present. The other one can be implemented in terms of the
PHY.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/17250
Signed-off-by: John Crispin <john@phrozen.org>
target/linux/lantiq/files/arch/mips/boot/dts/lantiq/ar9_zte_h201l.dts

index a0e3664b6dbcd2a875d78538ee43773df5f8977a..3e8cbcf84bc91c7c05a607f992bb10886b628e0d 100644 (file)
                        gpio-export,output = <1>;
                        gpios = <&gpio 38 GPIO_ACTIVE_HIGH>;
                };
-               usb {
-                       gpio-export,name = "usb";
-                       gpio-export,output = <1>;
-                       gpios = <&gpio 28 GPIO_ACTIVE_HIGH>;
-               };
                wifi {
                        gpio-export,name = "wifi";
                        gpio-export,output = <1>;
                };
        };
 
+       usb_phy: regulator-usb-phy {
+               compatible = "regulator-fixed";
+
+               regulator-name = "USB_PHY";
+
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+
+               gpios = <&gpio 28 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+       };
+
        usb_vbus: regulator-usb-vbus {
                compatible = "regulator-fixed";
 
 
 &usb_phy0 {
        status = "okay";
+       phy-supply = <&usb_phy>;
 };