Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

USB device hibernates can't be exit (g_ether)

Featured Replies

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!

 

 

  • Author

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?

 

 

  • Author

Yes I'm able to compile it myself, I already did it to add few drivers (g_ether and RTC PCF2127) and to create an image using btrfs file system. 

 

Thanks a lot.

  • Author

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?

Guest
This topic is now closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.