OSDN Git Service

dt-bindings: thermal: Convert Broadcom TMON to YAML
authorFlorian Fainelli <f.fainelli@gmail.com>
Wed, 8 Dec 2021 00:37:22 +0000 (16:37 -0800)
committerRob Herring <robh@kernel.org>
Tue, 14 Dec 2021 20:27:58 +0000 (14:27 -0600)
Convert the Broadcom AVS TMON Device Tree binding to YAML to help with
validation.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20211208003727.3596577-12-f.fainelli@gmail.com
Signed-off-by: Rob Herring <robh@kernel.org>
Documentation/devicetree/bindings/thermal/brcm,avs-tmon.txt [deleted file]
Documentation/devicetree/bindings/thermal/brcm,avs-tmon.yaml [new file with mode: 0644]
MAINTAINERS

diff --git a/Documentation/devicetree/bindings/thermal/brcm,avs-tmon.txt b/Documentation/devicetree/bindings/thermal/brcm,avs-tmon.txt
deleted file mode 100644 (file)
index 74a9ef0..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-* Broadcom STB thermal management
-
-Thermal management core, provided by the AVS TMON hardware block.
-
-Required properties:
-- compatible: must be one of:
-       "brcm,avs-tmon-bcm7216"
-       "brcm,avs-tmon-bcm7445"
-       "brcm,avs-tmon"
-- reg: address range for the AVS TMON registers
-- interrupts: temperature monitor interrupt, for high/low threshold triggers,
-             required except for "brcm,avs-tmon-bcm7216"
-- interrupt-names: should be "tmon"
-
-Example:
-
-       thermal@f04d1500 {
-               compatible = "brcm,avs-tmon-bcm7445", "brcm,avs-tmon";
-               reg = <0xf04d1500 0x28>;
-               interrupts = <0x6>;
-               interrupt-names = "tmon";
-               interrupt-parent = <&avs_host_l2_intc>;
-       };
diff --git a/Documentation/devicetree/bindings/thermal/brcm,avs-tmon.yaml b/Documentation/devicetree/bindings/thermal/brcm,avs-tmon.yaml
new file mode 100644 (file)
index 0000000..267a0f4
--- /dev/null
@@ -0,0 +1,56 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/thermal/brcm,avs-tmon.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Broadcom STB thermal management
+
+description: Thermal management core, provided by the AVS TMON hardware block.
+
+maintainers:
+  - Florian Fainelli <f.fainelli@gmail.com>
+
+allOf:
+  - $ref: thermal-sensor.yaml#
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - brcm,avs-tmon-bcm7216
+          - brcm,avs-tmon-bcm7445
+      - const: brcm,avs-tmon
+
+  reg:
+    maxItems: 1
+    description: >
+      Address range for the AVS TMON registers
+
+  interrupts:
+    maxItems: 1
+
+  interrupt-names:
+    items:
+      - const: tmon
+
+  "#thermal-sensor-cells":
+    const: 0
+
+additionalProperties: false
+
+required:
+  - compatible
+  - reg
+  - "#thermal-sensor-cells"
+
+examples:
+  - |
+     thermal@f04d1500 {
+          compatible = "brcm,avs-tmon-bcm7445", "brcm,avs-tmon";
+          reg = <0xf04d1500 0x28>;
+          interrupts = <0x6>;
+          interrupt-names = "tmon";
+          interrupt-parent = <&avs_host_l2_intc>;
+          #thermal-sensor-cells = <0>;
+     };
index d22669f..b5b7dca 100644 (file)
@@ -3936,7 +3936,7 @@ M:        Markus Mayer <mmayer@broadcom.com>
 M:     bcm-kernel-feedback-list@broadcom.com
 L:     linux-pm@vger.kernel.org
 S:     Maintained
-F:     Documentation/devicetree/bindings/thermal/brcm,avs-tmon.txt
+F:     Documentation/devicetree/bindings/thermal/brcm,avs-tmon.yaml
 F:     drivers/thermal/broadcom/brcmstb*
 
 BROADCOM STB DPFE DRIVER