From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Tue, 27 Oct 2020 11:22:40 +0100 Subject: [PATCH 7/8] usb: ci_udc: Convert driver to DM_USB_GADGET In-Reply-To: References: <20201012062354.3743-1-peng.fan@nxp.com> <20201012062354.3743-8-peng.fan@nxp.com> <124751.1603784732@gemini.denx.de> <126171.1603786559@gemini.denx.de> <128591.1603791169@gemini.denx.de> Message-ID: <129730.1603794160@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Peng Fan, In message 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@csnews.cs.colorado.edu>