diff mbox series

[v3,1/3] dt-bindings: dwc2: Add bindings for new Ingenic SoCs.

Message ID 1649964337-114337-2-git-send-email-zhouyanjie@wanyeetech.com
State Superseded
Headers show
Series Add OTG support for Ingenic SoCs. | expand

Commit Message

Zhou Yanjie April 14, 2022, 7:25 p.m. UTC
Add the dwc2 bindings for the JZ4775 SoC, the JZ4780 SoC, the X1000
SoC, the X1600 SoC, the X1700 SoC, the X1830 SoC, and the X2000 SoC
from Ingenic.

Signed-off-by: 周琰杰 (Zhou Yanjie) <zhouyanjie@wanyeetech.com>
Acked-by: Rob Herring <robh@kernel.org>
---

Notes:
    v1->v2:
    Add Rob Herring's Acked-by.
    
    v2->v3:
    No change.

 Documentation/devicetree/bindings/usb/dwc2.yaml | 7 +++++++
 1 file changed, 7 insertions(+)

Comments

Paul Cercueil April 16, 2022, 4:34 p.m. UTC | #1
Hi Zhou,

Le ven., avril 15 2022 at 03:25:35 +0800, 周琰杰 (Zhou Yanjie) 
<zhouyanjie@wanyeetech.com> a écrit :
> Add the dwc2 bindings for the JZ4775 SoC, the JZ4780 SoC, the X1000
> SoC, the X1600 SoC, the X1700 SoC, the X1830 SoC, and the X2000 SoC
> from Ingenic.
> 
> Signed-off-by: 周琰杰 (Zhou Yanjie) <zhouyanjie@wanyeetech.com>
> Acked-by: Rob Herring <robh@kernel.org>
> ---
> 
> Notes:
>     v1->v2:
>     Add Rob Herring's Acked-by.
> 
>     v2->v3:
>     No change.
> 
>  Documentation/devicetree/bindings/usb/dwc2.yaml | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/usb/dwc2.yaml 
> b/Documentation/devicetree/bindings/usb/dwc2.yaml
> index 4cebce6..c6e8c0b 100644
> --- a/Documentation/devicetree/bindings/usb/dwc2.yaml
> +++ b/Documentation/devicetree/bindings/usb/dwc2.yaml
> @@ -17,6 +17,13 @@ properties:
>      oneOf:
>        - const: brcm,bcm2835-usb
>        - const: hisilicon,hi6220-usb
> +      - const: ingenic,jz4775-otg
> +      - const: ingenic,jz4780-otg
> +      - const: ingenic,x1000-otg

The driver handles the JZ4775, JZ4780 and X1000 the exact same way. 
Maybe the latter two should use the JZ4775 string as the fallback? Do 
you know if the IP cores are any different?

> +      - const: ingenic,x1600-otg
> +      - const: ingenic,x1700-otg
> +      - const: ingenic,x1830-otg

Same here (and btw, first time I hear about the X1600 and X1700 ;))

Cheers,
-Paul

> +      - const: ingenic,x2000-otg
>        - items:
>            - const: rockchip,rk3066-usb
>            - const: snps,dwc2
> --
> 2.7.4
>
Zhou Yanjie April 17, 2022, 9:27 a.m. UTC | #2
Hi Paul,

On 2022/4/17 上午12:34, Paul Cercueil wrote:
> Hi Zhou,
>
> Le ven., avril 15 2022 at 03:25:35 +0800, 周琰杰 (Zhou Yanjie) 
> <zhouyanjie@wanyeetech.com> a écrit :
>> Add the dwc2 bindings for the JZ4775 SoC, the JZ4780 SoC, the X1000
>> SoC, the X1600 SoC, the X1700 SoC, the X1830 SoC, and the X2000 SoC
>> from Ingenic.
>>
>> Signed-off-by: 周琰杰 (Zhou Yanjie) <zhouyanjie@wanyeetech.com>
>> Acked-by: Rob Herring <robh@kernel.org>
>> ---
>>
>> Notes:
>>     v1->v2:
>>     Add Rob Herring's Acked-by.
>>
>>     v2->v3:
>>     No change.
>>
>>  Documentation/devicetree/bindings/usb/dwc2.yaml | 7 +++++++
>>  1 file changed, 7 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/usb/dwc2.yaml 
>> b/Documentation/devicetree/bindings/usb/dwc2.yaml
>> index 4cebce6..c6e8c0b 100644
>> --- a/Documentation/devicetree/bindings/usb/dwc2.yaml
>> +++ b/Documentation/devicetree/bindings/usb/dwc2.yaml
>> @@ -17,6 +17,13 @@ properties:
>>      oneOf:
>>        - const: brcm,bcm2835-usb
>>        - const: hisilicon,hi6220-usb
>> +      - const: ingenic,jz4775-otg
>> +      - const: ingenic,jz4780-otg
>> +      - const: ingenic,x1000-otg
>
> The driver handles the JZ4775, JZ4780 and X1000 the exact same way. 
> Maybe the latter two should use the JZ4775 string as the fallback? Do 
> you know if the IP cores are any different?
>

 From the manual, it seems that JZ4775 and JZ4780 should have the same 
specifications,
but in fact, the behavior of JZ4775 and JZ4780 is different, especially 
if the JZ4780
does not turn off overcurrent detection, there will be a high 
probability of affecting
the use, while the JZ4775 does not have this problem, so I think they 
should actually
be different.

The manual of X1000 shows that it has only 8 endpoints, which is 
different from JZ4775
and JZ4780.

 From the experimental results, it seems that the three of them can use 
the same set of
parameters, but in order to avoid hidden dangers that have not been 
found for the time
being, I think it seems necessary to keep three independent compatible 
strings.


>> +      - const: ingenic,x1600-otg
>> +      - const: ingenic,x1700-otg
>> +      - const: ingenic,x1830-otg
>
> Same here (and btw, first time I hear about the X1600 and X1700 ;))


The OTG of X1600 and X1700 seem to be the same, I will remove the 
compatibility string
of X1700 in the next version, but the device tree of X1830 in Ingenic 
SDK is configured
with different parameters from X1600/X1700, so I believe the X1830 
should be a little
different from the X1600/X1700, so although the experimental results 
show that the three
of them seem to be able to use the same parameters, it seems that it is 
more appropriate
to keep the compatibe string of X1830.

I also heard about the X1600 and X1700 not long ago. From the existing 
information, the
X1600 should be the only SoC with CAN in the known models of Ingenic. 
And the X1700 is
more like an SoC that focuses on display applications.


Thanks and best regards!


>
> Cheers,
> -Paul
>
>> +      - const: ingenic,x2000-otg
>>        - items:
>>            - const: rockchip,rk3066-usb
>>            - const: snps,dwc2
>> -- 
>> 2.7.4
>>
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/usb/dwc2.yaml b/Documentation/devicetree/bindings/usb/dwc2.yaml
index 4cebce6..c6e8c0b 100644
--- a/Documentation/devicetree/bindings/usb/dwc2.yaml
+++ b/Documentation/devicetree/bindings/usb/dwc2.yaml
@@ -17,6 +17,13 @@  properties:
     oneOf:
       - const: brcm,bcm2835-usb
       - const: hisilicon,hi6220-usb
+      - const: ingenic,jz4775-otg
+      - const: ingenic,jz4780-otg
+      - const: ingenic,x1000-otg
+      - const: ingenic,x1600-otg
+      - const: ingenic,x1700-otg
+      - const: ingenic,x1830-otg
+      - const: ingenic,x2000-otg
       - items:
           - const: rockchip,rk3066-usb
           - const: snps,dwc2