Re: [PATCH 2/5] dt-bindings: mfd: atmel,at91-usart: convert to json-schema
From: Krzysztof Kozlowski <hidden>
Date: 2022-08-19 08:42:00
Also in:
linux-clk, linux-devicetree, linux-serial, linux-spi, lkml
On 19/08/2022 11:37, Sergiu.Moga@microchip.com wrote:
quoted
quoted
+ - 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-usartThis 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.
quoted
quoted
+ - items: + - const: microchip,sam9x60-dbgu + - const: microchip,sam9x60-usart + - const: atmel,at91sam9260-dbgu + - const: atmel,at91sam9260-usartWhat? 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.
quoted
quoted
+ + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clock-names: + contains: + const: usartNo, 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel