public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Kever Yang <kever.yang@rock-chips.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 3/4] usb: dwc3: add support for 16 bit UTMI+ interface
Date: Tue, 30 Aug 2016 11:21:04 +0800	[thread overview]
Message-ID: <57C4FBA0.4070205@rock-chips.com> (raw)
In-Reply-To: <91c7d912-037f-de63-c3f5-1f94279a8b13@denx.de>

Hi Marek,

On 08/29/2016 09:01 AM, Marek Vasut wrote:
> On 08/29/2016 02:55 AM, Kever Yang wrote:
>> Hi Marek,
>>
>> On 08/26/2016 05:09 PM, Marek Vasut wrote:
>>> On 08/25/2016 03:17 AM, Kever Yang wrote:
>>>> Hi Marek,
>>>>
>>>> On 08/24/2016 07:38 PM, Marek Vasut wrote:
>>>>> On 08/24/2016 05:46 AM, Kever Yang wrote:
>>>>>> The dwc3 controller is using 8 bit UTMI+ interface for USB2.0 PHY,
>>>>>> add one variable in dwc3/dwc3_device struct to support 16 bit
>>>>>> UTMI+ interface on some SoCs like Rockchip rk3399.
>>>>>>
>>>>>> Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
>>>>>> ---
>>>>>>
>>>>>> Changes in v2:
>>>>>> - use a variable to identify utmi+ bus width instead of CONFIG MACRO
>>>>>>
>>>>>>     drivers/usb/dwc3/core.c |  6 ++++++
>>>>>>     drivers/usb/dwc3/core.h | 12 ++++++++++++
>>>>>>     include/dwc3-uboot.h    |  1 +
>>>>>>     3 files changed, 19 insertions(+)
>>>>>>
>>>>>> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
>>>>>> index 85cc96a..0613508 100644
>>>>>> --- a/drivers/usb/dwc3/core.c
>>>>>> +++ b/drivers/usb/dwc3/core.c
>>>>>> @@ -388,6 +388,11 @@ static void dwc3_phy_setup(struct dwc3 *dwc)
>>>>>>         if (dwc->dis_u2_susphy_quirk)
>>>>>>             reg &= ~DWC3_GUSB2PHYCFG_SUSPHY;
>>>>>>     +    if (dwc->usb2_phyif_utmi_width == 16) {
>>>>>> +        reg &= ~DWC3_GUSB2PHYCFG_USBTRDTIM_MASK;
>>>>>> +        reg |= DWC3_GUSB2PHYCFG_USBTRDTIM_16BIT;
>>>>>> +        reg |= DWC3_GUSB2PHYCFG_PHYIF_16BIT;
>>>>>> +    }
>>>>> Didn't we agree to pull this info from OF ?
>>>> Yes, the dwc->usb2_phyif_utmi_width is from OF,  but I make the DT parse
>>>> in board file instead of in the dwc3 driver,  see my patch:
>>>> [PATCH v2 2/4] board: evb-rk3399: add api to support dwc3 gadget
>>> So this is basically a passing of platform data ?
>> Yes, this is what other platform do, I just extend one more setting.
> Platform data should go away in favor of the DT probing.
>
>>>> I think implement in this way won't affect other soc also using dwc3
>>>> controller,
>>>> the DT parse would cost some time which may not necessary for other soc.
>>> The time needed to run the DT parsing is completely insignificant.
>>> This sounds like a premature optimization.
>> Which way of implement this DT parse do you prefer and more reasonable,
>> in dwc3 driver or in board init and dwc3 driver use it as platform data?
> Driver should parse the DT.

I'm going to parse the DT for this new 16bit UTMI+ interface, and keep 
other part "as is"
because the dwc3 device node for different SoC are different now.

Does this make sense to you?

Thanks,
- Kever
>
>> Thanks,
>> - Kever
> [...]
>

  reply	other threads:[~2016-08-30  3:21 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-24  3:46 [U-Boot] [PATCH v2 0/4] rk3399: enable dwc3 gadget and fastboot Kever Yang
2016-08-24  3:46 ` [U-Boot] [PATCH v2 1/4] rk3399: add a empty "sys_proto.h" header file Kever Yang
2016-08-24  3:46 ` [U-Boot] [PATCH v2 2/4] board: evb-rk3399: add api to support dwc3 gadget Kever Yang
2016-08-25  1:07   ` Kever Yang
2016-08-26  9:11     ` Marek Vasut
2016-08-29  0:49       ` Kever Yang
2016-08-29  0:54         ` Marek Vasut
2016-08-24  3:46 ` [U-Boot] [PATCH v2 3/4] usb: dwc3: add support for 16 bit UTMI+ interface Kever Yang
2016-08-24 11:38   ` Marek Vasut
2016-08-25  1:17     ` Kever Yang
2016-08-26  9:09       ` Marek Vasut
2016-08-29  0:55         ` Kever Yang
2016-08-29  1:01           ` Marek Vasut
2016-08-30  3:21             ` Kever Yang [this message]
2016-08-31  0:48               ` Marek Vasut
2016-08-24  3:46 ` [U-Boot] [PATCH v2 4/4] config: rk3399: add support for dwc3 gadget Kever Yang
2016-08-27 22:22   ` Steve Rae
2016-08-29  0:56     ` Kever Yang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=57C4FBA0.4070205@rock-chips.com \
    --to=kever.yang@rock-chips.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox