diff mbox

usb: dwc2: add support for the DWC2 controller on Meson8 SoCs

Message ID 20170506173745.19593-1-martin.blumenstingl@googlemail.com (mailing list archive)
State Not Applicable
Headers show

Commit Message

Martin Blumenstingl May 6, 2017, 5:37 p.m. UTC
USB support in the Meson8 SoCs is provided by a DWC2 controller which
works with the same settings as Meson8b and GXBB. Using the generic
"snps,dwc2" binding results in an endless stream of "Overcurrent change
detected" messages.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
 Documentation/devicetree/bindings/usb/dwc2.txt | 1 +
 drivers/usb/dwc2/params.c                      | 2 ++
 2 files changed, 3 insertions(+)

Comments

Rob Herring May 12, 2017, 7:15 p.m. UTC | #1
On Sat, May 06, 2017 at 07:37:45PM +0200, Martin Blumenstingl wrote:
> USB support in the Meson8 SoCs is provided by a DWC2 controller which
> works with the same settings as Meson8b and GXBB. Using the generic
> "snps,dwc2" binding results in an endless stream of "Overcurrent change
> detected" messages.
> 
> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> ---
>  Documentation/devicetree/bindings/usb/dwc2.txt | 1 +
>  drivers/usb/dwc2/params.c                      | 2 ++
>  2 files changed, 3 insertions(+)

Acked-by: Rob Herring <robh@kernel.org>
Martin Blumenstingl May 25, 2017, 5:39 p.m. UTC | #2
Hi John,

On Sat, May 6, 2017 at 7:37 PM, Martin Blumenstingl
<martin.blumenstingl@googlemail.com> wrote:
> USB support in the Meson8 SoCs is provided by a DWC2 controller which
> works with the same settings as Meson8b and GXBB. Using the generic
> "snps,dwc2" binding results in an endless stream of "Overcurrent change
> detected" messages.
>
> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
do you want me to re-send this with Rob's ACK?
also please let me know if something is still missing in this patch

