Skip to contentSkip to conversation

dt-bindings: rtc: Add Arm PL031 schema

PATCH In review Rob Herring 2 participants 2 messages Jun 7, 2021

Subsystems (2)
lore
Share & tools
lore

Rob Herring

author maintainer
#0 lore raw

PATCH 1/1 dt-bindings: rtc: Add Arm PL031 schema

The PL031 RTC binding has been in use for a long time, but never got documented. Fortunately, it's simple and existing users are consistent.

Cc Alessandro Zummo <[email protected]>
Cc Alexandre Belloni <[email protected]>
---
 .../devicetree/bindings/rtc/arm,pl031.yaml    | 56 +++++++++++++++++++
 1 file changed, 56 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/rtc/arm,pl031.yaml
Documentation/devicetree/bindings/rtc/arm,pl031.yaml new file +56 -0
new file mode 100644
index 000000000000..77452c9e9b63
@@ -0,0 +1,56 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/rtc/arm,pl031.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Arm Primecell PL031 Real Time Clock
+
+select:
+  properties:
+    compatible:
+      contains:
+        const: arm,pl031
+  required:
+    - compatible
+
+allOf:
+  - $ref: rtc.yaml#
+
+maintainers:
+  - Rob Herring <[email protected]>
+
+properties:
+  compatible:
+    items:
+      - const: arm,pl031
+      - const: arm,primecell
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  clock-names:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - clock-names
+
+additionalProperties: false
+
+examples:
+  - |
+    rtc@10017000 {
+        compatible = "arm,pl031", "arm,primecell";
+        reg = <0x10017000 0x1000>;
+        clocks = <&pclk>;
+        clock-names = "apb_pclk";
+    };
Signature · 1 line
2.27.0
maintainer Acked-by on v1 1/1
#1 lore raw

Hello Rob,

Quoted 54 lines · Rob Herring

The PL031 RTC binding has been in use for a long time, but never got documented. Fortunately, it's simple and existing users are consistent.

Cc Alessandro Zummo <[email protected]>
Cc Alexandre Belloni <[email protected]>
---
 .../devicetree/bindings/rtc/arm,pl031.yaml    | 56 +++++++++++++++++++
 1 file changed, 56 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/rtc/arm,pl031.yaml
Documentation/devicetree/bindings/rtc/arm,pl031.yaml new file +36 -0
new file mode 100644
index 000000000000..77452c9e9b63
@@ -0,0 +1,56 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/rtc/arm,pl031.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Arm Primecell PL031 Real Time Clock
+
+select:
+  properties:
+    compatible:
+      contains:
+        const: arm,pl031
+  required:
+    - compatible
+
+allOf:
+  - $ref: rtc.yaml#
+
+maintainers:
+  - Rob Herring <[email protected]>
+
+properties:
+  compatible:
+    items:
+      - const: arm,pl031
+      - const: arm,primecell
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1

Documentation/devicetree/bindings/rtc/arm,pl031.yaml line 46

Quoted 10 lines
Documentation/devicetree/bindings/rtc/arm,pl031.yaml new file +10 -0
+
+  clock-names:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - clock-names
+

As the driver sets the range, it also supports start-date from rtc.yaml With that added:

Signature · 3 lines
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com