From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kever Yang Date: Thu, 18 Aug 2016 17:04:35 +0800 Subject: [U-Boot] [PATCH 3/4] usb: dwc3: add support for 16 bit UTMI+ interface In-Reply-To: References: <1471341825-5000-1-git-send-email-kever.yang@rock-chips.com> <1471341825-5000-4-git-send-email-kever.yang@rock-chips.com> <57B3BE60.9010701@rock-chips.com> <97df8d12-6fc6-3942-f70a-5658e6f132bd@denx.de> <57B3C69C.10007@rock-chips.com> Message-ID: <57B57A23.1030108@rock-chips.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 Marek, On 08/17/2016 04:07 PM, Marek Vasut wrote: > On 08/17/2016 04:06 AM, Kever Yang wrote: >> Hi Marek, >> >> On 08/17/2016 09:39 AM, Marek Vasut wrote: >>> On 08/17/2016 03:31 AM, Kever Yang wrote: >>>> Hi Marek, >>> Hi, >>> >>>> On 08/16/2016 09:18 PM, Marek Vasut wrote: >>>>> On 08/16/2016 12:03 PM, Kever Yang wrote: >>>>>> The dwc3 controller is using 8 bit UTMI+ interface for USB2.0 PHY, >>>>>> add one MACRO CONFIG_USB_DWC3_USB2PHY_16BIT to support 16 bit >>>>>> UTMI+ interface on some SoCs like Rockchip rk3399. >>>>>> >>>>>> Signed-off-by: Kever Yang >>>>> This should be configured from either DT or Kconfig option. >>>> This setting in kernel is from DT, but we do not use DT for gadget mode >>>> in U-Boot. >>>> How about we add a quirk for it like u2phy_utmi_width_quirk in both >>>> dwc3_device >>>> and dwc3 struct for device mode? >>>> >>>> For Host mode, we can get from DT and also need a quirk to store it. >>> Surely, if you can get this info from DT for host mode, you can also get >>> it from DT for gadget mode, yes ? >> No, for gadget mode, the controller is init by board_usb_init() called >> from cmd like fastboot, >> there is no uclass driver for a udc driver and no one parse the DT >> currently. > Which doesn't imply you cannot parse the DT though, correct ? > I would _much_ rather see you parsing DT over adding new ad-hoc compile > time config option. Sorry, I don't understand what do you mean by "adding new ad-hoc compile time config option". Do you mean (a) add fdt_get_property() to parse DT only for this setting? Or (b) implement a new driver for gadget mode with driver-model support which bind the device during DT instead of board_usb_init()? The case (a) would be easy while case (b) suppose to be a big update. The source of driver for dwc3 gadget is in drivers/usb/dwc3 and the source of driver for dwc3 host is in drivers/usb/host, we will have to merge this two driver into one in case (b) bacause they are using the some controller which means the same dts node. I would like to see these two driver merge into one like what kernel do, but I think it need someone who very familiar with both dwc3 host and gadget to port the driver from kernel. Thanks, - Kever > >> You can see my patch "[PATCH 2/4] board: evb-rk3399: add api to support >> dwc3 gadget" >> for how it initialized. >> >> Thanks, >> - Kever > [...] >