Hi, On Wednesday 31 May 2017 09:20 AM, Simon Glass wrote: > On 23 May 2017 at 05:55, Vignesh R <vigne...@ti.com> wrote: >> From: Mugunthan V N <mugunthan...@ti.com> >> >> Add a misc driver for DWC3 wrapper, so that based on dr_mode the >> USB devices can bind to USB host or USB device drivers. >> >> Signed-off-by: Mugunthan V N <mugunthan...@ti.com> >> Signed-off-by: Vignesh R <vigne...@ti.com> >> --- >> board/ti/am57xx/board.c | 11 ---------- >> drivers/usb/dwc3/core.h | 4 ++++ >> drivers/usb/dwc3/dwc3-omap.c | 52 >> ++++++++++++++++++++++++++++++++++++++++++++ >> drivers/usb/dwc3/gadget.c | 2 +- >> 4 files changed, 57 insertions(+), 12 deletions(-) > > Can you explain why this is a misc driver, and how it will be instantiated?
Based on dr_mode property, the device node needs to bind to either "host" driver or "peripheral" driver. Therefore, this wrapper is written for DWC3, which on bind will read dr_mode property and appropriately associate USB DT node with DWC3 peripheral driver or host driver. This is similar to what exists today for MUSB[1] and is instantiated by arch_misc_init() function for am33xx and am43xx I got these patch from U-Boot list which the author had submitted previosuly and got Reviewed-by and did not look deep into it. But looks like this patch really needs be read along with patch 7/10. I will re-split and reorder this patch in the next version. [1]https://www.mail-archive.com/u-boot@lists.denx.de/msg231076.html -- Regards Vignesh _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot