public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marius Dinu <m95d+git@psihoexpert.ro>
To: u-boot@lists.denx.de
Cc: Patrick Delaunay <patrick.delaunay@st.com>
Subject: [bug] RK3288: usb won't start
Date: Sat, 18 Oct 2025 13:22:35 +0300	[thread overview]
Message-ID: <aPNqayAhe0Qn723N@GRAPHRT> (raw)

Hi.

Rockchip RK3288, Asus TinkerBoard S, u-boot master branch from 2025-10-14.
USB won't start. Log:

  => 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.
  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.
  Bus usb@ff540000: Port not available.
  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.
  Bus usb@ff580000: Port not available.

The bug is caused by this commit from 2020 (author in CC):
e17a4bf198510693967644c331ab621fc41ea8b5 usb: host: dwc2: add phy support

This chip uses drivers/usb/phy/rockchip_usb2_phy.c driver, but that driver
doesn't register itself as a proper dm driver and isn't found by the scan.

This quick and dirty patch makes it work, but I think the proper solution
is to fix the rockchip_usb2_phy driver. I'm unable to do that myself. Too
complicated for my skills.

You may consider merging this patch temporarily, as the bug breaks USB boot
and keyboard console on many devices.

Signed-off-by: Marius Dinu <m95d+git@psihoexpert.ro>

diff --git a/drivers/usb/host/dwc2.c b/drivers/usb/host/dwc2.c
index 16f21fa9083..74d71f23d88 100644
--- a/drivers/usb/host/dwc2.c
+++ b/drivers/usb/host/dwc2.c
@@ -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);
 }


                 reply	other threads:[~2025-10-18 10:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aPNqayAhe0Qn723N@GRAPHRT \
    --to=m95d+git@psihoexpert.ro \
    --cc=patrick.delaunay@st.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox