Message ID | 20240325-rtc-yaml-v2-2-ff9f68f43dbc@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | dt-bindings: rtc: convert multiple devices to dtschema | expand |
On 25/03/2024 22:10, Javier Carrasco wrote: > Convert existing binding to dtschema to support validation. > > This is a direct conversion with no additions. > > Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> > +allOf: > + - $ref: rtc.yaml# > + > +properties: > + compatible: > + const: alphascale,asm9260-rtc > + > + reg: > + description: > + Base address and length of the register region. If there is going to be any resend, drop description. It is redundant and obvious. reg cannot be anything else. > + maxItems: 1 > + Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Best regards, Krzysztof
On Mon, 25 Mar 2024 22:10:09 +0100, Javier Carrasco wrote: > Convert existing binding to dtschema to support validation. > > This is a direct conversion with no additions. > > Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> > --- > .../bindings/rtc/alphascale,asm9260-rtc.txt | 19 -------- > .../bindings/rtc/alphascale,asm9260-rtc.yaml | 52 ++++++++++++++++++++++ > 2 files changed, 52 insertions(+), 19 deletions(-) > Reviewed-by: Rob Herring <robh@kernel.org>
diff --git a/Documentation/devicetree/bindings/rtc/alphascale,asm9260-rtc.txt b/Documentation/devicetree/bindings/rtc/alphascale,asm9260-rtc.txt deleted file mode 100644 index 76ebca568db9..000000000000 --- a/Documentation/devicetree/bindings/rtc/alphascale,asm9260-rtc.txt +++ /dev/null @@ -1,19 +0,0 @@ -* Alphascale asm9260 SoC Real Time Clock - -Required properties: -- compatible: Should be "alphascale,asm9260-rtc" -- reg: Physical base address of the controller and length - of memory mapped region. -- interrupts: IRQ line for the RTC. -- clocks: Reference to the clock entry. -- clock-names: should contain: - * "ahb" for the SoC RTC clock - -Example: -rtc0: rtc@800a0000 { - compatible = "alphascale,asm9260-rtc"; - reg = <0x800a0000 0x100>; - clocks = <&acc CLKID_AHB_RTC>; - clock-names = "ahb"; - interrupts = <2>; -}; diff --git a/Documentation/devicetree/bindings/rtc/alphascale,asm9260-rtc.yaml b/Documentation/devicetree/bindings/rtc/alphascale,asm9260-rtc.yaml new file mode 100644 index 000000000000..8acd5e94fd58 --- /dev/null +++ b/Documentation/devicetree/bindings/rtc/alphascale,asm9260-rtc.yaml @@ -0,0 +1,52 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/rtc/alphascale,asm9260-rtc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Alphascale asm9260 SoC Real Time Clock + +maintainers: + - Javier Carrasco <javier.carrasco.cruz@gmail.com> + +allOf: + - $ref: rtc.yaml# + +properties: + compatible: + const: alphascale,asm9260-rtc + + reg: + description: + Base address and length of the register region. + maxItems: 1 + + clocks: + maxItems: 1 + + clock-names: + const: ahb + + interrupts: + maxItems: 1 + +required: + - compatible + - reg + - clocks + - clock-names + - interrupts + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/clock/alphascale,asm9260.h> + + rtc@800a0000 { + compatible = "alphascale,asm9260-rtc"; + reg = <0x800a0000 0x100>; + clocks = <&acc CLKID_AHB_RTC>; + clock-names = "ahb"; + interrupts = <2>; + };
Convert existing binding to dtschema to support validation. This is a direct conversion with no additions. Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> --- .../bindings/rtc/alphascale,asm9260-rtc.txt | 19 -------- .../bindings/rtc/alphascale,asm9260-rtc.yaml | 52 ++++++++++++++++++++++ 2 files changed, 52 insertions(+), 19 deletions(-)