devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: Thierry Reding <thierry.reding@gmail.com>,
	Rob Herring <robh+dt@kernel.org>
Cc: Jon Hunter <jonathanh@nvidia.com>,
	devicetree@vger.kernel.org, linux-tegra@vger.kernel.org
Subject: [PATCH v2 05/16] dt-bindings: rtc: tegra: Convert to json-schema
Date: Fri, 19 Nov 2021 15:38:28 +0100	[thread overview]
Message-ID: <20211119143839.1950739-6-thierry.reding@gmail.com> (raw)
In-Reply-To: <20211119143839.1950739-1-thierry.reding@gmail.com>

From: Thierry Reding <treding@nvidia.com>

Convert the NVIDIA Tegra RTC bindings from the free-form text format to
json-schema.

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
Changes in v2:
- document clock-names property and add additionalProperties: false

 .../bindings/rtc/nvidia,tegra20-rtc.txt       | 24 --------
 .../bindings/rtc/nvidia,tegra20-rtc.yaml      | 60 +++++++++++++++++++
 2 files changed, 60 insertions(+), 24 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/rtc/nvidia,tegra20-rtc.txt
 create mode 100644 Documentation/devicetree/bindings/rtc/nvidia,tegra20-rtc.yaml

diff --git a/Documentation/devicetree/bindings/rtc/nvidia,tegra20-rtc.txt b/Documentation/devicetree/bindings/rtc/nvidia,tegra20-rtc.txt
deleted file mode 100644
index b7d98ed3e098..000000000000
--- a/Documentation/devicetree/bindings/rtc/nvidia,tegra20-rtc.txt
+++ /dev/null
@@ -1,24 +0,0 @@
-NVIDIA Tegra20 real-time clock
-
-The Tegra RTC maintains seconds and milliseconds counters, and five alarm
-registers. The alarms and other interrupts may wake the system from low-power
-state.
-
-Required properties:
-
-- compatible : For Tegra20, must contain "nvidia,tegra20-rtc".  Otherwise,
-  must contain '"nvidia,<chip>-rtc", "nvidia,tegra20-rtc"', where <chip>
-  can be tegra30, tegra114, tegra124, or tegra132.
-- reg : Specifies base physical address and size of the registers.
-- interrupts : A single interrupt specifier.
-- clocks : Must contain one entry, for the module clock.
-  See ../clocks/clock-bindings.txt for details.
-
-Example:
-
-timer {
-	compatible = "nvidia,tegra20-rtc";
-	reg = <0x7000e000 0x100>;
-	interrupts = <0 2 0x04>;
-	clocks = <&tegra_car 4>;
-};
diff --git a/Documentation/devicetree/bindings/rtc/nvidia,tegra20-rtc.yaml b/Documentation/devicetree/bindings/rtc/nvidia,tegra20-rtc.yaml
new file mode 100644
index 000000000000..94266de73cb9
--- /dev/null
+++ b/Documentation/devicetree/bindings/rtc/nvidia,tegra20-rtc.yaml
@@ -0,0 +1,60 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/rtc/nvidia,tegra20-rtc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: NVIDIA Tegra real-time clock
+
+maintainers:
+  - Thierry Reding <thierry.reding@gmail.com>
+  - Jon Hunter <jonathanh@nvidia.com>
+
+description: |
+  The Tegra RTC maintains seconds and milliseconds counters, and five
+  alarm registers. The alarms and other interrupts may wake the system
+  from low-power state.
+
+properties:
+  compatible:
+    oneOf:
+      - const: nvidia,tegra20-rtc
+      - items:
+          - enum:
+              - nvidia,tegra30-rtc
+              - nvidia,tegra114-rtc
+              - nvidia,tegra124-rtc
+              - nvidia,tegra210-rtc
+              - nvidia,tegra186-rtc
+              - nvidia,tegra194-rtc
+          - const: nvidia,tegra20-rtc
+
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    maxItems: 1
+
+  clock-names:
+    items:
+      - const: rtc
+
+additionalProperties: false
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+
+examples:
+  - |
+    timer@7000e000 {
+        compatible = "nvidia,tegra20-rtc";
+        reg = <0x7000e000 0x100>;
+        interrupts = <0 2 0x04>;
+        clocks = <&tegra_car 4>;
+    };
-- 
2.33.1


  parent reply	other threads:[~2021-11-19 14:39 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-19 14:38 [PATCH v2 00/16] dt-bindings: Convert Tegra DT bindings to json-schema Thierry Reding
2021-11-19 14:38 ` [PATCH v2 01/16] dt-bindings: misc: Convert Tegra MISC " Thierry Reding
2021-11-30  1:29   ` Rob Herring
2021-11-19 14:38 ` [PATCH v2 02/16] dt-bindings: mmc: tegra: Convert " Thierry Reding
2021-11-30  1:31   ` Rob Herring
2021-11-19 14:38 ` [PATCH v2 03/16] dt-bindings: mailbox: " Thierry Reding
2021-11-30  1:32   ` Rob Herring
2021-11-19 14:38 ` [PATCH v2 04/16] dt-bindings: mailbox: tegra: Document Tegra234 HSP Thierry Reding
2021-11-30  1:32   ` Rob Herring
2021-11-19 14:38 ` Thierry Reding [this message]
2021-11-30  1:33   ` [PATCH v2 05/16] dt-bindings: rtc: tegra: Convert to json-schema Rob Herring
2021-11-19 14:38 ` [PATCH v2 06/16] dt-bindings: rtc: tegra: Document Tegra234 RTC Thierry Reding
2021-11-30  1:33   ` Rob Herring
2021-11-19 14:38 ` [PATCH v2 07/16] dt-bindings: fuse: tegra: Convert to json-schema Thierry Reding
2021-11-30  1:35   ` Rob Herring
2021-11-19 14:38 ` [PATCH v2 08/16] dt-bindings: fuse: tegra: Document Tegra234 FUSE Thierry Reding
2021-11-30  1:35   ` Rob Herring
2021-11-19 14:38 ` [PATCH v2 09/16] dt-bindings: mmc: tegra: Document Tegra234 SDHCI Thierry Reding
2021-11-30  1:35   ` Rob Herring
2021-11-19 14:38 ` [PATCH v2 10/16] dt-bindings: serial: 8250: Document Tegra234 UART Thierry Reding
2021-11-30  1:36   ` Rob Herring
2021-11-19 14:38 ` [PATCH v2 11/16] dt-bindings: tegra: pmc: Convert to json-schema Thierry Reding
2021-11-30  1:41   ` Rob Herring
2021-11-19 14:38 ` [PATCH v2 12/16] dt-bindings: firmware: tegra: " Thierry Reding
2021-11-30  1:43   ` Rob Herring
2021-11-19 14:38 ` [PATCH v2 13/16] dt-bindings: i2c: tegra-bpmp: " Thierry Reding
2021-11-23 16:34   ` Rob Herring
2021-11-30  1:44   ` Rob Herring
2021-12-01 17:42     ` Thierry Reding
2021-12-01 18:42       ` Rob Herring
2021-12-02 17:55         ` Thierry Reding
2021-12-02 21:08           ` Rob Herring
2021-12-02 22:38             ` Rob Herring
2021-11-19 14:38 ` [PATCH v2 14/16] dt-bindings: thermal: tegra186-bpmp: " Thierry Reding
2021-11-30  1:44   ` Rob Herring
2021-11-19 14:38 ` [PATCH v2 15/16] dt-bindings: serial: tegra-tcu: " Thierry Reding
2021-11-23 16:34   ` Rob Herring
2021-11-30  1:45   ` Rob Herring
2021-11-19 14:38 ` [PATCH v2 16/16] dt-bindings: serial: Document Tegra234 TCU Thierry Reding
2021-11-23 16:34   ` Rob Herring
2021-11-30  1:45   ` Rob Herring
2021-12-09 17:05 ` [PATCH v2 00/16] dt-bindings: Convert Tegra DT bindings to json-schema Thierry Reding

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211119143839.1950739-6-thierry.reding@gmail.com \
    --to=thierry.reding@gmail.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jonathanh@nvidia.com \
    --cc=linux-tegra@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).