diff mbox series

[1/3] dt-bindings: watchdog: convert Broadcom's WDT to the json-schema

Message ID 20211028093059.32535-1-zajec5@gmail.com (mailing list archive)
State New, archived
Headers show
Series [1/3] dt-bindings: watchdog: convert Broadcom's WDT to the json-schema | expand

Commit Message

Rafał Miłecki Oct. 28, 2021, 9:30 a.m. UTC
From: Rafał Miłecki <rafal@milecki.pl>

This helps validating DTS files. While at it also rename it to bcm63xx.
It's the first SoC with that hardware block and it's a naming schema
used for other Broadcom blocks. It's common for some (originally)
bcm63xx blocks to be reused in newer SoCs (like 7038 or 4908).

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
 .../bindings/watchdog/brcm,bcm63xx-wdt.yaml   | 38 +++++++++++++++++++
 .../bindings/watchdog/brcm,bcm7038-wdt.txt    | 19 ----------
 2 files changed, 38 insertions(+), 19 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/watchdog/brcm,bcm63xx-wdt.yaml
 delete mode 100644 Documentation/devicetree/bindings/watchdog/brcm,bcm7038-wdt.txt

Comments

Florian Fainelli Oct. 28, 2021, 4:31 p.m. UTC | #1
On 10/28/21 2:30 AM, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
> 
> This helps validating DTS files. While at it also rename it to bcm63xx.
> It's the first SoC with that hardware block and it's a naming schema
> used for other Broadcom blocks. It's common for some (originally)
> bcm63xx blocks to be reused in newer SoCs (like 7038 or 4908).
> 
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>

I would prefer you do not rename the binding especially as I am about to
remove the bcm63xx_wdt.c driver, and so having a binding name that sort
of matches the driver names makes it a lot easier to keep all of your
eggs in the same basket. We can argue whether 63xx came before 7xxx in
terms of time line, but that still does not justify the rename IMHO.

I realized that we are missing a 7038 pattern in the MAINTAINERS file
for the BCM7XXX entry, and that will be fixed shortly after sending this
email.

Please add Justin Chen (original author) and myself as maintainers for
this binding.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/watchdog/brcm,bcm63xx-wdt.yaml b/Documentation/devicetree/bindings/watchdog/brcm,bcm63xx-wdt.yaml
new file mode 100644
index 000000000000..9d468026550f
--- /dev/null
+++ b/Documentation/devicetree/bindings/watchdog/brcm,bcm63xx-wdt.yaml
@@ -0,0 +1,38 @@ 
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/watchdog/brcm,bcm63xx-wdt.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: BCM63xx watchdog timer
+
+allOf:
+  - $ref: "watchdog.yaml#"
+
+maintainers:
+  - Rafał Miłecki <rafal@milecki.pl>
+
+properties:
+  compatible:
+    const: brcm,bcm7038-wdt
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    description: >
+      The clock running the watchdog. If no clock is found the driver will
+      default to 27000000 Hz.
+
+unevaluatedProperties: false
+
+required:
+  - reg
+
+examples:
+  - |
+    watchdog@f040a7e8 {
+      compatible = "brcm,bcm7038-wdt";
+      reg = <0xf040a7e8 0x16>;
+      clocks = <&upg_fixed>;
+    };
diff --git a/Documentation/devicetree/bindings/watchdog/brcm,bcm7038-wdt.txt b/Documentation/devicetree/bindings/watchdog/brcm,bcm7038-wdt.txt
deleted file mode 100644
index 84122270be8f..000000000000
--- a/Documentation/devicetree/bindings/watchdog/brcm,bcm7038-wdt.txt
+++ /dev/null
@@ -1,19 +0,0 @@ 
-BCM7038 Watchdog timer
-
-Required properties:
-
-- compatible : should be "brcm,bcm7038-wdt"
-- reg : Specifies base physical address and size of the registers.
-
-Optional properties:
-
-- clocks: The clock running the watchdog. If no clock is found the
-	  driver will default to 27000000 Hz.
-
-Example:
-
-watchdog@f040a7e8 {
-	compatible = "brcm,bcm7038-wdt";
-	clocks = <&upg_fixed>;
-	reg = <0xf040a7e8 0x16>;
-};