ath79: add USB power control for GL-AR300M series
authorPtilopsisLeucotis <PtilopsisLeucotis@yandex.com>
Sat, 16 Apr 2022 10:21:58 +0000 (13:21 +0300)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 1 May 2022 11:23:12 +0000 (13:23 +0200)
Add USB power control in DTS for GL.iNet models:
- AR300M;
- AR300M-Ext;
- AR300M16;
- AR300M16-Ext.

Signed-off-by: PtilopsisLeucotis <PtilopsisLeucotis@yandex.com>
(cherry picked from commit 6e9c814022e41a7cfa4db3b1a41e257fd1515bea)

target/linux/ath79/dts/qca9531_glinet_gl-ar300m-lite.dts
target/linux/ath79/dts/qca9531_glinet_gl-ar300m.dtsi

index cf531ed8c4102a07ace2528c5935a679afe2d8fb..a34abb1dd2d87fbad9cb5f9724e2720990eefc91 100644 (file)
@@ -7,6 +7,8 @@
        model = "GL.iNet GL-AR300M-Lite";
 };
 
+/delete-node/ &reg_usb_vbus;
+
 /delete-node/ &nand_flash;
 
 &nor_firmware {
@@ -27,3 +29,7 @@
 &led_wlan {
        label = "green:wlan";
 };
+
+&usb0 {
+       /delete-property/ vbus-supply;
+};
index d4e1e6b2374d7ebaeac3b854f192921d55468207..2eaff61f50b5ce58a057ec53ba24e970d6a2802e 100644 (file)
                };
        };
 
+       reg_usb_vbus: reg_usb_vbus {
+               compatible = "regulator-fixed";
+
+               regulator-name = "usb_vbus";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               gpio = <&gpio 2 GPIO_ACTIVE_HIGH>;
+               enable-active-high;
+       };
+
        leds {
                compatible = "gpio-leds";
 
 &usb0 {
        #address-cells = <1>;
        #size-cells = <0>;
+       vbus-supply = <&reg_usb_vbus>;
        status = "okay";
 };