fix for lantiq (danube) usb

Luca Olivetti luca at ventoso.org
Fri Jul 3 12:10:21 EDT 2020


Hello,

around 2 years ago, this patch

https://git.openwrt.org/?p=openwrt/openwrt.git;a=commitdiff;h=6eaf8b3d89571992a0aa7142cfab3f1dcef3c802#patch7

broke the usb on my arv7518pw: when it tries to power up the usb it 
returns error -537 (EPROBE_DEFER, see 
https://bugs.openwrt.org/index.php?do=details&task_id=1634).

[ 5.431505] dwc2 1e101000.usb: 1e101000.usb supply vusb_d not found, 
using dummy regulator
[ 5.438418] dwc2 1e101000.usb: 1e101000.usb supply vusb_a not found, 
using dummy regulator
[ 5.446581] dwc2 1e101000.usb: dwc2_core_reset() HANG! Soft Reset 
GRSTCTL=80000001
[ 5.593255] dwc2 1e101000.usb: DWC OTG Controller
[ 5.596565] dwc2 1e101000.usb: new USB bus registered, assigned bus number 1
[ 5.603417] dwc2 1e101000.usb: irq 62, io mem 0x1e101000
[ 5.608632] dwc2 1e101000.usb: startup error -517
[ 5.613124] dwc2 1e101000.usb: USB bus 1 deregistered
[ 5.618080] dwc2 1e101000.usb: dwc2_hcd_init() FAILED, returning -517


If I revert the above patch, the usb initializes correctly, but there's 
no 5V on the port so it doesn't work.

I hacked a fake led on gpio 14 so I can turn on the 5V from user space, 
and the usb works (I tried with a memory stick and an rt73 wifi stick, 
an rtl8812au doesn't work but I think because its driver is ... meh).

What's the proper way to turn on the 5V on gpio 14 (i.e. fix the 
-EPROBE_DEFER error)?


I suppose that the issue also affects other danube based devices, but I 
can only test the one I have.

This is against 19.07.3

--- a/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV7518PW.dts
+++ b/target/linux/lantiq/files-4.14/arch/mips/boot/dts/ARV7518PW.dts
@@ -105,6 +105,10 @@
                         label = "arv7518pw:red:wps";
                         gpios = <&gpiomm 6 GPIO_ACTIVE_LOW>;
                 };
+               usbpw {
+                       label = "arv7518pw:green:usbpw";
+                       gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
+               };
         };
  };

@@ -147,17 +151,6 @@
                 };
         };

-       usb_vbus: regulator-usb-vbus {
-               compatible = "regulator-fixed";
-
-               regulator-name = "USB_VBUS";
-
-               regulator-min-microvolt = <5000000>;
-               regulator-max-microvolt = <5000000>;
-
-               gpio = <&gpio 14 GPIO_ACTIVE_HIGH>;
-               enable-active-high;
-       };
  };

  &gpiomm {
@@ -232,7 +225,6 @@

  &usb {
         status = "okay";
-       vbus-supply = <&usb_vbus>;
  };

  &vmmc {





More information about the openwrt-devel mailing list