Skip to content

Commit

Permalink
ath79: pineapple-nano: use regulator for USB GPIO
Browse files Browse the repository at this point in the history
The chipidea USB2 driver used on this platform supports controlling GPIO
through regulators. This is the upstream friendly solution.

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 517b9c1 commit 5aa996b
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions target/linux/ath79/dts/ar9331_hak5_wifi-pineapple-nano.dts
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@
gpio-export,name = "usb-alarm";
gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
};

usb-power {
gpio-export,name = "usb-power";
gpio-export,output = <0>;
gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
};
};

keys {
Expand All @@ -57,6 +51,14 @@
linux,default-trigger = "phy0tpt";
};
};

reg_power_usb: regulator {
compatible = "regulator-fixed";
regulator-name = "power_usb";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
};
};

&eth0 {
Expand Down Expand Up @@ -123,6 +125,8 @@

&usb {
status = "okay";

vbus-supply = <&reg_power_usb>;
};

&usb_phy {
Expand Down

0 comments on commit 5aa996b

Please sign in to comment.