[Letux-kernel] [PATCH 0/3] MIPS: CI20: USB EHCI/OHCI
paul at boddie.org.uk
Sat Sep 26 18:53:34 CEST 2020
On Saturday, 26 September 2020 16:23:08 CEST H. Nikolaus Schaller wrote:
> Yes. I have cleaned it up a little and will include it in letux-5.9-rc7 next
> * EHCI doesn't seem to work - falls back to USB 1.1 speed
> * using my panel on either port and a memory stick on the other leads to
> dwc2 13500000.usb: Overcurrent change detected
> * it seems as if I have to remove the Mini-OTG jumper for a moment to make
> the OTG port detect something * my attempt to do the enable/disable by
> [JZ4780_CLK_UHC] leads to a kernel panic - so I have it disabled
> Your observations and fixes will be welcome.
Well done on getting something working! I seem to remember some USB-specific
operations in the CGU driver, unless I am thinking of the Minibook again, and
it looks as if you have discovered them in the 3.18 driver.
The manual indicates that the suspend controls are indeed in the oscillator
and power control register (OPCR), and I see that Zhou Yanjie (perhaps) might
have reintroduced operations and a clock construct to access them for the OTG
peripheral, associating them with the OTG PHY clock source.
However, my interpretation of the OPCR controls is that they suspend the
peripheral regardless of which clock input is used to provide the UHC clock.
So, I imagine that if circumstances (dynamic configuration magic) do not cause
the OTG PHY input to be selected for the UHC clock, the OTG peripheral may not
get awakened. (I guess you could check which source is selected.)
Maybe the enable/disable operations need to be defined in the UHC clock
construct instead, though.
More information about the Letux-kernel