All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4] dt-bindings: usb: Add new compatible string for AM64 SoC
@ 2020-12-11  6:04 Aswath Govindraju
  2020-12-11 12:00 ` Aswath Govindraju
  0 siblings, 1 reply; 4+ messages in thread
From: Aswath Govindraju @ 2020-12-11  6:04 UTC (permalink / raw)
  Cc: Vignesh Raghavendra, Sekhar Nori, Aswath Govindraju,
	Greg Kroah-Hartman, Rob Herring, Roger Quadros, linux-usb,
	devicetree, linux-kernel

Add compatible string in j721e-usb binding file as the same USB subsystem
is present in AM64.

Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
---

Changes since v3:
- used enum instead of anyOf.

Changes since v2:
- added changes done over the versions.

Changes since v1:
- replaced the '\t' at the beginning of the lines with spaces as it was
  causing the dt_binding_check to fail.

 Documentation/devicetree/bindings/usb/ti,j721e-usb.yaml | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/usb/ti,j721e-usb.yaml b/Documentation/devicetree/bindings/usb/ti,j721e-usb.yaml
index 388245b91a55..1a5c7bbb40d1 100644
--- a/Documentation/devicetree/bindings/usb/ti,j721e-usb.yaml
+++ b/Documentation/devicetree/bindings/usb/ti,j721e-usb.yaml
@@ -11,8 +11,9 @@ maintainers:
 
 properties:
   compatible:
-    items:
-      - const: ti,j721e-usb
+    enum:
+      - ti,j721e-usb
+      - ti,am64-usb
 
   reg:
     description: module registers
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v4] dt-bindings: usb: Add new compatible string for AM64 SoC
  2020-12-11  6:04 [PATCH v4] dt-bindings: usb: Add new compatible string for AM64 SoC Aswath Govindraju
@ 2020-12-11 12:00 ` Aswath Govindraju
  2020-12-11 22:48   ` Rob Herring
  0 siblings, 1 reply; 4+ messages in thread
From: Aswath Govindraju @ 2020-12-11 12:00 UTC (permalink / raw)
  Cc: Vignesh Raghavendra, Sekhar Nori, Greg Kroah-Hartman,
	Rob Herring, Roger Quadros, linux-usb, devicetree, linux-kernel

Hi,
On 11/12/20 11:34 am, Aswath Govindraju wrote:
> Add compatible string in j721e-usb binding file as the same USB subsystem
> is present in AM64.
> 
> Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
> ---
> 
> Changes since v3:
> - used enum instead of anyOf.
> 
> Changes since v2:
> - added changes done over the versions.
> 
> Changes since v1:
> - replaced the '\t' at the beginning of the lines with spaces as it was
>   causing the dt_binding_check to fail.
> 
>  Documentation/devicetree/bindings/usb/ti,j721e-usb.yaml | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/usb/ti,j721e-usb.yaml b/Documentation/devicetree/bindings/usb/ti,j721e-usb.yaml
> index 388245b91a55..1a5c7bbb40d1 100644
> --- a/Documentation/devicetree/bindings/usb/ti,j721e-usb.yaml
> +++ b/Documentation/devicetree/bindings/usb/ti,j721e-usb.yaml
> @@ -11,8 +11,9 @@ maintainers:
>  
>  properties:
>    compatible:
> -    items:
> -      - const: ti,j721e-usb
> +    enum:
> +      - ti,j721e-usb
> +      - ti,am64-usb
> 

I am trying to use the compatible strings in the following manner

```
compatible = "ti,am64-usb", "ti,j721e-usb";

```
If I use above patch I am getting an error while doing a dtbs check.

```
/home/gsaswath/src/ti-linux-kernel/arch/arm64/boot/dts/ti/k3-am642-evm.dt.yaml:
cdns-usb@f900000: compatible: Additional items are not allowed
('ti,j721e-usb' was unexpected)
	From schema:
/home/gsaswath/src/ti-linux-kernel/Documentation/devicetree/bindings/usb/ti,j721e-usb.yaml
/home/gsaswath/src/ti-linux-kernel/arch/arm64/boot/dts/ti/k3-am642-evm.dt.yaml:
cdns-usb@f900000: compatible: ['ti,am64-usb', 'ti,j721e-usb'] is too long
	From schema:
/home/gsaswath/src/ti-linux-kernel/Documentation/devicetree/bindings/usb/ti,j721e-usb.yaml

```


I have looked around for examples but I am unable to find a similar
case. I tried using anyOf in the following manner

```
compatible:
     anyOf:
        - const: ti,am64-usb
        - const: ti,j721e-usb
```

But I am getting an error

```
/home/gsaswath/src/ti-linux-kernel/Documentation/devicetree/bindings/usb/ti,j721e-usb.example.dt.yaml:
cdns_usb@4104000: compatible: 'anyOf' conditional failed, one must be fixed:
	Additional items are not allowed ('ti,j721e-usb' was unexpected)
	['ti,am64-usb', 'ti,j721e-usb'] is too long
	'ti,j721e-usb' was expected
