From: Vignesh R Date: Wed, 31 May 2017 10:36:32 +0530 Subject: [U-Boot] [PATCH 05/11] drivers: usb: dwc3: add ti dwc3 misc driver for wrapper In-Reply-To: References: <20170523115546.399-1-vigneshr@ti.com> <20170523115546.399-6-vigneshr@ti.com> Message-ID: <412fec24-526f-8cc6-7ca9-c420b0850cc5@ti.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi, On Wednesday 31 May 2017 09:20 AM, Simon Glass wrote: > On 23 May 2017 at 05:55, Vignesh R wrote: >> From: Mugunthan V N >> >> 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 >> Signed-off-by: Vignesh R >> --- >> 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 previously 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 at lists.denx.de/msg231076.html -- Regards Vignesh