Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1532983 > unrolled thread

[PATCH 0/2] Support for Synopsys UDC for ARM platforms

Started byRaviteja Garimella <raviteja.garimella@broadcom.com>
First post2016-11-30 07:10 +0100
Last post2016-12-01 10:00 +0100
Articles 9 — 4 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/2] Support for Synopsys UDC for ARM platforms  Raviteja Garimella <raviteja.garimella@broadcom.com> - 2016-11-30 07:10 +0100
    [PATCH 1/2] Add DT bindings documentation for Synopsys UDC driver Raviteja Garimella <raviteja.garimella@broadcom.com> - 2016-11-30 07:10 +0100
      Re: [PATCH 1/2] Add DT bindings documentation for Synopsys UDC driver Rob Herring <robh@kernel.org> - 2016-12-06 00:10 +0100
        Re: [PATCH 1/2] Add DT bindings documentation for Synopsys UDC driver Raviteja Garimella <raviteja.garimella@broadcom.com> - 2016-12-06 12:00 +0100
    Re: [PATCH 2/2] Synopsys USB 2.0 Device Controller (UDC) Driver Felipe Balbi <balbi@kernel.org> - 2016-11-30 11:50 +0100
      Re: [PATCH 2/2] Synopsys USB 2.0 Device Controller (UDC) Driver Raviteja Garimella <raviteja.garimella@broadcom.com> - 2016-11-30 13:50 +0100
        Re: [PATCH 2/2] Synopsys USB 2.0 Device Controller (UDC) Driver Felipe Balbi <balbi@kernel.org> - 2016-11-30 13:50 +0100
          Re: [PATCH 2/2] Synopsys USB 2.0 Device Controller (UDC) Driver John Youn <John.Youn@synopsys.com> - 2016-12-01 02:00 +0100
            Re: [PATCH 2/2] Synopsys USB 2.0 Device Controller (UDC) Driver Felipe Balbi <balbi@kernel.org> - 2016-12-01 10:00 +0100

#1532983 — [PATCH 0/2] Support for Synopsys UDC for ARM platforms

FromRaviteja Garimella <raviteja.garimella@broadcom.com>
Date2016-11-30 07:10 +0100
Subject[PATCH 0/2] Support for Synopsys UDC for ARM platforms
Message-ID<sJ6fD-2kZ-1@gated-at.bofh.it>
This patchset adds support for Synposys Designware core AHB-UDC
(USB Device controller) for Arm platfoms.

New UDC driver is added to drivers/usb/gadget directory along with
updating the Kconfig and Makefile. 
DT bindings documentation is also added for the same.
Device tree entry for the same in NS2 dtsi will be sent for review
once the DRD phy driver code is pushed (which is being reviewed in a
separate patch series).

This patchset is tested on Broadcom NS2 BCM958712K reference board.

Repo: https://github.com/Broadcom/arm64-linux.git
Branch: udc_v1

Raviteja Garimella (2):
  Add DT bindings documentation for Synopsys UDC driver
  Synopsys USB 2.0 Device Controller (UDC) Driver

 .../devicetree/bindings/usb/snps,dw-ahb-udc.txt    |   29 +
 drivers/usb/gadget/udc/Kconfig                     |   12 +
 drivers/usb/gadget/udc/Makefile                    |    1 +
 drivers/usb/gadget/udc/snps_udc.c                  | 1751 ++++++++++++++++++++
 drivers/usb/gadget/udc/snps_udc.h                  | 1071 ++++++++++++
 5 files changed, 2864 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/usb/snps,dw-ahb-udc.txt
 create mode 100644 drivers/usb/gadget/udc/snps_udc.c
 create mode 100644 drivers/usb/gadget/udc/snps_udc.h

-- 
2.1.0

[toc] | [next] | [standalone]


#1532985 — [PATCH 1/2] Add DT bindings documentation for Synopsys UDC driver

FromRaviteja Garimella <raviteja.garimella@broadcom.com>
Date2016-11-30 07:10 +0100
Subject[PATCH 1/2] Add DT bindings documentation for Synopsys UDC driver
Message-ID<sJ6fE-2kZ-11@gated-at.bofh.it>
In reply to#1532983
This patch adds documentation for Synopsis Designware Cores AHB
Subsystem Device Controller (UDC).

Signed-off-by: Raviteja Garimella <raviteja.garimella@broadcom.com>
---
 .../devicetree/bindings/usb/snps,dw-ahb-udc.txt    | 29 ++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/usb/snps,dw-ahb-udc.txt

diff --git a/Documentation/devicetree/bindings/usb/snps,dw-ahb-udc.txt b/Documentation/devicetree/bindings/usb/snps,dw-ahb-udc.txt
new file mode 100644
index 0000000..64e1fbf
--- /dev/null
+++ b/Documentation/devicetree/bindings/usb/snps,dw-ahb-udc.txt
@@ -0,0 +1,29 @@
+Synopsys USB Device controller.
+
+The device node is used for Synopsys Designware Cores AHB
+Subsystem Device Controller (UDC).
+
+Required properties:
+ - compatible: should be "snps,dw-ahbudc"
+ - reg: Offset and length of UDC register set
+ - interrupts: description of interrupt line
+ - phys: phandle to phy node.
+ - phy-names: name of phy node. Must be usb2drd.
+ - extcon: phandle to the extcon device
+
+Example:
+
+	usbdrd_phy: phy@6501c000 {
+		#phy-cells = <0>;
+		compatible = "brcm,ns2-drd-phy";
+		reg = <0x66000000 0x1000>,
+	}
+
+	udc_dwc: usb@664e0000 {
+		compatible = "snps,dw-ahb-udc";
+		reg = <0x664e0000 0x2000>;
+		interrupts = <GIC_SPI 424 IRQ_TYPE_LEVEL_HIGH>;
+		phys = <&usbdrd_phy>;
+		phy-names = "usb2drd";
+		extcon = <&usbdrd_phy>";
+	};
-- 
2.1.0

[toc] | [prev] | [next] | [standalone]


#1536510 — Re: [PATCH 1/2] Add DT bindings documentation for Synopsys UDC driver

FromRob Herring <robh@kernel.org>
Date2016-12-06 00:10 +0100
SubjectRe: [PATCH 1/2] Add DT bindings documentation for Synopsys UDC driver
Message-ID<sLayt-2sU-9@gated-at.bofh.it>
In reply to#1532985
On Wed, Nov 30, 2016 at 11:35:09AM +0530, Raviteja Garimella wrote:
> This patch adds documentation for Synopsis Designware Cores AHB
> Subsystem Device Controller (UDC).
> 
> Signed-off-by: Raviteja Garimella <raviteja.garimella@broadcom.com>
> ---
>  .../devicetree/bindings/usb/snps,dw-ahb-udc.txt    | 29 ++++++++++++++++++++++
>  1 file changed, 29 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/usb/snps,dw-ahb-udc.txt
> 
> diff --git a/Documentation/devicetree/bindings/usb/snps,dw-ahb-udc.txt b/Documentation/devicetree/bindings/usb/snps,dw-ahb-udc.txt
> new file mode 100644
> index 0000000..64e1fbf
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/usb/snps,dw-ahb-udc.txt
> @@ -0,0 +1,29 @@
> +Synopsys USB Device controller.
> +
> +The device node is used for Synopsys Designware Cores AHB
> +Subsystem Device Controller (UDC).
> +
> +Required properties:
> + - compatible: should be "snps,dw-ahbudc"

Needs an SoC specific compatible string.

> + - reg: Offset and length of UDC register set
> + - interrupts: description of interrupt line
> + - phys: phandle to phy node.
> + - phy-names: name of phy node. Must be usb2drd.

A name is pointless when there's only 1 phy. Is this a device or dual 
role device(DRD)?

> + - extcon: phandle to the extcon device

I don't think extcon should be required. If this is UDC only, I'm not 
sure why you'd need it.

