Hi Loic,
kernel message on the host PC during boot related to USB are (with USB mouse and keyboard attached)
[ 0.233518] usbcore: registered new interface driver usbfs
[ 0.233552] usbcore: registered new interface driver hub
[ 0.233615] usbcore: registered new device driver usb
[ 3.858538] usbcore: registered new interface driver rtl8150
[ 3.861383] usbcore: registered new interface driver r8152
[ 3.867154] usbcore: registered new interface driver asix
[ 3.872443] usbcore: registered new interface driver ax88179_178a
[ 3.896114] ehci_hcd: USB 2.0 ‘Enhanced’ Host Controller (EHCI) Driver
[ 3.924016] ohci_hcd: USB 1.1 ‘Open’ Host Controller (OHCI) Driver
[ 3.946297] usbcore: registered new interface driver usb-storage
[ 3.949363] usbcore: registered new interface driver usbserial
[ 3.955603] usbcore: registered new interface driver usbserial_generic
[ 3.961216] usbserial: USB Serial support registered for generic
[ 4.127317] usbcore: registered new interface driver usbhid
[ 4.131626] usbhid: USB HID core driver
[ 4.140021] usbcore: registered new interface driver snd-usb-audio
[ 4.180225] qcom-qusb2-phy 7411000.phy: Registered Qcom-QUSB2 phy
[ 4.180657] qcom-qusb2-phy 7412000.phy: Registered Qcom-QUSB2 phy
[ 4.537035] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
[ 4.577032] hub 1-0:1.0: USB hub found
[ 4.580370] hub 1-0:1.0: 1 port detected
[ 4.584381] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[ 4.588237] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
[ 4.593610] usb usb2: We don’t know the algorithms for LPM for this host, disabling LPM.
[ 4.601601] hub 2-0:1.0: USB hub found
[ 4.918089] usb 1-1: new high-speed USB device number 2 using xhci-hcd
[ 5.073970] hub 1-1:1.0: USB hub found
[ 5.074698] hub 1-1:1.0: 4 ports detected
[ 5.194407] usb 2-1: new SuperSpeed USB device number 2 using xhci-hcd
[ 5.234226] hub 2-1:1.0: USB hub found
[ 5.234586] hub 2-1:1.0: 4 ports detected
[ 5.386154] usb 1-1.1: new high-speed USB device number 3 using xhci-hcd
[ 5.522007] hub 1-1.1:1.0: USB hub found
[ 5.522328] hub 1-1.1:1.0: 4 ports detected
[ 5.814116] usb 1-1.1.1: new low-speed USB device number 4 using xhci-hcd
[ 5.942868] input: CHICONY USB Keyboard as /devices/platform/soc/soc:usb@6a00000/6a00000.dwc3/xhci-hcd.0.auto/usb1/1-1/1-1.1/1-1.1.1/1-1.1.1:1.0/0003:04F2:0833.0001/input/input1
[ 6.002594] hid-generic 0003:04F2:0833.0001: input: USB HID v1.11 Keyboard [CHICONY USB Keyboard] on usb-xhci-hcd.0.auto-1.1.1/input0
[ 6.011175] input: CHICONY USB Keyboard as /devices/platform/soc/soc:usb@6a00000/6a00000.dwc3/xhci-hcd.0.auto/usb1/1-1/1-1.1/1-1.1.1/1-1.1.1:1.1/0003:04F2:0833.0002/input/input2
[ 6.070212] hid-generic 0003:04F2:0833.0002: input: USB HID v1.11 Device [CHICONY USB Keyboard] on usb-xhci-hcd.0.auto-1.1.1/input1
[ 6.150140] usb 1-1.1.2: new low-speed USB device number 5 using xhci-hcd
[ 6.262225] input: USB Optical Mouse as /devices/platform/soc/soc:usb@6a00000/6a00000.dwc3/xhci-hcd.0.auto/usb1/1-1/1-1.1/1-1.1.2/1-1.1.2:1.0/0003:045E:0797.0003/input/input3
[ 6.262752] hid-generic 0003:045E:0797.0003: input: USB HID v1.11 Mouse [USB Optical Mouse] on usb-xhci-hcd.0.auto-1.1.2/input0
I do not see any kernel logs when running the configuration commands. I see the following kernel logs when removing and inserting the usb otg
remove usb otg
[ 1084.424972] xhci-hcd xhci-hcd.2.auto: xHCI Host Controller
[ 1084.425053] xhci-hcd xhci-hcd.2.auto: new USB bus registered, assigned bus number 3
[ 1084.442548] xhci-hcd xhci-hcd.2.auto: hcc params 0x0220f665 hci version 0x100 quirks 0x02010010
[ 1084.442594] xhci-hcd xhci-hcd.2.auto: irq 178, io mem 0x07600000
[ 1084.450520] hub 3-0:1.0: USB hub found
[ 1084.456376] hub 3-0:1.0: 1 port detected
[ 1084.460116] xhci-hcd xhci-hcd.2.auto: xHCI Host Controller
[ 1084.463962] xhci-hcd xhci-hcd.2.auto: new USB bus registered, assigned bus number 4
[ 1084.469289] usb usb4: We don’t know the algorithms for LPM for this host, disabling LPM.
[ 1084.477241] hub 4-0:1.0: USB hub found
[ 1084.485169] hub 4-0:1.0: config failed, hub doesn’t have any ports! (err -19)
insert usb otg
[ 1128.357731] xhci-hcd xhci-hcd.2.auto: remove, state 4
[ 1128.357810] usb usb4: USB disconnect, device number 1
[ 1128.364597] xhci-hcd xhci-hcd.2.auto: USB bus 4 deregistered
[ 1128.367253] xhci-hcd xhci-hcd.2.auto: remove, state 4
[ 1128.372839] usb usb3: USB disconnect, device number 1
[ 1128.377998] xhci-hcd xhci-hcd.2.auto: USB bus 3 deregistered
I have also modified arch/arm64/boot/dts/qcom/apq8096-db820c.dtsi
usb@7600000 {
status = "okay";
dwc3@7600000 {
extcon = <&usb2_id>;
dr_mode = "peripheral"; // was dr_mode = "otg";
maximum-speed = "high-speed";
};
};
The last step in the configuration process is to enable the USD HID device (ls /sys/class/udc > UDC). Before I run this I have to connect the usb otg to the host to get the usb controller registered in /sys/class/uvc. If everything is configured correctly, do you know if I should see a host enumeration after I issue the “$ ls /sys/class/udc > UDC” command?