public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] usb: dwc2_udc_otg: support 8-bit interface
Date: Mon, 06 Jun 2016 18:30:14 +0200	[thread overview]
Message-ID: <5755A516.3010106@denx.de> (raw)
In-Reply-To: <CAM7GXo=hisu7x-uGXr3mcu0cGh+0jPSmhjXwhwW07FP=dO2c2A@mail.gmail.com>

On 06/06/2016 06:15 PM, Steve Rae wrote:
> On Mon, Jun 6, 2016 at 8:59 AM, Marek Vasut <marex@denx.de> wrote:
>>
>> On 06/06/2016 05:57 PM, Steve Rae wrote:
>>> Define CONFIG_USB_GADGET_DWC2_PHY_8_BIT to allow the
>>> physical interface to be 8-bit (rather than 16-bit).
>>>
>>> Signed-off-by: Steve Rae <srae@broadcom.com>
>>
>> Can this config option be picked from DT rather than hard-coded by some
>> new ad-hoc config option ? Also, new options should be Kconfig'd .
>>
>> Thanks
>>
> 
> Marek,

Hi,

> would this be the correct place to add this Kconfig???
> is the wording sufficient?
> Thanks, Steve
> 
> diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
> index a35a1c7..e957df4 100644
> --- a/drivers/usb/gadget/Kconfig
> +++ b/drivers/usb/gadget/Kconfig
> @@ -45,20 +45,26 @@ config USB_GADGET_ATMEL_USBA
> 
>  config USB_GADGET_DWC2_OTG
>         bool "DesignWare USB2.0 HS OTG controller (gadget mode)"
>         select USB_GADGET_DUALSPEED
>         help
>           The Designware USB2.0 high-speed gadget controller
>           integrated into many SoCs. Select this option if you want the
>           driver to operate in Peripheral mode. This option requires
>           USB_GADGET to be enabled.
> 
> +config USB_GADGET_DWC2_PHY_8_BIT
> +       bool "DesignWare USB2.0 controller (gadget mode)"

This is wrong, right ?

> +       help
> +         Set the Designware USB2.0 high-speed gadget controller
> +         to 8-bit mode, rather than the default 16-bit mode.

You mean 8bit mode ULPI, don't you ?

>  config CI_UDC
>         bool "ChipIdea device controller"
>         select USB_GADGET_DUALSPEED
>         help
>           Say Y here to enable device controller functionality of the
>           ChipIdea driver.
> 
>  config USB_GADGET_VBUS_DRAW
>         int "Maximum VBUS Power usage (2-500 mA)"
>         range 2 500
> 
>>
>>> ---
>>>
>>>  drivers/usb/gadget/dwc2_udc_otg.c | 4 ++++
>>>  include/configs/bcm28155_ap.h     | 1 +
>>>  2 files changed, 5 insertions(+)
>>>
>>> diff --git a/drivers/usb/gadget/dwc2_udc_otg.c b/drivers/usb/gadget/dwc2_udc_otg.c
>>> index cb20b00..a95c8d5 100644
>>> --- a/drivers/usb/gadget/dwc2_udc_otg.c
>>> +++ b/drivers/usb/gadget/dwc2_udc_otg.c
>>> @@ -415,7 +415,11 @@ static void reconfig_usbd(struct dwc2_udc *dev)
>>>               |0<<7           /* Ulpi DDR sel*/
>>>               |0<<6           /* 0: high speed utmi+, 1: full speed serial*/
>>>               |0<<4           /* 0: utmi+, 1:ulpi*/
>>> +#ifdef CONFIG_USB_GADGET_DWC2_PHY_8_BIT
>>> +             |0<<3           /* phy i/f  0:8bit, 1:16bit*/
>>> +#else
>>>               |1<<3           /* phy i/f  0:8bit, 1:16bit*/
>>> +#endif
>>>               |0x7<<0;        /* HS/FS Timeout**/
>>>
>>>       if (dev->pdata->usb_gusbcfg)
>>> diff --git a/include/configs/bcm28155_ap.h b/include/configs/bcm28155_ap.h
>>> index 889e5db..e04cfbe 100644
>>> --- a/include/configs/bcm28155_ap.h
>>> +++ b/include/configs/bcm28155_ap.h
>>> @@ -134,6 +134,7 @@
>>>  #define CONFIG_SYS_CACHELINE_SIZE    64
>>>  #define CONFIG_FASTBOOT_BUF_SIZE     (CONFIG_SYS_SDRAM_SIZE - SZ_1M)
>>>  #define CONFIG_FASTBOOT_BUF_ADDR     CONFIG_SYS_SDRAM_BASE
>>> +#define CONFIG_USB_GADGET_DWC2_PHY_8_BIT
>>>  #define CONFIG_USB_GADGET_BCM_UDC_OTG_PHY
>>>  #define CONFIG_USBID_ADDR            0x34052c46
>>>
>>>
>>
>>
>> --
>> Best regards,
>> Marek Vasut


-- 
Best regards,
Marek Vasut

  reply	other threads:[~2016-06-06 16:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-06 15:57 [U-Boot] [PATCH] usb: dwc2_udc_otg: support 8-bit interface Steve Rae
2016-06-06 15:59 ` Marek Vasut
2016-06-06 16:15   ` Steve Rae
2016-06-06 16:30     ` Marek Vasut [this message]
2016-06-06 16:50       ` Steve Rae
2016-06-06 17:03         ` Marek Vasut
2016-06-06 18:58           ` Steve Rae
2016-06-06 19:10             ` Steve Rae
2016-06-06 21:05               ` Marek Vasut
2016-06-06 21:04             ` Marek Vasut

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=5755A516.3010106@denx.de \
    --to=marex@denx.de \
    --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