This series converts the following existing bindings to dtschema:
- armada-380-rtc
- alphascale,asm9260-rtc
- digicolor-rtc (moved to trivial-rtc)
- nxp,lpc1788-rtc
All bindings include at least one compatible that is referenced in the
existing dts (arch/arm). Those dts could be tested against the new
bindings.
It might be worth mentioning that the reference to nxp,lpc1788-rtc in
arch/arm/boot/dts/nxp/lpc/lpc18xx.dtsi also includes another compatible
called nxp,lpc1850-rtc, which is not documented or supported by existing
drivers. That generates a warning when testing against nxp,lpc1788-rtc.
Signed-off-by: Javier Carrasco <[email protected]>
---
Changes in v3:
- alphascale-asm9260-rtc: drop unnecessary reg description.
- nxp,lpc1788-rtc: drop unnecessary reg description.
- Link to v2: https://lore.kernel.org/r/[email protected]
Changes in v2:
- General: reference to rtc.yaml
- digicolor-rtc: move to trivial-rtc
- Link to v1: https://lore.kernel.org/r/[email protected]
---
Javier Carrasco (4):
dt-bindings: rtc: armada-380-rtc: convert to dtschema
dt-bindings: rtc: alphascale,asm9260-rtc: convert to dtschema
dt-bindings: rtc: digicolor-rtc: move to trivial-rtc
dt-bindings: rtc: nxp,lpc1788-rtc: convert to dtschema
.../bindings/rtc/alphascale,asm9260-rtc.txt | 19 -------
.../bindings/rtc/alphascale,asm9260-rtc.yaml | 50 +++++++++++++++++++
.../devicetree/bindings/rtc/armada-380-rtc.txt | 24 ---------
.../devicetree/bindings/rtc/digicolor-rtc.txt | 17 -------
.../bindings/rtc/marvell,armada-380-rtc.yaml | 51 +++++++++++++++++++
.../devicetree/bindings/rtc/nxp,lpc1788-rtc.txt | 21 --------
.../devicetree/bindings/rtc/nxp,lpc1788-rtc.yaml | 58 ++++++++++++++++++++++
.../devicetree/bindings/rtc/trivial-rtc.yaml | 2 +
8 files changed, 161 insertions(+), 81 deletions(-)
---
base-commit: 4cece764965020c22cff7665b18a012006359095
change-id: 20240322-rtc-yaml-473335cbf911
Best regards,
--
Javier Carrasco <[email protected]>
Convert existing binding to dtschema to support validation.
This is a direct conversion with no additions.
Reviewed-by: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Javier Carrasco <[email protected]>
---
.../devicetree/bindings/rtc/armada-380-rtc.txt | 24 ----------
.../bindings/rtc/marvell,armada-380-rtc.yaml | 51 ++++++++++++++++++++++
2 files changed, 51 insertions(+), 24 deletions(-)
diff --git a/Documentation/devicetree/bindings/rtc/armada-380-rtc.txt b/Documentation/devicetree/bindings/rtc/armada-380-rtc.txt
deleted file mode 100644
index c3c9a1226f9a..000000000000
--- a/Documentation/devicetree/bindings/rtc/armada-380-rtc.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-* Real Time Clock of the Armada 38x/7K/8K SoCs
-
-RTC controller for the Armada 38x, 7K and 8K SoCs
-
-Required properties:
-- compatible : Should be one of the following:
- "marvell,armada-380-rtc" for Armada 38x SoC
- "marvell,armada-8k-rtc" for Aramda 7K/8K SoCs
-- reg: a list of base address and size pairs, one for each entry in
- reg-names
-- reg names: should contain:
- * "rtc" for the RTC registers
- * "rtc-soc" for the SoC related registers and among them the one
- related to the interrupt.
-- interrupts: IRQ line for the RTC.
-
-Example:
-
-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>;
-};
diff --git a/Documentation/devicetree/bindings/rtc/marvell,armada-380-rtc.yaml b/Documentation/devicetree/bindings/rtc/marvell,armada-380-rtc.yaml
new file mode 100644
index 000000000000..adf3ba0cd09f
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/marvell,armada-380-rtc.yaml
@@ -0,0 +1,51 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/rtc/marvell,armada-380-rtc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: RTC controller for the Armada 38x, 7K and 8K SoCs
+
+maintainers:
+ - Javier Carrasco <[email protected]>
+
+allOf:
+ - $ref: rtc.yaml#
+
+properties:
+ compatible:
+ enum:
+ - marvell,armada-380-rtc
+ - marvell,armada-8k-rtc
+
+ reg:
+ items:
+ - description: RTC base address size
+ - description: Base address and size of SoC related registers
+
+ reg-names:
+ items:
+ - const: rtc
+ - const: rtc-soc
+
+ interrupts:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - reg-names
+ - interrupts
+
+unevaluatedProperties: 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
Convert existing binding to dtschema to support validation.
This is a direct conversion with no additions.
Reviewed-by: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Javier Carrasco <[email protected]>
---
.../bindings/rtc/alphascale,asm9260-rtc.txt | 19 --------
.../bindings/rtc/alphascale,asm9260-rtc.yaml | 50 ++++++++++++++++++++++
2 files changed, 50 insertions(+), 19 deletions(-)
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..f955a7f638ad
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/alphascale,asm9260-rtc.yaml
@@ -0,0 +1,50 @@
+# 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 <[email protected]>
+
+allOf:
+ - $ref: rtc.yaml#
+
+properties:
+ compatible:
+ const: alphascale,asm9260-rtc
+
+ reg:
+ 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>;
+ };
--
2.40.1
Convert existing binding to dtschema to support validation.
This is a direct conversion with no additions.
Reviewed-by: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Javier Carrasco <[email protected]>
---
.../devicetree/bindings/rtc/nxp,lpc1788-rtc.txt | 21 --------
.../devicetree/bindings/rtc/nxp,lpc1788-rtc.yaml | 58 ++++++++++++++++++++++
2 files changed, 58 insertions(+), 21 deletions(-)
diff --git a/Documentation/devicetree/bindings/rtc/nxp,lpc1788-rtc.txt b/Documentation/devicetree/bindings/rtc/nxp,lpc1788-rtc.txt
deleted file mode 100644
index 3c97bd180592..000000000000
--- a/Documentation/devicetree/bindings/rtc/nxp,lpc1788-rtc.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-NXP LPC1788 real-time clock
-
-The LPC1788 RTC provides calendar and clock functionality
-together with periodic tick and alarm interrupt support.
-
-Required properties:
-- compatible : must contain "nxp,lpc1788-rtc"
-- reg : Specifies base physical address and size of the registers.
-- interrupts : A single interrupt specifier.
-- clocks : Must contain clock specifiers for rtc and register clock
-- clock-names : Must contain "rtc" and "reg"
- See ../clocks/clock-bindings.txt for details.
-
-Example:
-rtc: rtc@40046000 {
- compatible = "nxp,lpc1788-rtc";
- reg = <0x40046000 0x1000>;
- interrupts = <47>;
- clocks = <&creg_clk 0>, <&ccu1 CLK_CPU_BUS>;
- clock-names = "rtc", "reg";
-};
diff --git a/Documentation/devicetree/bindings/rtc/nxp,lpc1788-rtc.yaml b/Documentation/devicetree/bindings/rtc/nxp,lpc1788-rtc.yaml
new file mode 100644
index 000000000000..e88b847a1cc5
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/nxp,lpc1788-rtc.yaml
@@ -0,0 +1,58 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/rtc/nxp,lpc1788-rtc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NXP LPC1788 real-time clock
+
+description:
+ The LPC1788 RTC provides calendar and clock functionality
+ together with periodic tick and alarm interrupt support.
+
+maintainers:
+ - Javier Carrasco <[email protected]>
+
+allOf:
+ - $ref: rtc.yaml#
+
+properties:
+ compatible:
+ const: nxp,lpc1788-rtc
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ items:
+ - description: RTC clock
+ - description: Register clock
+
+ clock-names:
+ items:
+ - const: rtc
+ - const: reg
+
+ interrupts:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - clock-names
+ - interrupts
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/lpc18xx-ccu.h>
+
+ rtc@40046000 {
+ compatible = "nxp,lpc1788-rtc";
+ reg = <0x40046000 0x1000>;
+ clocks = <&creg_clk 0>, <&ccu1 CLK_CPU_BUS>;
+ clock-names = "rtc", "reg";
+ interrupts = <47>;
+ };
--
2.40.1
Convert existing binding to dtschema to support validation.
This device meets the requirements to be moved to trivial-rtc
(compatible, reg and a single interrupt).
Reviewed-by: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Javier Carrasco <[email protected]>
---
Documentation/devicetree/bindings/rtc/digicolor-rtc.txt | 17 -----------------
Documentation/devicetree/bindings/rtc/trivial-rtc.yaml | 2 ++
2 files changed, 2 insertions(+), 17 deletions(-)
diff --git a/Documentation/devicetree/bindings/rtc/digicolor-rtc.txt b/Documentation/devicetree/bindings/rtc/digicolor-rtc.txt
deleted file mode 100644
index d464986012cd..000000000000
--- a/Documentation/devicetree/bindings/rtc/digicolor-rtc.txt
+++ /dev/null
@@ -1,17 +0,0 @@
-Conexant Digicolor Real Time Clock controller
-
-This binding currently supports the CX92755 SoC.
-
-Required properties:
-- compatible: should be "cnxt,cx92755-rtc"
-- reg: physical base address of the controller and length of memory mapped
- region.
-- interrupts: rtc alarm interrupt
-
-Example:
-
- rtc@f0000c30 {
- compatible = "cnxt,cx92755-rtc";
- reg = <0xf0000c30 0x18>;
- interrupts = <25>;
- };
diff --git a/Documentation/devicetree/bindings/rtc/trivial-rtc.yaml b/Documentation/devicetree/bindings/rtc/trivial-rtc.yaml
index c9e3c5262c21..a3db41c5207c 100644
--- a/Documentation/devicetree/bindings/rtc/trivial-rtc.yaml
+++ b/Documentation/devicetree/bindings/rtc/trivial-rtc.yaml
@@ -24,6 +24,8 @@ properties:
- abracon,abb5zes3
# AB-RTCMC-32.768kHz-EOZ9: Real Time Clock/Calendar Module with I2C Interface
- abracon,abeoz9
+ # Conexant Digicolor Real Time Clock Controller
+ - cnxt,cx92755-rtc
# I2C, 32-Bit Binary Counter Watchdog RTC with Trickle Charger and Reset Input/Output
- dallas,ds1374
# Dallas DS1672 Real-time Clock
--
2.40.1
On Tue, Mar 26, 2024 at 02:03:22PM +0100, Javier Carrasco wrote:
> This series converts the following existing bindings to dtschema:
>
> - armada-380-rtc
> - alphascale,asm9260-rtc
> - digicolor-rtc (moved to trivial-rtc)
> - nxp,lpc1788-rtc
>
> All bindings include at least one compatible that is referenced in the
> existing dts (arch/arm). Those dts could be tested against the new
> bindings.
>
> It might be worth mentioning that the reference to nxp,lpc1788-rtc in
> arch/arm/boot/dts/nxp/lpc/lpc18xx.dtsi also includes another compatible
> called nxp,lpc1850-rtc, which is not documented or supported by existing
> drivers. That generates a warning when testing against nxp,lpc1788-rtc.
>
> Signed-off-by: Javier Carrasco <[email protected]>
> ---
> Changes in v3:
> - alphascale-asm9260-rtc: drop unnecessary reg description.
> - nxp,lpc1788-rtc: drop unnecessary reg description.
> - Link to v2: https://lore.kernel.org/r/[email protected]
>
> Changes in v2:
> - General: reference to rtc.yaml
> - digicolor-rtc: move to trivial-rtc
> - Link to v1: https://lore.kernel.org/r/[email protected]
>
> ---
> Javier Carrasco (4):
> dt-bindings: rtc: armada-380-rtc: convert to dtschema
> dt-bindings: rtc: alphascale,asm9260-rtc: convert to dtschema
> dt-bindings: rtc: digicolor-rtc: move to trivial-rtc
> dt-bindings: rtc: nxp,lpc1788-rtc: convert to dtschema
Reviewed-by: Rob Herring <[email protected]>
On Tue, 26 Mar 2024 14:03:22 +0100, Javier Carrasco wrote:
> This series converts the following existing bindings to dtschema:
>
> - armada-380-rtc
> - alphascale,asm9260-rtc
> - digicolor-rtc (moved to trivial-rtc)
> - nxp,lpc1788-rtc
>
> [...]
Applied, thanks!
[1/4] dt-bindings: rtc: armada-380-rtc: convert to dtschema
https://git.kernel.org/abelloni/c/c3c50e7df39b
[2/4] dt-bindings: rtc: alphascale,asm9260-rtc: convert to dtschema
https://git.kernel.org/abelloni/c/432008d2f766
[3/4] dt-bindings: rtc: digicolor-rtc: move to trivial-rtc
https://git.kernel.org/abelloni/c/971e7303f472
[4/4] dt-bindings: rtc: nxp,lpc1788-rtc: convert to dtschema
https://git.kernel.org/abelloni/c/7918a220d210
Best regards,
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com