Re: [PATCH 2/5] dt-bindings: mfd: atmel,at91-usart: convert to json-schema

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 19/08/2022 11:37, Sergiu.Moga@xxxxxxxxxxxxx wrote:

>>> +      - items:
>>> +          - const: atmel,at91rm9200-dbgu
>>> +          - const: atmel,at91rm9200-usart
>>> +      - items:
>>> +          - const: atmel,at91sam9260-dbgu
>>> +          - const: atmel,at91sam9260-usart
>>> +      - items:
>>> +          - const: microchip,sam9x60-dbgu
>>> +          - const: microchip,sam9x60-usart
>>> +      - items:
>>> +          - const: microchip,sam9x60-usart
>>> +          - const: atmel,at91sam9260-usart
>> This is not correct - contradicts earlier one.
>>
> 
> Yes, this was for a DT node we have internally, my bad. You are right, 
> it does not really make sense and it should not be the other way around: 
> having the DT validate the binding. I will remove this combination in 
> the next version.

You need to fix any out of tree DTS or upstream it.
> 
> 
>>> +      - items:
>>> +          - const: microchip,sam9x60-dbgu
>>> +          - const: microchip,sam9x60-usart
>>> +          - const: atmel,at91sam9260-dbgu
>>> +          - const: atmel,at91sam9260-usart
>> What? You wrote above that microchip,sam9x60-dbgu is compatible only
>> with microchip,sam9x60-usart. Now you write it is also compatible with
>> other ones?
> 
> 
> Yes, this one is intended because the 9x60 IP has new functionalities on 
> top of 9260, and some nodes do keep all four as fallback.

Then all nodes should keep fallbacks.

> 
> 
>>> +
>>> +  reg:
>>> +    maxItems: 1
>>> +
>>> +  interrupts:
>>> +    maxItems: 1
>>> +
>>> +  clock-names:
>>> +    contains:
>>> +      const: usart
>> No, this has to be specific/fixed list.
> 
> 
> I wanted to highlight the fact that it must contain either:
> clock-names = "usart";
> or
> clock-names = "usart", "gclk";
> 
> What would be the recommended way of doing this then?

We have an example for this.

https://elixir.bootlin.com/linux/v5.19/source/Documentation/devicetree/bindings/example-schema.yaml#L91


Best regards,
Krzysztof



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux