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 v2] usb: dwc2_udc_otg: support 8-bit interface
Date: Tue, 07 Jun 2016 03:02:19 +0200	[thread overview]
Message-ID: <57561D1B.4080307@denx.de> (raw)
In-Reply-To: <CAM7GXokLA4QP-gne4aMGhy7k8zDG2sJYKiR1DirucfSQ=XON0w@mail.gmail.com>

On 06/07/2016 02:55 AM, Steve Rae wrote:
> On Mon, Jun 6, 2016 at 5:38 PM, Marek Vasut <marex@denx.de> wrote:
>> On 06/07/2016 01:58 AM, Steve Rae wrote:
>>> Define CONFIG_USB_GADGET_DWC2_OTG_PHY_BUS_WIDTH_8 to allow the
>>> physical interface to be 8-bit (rather than 16-bit).
>>>
>>> Signed-off-by: Steve Rae <srae@broadcom.com>
>>
>> Hi, minor nits below.
>>
>>> ---
>>> from [1] (line ~124)
>>>
>>>     /* The Kona PHY supports an 8-bit wide UTMI interface */
>>>     [...snip...]
>>>
>>>     module_platform_driver(bcm_kona_usb2_driver);
>>>
>>>     MODULE_ALIAS("platform:bcm-kona-usb2");
>>>     MODULE_AUTHOR("Matt Porter <mporter@linaro.org>");
>>>     MODULE_DESCRIPTION("BCM Kona USB 2.0 PHY driver");
>>>     MODULE_LICENSE("GPL v2");
>>>
>>> [1] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/phy/phy-bcm-kona-usb2.c
>>>
>>> Changes in v2:
>>> - implement as Kconfig
>>>
>>>  configs/bcm11130_defconfig        |  1 +
>>>  configs/bcm11130_nand_defconfig   |  1 +
>>>  configs/bcm28155_ap_defconfig     |  1 +
>>>  configs/bcm28155_w1d_defconfig    |  1 +
>>>  drivers/usb/gadget/Kconfig        | 10 ++++++++++
>>>  drivers/usb/gadget/dwc2_udc_otg.c |  4 ++++
>>>  6 files changed, 18 insertions(+)
>>>
>>> diff --git a/configs/bcm11130_defconfig b/configs/bcm11130_defconfig
>>> index b8ec8ac..2716868 100644
>>> --- a/configs/bcm11130_defconfig
>>> +++ b/configs/bcm11130_defconfig
>>> @@ -18,6 +18,7 @@ CONFIG_SYS_NS16550=y
>>>  CONFIG_USB=y
>>>  CONFIG_USB_GADGET=y
>>>  CONFIG_USB_GADGET_DWC2_OTG=y
>>> +CONFIG_USB_GADGET_DWC2_OTG_PHY_BUS_WIDTH_8=y
>>>  CONFIG_USB_GADGET_DOWNLOAD=y
>>>  CONFIG_G_DNL_MANUFACTURER="Broadcom Corporation"
>>>  CONFIG_G_DNL_VENDOR_NUM=0x18d1
>>> diff --git a/configs/bcm11130_nand_defconfig b/configs/bcm11130_nand_defconfig
>>> index 6021fd2..8e01c52 100644
>>> --- a/configs/bcm11130_nand_defconfig
>>> +++ b/configs/bcm11130_nand_defconfig
>>> @@ -18,6 +18,7 @@ CONFIG_SYS_NS16550=y
>>>  CONFIG_USB=y
>>>  CONFIG_USB_GADGET=y
>>>  CONFIG_USB_GADGET_DWC2_OTG=y
>>> +CONFIG_USB_GADGET_DWC2_OTG_PHY_BUS_WIDTH_8=y
>>>  CONFIG_USB_GADGET_DOWNLOAD=y
>>>  CONFIG_G_DNL_MANUFACTURER="Broadcom Corporation"
>>>  CONFIG_G_DNL_VENDOR_NUM=0x18d1
>>> diff --git a/configs/bcm28155_ap_defconfig b/configs/bcm28155_ap_defconfig
>>> index 4404f32..eb58401 100644
>>> --- a/configs/bcm28155_ap_defconfig
>>> +++ b/configs/bcm28155_ap_defconfig
>>> @@ -17,6 +17,7 @@ CONFIG_SYS_NS16550=y
>>>  CONFIG_USB=y
>>>  CONFIG_USB_GADGET=y
>>>  CONFIG_USB_GADGET_DWC2_OTG=y
>>> +CONFIG_USB_GADGET_DWC2_OTG_PHY_BUS_WIDTH_8=y
>>>  CONFIG_USB_GADGET_DOWNLOAD=y
>>>  CONFIG_G_DNL_MANUFACTURER="Broadcom Corporation"
>>>  CONFIG_G_DNL_VENDOR_NUM=0x18d1
>>> diff --git a/configs/bcm28155_w1d_defconfig b/configs/bcm28155_w1d_defconfig
>>> index 60eb328..35d04af 100644
>>> --- a/configs/bcm28155_w1d_defconfig
>>> +++ b/configs/bcm28155_w1d_defconfig
>>> @@ -18,6 +18,7 @@ CONFIG_SYS_NS16550=y
>>>  CONFIG_USB=y
>>>  CONFIG_USB_GADGET=y
>>>  CONFIG_USB_GADGET_DWC2_OTG=y
>>> +CONFIG_USB_GADGET_DWC2_OTG_PHY_BUS_WIDTH_8=y
>>>  CONFIG_USB_GADGET_DOWNLOAD=y
>>>  CONFIG_G_DNL_MANUFACTURER="Broadcom Corporation"
>>>  CONFIG_G_DNL_VENDOR_NUM=0x18d1
>>
>> Config file changes should go through the bcm tree or whoever picks those.
> As far as I know, "nobody" is assigned to pick the "bcm tree"
> I've added Albert (arm) ?!?!?

Yeah, either Albert or Tom then. Still ... this might be an indication
that this situation needs to be fixed ;-)

>>> diff --git a/drivers/usb/gadget/Kconfig b/drivers/usb/gadget/Kconfig
>>> index a35a1c7..39e5c03 100644
>>> --- a/drivers/usb/gadget/Kconfig
>>> +++ b/drivers/usb/gadget/Kconfig
>>> @@ -52,6 +52,16 @@ config USB_GADGET_DWC2_OTG
>>>         driver to operate in Peripheral mode. This option requires
>>>         USB_GADGET to be enabled.
>>>
>>> +if USB_GADGET_DWC2_OTG
>>> +
>>> +config USB_GADGET_DWC2_OTG_PHY_BUS_WIDTH_8
>>> +     bool "DesignWare USB2.0 HS OTG controller PHY interface width"
>>
>> Rename it to "8-bit PHY bus width", otherwise the boolean value won't
>> make sense here.
> DONE = v3

Thanks

>>> +     help
>>> +       Set the Designware USB2.0 high-speed OTG controller
>>> +       PHY interface width to 8 bits, rather than the default (16 bits).
>>> +
>>> +endif # USB_GADGET_DWC2_OTG
>>> +
>>>  config CI_UDC
>>>       bool "ChipIdea device controller"
>>>       select USB_GADGET_DUALSPEED
>>> diff --git a/drivers/usb/gadget/dwc2_udc_otg.c b/drivers/usb/gadget/dwc2_udc_otg.c
>>> index cb20b00..a23278d 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_OTG_PHY_BUS_WIDTH_8
>>> +             |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)
>>>
>>
>>
>> --
>> Best regards,
>> Marek Vasut


-- 
Best regards,
Marek Vasut

      reply	other threads:[~2016-06-07  1:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-06 23:58 [U-Boot] [PATCH v2] usb: dwc2_udc_otg: support 8-bit interface Steve Rae
2016-06-07  0:38 ` Marek Vasut
2016-06-07  0:55   ` Steve Rae
2016-06-07  1:02     ` Marek Vasut [this message]

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=57561D1B.4080307@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