[U-Boot] [PATCH 3/4] usb: dwc3: add support for 16 bit UTMI+ interface

Kever Yang kever.yang at rock-chips.com
Thu Aug 18 11:04:35 CEST 2016


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 <kever.yang at rock-chips.com>
>>>>> 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
> [...]
>




More information about the U-Boot mailing list