2019-09-10 06:31 PM
We have a design with a USB HOST, the schematic is shown below, And the system is Linux 4.19. We have add some configuration about USB HID as below:
2 CONFIG_HID=y
3 CONFIG_HID_GENERIC=y
4 CONFIG_USB_HID=y
5 CONFIG_USB_HIDDEV=y
6 CONFIG_USB_KBD=y
7 CONFIG_USB_MOUSE=y
If we connect the USB Mouse directly to J4, it does not work(The LED on the USB mouse is on), but the USB Stick works;
dmesg | grep usb
[ 0.295912] usbcore: registered new interface driver usbfs
[ 0.295998] usbcore: registered new interface driver hub
[ 0.296136] usbcore: registered new device driver usb
[ 0.423062] stm32-usbphyc 5a006000.usbphyc: Linked as a consumer to regulator.1
[ 0.423179] stm32-usbphyc 5a006000.usbphyc: Linked as a consumer to regulator.2
[ 0.423306] stm32-usbphyc 5a006000.usbphyc: Dropping the link to regulator.2
[ 0.423416] stm32-usbphyc 5a006000.usbphyc: Dropping the link to regulator.1
[ 2.002834] usbcore: registered new interface driver pegasus
[ 2.008366] usbcore: registered new interface driver asix
[ 2.013858] usbcore: registered new interface driver ax88179_178a
[ 2.019882] usbcore: registered new interface driver cdc_ether
[ 2.025676] usbcore: registered new interface driver smsc75xx
[ 2.031460] usbcore: registered new interface driver smsc95xx
[ 2.037136] usbcore: registered new interface driver net1080
[ 2.042849] usbcore: registered new interface driver cdc_subset
[ 2.048703] usbcore: registered new interface driver zaurus
[ 2.054357] usbcore: registered new interface driver cdc_ncm
[ 2.083863] usbcore: registered new interface driver usb-storage
[ 2.535359] typec_stusb 2-0028: STUSB driver registered
[ 2.830866] usbcore: registered new interface driver usbhid
[ 2.835246] usbhid: USB HID core driver
[ 3.131030] stm32-usbphyc 5a006000.usbphyc: Linked as a consumer to regulator.1
[ 3.137157] stm32-usbphyc 5a006000.usbphyc: Linked as a consumer to regulator.2
[ 3.144451] stm32-usbphyc 5a006000.usbphyc: Linked as a consumer to regulator.12
[ 3.152880] stm32-usbphyc 5a006000.usbphyc: registered rev:1.0
[ 3.159739] dwc2 49000000.usb-otg: 49000000.usb-otg supply vusb_d not found, using dummy regulator
[ 3.172019] dwc2 49000000.usb-otg: Linked as a consumer to regulator.0
[ 3.178410] dwc2 49000000.usb-otg: 49000000.usb-otg supply vusb_a not found, using dummy regulator
[ 3.199883] dwc2 49000000.usb-otg: EPs: 9, dedicated fifos, 952 entries in SPRAM
[ 3.207419] ehci-platform 5800d000.usbh-ehci: EHCI Host Controller
[ 3.212250] ehci-platform 5800d000.usbh-ehci: new USB bus registered, assigned bus number 1
[ 3.220936] ehci-platform 5800d000.usbh-ehci: irq 73, io mem 0x5800d000
[ 3.249624] ehci-platform 5800d000.usbh-ehci: USB 2.0 started, EHCI 1.00
[ 3.629613] usb 1-1: new high-speed USB device number 2 using ehci-platform
[ 3.831585] usb-storage 1-1:1.0: USB Mass Storage device detected
[ 3.842489] scsi host0: usb-storage 1-1:1.0
[ 12.021335] usbcore: registered new interface driver uas
========
If we connect a USB Hub to J4, and connect the USB Mouse to the USB hub, it works.
==log with usb hub and USB Mouse is connected to the USB hub ==================
root@myir:~# dmesg | grep usb
[ 0.295932] usbcore: registered new interface driver usbfs
[ 0.296016] usbcore: registered new interface driver hub
[ 0.296160] usbcore: registered new device driver usb
[ 0.422977] stm32-usbphyc 5a006000.usbphyc: Linked as a consumer to regulator.1
[ 0.423097] stm32-usbphyc 5a006000.usbphyc: Linked as a consumer to regulator.2
[ 0.423225] stm32-usbphyc 5a006000.usbphyc: Dropping the link to regulator.2
[ 0.423338] stm32-usbphyc 5a006000.usbphyc: Dropping the link to regulator.1
[ 2.011997] usbcore: registered new interface driver pegasus
[ 2.017517] usbcore: registered new interface driver asix
[ 2.022947] usbcore: registered new interface driver ax88179_178a
[ 2.028993] usbcore: registered new interface driver cdc_ether
[ 2.034865] usbcore: registered new interface driver smsc75xx
[ 2.040610] usbcore: registered new interface driver smsc95xx
[ 2.046291] usbcore: registered new interface driver net1080
[ 2.052004] usbcore: registered new interface driver cdc_subset
[ 2.057861] usbcore: registered new interface driver zaurus
[ 2.063522] usbcore: registered new interface driver cdc_ncm
[ 2.093019] usbcore: registered new interface driver usb-storage
[ 2.545331] typec_stusb 2-0028: STUSB driver registered
[ 2.840784] usbcore: registered new interface driver usbhid
[ 2.845161] usbhid: USB HID core driver
[ 3.139937] stm32-usbphyc 5a006000.usbphyc: Linked as a consumer to regulator.1
[ 3.145998] stm32-usbphyc 5a006000.usbphyc: Linked as a consumer to regulator.2
[ 3.158710] stm32-usbphyc 5a006000.usbphyc: Linked as a consumer to regulator.12
[ 3.166786] stm32-usbphyc 5a006000.usbphyc: registered rev:1.0
[ 3.173934] dwc2 49000000.usb-otg: 49000000.usb-otg supply vusb_d not found, using dummy regulator
[ 3.181674] dwc2 49000000.usb-otg: Linked as a consumer to regulator.0
[ 3.187993] dwc2 49000000.usb-otg: 49000000.usb-otg supply vusb_a not found, using dummy regulator
[ 3.209463] dwc2 49000000.usb-otg: EPs: 9, dedicated fifos, 952 entries in SPRAM
[ 3.217087] ehci-platform 5800d000.usbh-ehci: EHCI Host Controller
[ 3.221928] ehci-platform 5800d000.usbh-ehci: new USB bus registered, assigned bus number 1
[ 3.230596] ehci-platform 5800d000.usbh-ehci: irq 73, io mem 0x5800d000
[ 3.259592] ehci-platform 5800d000.usbh-ehci: USB 2.0 started, EHCI 1.00
[ 3.639579] usb 1-1: new high-speed USB device number 2 using ehci-platform
[ 4.199627] usb 1-1.2: new low-speed USB device number 3 using ehci-platform
[ 4.360210] input: PixArt USB Optical Mouse as /devices/platform/soc/5800d000.usbh-ehci/usb1/1-1/1-1.2/1-1.2:1.0/0003:093A:2510.0001/input/input3
[ 4.372427] hid-generic 0003:093A:2510.0001: input: USB HID v1.11 Mouse [PixArt USB Optical Mouse] on usb-5800d000.usbh-ehci-1.2/input0
======
Could you please help us to fix this issue?
Solved! Go to Solution.
2019-09-11 01:10 AM
Hi,
I suspect the OHCI is not enabled, but "dmesg | grep usb" does not show it. You should try "dmesg | grep -i ohci"
The wiki page
https://wiki.st.com/stm32mpu/wiki/USBH_device_tree_configuration
reports the settings for enabling ohci.
Please note that ohci is not enabled on the ST boards because both include on-board a USB hub.
2019-09-11 01:10 AM
Hi,
I suspect the OHCI is not enabled, but "dmesg | grep usb" does not show it. You should try "dmesg | grep -i ohci"
The wiki page
https://wiki.st.com/stm32mpu/wiki/USBH_device_tree_configuration
reports the settings for enabling ohci.
Please note that ohci is not enabled on the ST boards because both include on-board a USB hub.
2019-09-11 01:12 AM
By the way ... could you please provide the P/N of L3 ?
Thanks!
2019-09-11 01:41 AM
Thank you for your reply, AntonioST!
After enabling ohci, the USB mouse works.
2019-09-11 01:43 AM
The P/N of L3 is shown below.