jeff
January 17, 2019, 3:06am
1
In working on DTS files for some GL.iNet devices, I came across a couple "puzzlements" around the AR300M DTS.
https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob_plain;f=target/linux/ath79/dts/qca9531_glinet_gl-ar300m.dtsi;hb=HEAD
The first is easy, the LED color -- are all LEDs, OpenWrt-wide, now "green", or should the red one be identified as "red" before this hits releases?
The second is a little more puzzling. The AR300M uses GPIO 2 to switch the power to the USB port , as confirmed by GL.iNet staff . However, it is identified to the system as an LED. This doesn't make a lot of sense to me, as the typical triggers aren't applicable, and you likely don't want to be PWM-ing the USB supply!
Is there an established place for GPIO-controlled functions like this already?
Did you find a right place for this? I also have one on Airtight C-75 board and not sure where to place it...
jeff
June 17, 2019, 1:58am
3
gpio-hog or fixed regulator, though they both seem to have the drawback of not being switchable from user-space during runtime, at least that I’ve found.
I thought declaring it as LED, name it USB Port Power and set to default "on" so that it will be available in LuCI but hoped there is a better option...
kofec
August 27, 2019, 11:37am
5
Hi,
Any new findings ? I have wdr3600 which had possibility to control USB power like:
# echo 0 > /sys/class/gpio/gpio21/value
# echo 0 > /sys/class/gpio/gpio22/value
Is it still possible when use "gpio-hog " ?
1 Like