Char11e Posted December 30, 2023 Posted December 30, 2023 (edited) 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 December 30, 2023 by Char11e 0 Quote
Char11e Posted December 30, 2023 Author Posted December 30, 2023 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 0 Quote
Char11e Posted December 30, 2023 Author Posted December 30, 2023 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. 0 Quote
Gunjan Gupta Posted December 30, 2023 Posted December 30, 2023 remove g_serial from /etc/modules. Then if you have a otg adapter then it should work fine 0 Quote
Char11e Posted December 31, 2023 Author Posted December 31, 2023 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 0 Quote
Gunjan Gupta Posted December 31, 2023 Posted December 31, 2023 It should work after a reboot. But as you manually removed using modprobe command, the module will return on reboot. 0 Quote
Char11e Posted December 31, 2023 Author Posted December 31, 2023 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? 0 Quote
Gunjan Gupta Posted December 31, 2023 Posted December 31, 2023 Main debugging information that would be needed in this case will be in kernel logs i.e. dmesg output. 0 Quote
Char11e Posted December 31, 2023 Author Posted December 31, 2023 This is the dmesg_log of my system. dmseg_log.txt 0 Quote
Gunjan Gupta Posted December 31, 2023 Posted December 31, 2023 it shows your otg port is in auto mode, did you had your otg cable connected when taking the logs? 0 Quote
Char11e Posted December 31, 2023 Author Posted December 31, 2023 Yes, when I captured the dmesg log, I had the otg usb cable connected and an 8g usb2.0 flash drive connected. 0 Quote
Solution Char11e Posted August 3, 2024 Author Solution Posted August 3, 2024 @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>; 0 Quote
Recommended Posts
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.