Skip to content

Commit

Permalink
ath79: add USB power control for GL-AR300M series
Browse files Browse the repository at this point in the history
Add USB power control in DTS for GL.iNet models:
- AR300M;
- AR300M-Ext;
- AR300M16;
- AR300M16-Ext.

Signed-off-by: PtilopsisLeucotis <PtilopsisLeucotis@yandex.com>
  • Loading branch information
PtilopsisLeucotis authored and hauke committed Apr 30, 2022
1 parent 063e904 commit 6e9c814
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
6 changes: 6 additions & 0 deletions target/linux/ath79/dts/qca9531_glinet_gl-ar300m-lite.dts
Expand Up @@ -7,6 +7,8 @@
model = "GL.iNet GL-AR300M-Lite";
};

/delete-node/ &reg_usb_vbus;

/delete-node/ &nand_flash;

&nor_firmware {
Expand All @@ -27,3 +29,7 @@
&led_wlan {
label = "green:wlan";
};

&usb0 {
/delete-property/ vbus-supply;
};
11 changes: 11 additions & 0 deletions target/linux/ath79/dts/qca9531_glinet_gl-ar300m.dtsi
Expand Up @@ -37,6 +37,16 @@
};
};

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";

Expand Down Expand Up @@ -134,6 +144,7 @@
&usb0 {
#address-cells = <1>;
#size-cells = <0>;
vbus-supply = <&reg_usb_vbus>;
status = "okay";
};

Expand Down

0 comments on commit 6e9c814

Please sign in to comment.