[PATCH 7/8] usb: ci_udc: Convert driver to DM_USB_GADGET

Wolfgang Denk wd at denx.de
Tue Oct 27 11:22:40 CET 2020


Dear Peng Fan,

In message <DB6PR0402MB2760CF94CA69EACD95DE978588160 at DB6PR0402MB2760.eurprd04.prod.outlook.com> you wrote:
>
> > > > > > > +static const struct udevice_id ci_udc_otg_ids[] = {
> > > > > > > +	{ .compatible = "fsl,imx27-usb-gadget" },
> > > > > > > +	{ }
> > > > > > > +};
...
> > Maybe I'm missing something, but I cannot find imx27-usb-gadget being used
> > anywhere - not in U-Boot nor in Linux mainline ?
> > 
> > And if we introduce this completely new - then why imx27 ?
> 
> ci udc driver is an driver long exist there.

Agreed.  But as far as I can see, no parts of the driver code
contain any references to imx27 (or even imx in general) at all.

> This is just switch to driver module support. Not completely new.

The compatible string "fsl,imx27-usb-gadget" is completely new.

We have all kinds of "fsl,imx27-usb" in U-Boot and Linux, but I
wonder what the rationale is there as well.  I cannot find it
documented anywhere.

All I can see is a comment

	"fsl,imx23-usbphy" is still a fallback for other strings

in Documentation/devicetree/bindings/phy/mxs-usb-phy.txt, but this
is for the USB PHY.

Yes, "fsl,imx27-usb" is being used a lot, but there are things which
look inconsistent to me; we have for example:

- "fsl,imx6ul-usb" in Linux arch/arm/boot/dts/imx7ulp.dtsi , but
  "fsl,imx27-usb" in U-Boot arch/arm/dts/imx7ulp.dtsi
  And actually arch/arm/boot/dts/imx6ul.dtsi then uses
  	compatible = "fsl,imx6ul-usb", "fsl,imx27-usb";

- "fsl,imx7d-usb" in Linux arch/arm64/boot/dts/freescale/imx8mn.dtsi
  and the same in U-Boot arch/arm/dts/imx8mn.dtsi

- "fsl,imx7d-usb" in Linux arch/arm64/boot/dts/freescale/imx8mm.dtsi
  and the same in U-Boot arch/arm/dts/imx8mm.dtsi

> I could use imx6-usb-gadget, but that means need add one
> more for i.MX5 if need.

If you use "fsl,imx7d-usb" on the imx8mm, then would it not be
logical to use ""fsl,imx7d-usb-gadget"?


I'm trying to make sense from all these compatible strings, but it
looks pretty much random to me, so if we add to this we should at
least not increase the confusion.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
That said, there may be good reasons for what you did beyond obsequi-
ous sycophantic parody. Perhaps you might be so kind as to elucidate.
         -- Tom Christiansen in <5ldjbm$jtk$1 at csnews.cs.colorado.edu>


More information about the U-Boot mailing list