> +
> +Example:
> +
> +	usbdrd_phy: phy@6501c000 {
> +		#phy-cells = <0>;
> +		compatible = "brcm,ns2-drd-phy";
> +		reg = <0x66000000 0x1000>,
> +	}
> +
> +	udc_dwc: usb@664e0000 {
> +		compatible = "snps,dw-ahb-udc";

Doesn't match above.

> +		reg = <0x664e0000 0x2000>;
> +		interrupts = <GIC_SPI 424 IRQ_TYPE_LEVEL_HIGH>;
> +		phys = <&usbdrd_phy>;
> +		phy-names = "usb2drd";
> +		extcon = <&usbdrd_phy>";

You are already describing the phy connection, you shouldn't need both.

> +	};
> -- 
> 2.1.0
> 

[toc] | [prev] | [next] | [standalone]


#1536851 — Re: [PATCH 1/2] Add DT bindings documentation for Synopsys UDC driver

FromRaviteja Garimella <raviteja.garimella@broadcom.com>
Date2016-12-06 12:00 +0100
SubjectRe: [PATCH 1/2] Add DT bindings documentation for Synopsys UDC driver
Message-ID<sLlDz-XN-13@gated-at.bofh.it>
In reply to#1536510
Hi Rob,

On Tue, Dec 6, 2016 at 4:34 AM, Rob Herring <robh@kernel.org> wrote:
> On Wed, Nov 30, 2016 at 11:35:09AM +0530, Raviteja Garimella wrote:
>> This patch adds documentation for Synopsis Designware Cores AHB
>> Subsystem Device Controller (UDC).
>>
>> Signed-off-by: Raviteja Garimella <raviteja.garimella@broadcom.com>
>> ---
>>  .../devicetree/bindings/usb/snps,dw-ahb-udc.txt    | 29 ++++++++++++++++++++++
>>  1 file changed, 29 insertions(+)
>>  create mode 100644 Documentation/devicetree/bindings/usb/snps,dw-ahb-udc.txt
>>
>> diff --git a/Documentation/devicetree/bindings/usb/snps,dw-ahb-udc.txt b/Documentation/devicetree/bindings/usb/snps,dw-ahb-udc.txt
>> new file mode 100644
>> index 0000000..64e1fbf
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/usb/snps,dw-ahb-udc.txt
>> @@ -0,0 +1,29 @@
>> +Synopsys USB Device controller.
>> +
>> +The device node is used for Synopsys Designware Cores AHB
>> +Subsystem Device Controller (UDC).
>> +
>> +Required properties:
>> + - compatible: should be "snps,dw-ahbudc"
>
> Needs an SoC specific compatible string.

This will be changed. I am working on using amd5536udc.c driver
which's already in Kernel tree and can be used for this UDC(as per
review comments from Felipe/John).
>
>> + - reg: Offset and length of UDC register set
>> + - interrupts: description of interrupt line
>> + - phys: phandle to phy node.
>> + - phy-names: name of phy node. Must be usb2drd.
>
> A name is pointless when there's only 1 phy. Is this a device or dual
> role device(DRD)?

This is DRD phy that's is connected to a Host Controller and a Device
Controller.
>
>> + - extcon: phandle to the extcon device
>
> I don't think extcon should be required. If this is UDC only, I'm not
> sure why you'd need it.

This Phy will be initialized in Host/Device mode based on the external
connector that's plugged in. That's reason for having extcon node.
>
>> +
>> +Example:
>> +
>> +     usbdrd_phy: phy@6501c000 {
>> +             #phy-cells = <0>;
>> +             compatible = "brcm,ns2-drd-phy";
>> +             reg = <0x66000000 0x1000>,
>> +     }
>> +
>> +     udc_dwc: usb@664e0000 {
>> +             compatible = "snps,dw-ahb-udc";
>
> Doesn't match above.

This will be changed.
>
>> +             reg = <0x664e0000 0x2000>;
>> +             interrupts = <GIC_SPI 424 IRQ_TYPE_LEVEL_HIGH>;
>> +             phys = <&usbdrd_phy>;
>> +             phy-names = "usb2drd";
>> +             extcon = <&usbdrd_phy>";
>
> You are already describing the phy connection, you shouldn't need both.

"extcon_get_edev_by_phandle" requires extcon phandle. I see that's the
only way to get the extcon device, since generic Phy device doesn't
have any extcon member.
The current driver will not go as-is after the suggestion I got in UDC
driver review (to use amd5536udc driver). I will work on the changes
and submit the patches once again.

Thanks,
Ravi
>
>> +     };
>> --
>> 2.1.0
>>

