Skip to content

RFC MXS: Add i.MX28 USB Host driver

Sascha Hauer linux-arm-kernel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest0 of 8 patches 0 repliesNew

Patches in v1 No applies recorded yet

None of the 8 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/8] MXS: Add i.MX28 USB Host driver

Hi Marek,

Quoted 3 lines · Marek Vasut

This patchset introduces the USB Host driver for i.MX28 CPU, utilising the generic USB PHY infrastructure.

Your patches won't work when more than one USB port is enabled because of the singular usb transceiver present in the kernel. That of course is not your fault. I think Heikki (Added to Cc) is working on this issue, but I don't know the status here.

Another problem is that what you are doing does not integrate at all with otg. I don't ask you to implement otg support because you are likely not interested in this, but since you are adding a new ehci glue driver anyway I suggest another approach:

Put a driver under drivers/usb/otg which:

- matches a 'imx-usb' device
- gets/enables all clocks needed for USB
- finds the transceiver
- registers a ehci device

Future additions would be:

- Put a USB_MODE_HOST/DEVICE flag into platform_data, and register a host or gadget driver depending on this flag
- Add a USB_MODE_OTG flag to platform_data and implement otg in this driver (or use whatever infrastructure present in the kernel then)

This is similar to what msm does. This way we have the clocks and phys handled where they are needed. We may use this code on i.MX later.

We did this wrong on i.MX (and several other architectures) and getting this right will be hard work. No need to introduce the same flaws again with a new architecture.

Sascha

Signature · 4 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |