USB: dwc2: allow usb start even if usbphy is not found
PATCH 1/1 USB: dwc2: allow usb start even if usbphy is not found
RK3288 uses rockchip_usb2_phy, but that driver doesn't register iself as a usbphy driver and "usb start" fails with this error:
drivers/usb/host/dwc2.c:1254- dwc2_setup_phy() dwc2_usb usb@ff580000:
Failed to get USB PHY: -19.
Until a proper fix is made for rockchip_usb2_phy, this patch allows usb start to continue even if usbphy is not found.
Tested on Asus TinkerBoard.
--- drivers/usb/host/dwc2.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/usb/host/dwc2.c +2 -3
@@ -1329,7 +1329,7 @@ static int dwc2_usb_probe(struct udevice *dev) ret =dwc2_setup_phy (dev);if (ret) -return ret; +dev_dbg (dev,"Failed to setup PHY: %d. Continuing anyway...\n" , ret);return dwc2_init_common (dev, priv); }
@@ -1345,8 +1345,7 @@ static int dwc2_usb_remove(struct udevice *dev) ret =dwc2_shutdown_phy (dev);if (ret) { -dev_dbg (dev,"Failed to shutdown USB PHY: %d.\n" , ret); -return ret; +dev_dbg (dev,"Failed to shutdown USB PHY: %d. Continuing anyway...\n" , ret); }dwc2_uninit_common (priv->regs);
Signature · 1 line
2.52.0
Hi Marius,
Quoted 10 lines · Marius Dinu
RK3288 uses
rockchip_usb2_phy, but that driver doesn't register iself as a usbphy driver and "usb start" fails with this error:drivers/usb/host/dwc2.c:1254-
dwc2_setup_phy()dwc2_usbusb@ff580000:
Failed to get USB PHY: -19.Until a proper fix is made for
rockchip_usb2_phy, this patch allows usb start to continue even if usbphy is not found.Tested on Asus TinkerBoard.
I am not seeing this issue on my TinkerBoard, what U-Boot version are you testing and have you made any config changes compared to tinker-rk3288_defconfig?
=> usb start
starting USB...
USB DWC2
USB DWC2
Bus usb@ff540000: 2 USB Device(s) found
Bus usb@ff580000: 1 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
=> dm tree -e usb
Class Seq Probed Driver Name
-----------------------------------------------------------
usb 0 [ + ] dwc2_usb usb@ff540000 usb_hub 0 [ + ] usb_hub `-- usb_hub usb_hub 1 [ + ] usb_hub `-- usb_hub usb 1 [ + ] dwc2_usb usb@ff580000 usb_hub 2 [ + ] usb_hub `-- usb_hub
Have something changed recently that broke this?
Anyway if something needs fixing it is probably rockchip_usb2_phy.
Regards,
Jonas
Quoted 29 lines
Signed-off-by Marius Dinu <[email protected]>--- drivers/usb/host/dwc2.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)drivers/usb/host/dwc2.c +2
-3@@ -1329,7 +1329,7 @@ static int dwc2_usb_probe(struct udevice *dev) ret =dwc2_setup_phy (dev);if (ret) -return ret; +dev_dbg (dev,"Failed to setup PHY: %d. Continuing anyway...\n" , ret);return dwc2_init_common (dev, priv); }@@ -1345,8 +1345,7 @@ static int dwc2_usb_remove(struct udevice *dev) ret =dwc2_shutdown_phy (dev);if (ret) { -dev_dbg (dev,"Failed to shutdown USB PHY: %d.\n" , ret); -return ret; +dev_dbg (dev,"Failed to shutdown USB PHY: %d. Continuing anyway...\n" , ret); }dwc2_uninit_common (priv->regs);
Quoted 9 lines · Jonas Karlman
Hi Marius,
Quoted 6 lines · Marius Dinu
RK3288 uses
rockchip_usb2_phy, but that driver doesn't register iself as a usbphy driver and "usb start" fails with this error:drivers/usb/host/dwc2.c:1254-
dwc2_setup_phy()dwc2_usbusb@ff580000:
Failed to get USB PHY: -19.
Quoted 8 lines
Quoted 4 lines
Until a proper fix is made for
rockchip_usb2_phy, this patch allows usb start to continue even if usbphy is not found.Tested on Asus TinkerBoard.
I am not seeing this issue on my TinkerBoard, what U-Boot version are you testing and have you made any config changes compared to tinker-rk3288_defconfig?
I'm using the github master branch pulled today + lots and lots of changes in config. I didn't make a diff, but I expect it to be very very far from tinker-rk3288_defconfig.
Quoted 12 lines
=> usb start
starting USB...
USB DWC2
USB DWC2
Bus usb@ff540000: 2 USB Device(s) found
Bus usb@ff580000: 1 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found=> dm tree -e usb
Class Seq Probed Driver Name
-----------------------------------------------------------
Quoted 7 lines
usb 0 [ + ] dwc2_usb usb@ff540000 usb_hub 0 [ + ] usb_hub `-- usb_hub usb_hub 1 [ + ] usb_hub `-- usb_hub usb 1 [ + ] dwc2_usb usb@ff580000 usb_hub 2 [ + ] usb_hub `-- usb_hubHave something changed recently that broke this?
Yes! but not exactly recently...
It broke since commit e17a4bf198510693967644c331ab621fc41ea8b5. Here's a log on my system without my proposed fix. This is a log that I saved while I was investigating the failed USB, about a year ago, I think. But I checked and it still fails with today's git master, I just don't have the time to enable all the debug options again. It's still ret -19 error.
=> usb start
starting USB...
drivers/core/ofnode.c:540- ofnode_read_prop() ofnode_read_prop: assigned-clock-rates: <not found>
drivers/core/of_access.c:556- of_read_u32_index() of_read_u32_index: #clock-cells: 0x1 (1)
drivers/core/of_access.c:556- of_read_u32_index() of_read_u32_index: #clock-cells: 0x1 (1)
drivers/core/uclass.c:546-uclass_get_device_by_ofnode() Looking for clock-controller@ff760000 drivers/core/uclass.c:397-uclass_find_device_by_ofnode() Looking for clock-controller@ff760000
drivers/core/uclass.c:406-uclass_find_device_by_ofnode() - checking oscillator
drivers/core/uclass.c:406-uclass_find_device_by_ofnode() - checking clock-controller@ff760000
drivers/core/uclass.c:416-uclass_find_device_by_ofnode() - result for clock-controller@ff760000: clock-controller@ff760000 (ret=0)
drivers/core/uclass.c:549-uclass_get_device_by_ofnode() - result for clock-controller@ff760000: clock-controller@ff760000 (ret=0)
drivers/core/ofnode.c:417-ofnode_read_u32_index() ofnode_read_u32_index: vbus-supply: of_read_u32_index: vbus-supply: (not found)
drivers/core/of_access.c:556- of_read_u32_index() of_read_u32_index: #phy-cells: 0x0 (0)
drivers/core/uclass.c:546-uclass_get_device_by_ofnode() Looking for usb-phy@334 drivers/core/uclass.c:397-uclass_find_device_by_ofnode() Looking for usb-phy@334
drivers/core/uclass.c:416-uclass_find_device_by_ofnode() - result for usb-phy@334: (none) (ret=-19)
drivers/core/uclass.c:549-uclass_get_device_by_ofnode() - result for usb-phy@334: (none) (ret=-19)
drivers/core/uclass.c:546-uclass_get_device_by_ofnode() Looking for usbphy drivers/core/uclass.c:397-uclass_find_device_by_ofnode() Looking for usbphy
drivers/core/uclass.c:416-uclass_find_device_by_ofnode() - result for usbphy: (none) (ret=-19)
drivers/core/uclass.c:549-uclass_get_device_by_ofnode() - result for usbphy: (none) (ret=-19)
Bus usb@ff500000: Port not available.
and it repeats for usb@ff540000 and usb@ff580000.
There is no usbphy or usb-phy detected/bound in log when u-boot walks the devicetree nodes, but the device tree has "usbphy" node compatible="rockchip,rk3288-usb-phy" with 3 sub-nodes: usb-phy@320, usb-phy@334, usb-phy@348.
Driver with that compatible string: rockchip_usb2_phy.c. CONFIG_ROCKCHIP_USB2_PHY is enabled, but "dm compat" lists only these:
rockchip_usb2phy rockchip,rk3308-usb2phy
rockchip,rk3328-usb2phy
rockchip,rk3399-usb2phy
rockchip,rk3528-usb2phy
rockchip,rk3568-usb2phy
rockchip,rk3576-usb2phy
rockchip,rk3588-usb2phyThose compat strings come from phy-rockchip-inno-usb2.c. (I also had that enabled while debugging.) There are no compat strings from rockchip_usb2_phy.c.
It's because phy-rockchip-inno-usb2.c has this:
U_BOOT_DRIVER(rockchip_usb2phy){
.name = rockchip_usb2phy"while rockchip_usb2_phy.c does not. So the usb driver finds no compatible phy driver loaded and fails. Before the commit, it would load anyway.
I didn't use any AI in this investigation!
Here is a log with my patch:
=> usb start
starting USB...
drivers/core/ofnode.c:525- ofnode_read_bool() ofnode_read_bool: disable-over-current: false drivers/core/ofnode.c:525- ofnode_read_bool() ofnode_read_bool: hnp-srp-disable: false drivers/core/ofnode.c:540- ofnode_read_prop() ofnode_read_prop: assigned-clock-rates: <not found> drivers/core/of_access.c:556- of_read_u32_index() of_read_u32_index: #clock-cells: 0x1 (1) drivers/core/of_access.c:556- of_read_u32_index() of_read_u32_index: #clock-cells: 0x1 (1) drivers/core/uclass.c:546-uclass_get_device_by_ofnode() Looking for clock-controller@ff760000 drivers/core/uclass.c:397-uclass_find_device_by_ofnode() Looking for clock-controller@ff760000 drivers/core/uclass.c:406-uclass_find_device_by_ofnode() - checking oscillator drivers/core/uclass.c:406-uclass_find_device_by_ofnode() - checking clock-controller@ff760000 drivers/core/uclass.c:416-uclass_find_device_by_ofnode() - result for clock-controller@ff760000: clock-controller@ff760000 (ret=0) drivers/core/uclass.c:549-uclass_get_device_by_ofnode() - result for clock-controller@ff760000: clock-controller@ff760000 (ret=0) drivers/core/of_access.c:556- of_read_u32_index() of_read_u32_index: #phy-cells: 0x0 (0) drivers/core/uclass.c:546-uclass_get_device_by_ofnode() Looking for usb-phy@348 drivers/core/uclass.c:397-uclass_find_device_by_ofnode() Looking for usb-phy@348 drivers/core/uclass.c:416-uclass_find_device_by_ofnode() - result for usb-phy@348: (none) (ret=-19) drivers/core/uclass.c:549-uclass_get_device_by_ofnode() - result for usb-phy@348: (none) (ret=-19) drivers/core/uclass.c:546-uclass_get_device_by_ofnode() Looking for usbphy drivers/core/uclass.c:397-uclass_find_device_by_ofnode() Looking for usbphy drivers/core/uclass.c:416-uclass_find_device_by_ofnode() - result for usbphy: (none) (ret=-19) drivers/core/uclass.c:549-uclass_get_device_by_ofnode() - result for usbphy: (none) (ret=-19) drivers/usb/host/dwc2.c:1254- dwc2_setup_phy() dwc2_usb usb@ff540000: Failed to get USB PHY: -19. drivers/usb/host/dwc2.c:1332- dwc2_usb_probe() dwc2_usb usb@ff540000: Failed to setup PHY: -19. Continuing anyway... drivers/usb/host/dwc2.c:1061- dwc2_reset() dwc2_usb usb@ff540000: Can't get reset: -2 drivers/usb/host/dwc2.c:1095- dwc2_init_common() dwc2_usb usb@ff540000: Core Release: 3.10a drivers/core/ofnode.c:540- ofnode_read_prop() ofnode_read_prop: dr_mode: host drivers/usb/common/dwc2_core.c:67- dwc2_flush_tx_fifo() Flush Tx FIFO 16 drivers/usb/common/dwc2_core.c:102- dwc2_flush_rx_fifo() Flush Rx FIFO drivers/core/ofnode.c:417-ofnode_read_u32_index() ofnode_read_u32_index: vbus-supply: of_read_u32_index: vbus-supply: (not found) USB DWC2 drivers/core/ofnode.c:417-ofnode_read_u32_index() ofnode_read_u32_index: companion: of_read_u32_index: companion: (not found) drivers/core/ofnode.c:525- ofnode_read_bool() ofnode_read_bool: disable-over-current: false drivers/core/ofnode.c:525- ofnode_read_bool() ofnode_read_bool: hnp-srp-disable: false drivers/core/ofnode.c:540- ofnode_read_prop() ofnode_read_prop: assigned-clock-rates: <not found>
drivers/core/of_access.c:556- of_read_u32_index() of_read_u32_index: #clock-cells: 0x1 (1)
drivers/core/of_access.c:556- of_read_u32_index() of_read_u32_index: #clock-cells: 0x1 (1)
drivers/core/uclass.c:546-uclass_get_device_by_ofnode() Looking for clock-controller@ff760000 drivers/core/uclass.c:397-uclass_find_device_by_ofnode() Looking for clock-controller@ff760000
drivers/core/uclass.c:406-uclass_find_device_by_ofnode() - checking oscillator
drivers/core/uclass.c:406-uclass_find_device_by_ofnode() - checking clock-controller@ff760000
drivers/core/uclass.c:416-uclass_find_device_by_ofnode() - result for clock-controller@ff760000: clock-controller@ff760000 (ret=0)
drivers/core/uclass.c:549-uclass_get_device_by_ofnode() - result for clock-controller@ff760000: clock-controller@ff760000 (ret=0)
drivers/core/of_access.c:556- of_read_u32_index() of_read_u32_index: #phy-cells: 0x0 (0)
drivers/core/uclass.c:546-uclass_get_device_by_ofnode() Looking for usb-phy@320 drivers/core/uclass.c:397-uclass_find_device_by_ofnode() Looking for usb-phy@320
drivers/core/uclass.c:416-uclass_find_device_by_ofnode() - result for usb-phy@320: (none) (ret=-19)
drivers/core/uclass.c:549-uclass_get_device_by_ofnode() - result for usb-phy@320: (none) (ret=-19)
drivers/core/uclass.c:546-uclass_get_device_by_ofnode() Looking for usbphy drivers/core/uclass.c:397-uclass_find_device_by_ofnode() Looking for usbphy
drivers/core/uclass.c:416-uclass_find_device_by_ofnode() - result for usbphy: (none) (ret=-19)
drivers/core/uclass.c:549-uclass_get_device_by_ofnode() - result for usbphy: (none) (ret=-19)
drivers/usb/host/dwc2.c:1254- dwc2_setup_phy() dwc2_usb usb@ff580000: Failed to get USB PHY: -19.
drivers/usb/host/dwc2.c:1332- dwc2_usb_probe() dwc2_usb usb@ff580000: Failed to setup PHY: -19. Continuing anyway...
drivers/usb/host/dwc2.c:1061- dwc2_reset() dwc2_usb usb@ff580000: Can't get reset: -2
drivers/usb/host/dwc2.c:1095- dwc2_init_common() dwc2_usb usb@ff580000: Core Release: 3.10a
drivers/core/ofnode.c:540- ofnode_read_prop() ofnode_read_prop: dr_mode: otg
drivers/usb/common/dwc2_core.c:67- dwc2_flush_tx_fifo() Flush Tx FIFO 16
drivers/usb/common/dwc2_core.c:102- dwc2_flush_rx_fifo() Flush Rx FIFO drivers/usb/host/dwc2.c:230-dwc_otg_core_host_init() dwc2_usb usb@ff580000: dwc_otg_core_host_init: Timeout! drivers/usb/host/dwc2.c:230-dwc_otg_core_host_init() dwc2_usb usb@ff580000: dwc_otg_core_host_init: Timeout! drivers/usb/host/dwc2.c:230-dwc_otg_core_host_init() dwc2_usb usb@ff580000: dwc_otg_core_host_init: Timeout! drivers/usb/host/dwc2.c:230-dwc_otg_core_host_init() dwc2_usb usb@ff580000: dwc_otg_core_host_init: Timeout! drivers/usb/host/dwc2.c:230-dwc_otg_core_host_init() dwc2_usb usb@ff580000: dwc_otg_core_host_init: Timeout! drivers/usb/host/dwc2.c:230-dwc_otg_core_host_init() dwc2_usb usb@ff580000: dwc_otg_core_host_init: Timeout! drivers/usb/host/dwc2.c:230-dwc_otg_core_host_init() dwc2_usb usb@ff580000: dwc_otg_core_host_init: Timeout! drivers/usb/host/dwc2.c:230-dwc_otg_core_host_init() dwc2_usb usb@ff580000: dwc_otg_core_host_init: Timeout!CONFIG_USB_GADGET is not enabled in my config.
drivers/core/ofnode.c:417-ofnode_read_u32_index() ofnode_read_u32_index: vbus-supply: of_read_u32_index: vbus-supply: (not found) USB DWC2
drivers/core/ofnode.c:417-ofnode_read_u32_index() ofnode_read_u32_index: companion: of_read_u32_index: companion: (not found) drivers/core/ofnode.c:417-ofnode_read_u32_index() ofnode_read_u32_index: usb,device-class: of_read_u32_index: usb,device-class: (not found) drivers/core/ofnode.c:417-ofnode_read_u32_index() ofnode_read_u32_index: usb,interface-class: of_read_u32_index: usb,interface-class: (not found) drivers/core/device.c:185- device_bind_common() Bound device usb_hub to usb@ff540000
drivers/core/ofnode.c:540- ofnode_read_prop() ofnode_read_prop: assigned-clock-rates: <not found>
drivers/core/device.c:185- device_bind_common() Bound device usb_hub to usb_hub drivers/core/device.c:185- device_bind_common() Bound device usb_mass_storage to usb_hub drivers/core/device.c:185- device_bind_common() Bound device usb_mass_storage.lun0 to usb_mass_storage
long delay here
drivers/core/device.c:185- device_bind_common() Bound device usb_mass_storage.lun0.bootdev to usb_mass_storage
even longer delay here
drivers/core/ofnode.c:417-ofnode_read_u32_index() ofnode_read_u32_index: usb,device-class: of_read_u32_index: usb,device-class: (not found) drivers/core/ofnode.c:417-ofnode_read_u32_index() ofnode_read_u32_index: usb,interface-class: of_read_u32_index: usb,interface-class: (not found) drivers/core/device.c:185- device_bind_common() Bound device usb_hub to usb@ff580000
drivers/core/ofnode.c:540- ofnode_read_prop() ofnode_read_prop: assigned-clock-rates: <not found>
Bus usb@ff540000: 3 USB Device(s) found
Bus usb@ff580000: 1 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found
Takes 30s to complete, but it works!
IIRC, that how much it took before the commit that broke it.
Marius
PS: There is a duplicate of this email sent from the wrong address. Sorry.
Quoted 36 lines
Anyway if something needs fixing it is probably
rockchip_usb2_phy.Regards,
JonasQuoted 29 lines
Signed-off-by Marius Dinu <[email protected]>--- drivers/usb/host/dwc2.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)drivers/usb/host/dwc2.c +2
-3@@ -1329,7 +1329,7 @@ static int dwc2_usb_probe(struct udevice *dev) ret =dwc2_setup_phy (dev);if (ret) -return ret; +dev_dbg (dev,"Failed to setup PHY: %d. Continuing anyway...\n" , ret);return dwc2_init_common (dev, priv); }@@ -1345,8 +1345,7 @@ static int dwc2_usb_remove(struct udevice *dev) ret =dwc2_shutdown_phy (dev);if (ret) { -dev_dbg (dev,"Failed to shutdown USB PHY: %d.\n" , ret); -return ret; +dev_dbg (dev,"Failed to shutdown USB PHY: %d. Continuing anyway...\n" , ret); }dwc2_uninit_common (priv->regs);
Hi Marius,
Quoted 41 lines · Marius Dinu
Quoted 9 lines · Jonas Karlman
Hi Marius,
Quoted 6 lines · Marius Dinu
RK3288 uses
rockchip_usb2_phy, but that driver doesn't register iself as a usbphy driver and "usb start" fails with this error:drivers/usb/host/dwc2.c:1254-
dwc2_setup_phy()dwc2_usbusb@ff580000:
Failed to get USB PHY: -19.Quoted 8 lines
Quoted 4 lines
Until a proper fix is made for
rockchip_usb2_phy, this patch allows usb start to continue even if usbphy is not found.Tested on Asus TinkerBoard.
I am not seeing this issue on my TinkerBoard, what U-Boot version are you testing and have you made any config changes compared to tinker-rk3288_defconfig?
I'm using the github master branch pulled today + lots and lots of changes in config. I didn't make a diff, but I expect it to be very very far from tinker-rk3288_defconfig.
Quoted 18 lines
=> usb start
starting USB...
USB DWC2
USB DWC2
Bus usb@ff540000: 2 USB Device(s) found
Bus usb@ff580000: 1 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found=> dm tree -e usb
Class Seq Probed Driver Name
-----------------------------------------------------------usb 0 [ + ] dwc2_usb usb@ff540000 usb_hub 0 [ + ] usb_hub `-- usb_hub usb_hub 1 [ + ] usb_hub `-- usb_hub usb 1 [ + ] dwc2_usb usb@ff580000 usb_hub 2 [ + ] usb_hub `-- usb_hub
Quoted 8 lines
Quoted 1 line
Have something changed recently that broke this?
Yes! but not exactly recently...
It broke since commite17a4bf198510693967644c331ab621fc41ea8b5. Here's a log on my system without my proposed fix. This is a log that I saved while I was investigating the failed USB, about a year ago, I think. But I checked and it still fails with today's git master, I just don't have the time to enable all the debug options again. It's still ret -19 error.
I did a new runtime test on a Tinker Board R2.0 using master with tinker-rk3288_defconfig and I am not able to reproduce any issue. Maybe your config changes introduce a condition that causes an issue? Please share your savedefconfig.
Quoted 144 lines
=> usb start
starting USB...
drivers/core/ofnode.c:540-ofnode_read_prop()ofnode_read_prop: assigned-clock-rates: <not found>
drivers/core/of_access.c:556-of_read_u32_index()of_read_u32_index: #clock-cells:0x1(1)
drivers/core/of_access.c:556-of_read_u32_index()of_read_u32_index: #clock-cells:0x1(1)
drivers/core/uclass.c:546-uclass_get_device_by_ofnode() Looking for clock-controller@ff760000 drivers/core/uclass.c:397-uclass_find_device_by_ofnode() Looking for clock-controller@ff760000
drivers/core/uclass.c:406-uclass_find_device_by_ofnode() - checking oscillator
drivers/core/uclass.c:406-uclass_find_device_by_ofnode() - checking clock-controller@ff760000
drivers/core/uclass.c:416-uclass_find_device_by_ofnode() - result for clock-controller@ff760000: clock-controller@ff760000 (ret=0)
drivers/core/uclass.c:549-uclass_get_device_by_ofnode() - result for clock-controller@ff760000: clock-controller@ff760000 (ret=0)
drivers/core/ofnode.c:417-ofnode_read_u32_index()ofnode_read_u32_index: vbus-supply:of_read_u32_index: vbus-supply: (not found)
drivers/core/of_access.c:556-of_read_u32_index()of_read_u32_index: #phy-cells:0x0(0)
drivers/core/uclass.c:546-uclass_get_device_by_ofnode() Looking for usb-phy@334 drivers/core/uclass.c:397-uclass_find_device_by_ofnode() Looking for usb-phy@334
drivers/core/uclass.c:416-uclass_find_device_by_ofnode() - result for usb-phy@334: (none) (ret=-19)
drivers/core/uclass.c:549-uclass_get_device_by_ofnode() - result for usb-phy@334: (none) (ret=-19)
drivers/core/uclass.c:546-uclass_get_device_by_ofnode() Looking for usbphy drivers/core/uclass.c:397-uclass_find_device_by_ofnode() Looking for usbphy
drivers/core/uclass.c:416-uclass_find_device_by_ofnode() - result for usbphy: (none) (ret=-19)
drivers/core/uclass.c:549-uclass_get_device_by_ofnode() - result for usbphy: (none) (ret=-19)
Bus usb@ff500000: Port not available.
and it repeats for usb@ff540000 and usb@ff580000.There is no usbphy or usb-phy detected/bound in log when u-boot walks the devicetree nodes, but the device tree has "usbphy" node compatible="rockchip,rk3288-usb-phy" with 3 sub-nodes: usb-phy@320, usb-phy@334, usb-phy@348.
Driver with that compatible string:rockchip_usb2_phy.c.CONFIG_ROCKCHIP_USB2_PHYis enabled, but "dm compat" lists only these:
rockchip_usb2phyrockchip,rk3308-usb2phyrockchip,rk3328-usb2phy rockchip,rk3399-usb2phy rockchip,rk3528-usb2phy rockchip,rk3568-usb2phy rockchip,rk3576-usb2phy rockchip,rk3588-usb2phyThose compat strings come from
phy-rockchip-inno-usb2.c. (I also had that enabled while debugging.) There are no compat strings fromrockchip_usb2_phy.c.It's because
phy-rockchip-inno-usb2.chas this:U_BOOT_DRIVER(rockchip_usb2phy){ .name = rockchip_usb2phy"while
rockchip_usb2_phy.cdoes not. So the usb driver finds no compatible phy driver loaded and fails. Before the commit, it would load anyway.I didn't use any AI in this investigation!
Here is a log with my patch:
=> usb start
starting USB...drivers/core/ofnode.c:525- ofnode_read_bool() ofnode_read_bool: disable-over-current: false drivers/core/ofnode.c:525- ofnode_read_bool() ofnode_read_bool: hnp-srp-disable: false drivers/core/ofnode.c:540- ofnode_read_prop() ofnode_read_prop: assigned-clock-rates: <not found> drivers/core/of_access.c:556- of_read_u32_index() of_read_u32_index: #clock-cells: 0x1 (1) drivers/core/of_access.c:556- of_read_u32_index() of_read_u32_index: #clock-cells: 0x1 (1) drivers/core/uclass.c:546-uclass_get_device_by_ofnode() Looking for clock-controller@ff760000 drivers/core/uclass.c:397-uclass_find_device_by_ofnode() Looking for clock-controller@ff760000 drivers/core/uclass.c:406-uclass_find_device_by_ofnode() - checking oscillator drivers/core/uclass.c:406-uclass_find_device_by_ofnode() - checking clock-controller@ff760000 drivers/core/uclass.c:416-uclass_find_device_by_ofnode() - result for clock-controller@ff760000: clock-controller@ff760000 (ret=0) drivers/core/uclass.c:549-uclass_get_device_by_ofnode() - result for clock-controller@ff760000: clock-controller@ff760000 (ret=0) drivers/core/of_access.c:556- of_read_u32_index() of_read_u32_index: #phy-cells: 0x0 (0) drivers/core/uclass.c:546-uclass_get_device_by_ofnode() Looking for usb-phy@348 drivers/core/uclass.c:397-uclass_find_device_by_ofnode() Looking for usb-phy@348 drivers/core/uclass.c:416-uclass_find_device_by_ofnode() - result for usb-phy@348: (none) (ret=-19) drivers/core/uclass.c:549-uclass_get_device_by_ofnode() - result for usb-phy@348: (none) (ret=-19) drivers/core/uclass.c:546-uclass_get_device_by_ofnode() Looking for usbphy drivers/core/uclass.c:397-uclass_find_device_by_ofnode() Looking for usbphy drivers/core/uclass.c:416-uclass_find_device_by_ofnode() - result for usbphy: (none) (ret=-19) drivers/core/uclass.c:549-uclass_get_device_by_ofnode() - result for usbphy: (none) (ret=-19) drivers/usb/host/dwc2.c:1254- dwc2_setup_phy() dwc2_usb usb@ff540000: Failed to get USB PHY: -19. drivers/usb/host/dwc2.c:1332- dwc2_usb_probe() dwc2_usb usb@ff540000: Failed to setup PHY: -19. Continuing anyway... drivers/usb/host/dwc2.c:1061- dwc2_reset() dwc2_usb usb@ff540000: Can't get reset: -2 drivers/usb/host/dwc2.c:1095- dwc2_init_common() dwc2_usb usb@ff540000: Core Release: 3.10a drivers/core/ofnode.c:540- ofnode_read_prop() ofnode_read_prop: dr_mode: host drivers/usb/common/dwc2_core.c:67- dwc2_flush_tx_fifo() Flush Tx FIFO 16 drivers/usb/common/dwc2_core.c:102- dwc2_flush_rx_fifo() Flush Rx FIFO drivers/core/ofnode.c:417-ofnode_read_u32_index() ofnode_read_u32_index: vbus-supply: of_read_u32_index: vbus-supply: (not found) USB DWC2 drivers/core/ofnode.c:417-ofnode_read_u32_index() ofnode_read_u32_index: companion: of_read_u32_index: companion: (not found) drivers/core/ofnode.c:525- ofnode_read_bool() ofnode_read_bool: disable-over-current: false drivers/core/ofnode.c:525- ofnode_read_bool() ofnode_read_bool: hnp-srp-disable: false drivers/core/ofnode.c:540- ofnode_read_prop() ofnode_read_prop: assigned-clock-rates: <not found>drivers/core/of_access.c:556-
of_read_u32_index()of_read_u32_index: #clock-cells:0x1(1)
drivers/core/of_access.c:556-of_read_u32_index()of_read_u32_index: #clock-cells:0x1(1)
drivers/core/uclass.c:546-uclass_get_device_by_ofnode() Looking for clock-controller@ff760000 drivers/core/uclass.c:397-uclass_find_device_by_ofnode() Looking for clock-controller@ff760000
drivers/core/uclass.c:406-uclass_find_device_by_ofnode() - checking oscillator
drivers/core/uclass.c:406-uclass_find_device_by_ofnode() - checking clock-controller@ff760000
drivers/core/uclass.c:416-uclass_find_device_by_ofnode() - result for clock-controller@ff760000: clock-controller@ff760000 (ret=0)
drivers/core/uclass.c:549-uclass_get_device_by_ofnode() - result for clock-controller@ff760000: clock-controller@ff760000 (ret=0)
drivers/core/of_access.c:556-of_read_u32_index()of_read_u32_index: #phy-cells:0x0(0)
drivers/core/uclass.c:546-uclass_get_device_by_ofnode() Looking for usb-phy@320 drivers/core/uclass.c:397-uclass_find_device_by_ofnode() Looking for usb-phy@320
drivers/core/uclass.c:416-uclass_find_device_by_ofnode() - result for usb-phy@320: (none) (ret=-19)
drivers/core/uclass.c:549-uclass_get_device_by_ofnode() - result for usb-phy@320: (none) (ret=-19)
drivers/core/uclass.c:546-uclass_get_device_by_ofnode() Looking for usbphy drivers/core/uclass.c:397-uclass_find_device_by_ofnode() Looking for usbphy
drivers/core/uclass.c:416-uclass_find_device_by_ofnode() - result for usbphy: (none) (ret=-19)
drivers/core/uclass.c:549-uclass_get_device_by_ofnode() - result for usbphy: (none) (ret=-19)
drivers/usb/host/dwc2.c:1254-dwc2_setup_phy()dwc2_usbusb@ff580000: Failed to get USB PHY: -19.
drivers/usb/host/dwc2.c:1332-dwc2_usb_probe()dwc2_usbusb@ff580000: Failed to setup PHY: -19. Continuing anyway...
drivers/usb/host/dwc2.c:1061-dwc2_reset()dwc2_usbusb@ff580000: Can't get reset: -2
drivers/usb/host/dwc2.c:1095-dwc2_init_common()dwc2_usbusb@ff580000: Core Release: 3.10a
drivers/core/ofnode.c:540-ofnode_read_prop()ofnode_read_prop:dr_mode: otg
drivers/usb/common/dwc2_core.c:67-dwc2_flush_tx_fifo()Flush Tx FIFO 16
drivers/usb/common/dwc2_core.c:102-dwc2_flush_rx_fifo()Flush Rx FIFO drivers/usb/host/dwc2.c:230-dwc_otg_core_host_init()dwc2_usbusb@ff580000:dwc_otg_core_host_init: Timeout! drivers/usb/host/dwc2.c:230-dwc_otg_core_host_init()dwc2_usbusb@ff580000:dwc_otg_core_host_init: Timeout! drivers/usb/host/dwc2.c:230-dwc_otg_core_host_init()dwc2_usbusb@ff580000:dwc_otg_core_host_init: Timeout! drivers/usb/host/dwc2.c:230-dwc_otg_core_host_init()dwc2_usbusb@ff580000:dwc_otg_core_host_init: Timeout! drivers/usb/host/dwc2.c:230-dwc_otg_core_host_init()dwc2_usbusb@ff580000:dwc_otg_core_host_init: Timeout! drivers/usb/host/dwc2.c:230-dwc_otg_core_host_init()dwc2_usbusb@ff580000:dwc_otg_core_host_init: Timeout! drivers/usb/host/dwc2.c:230-dwc_otg_core_host_init()dwc2_usbusb@ff580000:dwc_otg_core_host_init: Timeout! drivers/usb/host/dwc2.c:230-dwc_otg_core_host_init()dwc2_usbusb@ff580000:dwc_otg_core_host_init: Timeout!CONFIG_USB_GADGETis not enabled in my config.
drivers/core/ofnode.c:417-ofnode_read_u32_index()ofnode_read_u32_index: vbus-supply:of_read_u32_index: vbus-supply: (not found) USB DWC2
drivers/core/ofnode.c:417-ofnode_read_u32_index()ofnode_read_u32_index: companion:of_read_u32_index: companion: (not found) drivers/core/ofnode.c:417-ofnode_read_u32_index()ofnode_read_u32_index: usb,device-class:of_read_u32_index: usb,device-class: (not found) drivers/core/ofnode.c:417-ofnode_read_u32_index()ofnode_read_u32_index: usb,interface-class:of_read_u32_index: usb,interface-class: (not found) drivers/core/device.c:185-device_bind_common()Bound deviceusb_hubto usb@ff540000
drivers/core/ofnode.c:540-ofnode_read_prop()ofnode_read_prop: assigned-clock-rates: <not found>drivers/core/device.c:185- device_bind_common() Bound device usb_hub to usb_hub drivers/core/device.c:185- device_bind_common() Bound device usb_mass_storage to usb_hub drivers/core/device.c:185- device_bind_common() Bound device usb_mass_storage.lun0 to usb_mass_storagelong delay here
drivers/core/device.c:185-device_bind_common()Bound device usb_mass_storage.lun0.bootdev tousb_mass_storage
even longer delay here
drivers/core/ofnode.c:417-ofnode_read_u32_index()ofnode_read_u32_index: usb,device-class:of_read_u32_index: usb,device-class: (not found) drivers/core/ofnode.c:417-ofnode_read_u32_index()ofnode_read_u32_index: usb,interface-class:of_read_u32_index: usb,interface-class: (not found) drivers/core/device.c:185-device_bind_common()Bound deviceusb_hubto usb@ff580000
drivers/core/ofnode.c:540-ofnode_read_prop()ofnode_read_prop: assigned-clock-rates: <not found>
Bus usb@ff540000: 3 USB Device(s) found
Bus usb@ff580000: 1 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found
Quoted 2 lines
Takes 30s to complete, but it works!
IIRC, that how much it took before the commit that broke it.
I have re-run some tests with different Kconfig options related to GADGET and DWC2 and are not able to reproduce your issue.
As mentioned above, please share your config changes compared to tinker defconfig, maybe you have some Kconfig option enabled that make DWC2 work differently?
U-Boot SPL 2026.04-rc4-00007-g010855c5005e (Mar 16 2026 - 21:33:53 +0000) Trying to boot from RAM
## Checking hash(es) for config conf-1 ... OK
## Checking hash(es) for Image firmware-1 ... crc32+ OK
## Checking hash(es) for Image fdt-1 ... crc32+ OK
spl_perform_arch_fixups: could not map BootROM boot device to ofpath
U-Boot 2026.04-rc4-00007-g010855c5005e (Mar 16 2026 - 21:33:53 +0000)
SoC: Rockchip rk3288
Reset cause: POR
Model: Rockchip RK3288 Asus Tinker Board
DRAM: 2 GiB PMIC: RK808 Core: 221 devices, 27 uclasses, devicetree: separate MMC: mmc@ff0c0000: 1, mmc@ff0d0000: 2
Loading Environment from MMC... Card did not respond to voltage select! : -110 *** Warning - No block device, using default environment
In: serial,usbkbd Out: serial,vidconsole Err: serial,vidconsole Net: eth0: ethernet@ff290000
Hit any key to stop autoboot: 0
=> usb start
starting USB...
USB DWC2
USB DWC2
Bus usb@ff540000: 2 USB Device(s) found
Bus usb@ff580000: 1 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
=> usb tree
USB device tree:
1 Hub (480 Mb/s, 0mA)
| U-Boot Root Hub
|
+-2 Hub (480 Mb/s, 100mA)
USB2.0 Hub
1 Hub (480 Mb/s, 0mA)
U-Boot Root Hub => dm tree -e usb
Class Seq Probed Driver Name
-----------------------------------------------------------
usb 0 [ + ] dwc2_usb usb@ff540000 usb_hub 0 [ + ] usb_hub `-- usb_hub usb_hub 1 [ + ] usb_hub `-- usb_hub usb 1 [ + ] dwc2_usb usb@ff580000 usb_hub 2 [ + ] usb_hub `-- usb_hub pinconfig 130 [ ] pinconfig usb pinconfig 131 [ ] pinconfig |-- host-vbus-drv pinconfig 132 [ ] pinconfig `-- pwr-3g
=>
Regards,
Jonas
Quoted 42 lines
Marius
PS: There is a duplicate of this email sent from the wrong address. Sorry.
Quoted 36 lines
Anyway if something needs fixing it is probably
rockchip_usb2_phy.Regards,
JonasQuoted 29 lines
Signed-off-by Marius Dinu <[email protected]>--- drivers/usb/host/dwc2.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)drivers/usb/host/dwc2.c +2
-3@@ -1329,7 +1329,7 @@ static int dwc2_usb_probe(struct udevice *dev) ret =dwc2_setup_phy (dev);if (ret) -return ret; +dev_dbg (dev,"Failed to setup PHY: %d. Continuing anyway...\n" , ret);return dwc2_init_common (dev, priv); }@@ -1345,8 +1345,7 @@ static int dwc2_usb_remove(struct udevice *dev) ret =dwc2_shutdown_phy (dev);if (ret) { -dev_dbg (dev,"Failed to shutdown USB PHY: %d.\n" , ret); -return ret; +dev_dbg (dev,"Failed to shutdown USB PHY: %d. Continuing anyway...\n" , ret); }dwc2_uninit_common (priv->regs);
Quoted 69 lines · Jonas Karlman
I did a new runtime test on a Tinker Board R2.0 using master with tinker-rk3288_defconfig and I am not able to reproduce any issue. Maybe your config changes introduce a condition that causes an issue? Please share your savedefconfig.
I have re-run some tests with different
Kconfigoptions related to GADGET and DWC2 and are not able to reproduce your issue.As mentioned above, please share your config changes compared to tinker defconfig, maybe you have some
Kconfigoption enabled that make DWC2 work differently?U-Boot SPL 2026.04-rc4-00007-g010855c5005e (Mar 16 2026 - 21:33:53 +0000) Trying to boot from RAM
## Checking hash(es) for config conf-1 ... OK
## Checking hash(es) for Image firmware-1 ... crc32+ OK
## Checking hash(es) for Image fdt-1 ... crc32+ OK
spl_perform_arch_fixups: could not map BootROM boot device to ofpathU-Boot 2026.04-rc4-00007-g010855c5005e (Mar 16 2026 - 21:33:53 +0000)
SoC: Rockchip rk3288
Reset cause: POR
Model: Rockchip RK3288 Asus Tinker BoardDRAM: 2 GiB PMIC: RK808 Core: 221 devices, 27 uclasses, devicetree: separate MMC: mmc@ff0c0000: 1, mmc@ff0d0000: 2Loading Environment from MMC... Card did not respond to voltage select! : -110 *** Warning - No block device, using default environment
In: serial,usbkbd Out: serial,vidconsole Err: serial,vidconsole Net: eth0: ethernet@ff290000Hit any key to stop autoboot: 0
=> usb start
starting USB...
USB DWC2
USB DWC2
Bus usb@ff540000: 2 USB Device(s) found
Bus usb@ff580000: 1 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
=> usb tree
USB device tree:1 Hub (480 Mb/s, 0mA) | U-Boot Root Hub | +-2 Hub (480 Mb/s, 100mA) USB2.0 Hub 1 Hub (480 Mb/s, 0mA) U-Boot Root Hub=> dm tree -e usb
Class Seq Probed Driver Name
-----------------------------------------------------------usb 0 [ + ] dwc2_usb usb@ff540000 usb_hub 0 [ + ] usb_hub `-- usb_hub usb_hub 1 [ + ] usb_hub `-- usb_hub usb 1 [ + ] dwc2_usb usb@ff580000 usb_hub 2 [ + ] usb_hub `-- usb_hub pinconfig 130 [ ] pinconfig usb pinconfig 131 [ ] pinconfig |-- host-vbus-drv pinconfig 132 [ ] pinconfig `-- pwr-3g
Quoted 4 lines
=>
Regards,
Jonas
That's strage and unexpected... I'll try to start again from defconfig.
My current config:
CONFIG_ARM=yCONFIG_SPL_SKIP_LOWLEVEL_INIT_ONLY=yCONFIG_TPL_SKIP_LOWLEVEL_INIT_ONLY=yCONFIG_DRIVER_GICV2=yCONFIG_ARCH_CPU_INIT=yCONFIG_SYS_ARCH_TIMER=yCONFIG_ARCH_ROCKCHIP=yCONFIG_TEXT_BASE=0x01000000CONFIG_SYS_MALLOC_F_LEN=0x4000CONFIG_SPL_GPIO=yCONFIG_NR_DRAM_BANKS=1CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x100000CONFIG_ENV_SIZE=0x4000
# CONFIG_SPL_DM_SPI is not setCONFIG_DEFAULT_DEVICE_TREE="rockchip/rk3288-tinker-s"CONFIG_OF_LIBFDT_OVERLAY=yCONFIG_DM_RESET=yCONFIG_SYS_MONITOR_LEN=614400CONFIG_ROCKCHIP_RK3288=yCONFIG_ROCKCHIP_SPL_RESERVE_IRAM=0
# CONFIG_ROCKCHIP_DISABLE_FORCE_JTAG is not setCONFIG_TPL_LDSCRIPT="arch/arm/mach-rockchip/u-boot-tpl.lds"CONFIG_TPL_SYS_MALLOC_F_LEN=0x4000CONFIG_TARGET_TINKER_RK3288=y
# CONFIG_SPL_DRIVERS_MISC is not setCONFIG_BOOTCOUNT_BOOTLIMIT=3CONFIG_SPL_TEXT_BASE=0x0CONFIG_SYS_BOOTM_LEN=0x4000000CONFIG_SYS_LOAD_ADDR=0x800800CONFIG_WATCHDOG_TIMEOUT_MSECS=120000CONFIG_SPL_SIZE_LIMIT=0x4b000CONFIG_SPL_SIZE_LIMIT_PROVIDE_STACK=0CONFIG_PRE_CON_BUF_SZ=65536CONFIG_DEBUG_UART_BASE=0xff690000CONFIG_DEBUG_UART_CLOCK=24000000CONFIG_IDENT_STRING="-M95D"CONFIG_DEBUG_UART=yCONFIG_LOCALVERSION="-M95D"CONFIG_CC_OPTIMIZE_FOR_SPEED=yCONFIG_HAS_BOARD_SIZE_LIMIT=yCONFIG_BOARD_SIZE_LIMIT=12582912CONFIG_DYNAMIC_SYS_CLK_FREQ=y
# CONFIG_EFI_LOADER is not setCONFIG_TIMESTAMP=y
# CONFIG_BOOTSTD_DEFAULTS is not set
# CONFIG_BOOTSTD_BOOTCOMMAND is not set
# CONFIG_TPL_BOOTMETH_VBE is not setCONFIG_BOOTDELAY=3CONFIG_OF_ENV_SETUP=y
# CONFIG_ARCH_FIXUP_FDT_MEMORY is not setCONFIG_USE_BOOTARGS=yCONFIG_BOOTARGS="earlyprintk console=ttyS2,115200 rootwait root=PARTUUID=3c6300ea-04"CONFIG_BOOTARGS_SUBST=yCONFIG_USE_BOOTCOMMAND=yCONFIG_BOOTCOMMAND="sysboot mmc 1:3 any 0x02000000 /extlinux/extlinux.conf"CONFIG_USE_PREBOOT=yCONFIG_PREBOOT=""CONFIG_DEFAULT_FDT_FILE="rk3288-tinker-s.dtb"CONFIG_LOGLEVEL=6CONFIG_CONSOLE_FLUSH_ON_NEWLINE=y
# CONFIG_SYS_DEVICE_NULLDEV is not setCONFIG_LOGF_FILE=yCONFIG_LOGF_LINE=yCONFIG_LOGF_FUNC=yCONFIG_DISPLAY_BOARDINFO_LATE=yCONFIG_MISC_INIT_R=yCONFIG_SPL_NO_BSS_LIMIT=yCONFIG_SPL_SHOW_ERRORS=y
# CONFIG_SPL_BINMAN_SYMBOLS is not setCONFIG_SPL_I2C=y
# CONFIG_SYS_MMCSD_FS_BOOT is not setCONFIG_SPL_POWER=y
# CONFIG_TPL_BINMAN_SYMBOLS is not set
# CONFIG_TPL_SYS_MALLOC_SIMPLE is not set
# CONFIG_TPL_DRIVERS_MISC is not setCONFIG_HUSH_PARSER=yCONFIG_SYS_MAXARGS=16CONFIG_CMD_BDINFO_EXTRA=yCONFIG_CMD_CONFIG=yCONFIG_CMD_UFETCH=yCONFIG_CMD_HISTORY=y
# CONFIG_CMD_HISTORY_USE_CALLOC is not setCONFIG_CMD_BOOTDEV=yCONFIG_CMD_BOOTMETH=yCONFIG_CMD_BOOTSTD=yCONFIG_CMD_BOOTZ=y
# CONFIG_BOOTM_NETBSD is not set
# CONFIG_BOOTM_PLAN9 is not set
# CONFIG_BOOTM_RTEMS is not set
# CONFIG_BOOTM_VXWORKS is not setCONFIG_CMD_BOOTMENU=yCONFIG_CMD_ADTIMG=y
# CONFIG_CMD_ELF is not set
# CONFIG_CMD_GO is not set
# CONFIG_CMD_XIMG is not setCONFIG_CMD_ASKENV=yCONFIG_CMD_GREPENV=yCONFIG_CMD_ERASEENV=yCONFIG_CMD_ENV_FLAGS=yCONFIG_CMD_NVEDIT_INDIRECT=yCONFIG_CMD_NVEDIT_INFO=yCONFIG_CMD_NVEDIT_LOAD=yCONFIG_CRC32_VERIFY=yCONFIG_CMD_EEPROM=yCONFIG_CMD_EEPROM_LAYOUT=yCONFIG_SYS_I2C_EEPROM_BUS=2CONFIG_CMD_MEMINFO=yCONFIG_CMD_MEMINFO_MAP=y
# CONFIG_CMD_RANDOM is not setCONFIG_CMD_CLK=yCONFIG_CMD_GPIO=yCONFIG_CMD_GPIO_READ=yCONFIG_CMD_I2C=y
# CONFIG_CMD_LOADB is not set
# CONFIG_CMD_LOADS is not setCONFIG_CMD_LSBLK=yCONFIG_CMD_MISC=yCONFIG_CMD_MMC=yCONFIG_MMC_SPEED_MODE_SET=yCONFIG_CMD_PART=y
# CONFIG_CMD_PINMUX is not setCONFIG_CMD_POWEROFF=yCONFIG_CMD_SDRAM=yCONFIG_CMD_USB=yCONFIG_CMD_WDT=yCONFIG_CMD_CAT=y
# CONFIG_CMD_SETEXPR is not setCONFIG_BOOTP_MAY_FAIL=y
# CONFIG_BOOTP_DNS is not set
# CONFIG_BOOTP_GATEWAY is not set
# CONFIG_BOOTP_HOSTNAME is not set
# CONFIG_BOOTP_PXE_DHCP_OPTION is not setCONFIG_CMD_TFTPPUT=yCONFIG_CMD_TFTPSRV=yCONFIG_CMD_NFS=yCONFIG_CMD_DHCP=yCONFIG_CMD_PING=yCONFIG_CMD_PXE=yCONFIG_CMD_BOOTCOUNT=y
# CONFIG_CMD_BLOCK_CACHE is not setCONFIG_CMD_TIMER=yCONFIG_CMD_SYSBOOT=yCONFIG_CMD_PMIC=yCONFIG_CMD_REGULATOR=yCONFIG_CMD_EXT2=yCONFIG_CMD_EXT4=yCONFIG_CMD_EXT4_WRITE=yCONFIG_CMD_FAT=yCONFIG_CMD_FS_GENERIC=y
# CONFIG_CMD_CYCLIC is not setCONFIG_CMD_LOG=y
# CONFIG_SPL_DOS_PARTITION is not setCONFIG_SPL_OF_CONTROL=yCONFIG_OF_LIVE=yCONFIG_OF_UPSTREAM=yCONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents" CONFIG_OF_DTB_PROPS_REMOVE=yCONFIG_ENV_OVERWRITE=yCONFIG_ENV_IS_IN_EXT4=yCONFIG_ENV_EXT4_INTERFACE="mmc"CONFIG_ENV_EXT4_DEVICE_AND_PART=":3"CONFIG_ENV_MMC_DEVICE_INDEX=1CONFIG_USE_HOSTNAME=yCONFIG_HOSTNAME="TkB"CONFIG_NET_RETRY_COUNT=3CONFIG_TFTP_TSIZE=yCONFIG_UDP_CHECKSUM=yCONFIG_BOOTP_SERVERIP=yCONFIG_USE_IPADDR=yCONFIG_IPADDR="172.27.143.5"CONFIG_USE_NETMASK=yCONFIG_NETMASK="255.255.255.0"CONFIG_NET_RANDOM_ETHADDR=yCONFIG_SYS_RX_ETH_BUFFER=8CONFIG_REGMAP=yCONFIG_SPL_REGMAP=yCONFIG_SYSCON=yCONFIG_SPL_SYSCON=y
# CONFIG_SIMPLE_BUS is not set
# CONFIG_SPL_SIMPLE_BUS is not set
# CONFIG_OF_TRANSLATE is not set
# CONFIG_ADC is not setCONFIG_BOOTCOUNT_LIMIT=yCONFIG_BOOTCOUNT_ENV=yCONFIG_BOOTCOUNT_ALTBOOTCMD="ext2load mmc 1:3 $kernel_addr_r vmlinuz.failsafe; ext2load mmc 1:3 $fdt_addr_r $fdtfile.failsafe; bootz $kernel_addr_r - $fdt_addr_r" CONFIG_SYS_BOOTCOUNT_MAGIC=0xB007C047CONFIG_BUTTON=yCONFIG_BUTTON_GPIO=yCONFIG_CLK=yCONFIG_SPL_CLK=yCONFIG_EXTCON=yCONFIG_ROCKCHIP_GPIO=yCONFIG_SYS_I2C_ROCKCHIP=yCONFIG_LED=yCONFIG_LED_BOOT=yCONFIG_LED_ACTIVITY=yCONFIG_LED_SW_BLINK=yCONFIG_LED_GPIO=yCONFIG_MEMORY=yCONFIG_MISC=y
# CONFIG_SPL_MISC is not set
# CONFIG_TPL_MISC is not setCONFIG_ROCKCHIP_EFUSE=yCONFIG_PWRSEQ=yCONFIG_I2C_EEPROM=yCONFIG_MMC_PWRSEQ=yCONFIG_MMC_BROKEN_CD=yCONFIG_SUPPORT_EMMC_BOOT=yCONFIG_MMC_IO_VOLTAGE=yCONFIG_MMC_UHS_SUPPORT=yCONFIG_MMC_HS400_ES_SUPPORT=yCONFIG_MMC_HS400_SUPPORT=yCONFIG_MMC_DW=yCONFIG_MMC_DW_ROCKCHIP=y
# CONFIG_MTD is not setCONFIG_PHY_GIGE=yCONFIG_ETH_DESIGNWARE=yCONFIG_GMAC_ROCKCHIP=yCONFIG_PHY_ROCKCHIP_INNO_DSIDPHY=yCONFIG_PHY_ROCKCHIP_INNO_HDMI=yCONFIG_PINCTRL=y
# CONFIG_PINMUX is not setCONFIG_PINCONF=yCONFIG_SPL_PINCTRL=y
# CONFIG_SPL_PINCTRL_FULL is not setCONFIG_DM_PMIC=yCONFIG_PMIC_RK8XX=yCONFIG_SPL_PMIC_RK8XX=yCONFIG_SPL_DM_REGULATOR=yCONFIG_DM_REGULATOR_FIXED=yCONFIG_SPL_DM_REGULATOR_FIXED=yCONFIG_REGULATOR_RK8XX=y
# CONFIG_DM_PWM is not setCONFIG_RAM=yCONFIG_SPL_RAM=y
# CONFIG_RAM_ROCKCHIP_DEBUG is not setCONFIG_SERIAL_PUTS=yCONFIG_DEBUG_UART_SHIFT=2CONFIG_DEBUG_UART_ANNOUNCE=yCONFIG_SYS_NS16550_MEM32=y
# CONFIG_SPI is not setCONFIG_SYSRESET=yCONFIG_USB=y
# CONFIG_SPL_DM_USB is not setCONFIG_USB_DWC2=yCONFIG_ROCKCHIP_USB2_PHY=yCONFIG_USB_STORAGE=yCONFIG_USB_KEYBOARD=yCONFIG_USB_KEYBOARD_FN_KEYS=yCONFIG_VIDEO=yCONFIG_VIDEO_PCI_DEFAULT_FB_SIZE=0x1FA4000CONFIG_VIDEO_COPY=yCONFIG_VIDEO_ANSI=yCONFIG_I2C_EDID_STANDARD=yCONFIG_DISPLAY=yCONFIG_VIDEO_ROCKCHIP=yCONFIG_DISPLAY_ROCKCHIP_LVDS=yCONFIG_DISPLAY_ROCKCHIP_HDMI=yCONFIG_DISPLAY_ROCKCHIP_MIPI=yCONFIG_DISPLAY_ROCKCHIP_DW_MIPI=yCONFIG_VIDEO_BRIDGE=yCONFIG_VIDEO_BRIDGE_LVDS_CODEC=yCONFIG_CONSOLE_SCROLL_LINES=8CONFIG_DESIGNWARE_WATCHDOG=yCONFIG_WDT=yCONFIG_FAT_RENAME=y
# CONFIG_BINMAN_FDT is not setCONFIG_CC_OPTIMIZE_LIBS_FOR_SPEED=y
# CONFIG_REGEX is not set
# CONFIG_SPL_SHA1 is not setCONFIG_ERRNO_STR=yCONFIG_OF_LIBFDT_ASSUME_MASK=0
# CONFIG_TPL_OF_LIBFDT is not set
# CONFIG_TOOLS_LIBCRYPTO is not set
# CONFIG_TOOLS_KWBIMAGE is not set
Marius
Quoted 123 lines · Jonas Karlman
Hi Marius,
Quoted 41 lines · Marius Dinu
Quoted 9 lines · Jonas Karlman
Hi Marius,
Quoted 6 lines · Marius Dinu
RK3288 uses
rockchip_usb2_phy, but that driver doesn't register iself as a usbphy driver and "usb start" fails with this error:drivers/usb/host/dwc2.c:1254-
dwc2_setup_phy()dwc2_usbusb@ff580000:
Failed to get USB PHY: -19.Quoted 8 lines
Quoted 4 lines
Until a proper fix is made for
rockchip_usb2_phy, this patch allows usb start to continue even if usbphy is not found.Tested on Asus TinkerBoard.
I am not seeing this issue on my TinkerBoard, what U-Boot version are you testing and have you made any config changes compared to tinker-rk3288_defconfig?
I'm using the github master branch pulled today + lots and lots of changes in config. I didn't make a diff, but I expect it to be very very far from tinker-rk3288_defconfig.
Quoted 18 lines
=> usb start
starting USB...
USB DWC2
USB DWC2
Bus usb@ff540000: 2 USB Device(s) found
Bus usb@ff580000: 1 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found=> dm tree -e usb
Class Seq Probed Driver Name
-----------------------------------------------------------usb 0 [ + ] dwc2_usb usb@ff540000 usb_hub 0 [ + ] usb_hub `-- usb_hub usb_hub 1 [ + ] usb_hub `-- usb_hub usb 1 [ + ] dwc2_usb usb@ff580000 usb_hub 2 [ + ] usb_hub `-- usb_hubQuoted 8 lines
Quoted 1 line
Have something changed recently that broke this?
Yes! but not exactly recently...
It broke since commite17a4bf198510693967644c331ab621fc41ea8b5. Here's a log on my system without my proposed fix. This is a log that I saved while I was investigating the failed USB, about a year ago, I think. But I checked and it still fails with today's git master, I just don't have the time to enable all the debug options again. It's still ret -19 error.I did a new runtime test on a Tinker Board R2.0 using master with tinker-rk3288_defconfig and I am not able to reproduce any issue. Maybe your config changes introduce a condition that causes an issue? Please share your savedefconfig.
I have re-run some tests with different
Kconfigoptions related to GADGET and DWC2 and are not able to reproduce your issue.As mentioned above, please share your config changes compared to tinker defconfig, maybe you have some
Kconfigoption enabled that make DWC2 work differently?U-Boot SPL 2026.04-rc4-00007-g010855c5005e (Mar 16 2026 - 21:33:53 +0000) Trying to boot from RAM
## Checking hash(es) for config conf-1 ... OK
## Checking hash(es) for Image firmware-1 ... crc32+ OK
## Checking hash(es) for Image fdt-1 ... crc32+ OK
spl_perform_arch_fixups: could not map BootROM boot device to ofpathU-Boot 2026.04-rc4-00007-g010855c5005e (Mar 16 2026 - 21:33:53 +0000)
SoC: Rockchip rk3288
Reset cause: POR
Model: Rockchip RK3288 Asus Tinker BoardDRAM: 2 GiB PMIC: RK808 Core: 221 devices, 27 uclasses, devicetree: separate MMC: mmc@ff0c0000: 1, mmc@ff0d0000: 2Loading Environment from MMC... Card did not respond to voltage select! : -110 *** Warning - No block device, using default environment
In: serial,usbkbd Out: serial,vidconsole Err: serial,vidconsole Net: eth0: ethernet@ff290000Hit any key to stop autoboot: 0
=> usb start
starting USB...
USB DWC2
USB DWC2
Bus usb@ff540000: 2 USB Device(s) found
Bus usb@ff580000: 1 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
=> usb tree
USB device tree:1 Hub (480 Mb/s, 0mA) | U-Boot Root Hub | +-2 Hub (480 Mb/s, 100mA) USB2.0 Hub 1 Hub (480 Mb/s, 0mA) U-Boot Root Hub=> dm tree -e usb
Class Seq Probed Driver Name
-----------------------------------------------------------usb 0 [ + ] dwc2_usb usb@ff540000 usb_hub 0 [ + ] usb_hub `-- usb_hub usb_hub 1 [ + ] usb_hub `-- usb_hub usb 1 [ + ] dwc2_usb usb@ff580000 usb_hub 2 [ + ] usb_hub `-- usb_hub pinconfig 130 [ ] pinconfig usb pinconfig 131 [ ] pinconfig |-- host-vbus-drv pinconfig 132 [ ] pinconfig `-- pwr-3g
Quoted 4 lines
=>
Regards,
Jonas
I tested the tinkerboard defconfig. It does work. As far as I can tell, it doesn't try to load the phy driver at all. The only significant difference is that I didn't enable OTG/gadget in my config - it's just the usb-host driver.
So the bug is still there, it's just that the OTG driver doesn't search for a phy driver.
Marius
Quoted 44 lines
Quoted 43 lines
Marius
PS: There is a duplicate of this email sent from the wrong address. Sorry.
Quoted 36 lines
Anyway if something needs fixing it is probably
rockchip_usb2_phy.Regards,
JonasQuoted 29 lines
Signed-off-by Marius Dinu <[email protected]>--- drivers/usb/host/dwc2.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)drivers/usb/host/dwc2.c +2
-3@@ -1329,7 +1329,7 @@ static int dwc2_usb_probe(struct udevice *dev) ret =dwc2_setup_phy (dev);if (ret) -return ret; +dev_dbg (dev,"Failed to setup PHY: %d. Continuing anyway...\n" , ret);return dwc2_init_common (dev, priv); }@@ -1345,8 +1345,7 @@ static int dwc2_usb_remove(struct udevice *dev) ret =dwc2_shutdown_phy (dev);if (ret) { -dev_dbg (dev,"Failed to shutdown USB PHY: %d.\n" , ret); -return ret; +dev_dbg (dev,"Failed to shutdown USB PHY: %d. Continuing anyway...\n" , ret); }dwc2_uninit_common (priv->regs);
Quoted 9 lines · Jonas Karlman
Hi Marius,
Quoted 6 lines · Marius Dinu
RK3288 uses
rockchip_usb2_phy, but that driver doesn't register iself as a usbphy driver and "usb start" fails with this error:drivers/usb/host/dwc2.c:1254-
dwc2_setup_phy()dwc2_usbusb@ff580000:
Failed to get USB PHY: -19.
Quoted 8 lines
Quoted 4 lines
Until a proper fix is made for
rockchip_usb2_phy, this patch allows usb start to continue even if usbphy is not found.Tested on Asus TinkerBoard.
I am not seeing this issue on my TinkerBoard, what U-Boot version are you testing and have you made any config changes compared to tinker-rk3288_defconfig?
I'm using the github master branch pulled today + lots and lots of changes in config. I didn't make a diff, but I expect it to be very very far from tinker-rk3288_defconfig.
Quoted 12 lines
=> usb start
starting USB...
USB DWC2
USB DWC2
Bus usb@ff540000: 2 USB Device(s) found
Bus usb@ff580000: 1 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found=> dm tree -e usb
Class Seq Probed Driver Name
-----------------------------------------------------------
Quoted 7 lines
usb 0 [ + ] dwc2_usb usb@ff540000 usb_hub 0 [ + ] usb_hub `-- usb_hub usb_hub 1 [ + ] usb_hub `-- usb_hub usb 1 [ + ] dwc2_usb usb@ff580000 usb_hub 2 [ + ] usb_hub `-- usb_hubHave something changed recently that broke this?
Yes! but not exactly recently...
It broke since commit e17a4bf198510693967644c331ab621fc41ea8b5. Here's a log on my system without my proposed fix. This is a log that I saved while I was investigating the failed USB, about a year ago, I think. But I checked and it still fails with today's git master, I just don't have the time to enable all the debug options again. It's still ret -19 error.
=> usb start
starting USB...
drivers/core/ofnode.c:540- ofnode_read_prop() ofnode_read_prop: assigned-clock-rates: <not found>
drivers/core/of_access.c:556- of_read_u32_index() of_read_u32_index: #clock-cells: 0x1 (1)
drivers/core/of_access.c:556- of_read_u32_index() of_read_u32_index: #clock-cells: 0x1 (1)
drivers/core/uclass.c:546-uclass_get_device_by_ofnode() Looking for clock-controller@ff760000 drivers/core/uclass.c:397-uclass_find_device_by_ofnode() Looking for clock-controller@ff760000
drivers/core/uclass.c:406-uclass_find_device_by_ofnode() - checking oscillator
drivers/core/uclass.c:406-uclass_find_device_by_ofnode() - checking clock-controller@ff760000
drivers/core/uclass.c:416-uclass_find_device_by_ofnode() - result for clock-controller@ff760000: clock-controller@ff760000 (ret=0)
drivers/core/uclass.c:549-uclass_get_device_by_ofnode() - result for clock-controller@ff760000: clock-controller@ff760000 (ret=0)
drivers/core/ofnode.c:417-ofnode_read_u32_index() ofnode_read_u32_index: vbus-supply: of_read_u32_index: vbus-supply: (not found)
drivers/core/of_access.c:556- of_read_u32_index() of_read_u32_index: #phy-cells: 0x0 (0)
drivers/core/uclass.c:546-uclass_get_device_by_ofnode() Looking for usb-phy@334 drivers/core/uclass.c:397-uclass_find_device_by_ofnode() Looking for usb-phy@334
drivers/core/uclass.c:416-uclass_find_device_by_ofnode() - result for usb-phy@334: (none) (ret=-19)
drivers/core/uclass.c:549-uclass_get_device_by_ofnode() - result for usb-phy@334: (none) (ret=-19)
drivers/core/uclass.c:546-uclass_get_device_by_ofnode() Looking for usbphy drivers/core/uclass.c:397-uclass_find_device_by_ofnode() Looking for usbphy
drivers/core/uclass.c:416-uclass_find_device_by_ofnode() - result for usbphy: (none) (ret=-19)
drivers/core/uclass.c:549-uclass_get_device_by_ofnode() - result for usbphy: (none) (ret=-19)
Bus usb@ff500000: Port not available.
and it repeats for usb@ff540000 and usb@ff580000.
There is no usbphy or usb-phy detected/bound in log when u-boot walks the devicetree nodes, but the device tree has "usbphy" node compatible="rockchip,rk3288-usb-phy" with 3 sub-nodes: usb-phy@320, usb-phy@334, usb-phy@348.
Driver with that compatible string: rockchip_usb2_phy.c. CONFIG_ROCKCHIP_USB2_PHY is enabled, but "dm compat" lists only these:
rockchip_usb2phy rockchip,rk3308-usb2phy
rockchip,rk3328-usb2phy
rockchip,rk3399-usb2phy
rockchip,rk3528-usb2phy
rockchip,rk3568-usb2phy
rockchip,rk3576-usb2phy
rockchip,rk3588-usb2phyThose compat strings come from phy-rockchip-inno-usb2.c. (I also had that enabled while debugging.) There are no compat strings from rockchip_usb2_phy.c.
It's because phy-rockchip-inno-usb2.c has this:
U_BOOT_DRIVER(rockchip_usb2phy){
.name = rockchip_usb2phy"while rockchip_usb2_phy.c does not. So the usb driver finds no compatible phy driver loaded and fails. Before the commit, it would load anyway.
I didn't use any AI in this investigation!
Here is a log with my patch:
=> usb start
starting USB...
drivers/core/ofnode.c:525- ofnode_read_bool() ofnode_read_bool: disable-over-current: false drivers/core/ofnode.c:525- ofnode_read_bool() ofnode_read_bool: hnp-srp-disable: false drivers/core/ofnode.c:540- ofnode_read_prop() ofnode_read_prop: assigned-clock-rates: <not found> drivers/core/of_access.c:556- of_read_u32_index() of_read_u32_index: #clock-cells: 0x1 (1) drivers/core/of_access.c:556- of_read_u32_index() of_read_u32_index: #clock-cells: 0x1 (1) drivers/core/uclass.c:546-uclass_get_device_by_ofnode() Looking for clock-controller@ff760000 drivers/core/uclass.c:397-uclass_find_device_by_ofnode() Looking for clock-controller@ff760000 drivers/core/uclass.c:406-uclass_find_device_by_ofnode() - checking oscillator drivers/core/uclass.c:406-uclass_find_device_by_ofnode() - checking clock-controller@ff760000 drivers/core/uclass.c:416-uclass_find_device_by_ofnode() - result for clock-controller@ff760000: clock-controller@ff760000 (ret=0) drivers/core/uclass.c:549-uclass_get_device_by_ofnode() - result for clock-controller@ff760000: clock-controller@ff760000 (ret=0) drivers/core/of_access.c:556- of_read_u32_index() of_read_u32_index: #phy-cells: 0x0 (0) drivers/core/uclass.c:546-uclass_get_device_by_ofnode() Looking for usb-phy@348 drivers/core/uclass.c:397-uclass_find_device_by_ofnode() Looking for usb-phy@348 drivers/core/uclass.c:416-uclass_find_device_by_ofnode() - result for usb-phy@348: (none) (ret=-19) drivers/core/uclass.c:549-uclass_get_device_by_ofnode() - result for usb-phy@348: (none) (ret=-19) drivers/core/uclass.c:546-uclass_get_device_by_ofnode() Looking for usbphy drivers/core/uclass.c:397-uclass_find_device_by_ofnode() Looking for usbphy drivers/core/uclass.c:416-uclass_find_device_by_ofnode() - result for usbphy: (none) (ret=-19) drivers/core/uclass.c:549-uclass_get_device_by_ofnode() - result for usbphy: (none) (ret=-19) drivers/usb/host/dwc2.c:1254- dwc2_setup_phy() dwc2_usb usb@ff540000: Failed to get USB PHY: -19. drivers/usb/host/dwc2.c:1332- dwc2_usb_probe() dwc2_usb usb@ff540000: Failed to setup PHY: -19. Continuing anyway... drivers/usb/host/dwc2.c:1061- dwc2_reset() dwc2_usb usb@ff540000: Can't get reset: -2 drivers/usb/host/dwc2.c:1095- dwc2_init_common() dwc2_usb usb@ff540000: Core Release: 3.10a drivers/core/ofnode.c:540- ofnode_read_prop() ofnode_read_prop: dr_mode: host drivers/usb/common/dwc2_core.c:67- dwc2_flush_tx_fifo() Flush Tx FIFO 16 drivers/usb/common/dwc2_core.c:102- dwc2_flush_rx_fifo() Flush Rx FIFO drivers/core/ofnode.c:417-ofnode_read_u32_index() ofnode_read_u32_index: vbus-supply: of_read_u32_index: vbus-supply: (not found) USB DWC2 drivers/core/ofnode.c:417-ofnode_read_u32_index() ofnode_read_u32_index: companion: of_read_u32_index: companion: (not found) drivers/core/ofnode.c:525- ofnode_read_bool() ofnode_read_bool: disable-over-current: false drivers/core/ofnode.c:525- ofnode_read_bool() ofnode_read_bool: hnp-srp-disable: false drivers/core/ofnode.c:540- ofnode_read_prop() ofnode_read_prop: assigned-clock-rates: <not found>
drivers/core/of_access.c:556- of_read_u32_index() of_read_u32_index: #clock-cells: 0x1 (1)
drivers/core/of_access.c:556- of_read_u32_index() of_read_u32_index: #clock-cells: 0x1 (1)
drivers/core/uclass.c:546-uclass_get_device_by_ofnode() Looking for clock-controller@ff760000 drivers/core/uclass.c:397-uclass_find_device_by_ofnode() Looking for clock-controller@ff760000
drivers/core/uclass.c:406-uclass_find_device_by_ofnode() - checking oscillator
drivers/core/uclass.c:406-uclass_find_device_by_ofnode() - checking clock-controller@ff760000
drivers/core/uclass.c:416-uclass_find_device_by_ofnode() - result for clock-controller@ff760000: clock-controller@ff760000 (ret=0)
drivers/core/uclass.c:549-uclass_get_device_by_ofnode() - result for clock-controller@ff760000: clock-controller@ff760000 (ret=0)
drivers/core/of_access.c:556- of_read_u32_index() of_read_u32_index: #phy-cells: 0x0 (0)
drivers/core/uclass.c:546-uclass_get_device_by_ofnode() Looking for usb-phy@320 drivers/core/uclass.c:397-uclass_find_device_by_ofnode() Looking for usb-phy@320
drivers/core/uclass.c:416-uclass_find_device_by_ofnode() - result for usb-phy@320: (none) (ret=-19)
drivers/core/uclass.c:549-uclass_get_device_by_ofnode() - result for usb-phy@320: (none) (ret=-19)
drivers/core/uclass.c:546-uclass_get_device_by_ofnode() Looking for usbphy drivers/core/uclass.c:397-uclass_find_device_by_ofnode() Looking for usbphy
drivers/core/uclass.c:416-uclass_find_device_by_ofnode() - result for usbphy: (none) (ret=-19)
drivers/core/uclass.c:549-uclass_get_device_by_ofnode() - result for usbphy: (none) (ret=-19)
drivers/usb/host/dwc2.c:1254- dwc2_setup_phy() dwc2_usb usb@ff580000: Failed to get USB PHY: -19.
drivers/usb/host/dwc2.c:1332- dwc2_usb_probe() dwc2_usb usb@ff580000: Failed to setup PHY: -19. Continuing anyway...
drivers/usb/host/dwc2.c:1061- dwc2_reset() dwc2_usb usb@ff580000: Can't get reset: -2
drivers/usb/host/dwc2.c:1095- dwc2_init_common() dwc2_usb usb@ff580000: Core Release: 3.10a
drivers/core/ofnode.c:540- ofnode_read_prop() ofnode_read_prop: dr_mode: otg
drivers/usb/common/dwc2_core.c:67- dwc2_flush_tx_fifo() Flush Tx FIFO 16
drivers/usb/common/dwc2_core.c:102- dwc2_flush_rx_fifo() Flush Rx FIFO drivers/usb/host/dwc2.c:230-dwc_otg_core_host_init() dwc2_usb usb@ff580000: dwc_otg_core_host_init: Timeout! drivers/usb/host/dwc2.c:230-dwc_otg_core_host_init() dwc2_usb usb@ff580000: dwc_otg_core_host_init: Timeout! drivers/usb/host/dwc2.c:230-dwc_otg_core_host_init() dwc2_usb usb@ff580000: dwc_otg_core_host_init: Timeout! drivers/usb/host/dwc2.c:230-dwc_otg_core_host_init() dwc2_usb usb@ff580000: dwc_otg_core_host_init: Timeout! drivers/usb/host/dwc2.c:230-dwc_otg_core_host_init() dwc2_usb usb@ff580000: dwc_otg_core_host_init: Timeout! drivers/usb/host/dwc2.c:230-dwc_otg_core_host_init() dwc2_usb usb@ff580000: dwc_otg_core_host_init: Timeout! drivers/usb/host/dwc2.c:230-dwc_otg_core_host_init() dwc2_usb usb@ff580000: dwc_otg_core_host_init: Timeout! drivers/usb/host/dwc2.c:230-dwc_otg_core_host_init() dwc2_usb usb@ff580000: dwc_otg_core_host_init: Timeout!CONFIG_USB_GADGET is not enabled in my config.
drivers/core/ofnode.c:417-ofnode_read_u32_index() ofnode_read_u32_index: vbus-supply: of_read_u32_index: vbus-supply: (not found) USB DWC2
drivers/core/ofnode.c:417-ofnode_read_u32_index() ofnode_read_u32_index: companion: of_read_u32_index: companion: (not found) drivers/core/ofnode.c:417-ofnode_read_u32_index() ofnode_read_u32_index: usb,device-class: of_read_u32_index: usb,device-class: (not found) drivers/core/ofnode.c:417-ofnode_read_u32_index() ofnode_read_u32_index: usb,interface-class: of_read_u32_index: usb,interface-class: (not found) drivers/core/device.c:185- device_bind_common() Bound device usb_hub to usb@ff540000
drivers/core/ofnode.c:540- ofnode_read_prop() ofnode_read_prop: assigned-clock-rates: <not found>
drivers/core/device.c:185- device_bind_common() Bound device usb_hub to usb_hub drivers/core/device.c:185- device_bind_common() Bound device usb_mass_storage to usb_hub drivers/core/device.c:185- device_bind_common() Bound device usb_mass_storage.lun0 to usb_mass_storage
long delay here
drivers/core/device.c:185- device_bind_common() Bound device usb_mass_storage.lun0.bootdev to usb_mass_storage
even longer delay here
drivers/core/ofnode.c:417-ofnode_read_u32_index() ofnode_read_u32_index: usb,device-class: of_read_u32_index: usb,device-class: (not found) drivers/core/ofnode.c:417-ofnode_read_u32_index() ofnode_read_u32_index: usb,interface-class: of_read_u32_index: usb,interface-class: (not found) drivers/core/device.c:185- device_bind_common() Bound device usb_hub to usb@ff580000
drivers/core/ofnode.c:540- ofnode_read_prop() ofnode_read_prop: assigned-clock-rates: <not found>
Bus usb@ff540000: 3 USB Device(s) found
Bus usb@ff580000: 1 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found
Takes 30s to complete, but it works!
IIRC, that how much it took before the commit that broke it.
Marius
Quoted 36 lines
Anyway if something needs fixing it is probably
rockchip_usb2_phy.Regards,
JonasQuoted 29 lines
Signed-off-by Marius Dinu <[email protected]>--- drivers/usb/host/dwc2.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)drivers/usb/host/dwc2.c +2
-3@@ -1329,7 +1329,7 @@ static int dwc2_usb_probe(struct udevice *dev) ret =dwc2_setup_phy (dev);if (ret) -return ret; +dev_dbg (dev,"Failed to setup PHY: %d. Continuing anyway...\n" , ret);return dwc2_init_common (dev, priv); }@@ -1345,8 +1345,7 @@ static int dwc2_usb_remove(struct udevice *dev) ret =dwc2_shutdown_phy (dev);if (ret) { -dev_dbg (dev,"Failed to shutdown USB PHY: %d.\n" , ret); -return ret; +dev_dbg (dev,"Failed to shutdown USB PHY: %d. Continuing anyway...\n" , ret); }dwc2_uninit_common (priv->regs);