[toc] | [prev] | [next] | [standalone]


#1533204 — Re: [PATCH 2/2] Synopsys USB 2.0 Device Controller (UDC) Driver

FromFelipe Balbi <balbi@kernel.org>
Date2016-11-30 11:50 +0100
SubjectRe: [PATCH 2/2] Synopsys USB 2.0 Device Controller (UDC) Driver
Message-ID<sJaCB-4Za-1@gated-at.bofh.it>
In reply to#1532983

[Multipart message — attachments visible in raw view] — view raw

Hi,

Raviteja Garimella <raviteja.garimella@broadcom.com> writes:
> This is driver for Synopsys Designware Cores USB Device
> Controller (UDC) Subsystem with the AMBA Advanced High-Performance
> Bus (AHB). This driver works with Synopsys UDC20 products.
>
> Signed-off-by: Raviteja Garimella <raviteja.garimella@broadcom.com>

use drivers/usb/dwc2 instead of duplicating it.

-- 
balbi

[toc] | [prev] | [next] | [standalone]


#1533271 — Re: [PATCH 2/2] Synopsys USB 2.0 Device Controller (UDC) Driver

FromRaviteja Garimella <raviteja.garimella@broadcom.com>
Date2016-11-30 13:50 +0100
SubjectRe: [PATCH 2/2] Synopsys USB 2.0 Device Controller (UDC) Driver
Message-ID<sJcuK-6aW-13@gated-at.bofh.it>
In reply to#1533204
Hi Balbi,

On Wed, Nov 30, 2016 at 4:10 PM, Felipe Balbi <balbi@kernel.org> wrote:
>
> Hi,
>
> Raviteja Garimella <raviteja.garimella@broadcom.com> writes:
>> This is driver for Synopsys Designware Cores USB Device
>> Controller (UDC) Subsystem with the AMBA Advanced High-Performance
>> Bus (AHB). This driver works with Synopsys UDC20 products.
>>
>> Signed-off-by: Raviteja Garimella <raviteja.garimella@broadcom.com>
>
> use drivers/usb/dwc2 instead of duplicating it.

The ones we have in drivers/usb/dwc2 is for Designware high speed OTG
controller IP. The one that I submitted for review is for USB Device
controller IP (UDC). The IPs are different.

Thanks,
Ravi
>
> --
> balbi

[toc] | [prev] | [next] | [standalone]


#1533273 — Re: [PATCH 2/2] Synopsys USB 2.0 Device Controller (UDC) Driver

FromFelipe Balbi <balbi@kernel.org>
Date2016-11-30 13:50 +0100
SubjectRe: [PATCH 2/2] Synopsys USB 2.0 Device Controller (UDC) Driver
Message-ID<sJcuK-6aW-11@gated-at.bofh.it>
In reply to#1533271

[Multipart message — attachments visible in raw view] — view raw

Hi,

Raviteja Garimella <raviteja.garimella@broadcom.com> writes:
> Hi Balbi,
>
> On Wed, Nov 30, 2016 at 4:10 PM, Felipe Balbi <balbi@kernel.org> wrote:
>>
>> Hi,
>>
>> Raviteja Garimella <raviteja.garimella@broadcom.com> writes:
>>> This is driver for Synopsys Designware Cores USB Device
>>> Controller (UDC) Subsystem with the AMBA Advanced High-Performance
>>> Bus (AHB). This driver works with Synopsys UDC20 products.
>>>
>>> Signed-off-by: Raviteja Garimella <raviteja.garimella@broadcom.com>
>>
>> use drivers/usb/dwc2 instead of duplicating it.
>
> The ones we have in drivers/usb/dwc2 is for Designware high speed OTG
> controller IP. The one that I submitted for review is for USB Device
> controller IP (UDC). The IPs are different.

