Skip to content

Commit

Permalink
ath79: gl-ar150: fix USB GPIO usage
Browse files Browse the repository at this point in the history
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 <[email protected]>
Link: openwrt/openwrt#17356
Signed-off-by: Hauke Mehrtens <[email protected]>
  • Loading branch information
neheb authored and hauke committed Jan 12, 2025
1 parent 5aa996b commit 90e86a8
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions target/linux/ath79/dts/ar9330_glinet_gl-ar150.dts
Original file line number Diff line number Diff line change
Expand Up @@ -62,16 +62,26 @@
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 {
Expand Down

0 comments on commit 90e86a8

Please sign in to comment.