Hi, On 28/08/19 7:52 PM, Sherry Sun wrote: > Hi Vignesh, [...] >> I see that Cadence USB driver for Linux kernel is still under development and >> DT compatible binding is supposed to be "cdns,usb3" not "cdns,usb3-1.0.0". >> See v11: >> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatch >> work.kernel.org%2Fpatch%2F11114415%2F&data=02%7C01%7Csherry.s >> un%40nxp.com%7C97d431d6b569451ff8ac08d72bb5f883%7C686ea1d3bc2b >> 4c6fa92cd99c5c301635%7C0%7C0%7C637025932942549390&sdata=Jltlk >> Te7SXTAQAKtF7HzOqY291upS67Eixeke9oXQ2w%3D&reserved=0 >> Deviating from kernel binding will break sync'ing of DTs b/w kernel and U- >> Boot. >> > > Thanks for your reminder, I only noticed the DT compatible in v5 last time. > So I will change it to "cdns,usb3" in next version. > >> Also, why not sync the latest host/gadget driver patches from kernel as is? >> That should help in borrowing bug fixes/features whenever Cadence updates >> kernel driver in future. > > Since there are many differences between the cdns3 driver in uboot and > kernel, > such as in uboot, we didn't support host mode in cdns3 core.c, instead we add > an > xhci-imx8 driver as host driver. So the patches from kernel can't be applied > to this driver. >
I see that xhci-imx8.c is generic enough to be used with v11 upstream cdns3/core.c and cdns3/host.c once IMX specific stuff is moved to top level wrapper. I see you use a separate compatible for host driver which does not match with kernel (as there is no separate node for host vs device). Moreover the dt bindings listed in patch 1/7 lists non core registers as part of Cadence USB3 controller node. Above issues make it impossible to sync Kernel DT nodes with U-Boot DT nodes which is not acceptable for U-Boot. All non Cadence core registers and configurations need to part of a separate wrapper driver that then binds to appropriate host/device Cadence USB3 controller node based on dr_mode property. E.g: see who dwc3 is modeled [3]: Also see cdns-ti.c in the TI U-Boot branch [1] [2]) If there are more customization required for host driver cdns3/host.c we can provide vendor specific hooks/callbacks to be called from cdns3/host.c Current series is not usable on TI platform with Cadence USB3 IP at least in host mode and would need core host driver to be ported from kernel. Keeping Linux kernel and U-Boot driver stack in sync has a big advantage for you as well. It simplifies borrowing bug fixes and new features or functions (especially in subsystems like USB where code is pretty large) BTW, I have a tree with v10 of Cadence USB3 kernel driver ported to U-Boot here[1]. It is based on 2019.01 U-Boot but should apply as is on the latest tree as well. (Tree is still missing USB3 PHY support and thus USB 3.0 support) and works on TI platform. I am waiting for bindings to be frozen in Linux before posting to U-Boot list. Hopefully we can find a way to collaborate! [1] git://git.ti.com/~vigneshr/ti-u-boot/vigneshr-ti-u-boot.git branch: dfu [2] http://git.ti.com/cgit/cgit.cgi/~vigneshr/ti-u-boot/vigneshr-ti-u-boot.git/tree/arch/arm/dts/k3-j721e-main.dtsi?h=dfu#n430 [3] https://elixir.bootlin.com/u-boot/latest/source/drivers/usb/dwc3/dwc3-generic.c -- Regards Vignesh _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot