Forum Discussion
- teiram1 month ago
New Contributor
Hi AlanCLTan
sorry, I was out for some days and didn't have the chance yet, but thanks a lot for your insights and ideas.
What I see is the following:
usb-phy0 is already defined in the base socfpga.dtsi file, as:
usbphy0: usbphy {
#phy-cells = <0>;
compatible = "usb-nop-xceiv";
status = "okay";
};It is lacking the reset-gpios entry, what I think I could overlay on my dtsi file.
usb1 refers to the phy, but using a different atttribute (phys instead of usb-phy as you suggested):
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 that make a difference?
Regarding your suggested kernel configuration, does this apply to the u-boot defconfig? So far I'm trying to have a working u-boot, but I don't see all those options in my current .config, either set or not set:
- CONFIG_USB_DWC2. That is set.
- CONFIG_USB_OHCI_HCD. That is not set.
- CONFIG_PHY. Not in u-boot .config
- CONFIG_NOP_USB_XCEIV. Not in u-boot .config, but there is a CONFIG_NOP_PHY.
I will play a bit with these ideas to see if I get a working configuration
- AlanCLTan1 month ago
Occasional Contributor
Hi teiram ,
Welcome back!
phys instead of usb-phy -- From my study, "phys" is for modern controller and "usb-phys" is used for older controller. Not 100% sure on the impact but please experiment with both cases :)
As for the CONFIG_*s, they should be found in Linux's kernel menu-config.
Thanks
- teiram1 month ago
New Contributor
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_hubbut 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