All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [RESEND PATCH 0/5] usb: host: dwc2: use driver model for PHY and CLOCK
@ 2019-10-14  8:00 Patrick Delaunay
  2019-10-14  8:00 ` [U-Boot] [RESEND PATCH 1/5] usb: host: dwc2: add phy support Patrick Delaunay
                   ` (4 more replies)
  0 siblings, 5 replies; 23+ messages in thread
From: Patrick Delaunay @ 2019-10-14  8:00 UTC (permalink / raw)
  To: u-boot


In this serie I update the DWC2 host driver to use the device tree
information and the associated PHY and CLOCK drivers when they are
available.

I test this serie on stm32mp157c-ev1 board;
The U-CLASS are provided by:
- PHY by USBPHYC driver = ./drivers/phy/phy-stm32-usbphyc.c
- CLOCK by RCC clock driver = drivers/clk/clk_stm32mp1.c
- RESET by RCC reset driver = drivers/reset/stm32-reset.c

And I activate the configuration
+CONFIG_USB_DWC2=y

PS: it is not the default configuration to avoid conflict with gadget
    driver

To solve a binding issue, I also deactivate the gadget support:
by default only one driver is bound to theusbotg_hs node with "snps,dwc2"
compatible, and today it is the device one (the first in the driver list).

I also need to deactivate hnp-srp support with:

&usbotg_hs {
	/* need to disable ONLY for HOST support */
	hnp-srp-disable;
};

WARNING: OTG with device or host support is not correctly handle by DWC2
         driver (see example for dynamic OTG role in DWC3 driver).

The tests executed on the stm32mp157c-ev1 target:

STM32MP> usb start
starting USB...
Bus usb-otg at 49000000: USB DWC2
Bus usbh-ehci at 5800d000: USB EHCI 1.00
scanning bus usb-otg at 49000000 for devices... 2 USB Device(s) found
scanning bus usbh-ehci at 5800d000 for devices... 3 USB Device(s) found
       scanning usb for storage devices... 2 Storage Device(s) found
STM32MP> usb tree
USB device tree:
  1  Hub (480 Mb/s, 0mA)
  |   U-Boot Root Hub
  |
  +-2  Mass Storage (480 Mb/s, 300mA)
       Verbatim STORE N GO 070731C8ACD7EE97

  1  Hub (480 Mb/s, 0mA)
  |  u-boot EHCI Host Controller
  |
  +-2  Hub (480 Mb/s, 2mA)
    |
    +-3  Mass Storage (480 Mb/s, 500mA)
         Generic  USB Storage

STM32MP> ls usb 0
<DIR>       4096 .
<DIR>       4096 ..
<DIR>      16384 lost+found
<DIR>       4096 record
         1490212 xipImage
        21058006 vmlinux

STM32MP> load usb 0 0xC0000000 vmlinux
21058006 bytes read in 10851 ms (1.9 MiB/s)



Patrick Delaunay (5):
  usb: host: dwc2: add phy support
  usb: host: dwc2: add support for clk
  usb: host: dwc2: force reset assert
  usb: host: dwc2: add usb33d supply support for stm32mp1
  usb: host: dwc2: add trace to have clean usb start

 drivers/usb/host/dwc2.c | 112 +++++++++++++++++++++++++++++++++++++++-
 1 file changed, 111 insertions(+), 1 deletion(-)

-- 
2.17.1

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2019-11-08 15:41 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-14  8:00 [U-Boot] [RESEND PATCH 0/5] usb: host: dwc2: use driver model for PHY and CLOCK Patrick Delaunay
2019-10-14  8:00 ` [U-Boot] [RESEND PATCH 1/5] usb: host: dwc2: add phy support Patrick Delaunay
2019-10-14 23:26   ` Marek Vasut
2019-11-06 17:40     ` Patrick DELAUNAY
2019-11-06 21:55       ` Marek Vasut
2019-11-08 13:25         ` Patrick DELAUNAY
2019-11-08 15:41           ` Marek Vasut
2019-10-14  8:00 ` [U-Boot] [RESEND PATCH 2/5] usb: host: dwc2: add support for clk Patrick Delaunay
2019-10-14 23:28   ` Marek Vasut
2019-11-06 18:03     ` Patrick DELAUNAY
2019-11-06 21:59       ` Marek Vasut
2019-10-14  8:00 ` [U-Boot] [RESEND PATCH 3/5] usb: host: dwc2: force reset assert Patrick Delaunay
2019-10-14 23:29   ` Marek Vasut
2019-11-06 18:27     ` Patrick DELAUNAY
2019-11-06 22:00       ` Marek Vasut
2019-11-08  9:53         ` Patrick DELAUNAY
2019-11-08  9:55           ` Marek Vasut
2019-11-08 10:51             ` Patrick DELAUNAY
2019-11-08 10:52               ` Marek Vasut
2019-10-14  8:00 ` [U-Boot] [RESEND PATCH 4/5] usb: host: dwc2: add usb33d supply support for stm32mp1 Patrick Delaunay
2019-10-14 23:31   ` Marek Vasut
2019-11-06 18:42     ` Patrick DELAUNAY
2019-10-14  8:00 ` [U-Boot] [RESEND PATCH 5/5] usb: host: dwc2: add trace to have clean usb start Patrick Delaunay

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.