Re: [PATCH 1/4] dt-bindings: rtc: armada-380-rtc: convert to dtschema

From: Javier Carrasco
Date: Sat Mar 23 2024 - 20:02:45 EST


On 3/24/24 00:37, Alexandre Belloni wrote:
> On 23/03/2024 23:46:13+0100, Javier Carrasco wrote:
>> Convert existing binding to dtschema to support validation.
>>
>> +required:
>> + - compatible
>> + - reg
>> + - reg-names
>> + - interrupts
>> +
>> +additionalProperties: false
>
> This is not correct because at least start-year is supported. Please
> check for all your other submissions too.
>

allOf:
- $ref: rtc.yaml#

is missing, and then

unvealuatedProperties: false

to account for that.

"start-year" is read in the RTC base class, so I wonder why so many RTC
bindings add a reference to rtc.yaml, but then use

additionalProperties: false

>> +
>> +examples:
>> + - |
>> + #include <dt-bindings/interrupt-controller/arm-gic.h>
>> +
>> + rtc@a3800 {
>> + compatible = "marvell,armada-380-rtc";
>> + reg = <0xa3800 0x20>, <0x184a0 0x0c>;
>> + reg-names = "rtc", "rtc-soc";
>> + interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
>> + };
>>
>> --
>> 2.40.1
>>
>

Thanks and best regards,
Javier Carrasco