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.

How to set the OTG USB port of Orange Pi PC to be used as a normal USB port

Featured Replies

The system I currently use:
Armbian 23.11.1 jammy

 

Linux kernel version:
Linux orangepipc 6.1.63-current-sunxi #1 SMP Mon Nov 20 10:52:19 UTC 2023 armv7l armv7l armv7l GNU/Linux

 

Currently I want to make this OTG USB work like the other three USB Ports.

 

Do I need to recompile DTS?

Edited by Char11e

Solved by Char11e

  • Char11e changed the title to How to set the OTG USB port of Orange Pi PC to be used as a normal USB port
  • Author

pi@orangepipc:~$ dmesg |grep musb
[    2.610963] musb-hdrc musb-hdrc.4.auto: MUSB HDRC host driver
[    2.611005] musb-hdrc musb-hdrc.4.auto: new USB bus registered, assigned bus number 9
[    2.611363] usb usb9: Manufacturer: Linux 6.1.63-current-sunxi musb-hcd
[    2.611373] usb usb9: SerialNumber: musb-hdrc.4.auto

  • Author

pi@orangepipc:~$ sudo modprobe g_serial
pi@orangepipc:~$ lsmod | grep serial
g_serial               16384  0
u_serial               24576  1 usb_f_acm
libcomposite           45056  2 g_serial,usb_f_acm

I have the g_serial module enabled, but this seems to be the function that makes otg a serial port.

 

  • Author

I uninstalled g_serial using modprobe but it doesn't seem to work.

 

I tried using the lsusb and lsblk commands to check. When I connected the OTG USB, the system did not automatically detect the new device.

pi@orangepipc:~$ lsmod | grep serial
u_serial               24576  1 usb_f_acm
pi@orangepipc:~$ lsusb
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 002: ID 0080:a001 Unknown JMS578 based SATA bridge
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 009 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
pi@orangepipc:~$ lsblk
NAME        MAJ:MIN RM  SIZE RO TYPE MOUNTPOINTS
sda           8:0    0  2.7T  0 disk
└─sda1        8:1    0  2.7T  0 part /home/pi/dl
mmcblk0     179:0    0 14.8G  0 disk
└─mmcblk0p1 179:1    0 14.7G  0 part /var/log.hdd
                                     /
zram0       254:0    0  499M  0 disk [SWAP]
zram1       254:1    0   50M  0 disk /var/log
zram2       254:2    0    0B  0 disk

  • Author

Thank you for your answer.
However, after I restarted the system, the g_serial module has been uninstalled. However, after I connected the USB OTG external device, the device was still not read.

pi@orangepipc:~$ lsmod | grep serial
pi@orangepipc:~$ lsmod | grep usb
pi@orangepipc:~$ lsusb
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 002: ID 0080:a001 Unknown JMS578 based SATA bridge
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 009 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
pi@orangepipc:~$ lsusb
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 002: ID 0080:a001 Unknown JMS578 based SATA bridge
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 009 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
pi@orangepipc:~$


My device is a USB2.0 8G flash drive.
I'm not sure if I've set it up correctly?

  • Author
  • Solution

@Gunjan Gupta

 

Thank you for your suggestion. Currently, the kernel is upgraded to 6.6.36-current-sunxi.

I found that the dts file has the USB defaulted to otg mode, and the USB storage device can be read and used normally.


usb@1c19000 {
                        compatible = "allwinner,sun8i-h3-musb";
                        reg = <0x1c19000 0x400>;
                        clocks = <0x03 0x20>;
                        resets = <0x03 0x11>;
                        interrupts = <0x00 0x47 0x04>;
                        interrupt-names = "mc";
                        phys = <0x18 0x00>;
                        phy-names = "usb";
                        extcon = <0x18 0x00>;
                        dr_mode = "otg";
                        status = "okay";
                        phandle = <0x57>;

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

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.