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

Xavier Drudis Ferran xdrudis at tinet.cat
Mon Feb 27 13:22:19 CET 2023


El Sun, Feb 19, 2023 at 08:48:57PM +0100, Christoph Fritz deia:
> 
> 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
> 

Thank you a lot for testing and reporting.

I think I found the cause. property_enable() returns an error code in
linux but just the value written to the register in U-Boot. So I'll be
sending an v5 with a change to ignore the return from
property_enable() when enabling and disabling the clock, just as other
calls in the file do.

Alternatively one could use v1, v2 or v3 of the patch. But since they
weren't accepted I'll try an v5.

I wellcome help testing or ideas on how to test whether an output
clock is correctly enabled or disabled when everything seems to work
fine already without enabling it, but it needs to be enabled simply
because of a dts coming from linux where it seems to have effects on
suspend/resume.

Thanks,

--
Xavier Drudis Ferran


More information about the U-Boot mailing list