ath79: Fix glinet ar300m usb not working
authorLuo Chongjun <luochongjun@gl-inet.com>
Thu, 15 Dec 2022 09:25:15 +0000 (17:25 +0800)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 2 Apr 2023 20:07:28 +0000 (22:07 +0200)
commit70d2e8b4db0c5c9f1a2d40827928bef8083b19d6
tree0373d33e3682a12c5a0ec7cb8ba641ef3a17c4f2
parent9aaeaa8d2a9d619169ffddaa23d820523d0fcdfa
ath79: Fix glinet ar300m usb not working

glinet forum users reported the problem at
https://forum.gl-inet.com/t/gl-ar300m16-openwrt-22-03-0-rc5-usb-port-power-off-by-default/23199

The current code uses the regulator framework to control the USB power
supply. Although usb0 described in DTS refers to the regulator by
vbus-supply, but there is no code related to regulator implemented
in the USB driver of QCA953X, so the USB of the device cannot work.

Under the regulator framework, adding the regulator-always-on attribute
fixes this problem, but it means that USB power will not be able to be
turned off. Since we need to control the USB power supply in user space,
I didn't find any other better way under the regulator framework of Linux,
so I directly export gpio.

Signed-off-by: Luo Chongjun <luochongjun@gl-inet.com>
(cherry picked from commit b352124cd2115fec648a00956a848660df9477d3)
target/linux/ath79/dts/qca9531_glinet_gl-ar300m-lite.dts
target/linux/ath79/dts/qca9531_glinet_gl-ar300m.dtsi