```

Doesn't anyof mean that the compatible strings can be used in any
combination ??

Thanks,
Aswath

>    reg:
>      description: module registers
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v4] dt-bindings: usb: Add new compatible string for AM64 SoC
  2020-12-11 12:00 ` Aswath Govindraju
@ 2020-12-11 22:48   ` Rob Herring
  2020-12-14 14:08     ` [EXTERNAL] " Aswath Govindraju
  0 siblings, 1 reply; 4+ messages in thread
From: Rob Herring @ 2020-12-11 22:48 UTC (permalink / raw)
  To: Aswath Govindraju
  Cc: Vignesh Raghavendra, Sekhar Nori, Greg Kroah-Hartman,
	Roger Quadros, Linux USB List, devicetree, linux-kernel

On Fri, Dec 11, 2020 at 6:04 AM Aswath Govindraju <a-govindraju@ti.com> wrote:
>
> Hi,
> On 11/12/20 11:34 am, Aswath Govindraju wrote:
> > Add compatible string in j721e-usb binding file as the same USB subsystem
> > is present in AM64.
> >
> > Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
> > ---
> >
> > Changes since v3:
> > - used enum instead of anyOf.
> >
> > Changes since v2:
> > - added changes done over the versions.
> >
> > Changes since v1:
> > - replaced the '\t' at the beginning of the lines with spaces as it was
> >   causing the dt_binding_check to fail.
> >
> >  Documentation/devicetree/bindings/usb/ti,j721e-usb.yaml | 5 +++--
> >  1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/usb/ti,j721e-usb.yaml b/Documentation/devicetree/bindings/usb/ti,j721e-usb.yaml
> > index 388245b91a55..1a5c7bbb40d1 100644
> > --- a/Documentation/devicetree/bindings/usb/ti,j721e-usb.yaml
> > +++ b/Documentation/devicetree/bindings/usb/ti,j721e-usb.yaml
> > @@ -11,8 +11,9 @@ maintainers:
> >
> >  properties:
> >    compatible:
> > -    items:
> > -      - const: ti,j721e-usb
> > +    enum:
> > +      - ti,j721e-usb
> > +      - ti,am64-usb
> >
>
> I am trying to use the compatible strings in the following manner
>
> ```
> compatible = "ti,am64-usb", "ti,j721e-usb";
>
> ```
> If I use above patch I am getting an error while doing a dtbs check.
>
> ```
> /home/gsaswath/src/ti-linux-kernel/arch/arm64/boot/dts/ti/k3-am642-evm.dt.yaml:
> cdns-usb@f900000: compatible: Additional items are not allowed
> ('ti,j721e-usb' was unexpected)
>         From schema:
> /home/gsaswath/src/ti-linux-kernel/Documentation/devicetree/bindings/usb/ti,j721e-usb.yaml
> /home/gsaswath/src/ti-linux-kernel/arch/arm64/boot/dts/ti/k3-am642-evm.dt.yaml:
> cdns-usb@f900000: compatible: ['ti,am64-usb', 'ti,j721e-usb'] is too long
>         From schema:
> /home/gsaswath/src/ti-linux-kernel/Documentation/devicetree/bindings/usb/ti,j721e-usb.yaml
>
> ```
>
>
> I have looked around for examples but I am unable to find a similar
> case. I tried using anyOf in the following manner

You didn't look hard enough. There are lots.

> ```
> compatible:
>      anyOf:
>         - const: ti,am64-usb
>         - const: ti,j721e-usb

This is really no different than a single 'enum' with the 2 values.
'anyOf' means one or more in the list are true, but more than 1 is
impossible here.

If you have different possible lengths of values, then you need
'oneOf' for each case and then 'items' when you have a value with
multiple entries:

oneOf:
  - const: ti,j721e-usb
  - items:
      - const: ti,am64-usb
      - const: ti,j721e-usb

> ```
>
> But I am getting an error
>
> ```
> /home/gsaswath/src/ti-linux-kernel/Documentation/devicetree/bindings/usb/ti,j721e-usb.example.dt.yaml:
> cdns_usb@4104000: compatible: 'anyOf' conditional failed, one must be fixed:
>         Additional items are not allowed ('ti,j721e-usb' was unexpected)
>         ['ti,am64-usb', 'ti,j721e-usb'] is too long
>         'ti,j721e-usb' was expected
> ```
>
> Doesn't anyof mean that the compatible strings can be used in any
> combination ??
>
> Thanks,
> Aswath
>
> >    reg:
> >      description: module registers
> >
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [EXTERNAL] Re: [PATCH v4] dt-bindings: usb: Add new compatible string for AM64 SoC
  2020-12-11 22:48   ` Rob Herring
@ 2020-12-14 14:08     ` Aswath Govindraju
  0 siblings, 0 replies; 4+ messages in thread
