[Letux-kernel] Status of JZ4780/CI20 upstream support

Paul Boddie paul at boddie.org.uk
Tue Jul 9 00:22:18 CEST 2019


Following up from before...

> I was going to look at USB today, seeing what it would take to get the
> JZ4780- specific host drivers working with a newer kernel than 3.18. The
> initial motivation was to make the main LED responsive since it appears to
> be connected to a pin designated for USB VBUS:
> 
> https://www.elinux.org/CI20_Hardware#LED
> 
> I am imagining that if the USB drivers are actually in place, their
> activation and deactivation will also cause the pin to change value and
> thereby cause the LED to switch off upon shutdown.

So, I found that the USB support didn't make it into the mainline kernel, so 
in drivers/usb/host...

ohci-jz4740.c needs to be brought in from 3.18 (or elsewhere, maybe) and 
included within ohci-hcd.c in a not particularly pleasant fashion, but this 
just seems to be the way things are done with the OHCI support.

ehci-jz4780.c uses various functions that have been removed from jz4780-cgu.c
(which has itself been moved to drivers/clk/ingenic from drivers/clk/jz47xx in 
3.18). These functions are as follows:

  jz4780_cgu_set_usb_suspend
  jz4780_cgu_start_ehci
  jz4780_cgu_stop_ehci

In fact, it seems that a range of extra functions were omitted when jz4780-
cgu.c was submitted to mainline:

https://www.linux-mips.org/archives/linux-mips/2015-04/msg00306.html

Maybe they can be reworked and included again.

Paul


More information about the Letux-kernel mailing list