USB device hibernates can't be exit (g_ether)


Recommended Posts

Hello,

 

I'm enabling g_ether driver on tinker board. The driver works and I'm able to emulate an Ethernet adapter on my PC when I connect it to the tinker micro USB port.  This only works if the micro USB connection exists before powering ON the board. If I connect it while the device is already running nothing happens. This behavior may be related to the following kernel path:

https://patchwork.kernel.org/patch/10535905/

 

Is there any parameter I can add to avoid the USB from going to hibernate state? Or would it be possible to add the mentioned patch to armbian build tool?

 

Thanks!

 

 

Link to post
Share on other sites
Armbian is a community driven open source project. Do you like to contribute your code?

When I stat the board without the USB cable connected I get this error on dmesg (running on kernel 4.4.161-rockchip):

[    1.016700] dwc2 ff580000.usb: dwc2_core_reset() HANG! Soft Reset GRSTCTL=80000001
[    1.127654] dwc2 ff580000.usb: dwc2_wait_for_mode: Couldn't set device mode

Googling this message brought me to those bugs:

 

https://www.spinics.net/lists/arm-kernel/msg564614.html

 

Any patch to solve this issue?

 

 

Link to post
Share on other sites

I recompiled the full image with default and next kernel, but still no luck. I also modified the device tree to force USB to peripheral. (dr_mode="peripheral"):

 

	usb@ff580000 {
		compatible = "rockchip,rk3288-usb", "rockchip,rk3066-usb", "snps,dwc2";
		reg = <0x0 0xff580000 0x0 0x40000>;
		interrupts = <0x0 0x17 0x4>;
		clocks = <0x7 0x1c1>;
		clock-names = "otg";
		dr_mode = "peripheral";
		g-np-tx-fifo-size = <0x10>;
		g-rx-fifo-size = <0x118>;
		g-tx-fifo-size = <0x100 0x80 0x80 0x40 0x20 0x10>;
		g-use-dma;
		phys = <0x50>;
		phy-names = "usb2-phy";
		status = "okay";
		phandle = <0xcf>;
	};

The g_ether gadget only works if the cable is connected during boot, connecting the USB cable afterward has no effect. not even a single message on dmesg.  It seems that the USB ID pin must be tied to GND during boot process, otherwise the USB OTG cannot enter peripheral mode anymore.

 

Any suggestion on what I should try next?

Link to post
Share on other sites
Guest
This topic is now closed to further replies.