[PATCH v4 0/2] arm: dts: rockchip: rk3399: usb: ehci: Fix EHCI probe in rk3399 to access peripherals by USB 2.

Christoph Fritz chf.fritz at googlemail.com
Sun Feb 19 20:48:57 CET 2023


Hello Xavier

> The first patch in the series (identical to v3) just registers usb2phy
> as a clock driver (device_bind_driver() didn't work but
> device_bind_driver_to_node() did), without any specific operations, so
> that ehci-generic.c finds it and is happy. It worked in my tests on a
> Rock Pi 4 B+ (rk3399).
> 
> Since Marek Vasut objected to an operationless driver[4], the second
> patch adds enable and disable operations adapted from linux prepare
> and unprepare operations (and round_rate(), which doesn't seem very
> useful anyway since it's a fixed clock). Since there're no users of
> this clock in u-boot, I can't see any difference in my tests with only
> the first patch or both, so I can't be sure it really works if it's
> ever needed, but it's hopefully more complete.
> 

I have tested both of your patches on an rk3399:

without patches applied:

  | starting USB...
  | Bus usb at fe380000: ehci_generic usb at fe380000: Failed to get clocks (ret=-19)
  | Port not available.

with patches applied:

  | starting USB...
  | Bus usb at fe380000: USB EHCI 1.00
  | Bus usb at fe3c0000: USB EHCI 1.00
  | Bus usb at fe800000: Register 2000140 NbrPorts 2


'usb stop' still makes u-boot hang, but with your patches applied
following output gets printed before:

  | => usb stop
  | stopping USB..
  | device_remove: Device 'usb at fe380000' failed to remove, but children are gone
  | device_remove: Device 'usb at fe3c0000' failed to remove, but children are gone
  <u-boot hangs>

Without CONFIG_USB_EHCI_HCD 'usb stop' works just fine.

Thanks
  -- Christoph



More information about the U-Boot mailing list