I'll wait for John's confirmation that this really isn't compatible with
dwc2. John?

-- 
balbi

[toc] | [prev] | [next] | [standalone]


#1533709 — Re: [PATCH 2/2] Synopsys USB 2.0 Device Controller (UDC) Driver

FromJohn Youn <John.Youn@synopsys.com>
Date2016-12-01 02:00 +0100
SubjectRe: [PATCH 2/2] Synopsys USB 2.0 Device Controller (UDC) Driver
Message-ID<sJnTb-52M-13@gated-at.bofh.it>
In reply to#1533273
On 11/30/2016 4:47 AM, Felipe Balbi wrote:
> 
> Hi,
> 
> Raviteja Garimella <raviteja.garimella@broadcom.com> writes:
>> Hi Balbi,
>>
>> On Wed, Nov 30, 2016 at 4:10 PM, Felipe Balbi <balbi@kernel.org> wrote:
>>>
>>> Hi,
>>>
>>> Raviteja Garimella <raviteja.garimella@broadcom.com> writes:
>>>> This is driver for Synopsys Designware Cores USB Device
>>>> Controller (UDC) Subsystem with the AMBA Advanced High-Performance
>>>> Bus (AHB). This driver works with Synopsys UDC20 products.
>>>>
>>>> Signed-off-by: Raviteja Garimella <raviteja.garimella@broadcom.com>
>>>
>>> use drivers/usb/dwc2 instead of duplicating it.
>>
>> The ones we have in drivers/usb/dwc2 is for Designware high speed OTG
>> controller IP. The one that I submitted for review is for USB Device
>> controller IP (UDC). The IPs are different.
> 
> I'll wait for John's confirmation that this really isn't compatible with
> dwc2. John?
> 

Hi Felipe,

This is our older UDC IP, not compatible with HSOTG.

It is also no longer supported by Synopsys and considered EOL.

Regards,
John

[toc] | [prev] | [next] | [standalone]


#1533900 — Re: [PATCH 2/2] Synopsys USB 2.0 Device Controller (UDC) Driver

FromFelipe Balbi <balbi@kernel.org>
Date2016-12-01 10:00 +0100
SubjectRe: [PATCH 2/2] Synopsys USB 2.0 Device Controller (UDC) Driver
Message-ID<sJvnH-1wN-17@gated-at.bofh.it>
In reply to#1533709

[Multipart message — attachments visible in raw view] — view raw

Hi,

John Youn <John.Youn@synopsys.com> writes:
> On 11/30/2016 4:47 AM, Felipe Balbi wrote:
>> 
>> Hi,
>> 
>> Raviteja Garimella <raviteja.garimella@broadcom.com> writes:
>>> Hi Balbi,
>>>
>>> On Wed, Nov 30, 2016 at 4:10 PM, Felipe Balbi <balbi@kernel.org> wrote:
>>>>
>>>> Hi,
>>>>
>>>> Raviteja Garimella <raviteja.garimella@broadcom.com> writes:
>>>>> This is driver for Synopsys Designware Cores USB Device
>>>>> Controller (UDC) Subsystem with the AMBA Advanced High-Performance
>>>>> Bus (AHB). This driver works with Synopsys UDC20 products.
>>>>>
>>>>> Signed-off-by: Raviteja Garimella <raviteja.garimella@broadcom.com>
>>>>
>>>> use drivers/usb/dwc2 instead of duplicating it.
>>>
>>> The ones we have in drivers/usb/dwc2 is for Designware high speed OTG
>>> controller IP. The one that I submitted for review is for USB Device
>>> controller IP (UDC). The IPs are different.
>> 
>> I'll wait for John's confirmation that this really isn't compatible with
>> dwc2. John?
>> 
>
> Hi Felipe,
>
> This is our older UDC IP, not compatible with HSOTG.
>
> It is also no longer supported by Synopsys and considered EOL.

Is it the same one used by amd5536udc.c? If it is, then it's much better
to refactor that driver so it can be used as a library of sorts by PCI
and non-PCI systems. We really don't want duplicated drivers upstream.

-- 
balbi

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web