Forum Discussion
Hi AlanCLTan
tried both approaches but no luck so far. GPIOs seem to be in the correct status, the device tree looks good too:
phy 0 [ + ] nop_phy | |-- usbphy
usb 0 [ + ] dwc2_usb | `-- usb@ffb40000
usb_hub 0 [ + ] usb_hub | `-- usb_hub
but no detection of the USB 2513B Hub connected to the USB3300 one
I didn't try the kernel CONFIG_ parameters because I was focusing on making u-boot work, just to keep the scope more limited.
With the older working uboot there is no mention of the phy layer in the dm tree output:
=> usb start
starting USB...
USB0: Core Release: 2.93a
scanning bus 0 for devices... 2 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
=> dm tree
Class Probed Name
----------------------------------------
root [ + ] root_driver
simple_bus [ + ] `-- soc
gpio [ + ] |-- gpio@ff708000
gpio [ + ] | `-- porta
gpio [ ] |-- gpio@ff709000
gpio [ ] | `-- portb
gpio [ ] |-- gpio@ff70a000
gpio [ ] | `-- portc
mmc [ + ] |-- dwmmc0@ff704000
blk [ + ] | `-- dwmmc0@ff704000.blk
usb [ + ] `-- usb@ffb40000
usb_hub [ + ] `-- usb_hub
usb_hub [ + ] `-- usb_hub
Hi teiram
I was checking back your usb0 node definition.
usb0: usb@ffb00000 {
compatible = "snps,dwc2";
reg = <0xffb00000 0xffff>;
interrupts = <0 125 4>;
clocks = <&usb_mp_clk>;
clock-names = "otg";
resets = <&rst USB0_RESET>;
reset-names = "dwc2";
phys = <&usbphy0>;
phy-names = "usb2-phy";
status = "disabled";
};Could you set the status to "okay"? Also, included a few things to try, i.e. increasing the reg size.
&usb0 {
compatible = "snps,dwc2";
reg = <0xffb00000 0x10000>; /* increase the size */
/* Verify the correct interrupt for your platform */
interrupts = <0 125 4>;
clocks = <&usb_mp_clk>;
clock-names = "otg";
resets = <&rst USB0_RESET>;
reset-names = "dwc2"; /* ensure this matches your reset controller driver */
/* Key properties for ULPI host */
dr_mode = "host";
snps,phy_type = "ulpi"; /* helps older/newer drivers */
phys = <&usbphy0>;
phy-names = "usb2-phy";
snps,dis_u2_susphy_quirk; /* common with external ULPI PHYs */
/* Power for the port */
vbus-supply = <&vbus_5v>;
/* Pinctrl must be applied */
pinctrl-names = "default";
pinctrl-0 = <&usb0_ulpi_pins>;
status = "okay";
};As for the vbus_5v and usb0_ulpi_pins definitions, you could refer to this:
vbus_5v: regulator-vbus-5v {
compatible = "regulator-fixed";
regulator-name = "vbus-5v";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
gpio = <&gpioX Y GPIO_ACTIVE_HIGH>; /* Replace with your actual GPIO controlling the VBUS switch (if any) */
enable-active-high;
regulator-always-on; /* or remove and let runtime handle it */
status = "okay";
};
&pinctrl {
usb0_ulpi_pins: usb0-ulpi-pins {
pins = "..."; /* Replace with your platform’s exact pin/function descriptors */
function = "usb";
bias-disable;
drive-strength = <8>;
slew-rate = <1>;
};
};Regards,
Alan
- teiram19 days ago
New Contributor
Hi Alan,
I'm a bit confused about your request on USB0 configuration. The HPS only enables USB1 and that is why I think USB0 is just disabled. This is from the HPS peripheral configuration page:
I've found identical setups on other Cyclone-V based projects, so I assumed that should be okey.
My feeling is that maybe there is something missing in the u-boot config, but I'm not able to find what it might be. I understand ULPI drivers/handling should work out of the box? This is my USB configuration:
Could I be missing something?
Regards,
Manuel