[U-Boot] [PATCH 05/11] drivers: usb: dwc3: add ti dwc3 misc driver for wrapper

Vignesh R vigneshr at ti.com
Wed May 31 05:06:32 UTC 2017


Hi,

On Wednesday 31 May 2017 09:20 AM, Simon Glass wrote:
> On 23 May 2017 at 05:55, Vignesh R <vigneshr at ti.com> wrote:
>> From: Mugunthan V N <mugunthanvnm at 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 <mugunthanvnm at ti.com>
>> Signed-off-by: Vignesh R <vigneshr at 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
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@lists.denx.de/msg231076.html

-- 
Regards
Vignesh


More information about the U-Boot mailing list