[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220210093427.2813601-1-clabbe@baylibre.com>
Date: Thu, 10 Feb 2022 09:34:27 +0000
From: Corentin Labbe <clabbe@...libre.com>
To: krzysztof.kozlowski@...onical.com, linux@...ck-us.net,
robh+dt@...nel.org, wim@...ux-watchdog.org
Cc: devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-watchdog@...r.kernel.org,
Corentin Labbe <clabbe@...libre.com>,
Linus Walleij <linus.walleij@...aro.org>
Subject: [PATCH v2] dt-bindings: watchdog: convert faraday,ftwdt010 to yaml
Convert watchdog/faraday,ftwdt010.txt to yaml.
This permits to detect missing properties like clocks and resets or
compatible like moxa,moxart-watchdog.
Reviewed-by: Linus Walleij <linus.walleij@...aro.org>
Signed-off-by: Corentin Labbe <clabbe@...libre.com>
---
Changes since v1:
- Added myself as maintainer as requested by Linus
- Added $ref to watchdog.yaml
- Removed useless quotes
- Added blank lines between properties
- Removed timeout-sec as already provided by watchdog.yaml
.../bindings/watchdog/faraday,ftwdt010.txt | 22 ------
.../bindings/watchdog/faraday,ftwdt010.yaml | 67 +++++++++++++++++++
2 files changed, 67 insertions(+), 22 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/watchdog/faraday,ftwdt010.txt
create mode 100644 Documentation/devicetree/bindings/watchdog/faraday,ftwdt010.yaml
diff --git a/Documentation/devicetree/bindings/watchdog/faraday,ftwdt010.txt b/Documentation/devicetree/bindings/watchdog/faraday,ftwdt010.txt
deleted file mode 100644
index 9ecdb502e605..000000000000
--- a/Documentation/devicetree/bindings/watchdog/faraday,ftwdt010.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-Faraday Technology FTWDT010 watchdog
-
-This is an IP part from Faraday Technology found in the Gemini
-SoCs and others.
-
-Required properties:
-- compatible : must be one of
- "faraday,ftwdt010"
- "cortina,gemini-watchdog", "faraday,ftwdt010"
-- reg : shall contain base register location and length
-- interrupts : shall contain the interrupt for the watchdog
-
-Optional properties:
-- timeout-sec : the default watchdog timeout in seconds.
-
-Example:
-
-watchdog@...00000 {
- compatible = "faraday,ftwdt010";
- reg = <0x41000000 0x1000>;
- interrupts = <3 IRQ_TYPE_LEVEL_HIGH>;
-};
diff --git a/Documentation/devicetree/bindings/watchdog/faraday,ftwdt010.yaml b/Documentation/devicetree/bindings/watchdog/faraday,ftwdt010.yaml
new file mode 100644
index 000000000000..64e9c414cc60
--- /dev/null
+++ b/Documentation/devicetree/bindings/watchdog/faraday,ftwdt010.yaml
@@ -0,0 +1,67 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/watchdog/faraday,ftwdt010.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Faraday Technology FTWDT010 watchdog
+
+maintainers:
+ - Linus Walleij <linus.walleij@...aro.org>
+ - Corentin Labbe <clabbe@...libre.com>
+
+description: |
+ This is an IP part from Faraday Technology found in the Gemini
+ SoCs and others.
+
+allOf:
+ - $ref: "watchdog.yaml#"
+
+properties:
+ compatible:
+ oneOf:
+ - const: faraday,ftwdt010
+ - items:
+ - const: cortina,gemini-watchdog
+ - const: faraday,ftwdt010
+ - items:
+ - const: moxa,moxart-watchdog
+ - const: faraday,ftwdt010
+
+ reg:
+ maxItems: 1
+
+ resets:
+ maxItems: 1
+
+ clocks:
+ maxItems: 1
+
+ clock-names:
+ const: PCLK
+
+ interrupts:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+ watchdog@...00000 {
+ compatible = "faraday,ftwdt010";
+ reg = <0x41000000 0x1000>;
+ interrupts = <3 IRQ_TYPE_LEVEL_HIGH>;
+ };
+ - |
+ watchdog: watchdog@...00000 {
+ compatible = "moxa,moxart-watchdog", "faraday,ftwdt010";
+ reg = <0x98500000 0x10>;
+ clocks = <&clk_apb>;
+ clock-names = "PCLK";
+ };
+...
--
2.34.1
Powered by blists - more mailing lists