2024-11-16 06:03 PM - edited 2024-11-17 03:42 AM
Hi!
When I use this device tree nodes, or very similar. I get this error code:
As you can see, I'm getting this kind of errors. I don't know if the Device Tree or the IC chip is faulty. I would like to know if there are any ways to find out if the IC chip is the cause of the problem or if there is any way for me to find out if the USB2514B is faulty. Can you give me any suggestions?
I have checked the hardware configuration and it seems to be in order. I have checked the voltage levels. It seems very OK as well.
Once RESET_N goes low, the error codes in Linux terminal will re-write the error codes again. So I guess that the RESET_N is working on the USB hub.
[...] usb 2-4: device not accepting address 27, error -62
[...] usb 2-4: device descriptor read/64, error -62
[...] usb 2-4: device descriptor read/64, error -62
[...] usb 2-4: device not accepting address 29, error -62
[...] usb 2-4: device not accepting address 30, error -62
[...] usb usb2-port4: unable to enumerate USB device
Error -62 is:
(Time out: ETIME 62 /* Timer expired */)
Here is my device tree. I have tried different configurations, without success. That error above only occurs when this:
&usbh_ehci{
status = "okay";
/* USER CODE BEGIN usbh_ehci */
phys = <&usbphyc_port0>;
#address-cells = <1>;
#size-cells = <0>;
/* onboard HUB */
hub@1 {
compatible = "usb424,2514";
reg = <1>;
vdd-supply = <&v3v3>;
};
/* USER CODE END usbh_ehci */
};
&usbh_ohci{
status = "okay";
/* USER CODE BEGIN usbh_ohci */
/* USER CODE END usbh_ohci */
};
Or this applies, with status = "okay" or status = "disable" for usb_ehci.
&usbh_ehci{
status = "okay";
/* USER CODE BEGIN usbh_ehci */
/* USER CODE END usbh_ehci */
};
&usbh_ohci{
status = "okay";
/* USER CODE BEGIN usbh_ohci */
phys = <&usbphyc_port0>;
#address-cells = <1>;
#size-cells = <0>;
/* onboard HUB */
hub@1 {
compatible = "usb424,2514";
reg = <1>;
vdd-supply = <&v3v3>;
};
/* USER CODE END usbh_ohci */
};
Solved! Go to Solution.
2024-11-18 04:56 AM
Hi,
Have you check that the 24MHz crystal on USB2514B is oscillating correctly.
What is you crystal CL value ? Are you sure about the 18pF and 1Mohms ?
On STM32MP157F-DK2, we have 6.8pF and no resistor (with a CL=6pF crystal).
Maybe remove the 1Mohms (as there is one inside USB2514B) and recalculate load capacitors based on your crystal spec.
If it helps. here the log on STM32MP157F-DK2 (nothing connected on USB):
root@stm32mp1:~# dmesg | grep usb
[ 0.109625] platform 49000000.usb-otg: Fixed dependency cycle(s) with /soc/etzpc@5c007000/i2c@5c002000/stusb1600@28/connector
[ 0.147026] usbcore: registered new interface driver usbfs
[ 0.147110] usbcore: registered new interface driver hub
[ 0.147174] usbcore: registered new device driver usb
[ 0.329711] usbcore: registered new interface driver pegasus
[ 0.329798] usbcore: registered new interface driver asix
[ 0.329854] usbcore: registered new interface driver ax88179_178a
[ 0.329905] usbcore: registered new interface driver cdc_ether
[ 0.329970] usbcore: registered new interface driver smsc75xx
[ 0.330035] usbcore: registered new interface driver smsc95xx
[ 0.330084] usbcore: registered new interface driver net1080
[ 0.330133] usbcore: registered new interface driver cdc_subset
[ 0.330192] usbcore: registered new interface driver zaurus
[ 0.330309] usbcore: registered new interface driver cdc_ncm
[ 0.333033] usbcore: registered new interface driver usb-storage
[ 0.333303] usbcore: registered new device driver onboard-usb-hub
[ 0.367642] usbcore: registered new interface driver usbhid
[ 0.367655] usbhid: USB HID core driver
[ 2.701590] stm32-usbphyc 5a006000.usbphyc: registered rev:1.0
[ 2.718796] ehci-platform 5800d000.usb: EHCI Host Controller
[ 2.728433] dwc2 49000000.usb-otg: supply vusb_d not found, using dummy regulator
[ 2.732811] ehci-platform 5800d000.usb: new USB bus registered, assigned bus number 1
[ 2.740460] dwc2 49000000.usb-otg: supply vusb_a not found, using dummy regulator
[ 2.756017] ehci-platform 5800d000.usb: irq 77, io mem 0x5800d000
[ 2.782944] ehci-platform 5800d000.usb: USB 2.0 started, EHCI 1.00
[ 2.883277] dwc2 49000000.usb-otg: EPs: 9, dedicated fifos, 952 entries in SPRAM
[ 2.890951] dwc2 49000000.usb-otg: DWC OTG Controller
[ 2.894861] dwc2 49000000.usb-otg: new USB bus registered, assigned bus number 2
[ 2.902069] dwc2 49000000.usb-otg: irq 80, io mem 0x49000000
[ 3.082823] usb 1-1: new high-speed USB device number 2 using ehci-platform
[ 16.226278] usb0: HOST MAC d8:d8:42:52:6e:36
[ 16.229180] usb0: MAC 6e:54:67:18:53:e0
[ 16.235288] dwc2 49000000.usb-otg: bound driver configfs-gadget.g1
root@stm32mp1:~# lsusb
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 0424:2514 Microchip Technology, Inc. (formerly SMSC) USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@stm32mp1:~#
Regards.
2024-11-17 11:18 PM
Hi,
as far as I understood, only usbh_ehci should be enabled as the communication with the hub is always high-speed (I think the full-speed or low-speed devices enumeration are automatically managed by the hub itself).
See working example for STM32MP157f-dk2:
Regards.
2024-11-17 11:48 PM
Hi @PatrickF
I totally agree!
When I disable "status = "disabled";" on usbh_ohci, I get no error -62 at all.
But I cannot verify if usbh_ehic have establish a communication. Is it something more I need to do?
It's the CubeIDE that generates the node @usbh_ohci by the way.
2024-11-18 03:26 AM - edited 2024-11-18 03:48 AM
This is the output when I use this device tree. Note: When I apply 0V on RESET_N, nothing happens. It's like that the hub won't care if I use usbh_ehic. Why? This must be the cause of the problem?
&usbh_ehci{
status = "okay";
/* USER CODE BEGIN usbh_ehci */
phys = <&usbphyc_port0>;
#address-cells = <1>;
#size-cells = <0>;
/* onboard HUB */
hub@1 {
compatible = "usb424,2514";
reg = <1>;
vdd-supply = <&v3v3>;
};
/* USER CODE END usbh_ehci */
};
&usbh_ohci{
/* USER CODE BEGIN usbh_ohci */
status = "disabled";
/* USER CODE END usbh_ohci */
};
This is how my stm32mp151.dtsi file looks like
usbh_ohci: usb@5800c000 {
compatible = "generic-ohci";
reg = <0x5800c000 0x1000>;
clocks = <&usbphyc>, <&rcc USBH>;
resets = <&rcc USBH_R>;
interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
status = "disabled";
};
usbh_ehci: usb@5800d000 {
compatible = "generic-ehci";
reg = <0x5800d000 0x1000>;
clocks = <&usbphyc>, <&rcc USBH>;
resets = <&rcc USBH_R>;
interrupts-extended = <&exti 43 IRQ_TYPE_LEVEL_HIGH>;
companion = <&usbh_ohci>;
power-domains = <&pd_core>;
wakeup-source;
status = "disabled";
};
2024-11-18 04:56 AM
Hi,
Have you check that the 24MHz crystal on USB2514B is oscillating correctly.
What is you crystal CL value ? Are you sure about the 18pF and 1Mohms ?
On STM32MP157F-DK2, we have 6.8pF and no resistor (with a CL=6pF crystal).
Maybe remove the 1Mohms (as there is one inside USB2514B) and recalculate load capacitors based on your crystal spec.
If it helps. here the log on STM32MP157F-DK2 (nothing connected on USB):
root@stm32mp1:~# dmesg | grep usb
[ 0.109625] platform 49000000.usb-otg: Fixed dependency cycle(s) with /soc/etzpc@5c007000/i2c@5c002000/stusb1600@28/connector
[ 0.147026] usbcore: registered new interface driver usbfs
[ 0.147110] usbcore: registered new interface driver hub
[ 0.147174] usbcore: registered new device driver usb
[ 0.329711] usbcore: registered new interface driver pegasus
[ 0.329798] usbcore: registered new interface driver asix
[ 0.329854] usbcore: registered new interface driver ax88179_178a
[ 0.329905] usbcore: registered new interface driver cdc_ether
[ 0.329970] usbcore: registered new interface driver smsc75xx
[ 0.330035] usbcore: registered new interface driver smsc95xx
[ 0.330084] usbcore: registered new interface driver net1080
[ 0.330133] usbcore: registered new interface driver cdc_subset
[ 0.330192] usbcore: registered new interface driver zaurus
[ 0.330309] usbcore: registered new interface driver cdc_ncm
[ 0.333033] usbcore: registered new interface driver usb-storage
[ 0.333303] usbcore: registered new device driver onboard-usb-hub
[ 0.367642] usbcore: registered new interface driver usbhid
[ 0.367655] usbhid: USB HID core driver
[ 2.701590] stm32-usbphyc 5a006000.usbphyc: registered rev:1.0
[ 2.718796] ehci-platform 5800d000.usb: EHCI Host Controller
[ 2.728433] dwc2 49000000.usb-otg: supply vusb_d not found, using dummy regulator
[ 2.732811] ehci-platform 5800d000.usb: new USB bus registered, assigned bus number 1
[ 2.740460] dwc2 49000000.usb-otg: supply vusb_a not found, using dummy regulator
[ 2.756017] ehci-platform 5800d000.usb: irq 77, io mem 0x5800d000
[ 2.782944] ehci-platform 5800d000.usb: USB 2.0 started, EHCI 1.00
[ 2.883277] dwc2 49000000.usb-otg: EPs: 9, dedicated fifos, 952 entries in SPRAM
[ 2.890951] dwc2 49000000.usb-otg: DWC OTG Controller
[ 2.894861] dwc2 49000000.usb-otg: new USB bus registered, assigned bus number 2
[ 2.902069] dwc2 49000000.usb-otg: irq 80, io mem 0x49000000
[ 3.082823] usb 1-1: new high-speed USB device number 2 using ehci-platform
[ 16.226278] usb0: HOST MAC d8:d8:42:52:6e:36
[ 16.229180] usb0: MAC 6e:54:67:18:53:e0
[ 16.235288] dwc2 49000000.usb-otg: bound driver configfs-gadget.g1
root@stm32mp1:~# lsusb
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 0424:2514 Microchip Technology, Inc. (formerly SMSC) USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
root@stm32mp1:~#
Regards.
2024-11-18 06:41 AM - edited 2024-11-18 06:42 AM
Hi @PatrickF
I've been using ABM12W-24.0000MHZ-6-D1X-T3 from https://www.mouser.se/ProductDetail/815-12W24-6D1XT
And 6.8 pF caps.
I will measure the frequency and give you a reply later. Perhaps it might be the cause of the failed communication.
2024-11-19 02:11 PM
It was the crystal that caused the problem.
Instead, I made a track from the 24 MHz oscillator, to the USB hub. It works very well. Even my optical mouse was awaken.