# GL-AR300M16 openwrt 22.03.0 rc5 USB port power off by default

**URL:** <https://forum.gl-inet.com/t/gl-ar300m16-openwrt-22-03-0-rc5-usb-port-power-off-by-default/23199>\
**Category:** Router\
**Created:** [August 2, 2022, 3:01am UTC](https://forum.gl-inet.com/t/gl-ar300m16-openwrt-22-03-0-rc5-usb-port-power-off-by-default/23199 "2022-08-02T03:01:51Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![msbroadf](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/m/a183cd/32.png) [@msbroadf](https://forum.gl-inet.com/u/msbroadf)\
**Post date:** [August 2, 2022, 3:01am UTC](https://forum.gl-inet.com/t/gl-ar300m16-openwrt-22-03-0-rc5-usb-port-power-off-by-default/23199/1 "2022-08-02T03:01:51Z")

</div>

I built openwrt v22.03.0-rc5 for my gl-ar300m16 and it works except for the power to the USB port.

It seems like mainline openwrt needs a patch to connect the USB GPIO power supply to the USB port for the GL-AR300M16 target?

Searching these forums i see there was a similar issue a few years ago between gl-inet firmware 2.26 and 2.27 [USB devices not recognized - #8 by patchmaster](https://forum.gl-inet.com/t/usb-devices-not-recognized/3386/8)

I suspect the same patch is required for mainline openwrt?

---

<div class="post-metadata">

**Author:** ![alzhao](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/a/5f9b8f/32.png) [@alzhao](https://forum.gl-inet.com/u/alzhao)\
**Post date:** [August 2, 2022, 11:02am UTC](https://forum.gl-inet.com/t/gl-ar300m16-openwrt-22-03-0-rc5-usb-port-power-off-by-default/23199/2 "2022-08-02T11:02:01Z")

</div>

I didn’t test openwrt 22.03 on AR300M16.

But if the USB is powered off by default, a simple solution is to enable it in /etc/rc.local

Just write a command to enable the USB, e.g. writing 0 or 1 to the gpio control.

---

<div class="post-metadata">

**Author:** ![msbroadf](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/m/a183cd/32.png) [@msbroadf](https://forum.gl-inet.com/u/msbroadf)\
**Post date:** [August 2, 2022, 11:15am UTC](https://forum.gl-inet.com/t/gl-ar300m16-openwrt-22-03-0-rc5-usb-port-power-off-by-default/23199/3 "2022-08-02T11:15:38Z")

</div>

Yes i tried that but couldn’t export GPIO 2 (i suspect with the new 5x kernel its not actually gpio 2 but called something else)

Anyway i managed to get it to work by creating this patch:

```auto
diff --git a/target/linux/ath79/dts/qca9531_glinet_gl-ar300m.dtsi b/target/linux/ath79/dts/qca9531_glinet_gl-ar300m.dtsi
index d64ffa7115..5aaa149940 100644
--- a/target/linux/ath79/dts/qca9531_glinet_gl-ar300m.dtsi
+++ b/target/linux/ath79/dts/qca9531_glinet_gl-ar300m.dtsi
@@ -43,8 +43,7 @@
                regulator-name = "usb_vbus";
                regulator-min-microvolt = <5000000>;
                regulator-max-microvolt = <5000000>;
- gpio = <&gpio 2 GPIO_ACTIVE_HIGH>;
- enable-active-high;
+ gpio = <&gpio 2 GPIO_ACTIVE_LOW>;
        };
 
        leds {

```

---

<div class="post-metadata">

**Author:** ![EKNYESE](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/e/3e96dc/32.png) [@EKNYESE](https://forum.gl-inet.com/u/EKNYESE)\
**Post date:** [December 1, 2022, 10:37am UTC](https://forum.gl-inet.com/t/gl-ar300m16-openwrt-22-03-0-rc5-usb-port-power-off-by-default/23199/4 "2022-12-01T10:37:48Z")

</div>

Did you already mentioned this on github for openwrt, so this bug can be fixed in the next bulids?

---

<div class="post-metadata">

**Author:** ![msbroadf](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/m/a183cd/32.png) [@msbroadf](https://forum.gl-inet.com/u/msbroadf)\
**Post date:** [December 1, 2022, 11:01am UTC](https://forum.gl-inet.com/t/gl-ar300m16-openwrt-22-03-0-rc5-usb-port-power-off-by-default/23199/5 "2022-12-01T11:01:07Z")

</div>

No, i didnt, you will need to submit a patch to openwrt mainline

---

<div class="post-metadata">

**Author:** ![alzhao](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/a/5f9b8f/32.png) [@alzhao](https://forum.gl-inet.com/u/alzhao)\
**Post date:** [December 1, 2022, 11:15am UTC](https://forum.gl-inet.com/t/gl-ar300m16-openwrt-22-03-0-rc5-usb-port-power-off-by-default/23199/6 "2022-12-01T11:15:41Z")

</div>

We will do that. Thanks!

---

<div class="post-metadata">

**Author:** ![EKNYESE](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/e/3e96dc/32.png) [@EKNYESE](https://forum.gl-inet.com/u/EKNYESE)\
**Post date:** [December 1, 2022, 1:13pm UTC](https://forum.gl-inet.com/t/gl-ar300m16-openwrt-22-03-0-rc5-usb-port-power-off-by-default/23199/7 "2022-12-01T13:13:22Z")

</div>

Could you please post the link here to your corresponding pull-request as soon as created?  
 → I urgent need a fixed firmware and would be happy, when this bug is fixed in the next openwrt release (\>22.03.2).  
Thanks in advance!

---

<div class="post-metadata">

**Author:** ![alzhao](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/a/5f9b8f/32.png) [@alzhao](https://forum.gl-inet.com/u/alzhao)\
**Post date:** [December 5, 2022, 5:00am UTC](https://forum.gl-inet.com/t/gl-ar300m16-openwrt-22-03-0-rc5-usb-port-power-off-by-default/23199/8 "2022-12-05T05:00:50Z")

</div>

Developer will post link of pull request after submit.

Please give a little time.

---

<div class="post-metadata">

**Author:** ![alzhao](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/a/5f9b8f/32.png) [@alzhao](https://forum.gl-inet.com/u/alzhao)\
**Post date:** [December 15, 2022, 10:55am UTC](https://forum.gl-inet.com/t/gl-ar300m16-openwrt-22-03-0-rc5-usb-port-power-off-by-default/23199/9 "2022-12-15T10:55:51Z")

</div>

Problem finally solved. Pls check the patch.

It is due to a driver issue actually.

> <https://github.com/openwrt/openwrt/pull/11521>
>
> glinet forum users reported the problem at
> https://forum.gl-inet.com/t/gl-ar300…m16-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: gl-luochongjun \<luochongjun@gl-inet.com\>
> 
> Thanks for your contribution to OpenWrt!
> 
> To help keep the codebase consistent and readable,
> and to help people review your contribution,
> we ask you to follow the rules you find in the wiki at this link
> https://openwrt.org/submitting-patches
> 
> Please remove this message before posting the pull request.

---

<div class="post-metadata">

**Author:** ![alzhao](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/a/5f9b8f/32.png) [@alzhao](https://forum.gl-inet.com/u/alzhao)\
**Post date:** [January 16, 2023, 6:47am UTC](https://forum.gl-inet.com/t/gl-ar300m16-openwrt-22-03-0-rc5-usb-port-power-off-by-default/23199/10 "2023-01-16T06:47:01Z")

</div>

Openwrt merged the patch to master.

---

<div class="post-metadata">

**Author:** ![bruce](https://forum-assets.gl-inet.com/user_avatar/forum.gl-inet.com/bruce/32/35649_2.png) [@bruce](https://forum.gl-inet.com/u/bruce)\
**Post date:** [October 29, 2025, 4:20am UTC](https://forum.gl-inet.com/t/gl-ar300m16-openwrt-22-03-0-rc5-usb-port-power-off-by-default/23199/12 "2025-10-29T04:20:35Z")

</div>


