]> git.ipfire.org Git - thirdparty/openwrt.git/commit
ath79: enable USB by default on hAP ac 19334/head
authorValeriy Manzhos <manzhos.va@gmail.com>
Sun, 15 Jun 2025 10:08:29 +0000 (13:08 +0300)
committerRobert Marko <robimarko@gmail.com>
Tue, 8 Jul 2025 07:41:44 +0000 (09:41 +0200)
commit32b0c8994772f1bd222b16c911c52b3c292a70b6
tree10a41dab37573a3ca194e36143ba8f18fa448eab
parent5096c7624fe00abfa593e21b4437bb632c303f85
ath79: enable USB by default on hAP ac

Due to a bug, USB is not powered on after boot on hAP ac.
This prevents extroot configurations from working as overlayfs is mounted
before USB device can be powered on. This commit fixes this by enabling USB
in devicetree.

Related discussion links:
- https://forum.openwrt.org/t/usb-power-is-off-on-boot/229007

---

Extroot configuration requires the USB to be powered on before
preinit_main/80_mount_root. Probably the simplest approach is to enable
it in the devicetree. Another approach would be to add a script into
/lib/preinit that will power on USB via /sys/class/gpio/usb-power/value
E.g.
cat /lib/preinit/79_power_on_usb
do_power_on_usb(){
  echo '1' > /sys/class/gpio/usb-power/value
}
boot_hook_add preinit_main do_power_on_usb

Signed-off-by: Valeriy Manzhos <manzhos.va@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/19149
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit f7dba4ebbcebde7e0c5c9186e94a502aeeaf789a)
Link: https://github.com/openwrt/openwrt/pull/19334
Signed-off-by: Robert Marko <robimarko@gmail.com>
target/linux/ath79/dts/qca9558_mikrotik_routerboard-96x.dtsi