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.

NanoPi M1 USB gadget mode madness

Featured Replies

Greetings,

 

I've got 2 M1 boards in front of me. The FA is running their latest distribution: http://www.mediafire.com/file/kc44mm1mdahslho/nanopi-m1_debian-jessie_4.11.2_20170905.img.zip

 

By default the device tree for the FA has the USB controller (usb@01c19000) marked as disabled and is missing the dr_mode = "OTG" attribute. Enable the controller and Add the dr_node property and the board comes up as a mass storage device in both Windows and Linux. 

 

The board running Armbian has exactly the same device tree entries, dmesg shows the USB controller is loaded and visible with lsusb -t. When a gadget module is loaded all appears to work on the M1 but it never appears as a valid USB device on the host. Windows eventually complains that the port reset failed.

 

I figured this might be a problem with the OTG ID pin not being set up properly but both boards report the same PIO pin status. 

 

Does anyone have working gadget mode on an M1? Or might they suggest how I can diagnose this issue?

 

Just for laughs Armbian 4.11.5 running on an OPI One *does* have working gadget mode. Given identical hardware and USB wiring I figure this makes it unlikely (but not impossible) to be a kernel issue.

 

TAIA

 

P.S. If anyone wants to do a bit of consulting to fix this problem, please PM me.

nanopim1:~$ uname -a
Linux nanopim1 4.11.5-sun8i #7 SMP Mon Sep 11 17:50:49 BST 2017 armv7l GNU/Linux

~# uname -a
Linux FriendlyELEC 4.11.2 #1 SMP Mon Jul 10 11:06:36 CST 2017 armv7l GNU/Linux

nanopim1:~$ sudo sunxi-pio -m PG12
PG12<7><0><1>

@FriendlyELEC:~# sunxi-pio -m PG12
PG12<7><0><1>

 

 

 

 

 

  • Author

Hello Enno and thanks.

 

Yes - Indeed mine is the last comment, posted at some point yesterday :)

 

For the M1 board the FA distro does not specify the usb0_id_det-gpios = <0xe 0x6 0xc 0x0>; section in the DTS.

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.