Forum Discussion
Cyclone V: how to enable USB1 with a ULPI USB PHY (USB3320)?
I want to enable USB1 (USB 2.0 controller) of the Cyclone V in host-only mode. But Vbus is not present and no device is detected.
- A ULPI-compatible Microchip USB3320 USB PHY is connected to the Cyclone V with a ULPI interface. The CPEN pin of the USB3320 controls a power switch on the board. To enable the 5V Vbus voltage, used to power USB devices, the CPEN pin must be driven high. Its POR state is low.
- HPS_GPIO0 is connected to the active-low RESET# pin of the USB3320.
- To check if Vbus is on, I connected a mouse, that should light up when connected to a USB host.
The main DT file is socfpga.dtsi. I altered it a little in both Barebox and Linux v6.6.22:
&usbphy0 {
reset-gpios = <&porta 0 GPIO_ACTIVE_LOW>;
status = "okay";
};
&usb1 {
status = "okay";
dr_mode = "host";
};Barebox shows that GPIO0 (RESET#) is an output and is high, which is OK:
barebox:/ gpioinfo ff708000.gpio@ff708000:[email protected]
GPIOs 454-482, chip ff708000.gpio@ff708000:[email protected]:
dir val requested name label
GPIO 0: out hi active low soc:usbphy.of reset
GPIO 1: in lo false
GPIO 2: in lo falseBarebox shows that the dwc2 driver binds to usb1:
barebox@Enclustra Mercury+ SA2:/ drvinfo dwc2
Driver Device(s)
--------------------
dwc2
[email protected]Linux boot log:
# dmesg | grep -Ei 'usb|dwc2'
[ 0.042372] usbcore: registered new interface driver usbfs
[ 0.042408] usbcore: registered new interface driver hub
[ 0.042448] usbcore: registered new device driver usb
[ 0.896138] usbcore: registered new interface driver usb-storage
[ 0.920377] usbcore: registered new interface driver usbhid
[ 0.932106] usbhid: USB HID core driver
[ 1.086689] usb_phy_generic soc:usbphy: dummy supplies not allowed for exclusive requests
[ 1.095129] dwc2 ffb40000.usb: supply vusb_d not found, using dummy regulator
[ 1.111913] dwc2 ffb40000.usb: supply vusb_a not found, using dummy regulator
[ 1.137639] dwc2 ffb40000.usb: DWC OTG Controller
[ 1.142362] dwc2 ffb40000.usb: new USB bus registered, assigned bus number 1
[ 1.149465] dwc2 ffb40000.usb: irq 48, io mem 0xffb40000
[ 1.155604] hub 1-0:1.0: USB hub foundI was told that the "dummy regulator" messages are nothing to worry about.
More Linux commands:
# lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux 6.6.22 dwc2_hsotg DWC OTG Controller
# gpioinfo gpiochip0
gpiochip0 - 29 lines:
line 0: unnamed "reset" output active-low [used]
line 1: unnamed unused input active-high
line 2: unnamed unused input active-highPastebin
- my configuration: https://paste.debian.net/hidden/77078877
- Buildroot defconfig: https://paste.debian.net/hidden/e8b1d0fc
- Linux defconfig: https://paste.debian.net/hidden/d578d0f9
Hi Alan,
Thanks for giving it a thought. I finally got it working: a misconfigured switch. No comments, please...
David
3 Replies
- dpeng
Occasional Contributor
Hi Alan,
Thanks for giving it a thought. I finally got it working: a misconfigured switch. No comments, please...
David
- SueC_Altera
Contributor
David - I hate it when something like that happens! Thanks for letting us know you figured it out!
Sue
- AlanCLTan
Occasional Contributor
Hi dpeng,
Let me understand further on your setup:
- CPEN routed to a VBUS power switch enable (active‑high)
- RESET# of the USB3320 driven by HPS_GPIO0 (active‑low)
Is that correct?
Could you confirm the checklist below:
- Confirm the 5 V input to the VBUS power switch is present.
- Verify the switch enable pin is active-high and connected to CPEN directly.
- Verify the reference clock to USP3320 (26MHz) is present and stable.
- Scope the ULPI CLK pin from the PHY (usually 60 MHz output to the MAC).
- Also check that ULPI I/O voltage rails (1.8 V or 3.3 V) are correct.
- For OTG micro‑AB, ID grounded: A‑device (host); ID floating: B‑device (peripheral). If the ID pin is floating, the PHY may not try to source VBUS.
Best regards,
Alan