From: Aswath Govindraju @ 2020-12-14 14:08 UTC (permalink / raw)
  To: Rob Herring
  Cc: Vignesh Raghavendra, Sekhar Nori, Greg Kroah-Hartman,
	Roger Quadros, Linux USB List, devicetree, linux-kernel

Hi Rob,
On 12/12/20 4:18 am, Rob Herring wrote:
> On Fri, Dec 11, 2020 at 6:04 AM Aswath Govindraju <a-govindraju@ti.com> wrote:
>>
>> Hi,
>> On 11/12/20 11:34 am, Aswath Govindraju wrote:
>>> Add compatible string in j721e-usb binding file as the same USB subsystem
>>> is present in AM64.
>>>
>>> Signed-off-by: Aswath Govindraju <a-govindraju@ti.com>
>>> ---
>>>
>>> Changes since v3:
>>> - used enum instead of anyOf.
>>>
>>> Changes since v2:
>>> - added changes done over the versions.
>>>
>>> Changes since v1:
>>> - replaced the '\t' at the beginning of the lines with spaces as it was
>>>   causing the dt_binding_check to fail.
>>>
>>>  Documentation/devicetree/bindings/usb/ti,j721e-usb.yaml | 5 +++--
>>>  1 file changed, 3 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/Documentation/devicetree/bindings/usb/ti,j721e-usb.yaml b/Documentation/devicetree/bindings/usb/ti,j721e-usb.yaml
>>> index 388245b91a55..1a5c7bbb40d1 100644
>>> --- a/Documentation/devicetree/bindings/usb/ti,j721e-usb.yaml
>>> +++ b/Documentation/devicetree/bindings/usb/ti,j721e-usb.yaml
>>> @@ -11,8 +11,9 @@ maintainers:
>>>
>>>  properties:
>>>    compatible:
>>> -    items:
>>> -      - const: ti,j721e-usb
>>> +    enum:
>>> +      - ti,j721e-usb
>>> +      - ti,am64-usb
>>>
>>
>> I am trying to use the compatible strings in the following manner
>>
>> ```
>> compatible = "ti,am64-usb", "ti,j721e-usb";
>>
>> ```
>> If I use above patch I am getting an error while doing a dtbs check.
>>
>> ```
>> /home/gsaswath/src/ti-linux-kernel/arch/arm64/boot/dts/ti/k3-am642-evm.dt.yaml:
>> cdns-usb@f900000: compatible: Additional items are not allowed
>> ('ti,j721e-usb' was unexpected)
>>         From schema:
>> /home/gsaswath/src/ti-linux-kernel/Documentation/devicetree/bindings/usb/ti,j721e-usb.yaml
>> /home/gsaswath/src/ti-linux-kernel/arch/arm64/boot/dts/ti/k3-am642-evm.dt.yaml:
>> cdns-usb@f900000: compatible: ['ti,am64-usb', 'ti,j721e-usb'] is too long
>>         From schema:
>> /home/gsaswath/src/ti-linux-kernel/Documentation/devicetree/bindings/usb/ti,j721e-usb.yaml
>>
>> ```
>>
>>
>> I have looked around for examples but I am unable to find a similar
>> case. I tried using anyOf in the following manner
> 
> You didn't look hard enough. There are lots.
>
>> ```
>> compatible:
>>      anyOf:
>>         - const: ti,am64-usb
>>         - const: ti,j721e-usb
> 
> This is really no different than a single 'enum' with the 2 values.
> 'anyOf' means one or more in the list are true, but more than 1 is
> impossible here.
> 
> If you have different possible lengths of values, then you need
> 'oneOf' for each case and then 'items' when you have a value with
> multiple entries:
> 
> oneOf:
>   - const: ti,j721e-usb
>   - items:
>       - const: ti,am64-usb
>       - const: ti,j721e-usb
> 

Thank you for the detailed explanation :) . I am sorry for not being
able figure this out on my own. I have sent a respin of this patch(v5).

Thanks,
Aswath

>> ```
>>
>> But I am getting an error
>>
>> ```
>> /home/gsaswath/src/ti-linux-kernel/Documentation/devicetree/bindings/usb/ti,j721e-usb.example.dt.yaml:
>> cdns_usb@4104000: compatible: 'anyOf' conditional failed, one must be fixed:
>>         Additional items are not allowed ('ti,j721e-usb' was unexpected)
>>         ['ti,am64-usb', 'ti,j721e-usb'] is too long
>>         'ti,j721e-usb' was expected
>> ```
>>
>> Doesn't anyof mean that the compatible strings can be used in any
>> combination ??
>>
>> Thanks,
>> Aswath
>>
>>>    reg:
>>>      description: module registers
>>>
>>


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-12-14 14:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-11  6:04 [PATCH v4] dt-bindings: usb: Add new compatible string for AM64 SoC Aswath Govindraju
2020-12-11 12:00 ` Aswath Govindraju
2020-12-11 22:48   ` Rob Herring
2020-12-14 14:08     ` [EXTERNAL] " Aswath Govindraju

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.