> ---
>  Documentation/devicetree/bindings/usb/dwc2.txt | 1 +
>  drivers/usb/dwc2/params.c                      | 2 ++
>  2 files changed, 3 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/usb/dwc2.txt b/Documentation/devicetree/bindings/usb/dwc2.txt
> index 6c7c2bce6d0c..b55be381ae85 100644
> --- a/Documentation/devicetree/bindings/usb/dwc2.txt
> +++ b/Documentation/devicetree/bindings/usb/dwc2.txt
> @@ -10,6 +10,7 @@ Required properties:
>    - "rockchip,rk3288-usb", "rockchip,rk3066-usb", "snps,dwc2": for rk3288 Soc;
>    - "lantiq,arx100-usb": The DWC2 USB controller instance in Lantiq ARX SoCs;
>    - "lantiq,xrx200-usb": The DWC2 USB controller instance in Lantiq XRX SoCs;
> +  - "amlogic,meson8-usb": The DWC2 USB controller instance in Amlogic Meson8 SoCs;
>    - "amlogic,meson8b-usb": The DWC2 USB controller instance in Amlogic Meson8b SoCs;
>    - "amlogic,meson-gxbb-usb": The DWC2 USB controller instance in Amlogic S905 SoCs;
>    - "amcc,dwc-otg": The DWC2 USB controller instance in AMCC Canyonlands 460EX SoCs;
> diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c
> index 2990c347289f..0d6290ed66ea 100644
> --- a/drivers/usb/dwc2/params.c
> +++ b/drivers/usb/dwc2/params.c
> @@ -128,6 +128,8 @@ const struct of_device_id dwc2_of_match_table[] = {
>         { .compatible = "lantiq,xrx200-usb", .data = dwc2_set_ltq_params },
>         { .compatible = "snps,dwc2" },
>         { .compatible = "samsung,s3c6400-hsotg" },
> +       { .compatible = "amlogic,meson8-usb",
> +         .data = dwc2_set_amlogic_params },
>         { .compatible = "amlogic,meson8b-usb",
>           .data = dwc2_set_amlogic_params },
>         { .compatible = "amlogic,meson-gxbb-usb",
> --
> 2.12.2
>
John Youn June 6, 2017, 1:48 a.m. UTC | #3
On 5/25/2017 10:39 AM, Martin Blumenstingl wrote:
> Hi John,
>
> On Sat, May 6, 2017 at 7:37 PM, Martin Blumenstingl
> <martin.blumenstingl@googlemail.com> wrote:
>> USB support in the Meson8 SoCs is provided by a DWC2 controller which
>> works with the same settings as Meson8b and GXBB. Using the generic
>> "snps,dwc2" binding results in an endless stream of "Overcurrent change
>> detected" messages.
>>
>> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> do you want me to re-send this with Rob's ACK?
> also please let me know if something is still missing in this patch
>
>> ---
>>  Documentation/devicetree/bindings/usb/dwc2.txt | 1 +
>>  drivers/usb/dwc2/params.c                      | 2 ++
>>  2 files changed, 3 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/usb/dwc2.txt b/Documentation/devicetree/bindings/usb/dwc2.txt
>> index 6c7c2bce6d0c..b55be381ae85 100644
>> --- a/Documentation/devicetree/bindings/usb/dwc2.txt
>> +++ b/Documentation/devicetree/bindings/usb/dwc2.txt
>> @@ -10,6 +10,7 @@ Required properties:
>>    - "rockchip,rk3288-usb", "rockchip,rk3066-usb", "snps,dwc2": for rk3288 Soc;
>>    - "lantiq,arx100-usb": The DWC2 USB controller instance in Lantiq ARX SoCs;
>>    - "lantiq,xrx200-usb": The DWC2 USB controller instance in Lantiq XRX SoCs;
>> +  - "amlogic,meson8-usb": The DWC2 USB controller instance in Amlogic Meson8 SoCs;
>>    - "amlogic,meson8b-usb": The DWC2 USB controller instance in Amlogic Meson8b SoCs;
>>    - "amlogic,meson-gxbb-usb": The DWC2 USB controller instance in Amlogic S905 SoCs;
>>    - "amcc,dwc-otg": The DWC2 USB controller instance in AMCC Canyonlands 460EX SoCs;
>> diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c
>> index 2990c347289f..0d6290ed66ea 100644
>> --- a/drivers/usb/dwc2/params.c
>> +++ b/drivers/usb/dwc2/params.c
>> @@ -128,6 +128,8 @@ const struct of_device_id dwc2_of_match_table[] = {
>>         { .compatible = "lantiq,xrx200-usb", .data = dwc2_set_ltq_params },
>>         { .compatible = "snps,dwc2" },
>>         { .compatible = "samsung,s3c6400-hsotg" },
>> +       { .compatible = "amlogic,meson8-usb",
>> +         .data = dwc2_set_amlogic_params },
>>         { .compatible = "amlogic,meson8b-usb",
>>           .data = dwc2_set_amlogic_params },
>>         { .compatible = "amlogic,meson-gxbb-usb",
>> --
>> 2.12.2
>>
>

Adding Felipe


Acked-by: John Youn <johnyoun@synopsys.com>

John
Martin Blumenstingl June 6, 2017, 6:16 p.m. UTC | #4
Hi John,

On Tue, Jun 6, 2017 at 3:48 AM, John Youn <John.Youn@synopsys.com> wrote:
> On 5/25/2017 10:39 AM, Martin Blumenstingl wrote:
>> Hi John,
>>
>> On Sat, May 6, 2017 at 7:37 PM, Martin Blumenstingl
>> <martin.blumenstingl@googlemail.com> wrote:
>>> USB support in the Meson8 SoCs is provided by a DWC2 controller which
>>> works with the same settings as Meson8b and GXBB. Using the generic
>>> "snps,dwc2" binding results in an endless stream of "Overcurrent change
>>> detected" messages.
>>>
>>> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
>> do you want me to re-send this with Rob's ACK?
>> also please let me know if something is still missing in this patch
>>
>>> ---
>>>  Documentation/devicetree/bindings/usb/dwc2.txt | 1 +
>>>  drivers/usb/dwc2/params.c                      | 2 ++
>>>  2 files changed, 3 insertions(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/usb/dwc2.txt b/Documentation/devicetree/bindings/usb/dwc2.txt
>>> index 6c7c2bce6d0c..b55be381ae85 100644
>>> --- a/Documentation/devicetree/bindings/usb/dwc2.txt
>>> +++ b/Documentation/devicetree/bindings/usb/dwc2.txt
>>> @@ -10,6 +10,7 @@ Required properties:
>>>    - "rockchip,rk3288-usb", "rockchip,rk3066-usb", "snps,dwc2": for rk3288 Soc;
>>>    - "lantiq,arx100-usb": The DWC2 USB controller instance in Lantiq ARX SoCs;
>>>    - "lantiq,xrx200-usb": The DWC2 USB controller instance in Lantiq XRX SoCs;
>>> +  - "amlogic,meson8-usb": The DWC2 USB controller instance in Amlogic Meson8 SoCs;
>>>    - "amlogic,meson8b-usb": The DWC2 USB controller instance in Amlogic Meson8b SoCs;
>>>    - "amlogic,meson-gxbb-usb": The DWC2 USB controller instance in Amlogic S905 SoCs;
>>>    - "amcc,dwc-otg": The DWC2 USB controller instance in AMCC Canyonlands 460EX SoCs;
>>> diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c
>>> index 2990c347289f..0d6290ed66ea 100644
>>> --- a/drivers/usb/dwc2/params.c
>>> +++ b/drivers/usb/dwc2/params.c
>>> @@ -128,6 +128,8 @@ const struct of_device_id dwc2_of_match_table[] = {
>>>         { .compatible = "lantiq,xrx200-usb", .data = dwc2_set_ltq_params },
>>>         { .compatible = "snps,dwc2" },
>>>         { .compatible = "samsung,s3c6400-hsotg" },
>>> +       { .compatible = "amlogic,meson8-usb",
>>> +         .data = dwc2_set_amlogic_params },
>>>         { .compatible = "amlogic,meson8b-usb",
>>>           .data = dwc2_set_amlogic_params },
>>>         { .compatible = "amlogic,meson-gxbb-usb",
>>> --
>>> 2.12.2
>>>
>>
>
> Adding Felipe
>
>
> Acked-by: John Youn <johnyoun@synopsys.com>
thank you!

actually Greg seems to have picked it up already as it's part of his
v4.12-rc4 pull request: [0]
(I'm not sure why it went into v4.12-rc4 instead of -next/v4.13 - but
it probably won't hurt anyone)


[0] https://www.spinics.net/lists/linux-usb/msg157693.html
diff mbox

Patch

diff --git a/Documentation/devicetree/bindings/usb/dwc2.txt b/Documentation/devicetree/bindings/usb/dwc2.txt
index 6c7c2bce6d0c..b55be381ae85 100644
--- a/Documentation/devicetree/bindings/usb/dwc2.txt
+++ b/Documentation/devicetree/bindings/usb/dwc2.txt
@@ -10,6 +10,7 @@  Required properties:
   - "rockchip,rk3288-usb", "rockchip,rk3066-usb", "snps,dwc2": for rk3288 Soc;
   - "lantiq,arx100-usb": The DWC2 USB controller instance in Lantiq ARX SoCs;
   - "lantiq,xrx200-usb": The DWC2 USB controller instance in Lantiq XRX SoCs;
+  - "amlogic,meson8-usb": The DWC2 USB controller instance in Amlogic Meson8 SoCs;
   - "amlogic,meson8b-usb": The DWC2 USB controller instance in Amlogic Meson8b SoCs;
   - "amlogic,meson-gxbb-usb": The DWC2 USB controller instance in Amlogic S905 SoCs;
   - "amcc,dwc-otg": The DWC2 USB controller instance in AMCC Canyonlands 460EX SoCs;
diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c
index 2990c347289f..0d6290ed66ea 100644
--- a/drivers/usb/dwc2/params.c
+++ b/drivers/usb/dwc2/params.c
@@ -128,6 +128,8 @@  const struct of_device_id dwc2_of_match_table[] = {
 	{ .compatible = "lantiq,xrx200-usb", .data = dwc2_set_ltq_params },
 	{ .compatible = "snps,dwc2" },
 	{ .compatible = "samsung,s3c6400-hsotg" },
+	{ .compatible = "amlogic,meson8-usb",
+	  .data = dwc2_set_amlogic_params },
 	{ .compatible = "amlogic,meson8b-usb",
 	  .data = dwc2_set_amlogic_params },
 	{ .compatible = "amlogic,meson-gxbb-usb",