Skip to contentSkip to conversation

dt-bindings: thermal: brcm,ns-thermal: convert to the json-schema

PATCH In review Rafał Miłecki 3 participants 5 messages Apr 15, 2021 – Apr 27, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dt-bindings: thermal: brcm,ns-thermal: convert to the json-schema

From: Rafał Miłecki <[email protected]>

This helps validating DTS files.

---
 .../bindings/thermal/brcm,ns-thermal.txt      | 37 ------------
 .../bindings/thermal/brcm,ns-thermal.yaml     | 59 +++++++++++++++++++
 2 files changed, 59 insertions(+), 37 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/thermal/brcm,ns-thermal.txt
 create mode 100644 Documentation/devicetree/bindings/thermal/brcm,ns-thermal.yaml
Documentation/devicetree/bindings/thermal/brcm,ns-thermal.txt deleted +0 -37
deleted file mode 100644
index 68e047170039..000000000000
@@ -1,37 +0,0 @@
-* Broadcom Northstar Thermal
-
-This binding describes thermal sensor that is part of Northstar's DMU (Device
-Management Unit).
-
-Required properties:
-- compatible : Must be "brcm,ns-thermal"
-- reg : iomem address range of PVTMON registers
-- #thermal-sensor-cells : Should be <0>
-
-Example:
-
-thermal: thermal@1800c2c0 {
-	compatible = "brcm,ns-thermal";
-	reg = <0x1800c2c0 0x10>;
-	#thermal-sensor-cells = <0>;
-};
-
-thermal-zones {
-	cpu_thermal: cpu-thermal {
-		polling-delay-passive = <0>;
-		polling-delay = <1000>;
-		coefficients = <(-556) 418000>;
-		thermal-sensors = <&thermal>;
-
-		trips {
-			cpu-crit {
-				temperature	= <125000>;
-				hysteresis	= <0>;
-				type		= "critical";
-			};
-		};
-
-		cooling-maps {
-		};
-	};
-};
Documentation/devicetree/bindings/thermal/brcm,ns-thermal.yaml new file +59 -0

59 lines not on this page · raw message

Signature · 1 line
2.26.2
maintainer
#1 lore raw
Quoted 74 lines · Rafał Miłecki

From: Rafał Miłecki <[email protected]>

This helps validating DTS files.

---
 .../bindings/thermal/brcm,ns-thermal.txt      | 37 ------------
 .../bindings/thermal/brcm,ns-thermal.yaml     | 59 +++++++++++++++++++
 2 files changed, 59 insertions(+), 37 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/thermal/brcm,ns-thermal.txt
 create mode 100644 Documentation/devicetree/bindings/thermal/brcm,ns-thermal.yaml
Documentation/devicetree/bindings/thermal/brcm,ns-thermal.txt deleted +0 -37
deleted file mode 100644
index 68e047170039..000000000000
@@ -1,37 +0,0 @@
-* Broadcom Northstar Thermal
-
-This binding describes thermal sensor that is part of Northstar's DMU (Device
-Management Unit).
-
-Required properties:
-- compatible : Must be "brcm,ns-thermal"
-- reg : iomem address range of PVTMON registers
-- #thermal-sensor-cells : Should be <0>
-
-Example:
-
-thermal: thermal@1800c2c0 {
-	compatible = "brcm,ns-thermal";
-	reg = <0x1800c2c0 0x10>;
-	#thermal-sensor-cells = <0>;
-};
-
-thermal-zones {
-	cpu_thermal: cpu-thermal {
-		polling-delay-passive = <0>;
-		polling-delay = <1000>;
-		coefficients = <(-556) 418000>;
-		thermal-sensors = <&thermal>;
-
-		trips {
-			cpu-crit {
-				temperature	= <125000>;
-				hysteresis	= <0>;
-				type		= "critical";
-			};
-		};
-
-		cooling-maps {
-		};
-	};
-};
Documentation/devicetree/bindings/thermal/brcm,ns-thermal.yaml new file +13 -0
new file mode 100644
index 000000000000..50143e2f6bcb
@@ -0,0 +1,59 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/thermal/brcm,ns-thermal.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Broadcom Northstar Thermal
+
+maintainers:
+  - Rafał Miłecki <[email protected]>
+
+description:
+  Thermal sensor that is part of Northstar's DMU (Device Management Unit).

Documentation/devicetree/bindings/thermal/brcm,ns-thermal.yaml line 23

Quoted 10 lines
Documentation/devicetree/bindings/thermal/brcm,ns-thermal.yaml new file +10 -0
+
+allOf:
+  - $ref: thermal-sensor.yaml#
+
+properties:
+  compatible:
+    const: brcm,ns-thermal
+
+  reg:
+    description: PVTMON registers range

How many?

Quoted 39 lines
Documentation/devicetree/bindings/thermal/brcm,ns-thermal.yaml new file +36 -0
+
+  "#thermal-sensor-cells":
+    const: 0
+
+unevaluatedProperties: false
+
+required:
+  - reg
+
+examples:
+  - |
+    thermal: thermal@1800c2c0 {
+        compatible = "brcm,ns-thermal";
+        reg = <0x1800c2c0 0x10>;
+        #thermal-sensor-cells = <0>;
+    };
+
+    thermal-zones {
+        cpu-thermal {
+            polling-delay-passive = <0>;
+            polling-delay = <1000>;
+            coefficients = <(-556) 418000>;
+            thermal-sensors = <&thermal>;
+
+            trips {
+                cpu-crit {
+                    temperature = <125000>;
+                    hysteresis = <0>;
+                    type = "critical";
+                };
+            };
+
+            cooling-maps {
+            };
+        };
+    };
Signature · 1 line
2.26.2
#2 lore raw

PATCH v2 1/1 dt-bindings: thermal: brcm,ns-thermal: convert to the json-schema

In reply to Rafał Miłecki

From: Rafał Miłecki <[email protected]>

This helps validating DTS files.

---
V2: Add maxItems to the reg property

---
 .../bindings/thermal/brcm,ns-thermal.txt      | 37 ------------
 .../bindings/thermal/brcm,ns-thermal.yaml     | 60 +++++++++++++++++++
 2 files changed, 60 insertions(+), 37 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/thermal/brcm,ns-thermal.txt
 create mode 100644 Documentation/devicetree/bindings/thermal/brcm,ns-thermal.yaml
Documentation/devicetree/bindings/thermal/brcm,ns-thermal.txt deleted +0 -37
deleted file mode 100644
index 68e047170039..000000000000
@@ -1,37 +0,0 @@
-* Broadcom Northstar Thermal
-
-This binding describes thermal sensor that is part of Northstar's DMU (Device
-Management Unit).
-
-Required properties:
-- compatible : Must be "brcm,ns-thermal"
-- reg : iomem address range of PVTMON registers
-- #thermal-sensor-cells : Should be <0>
-
-Example:
-
-thermal: thermal@1800c2c0 {
-	compatible = "brcm,ns-thermal";
-	reg = <0x1800c2c0 0x10>;
-	#thermal-sensor-cells = <0>;
-};
-
-thermal-zones {
-	cpu_thermal: cpu-thermal {
-		polling-delay-passive = <0>;
-		polling-delay = <1000>;
-		coefficients = <(-556) 418000>;
-		thermal-sensors = <&thermal>;
-
-		trips {
-			cpu-crit {
-				temperature	= <125000>;
-				hysteresis	= <0>;
-				type		= "critical";
-			};
-		};
-
-		cooling-maps {
-		};
-	};
-};
Documentation/devicetree/bindings/thermal/brcm,ns-thermal.yaml new file +60 -0

60 lines not on this page · raw message

Signature · 1 line
2.26.2
maintainer Reviewed-by on v2 1/1
#3 lore raw
Quoted 5 lines · Rafał Miłecki

From: Rafał Miłecki <[email protected]>

This helps validating DTS files.

Quoted 9 lines

---
V2: Add maxItems to the reg property

---
 .../bindings/thermal/brcm,ns-thermal.txt      | 37 ------------
 .../bindings/thermal/brcm,ns-thermal.yaml     | 60 +++++++++++++++++++
 2 files changed, 60 insertions(+), 37 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/thermal/brcm,ns-thermal.txt
 create mode 100644 Documentation/devicetree/bindings/thermal/brcm,ns-thermal.yaml
#4 lore raw

[thermal: thermal/next] dt-bindings: thermal: brcm,ns-thermal: Convert to the json-schema

In reply to Rafał Miłecki
The following commit has been merged into the thermal/next branch of thermal:

The following commit has been merged into the thermal/next branch of thermal:

Commit-ID:     08e9fdfbb2248e93bbfaeb9cde284776085466cd
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git//08e9fdfbb2248e93bbfaeb9cde284776085466cd
Author:        Rafał Miłecki <[email protected]>
AuthorDate:    Tue, 20 Apr 2021 23:01:04 +02:00
Committer:     Daniel Lezcano <[email protected]>
CommitterDate: Wed, 21 Apr 2021 20:42:48 +02:00

dt-bindings: thermal: brcm,ns-thermal: Convert to the json-schema

This helps validating DTS files.

---
 Documentation/devicetree/bindings/thermal/brcm,ns-thermal.txt  | 37 +----
 Documentation/devicetree/bindings/thermal/brcm,ns-thermal.yaml | 60 +++++++-
 2 files changed, 60 insertions(+), 37 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/thermal/brcm,ns-thermal.txt
 create mode 100644 Documentation/devicetree/bindings/thermal/brcm,ns-thermal.yaml
Documentation/devicetree/bindings/thermal/brcm,ns-thermal.txt deleted +0 -37
deleted file mode 100644
index 68e0471..0000000
@@ -1,37 +0,0 @@
-* Broadcom Northstar Thermal
-
-This binding describes thermal sensor that is part of Northstar's DMU (Device
-Management Unit).
-
-Required properties:
-- compatible : Must be "brcm,ns-thermal"
-- reg : iomem address range of PVTMON registers
-- #thermal-sensor-cells : Should be <0>
-
-Example:
-
-thermal: thermal@1800c2c0 {
-	compatible = "brcm,ns-thermal";
-	reg = <0x1800c2c0 0x10>;
-	#thermal-sensor-cells = <0>;
-};
-
-thermal-zones {
-	cpu_thermal: cpu-thermal {
-		polling-delay-passive = <0>;
-		polling-delay = <1000>;
-		coefficients = <(-556) 418000>;
-		thermal-sensors = <&thermal>;
-
-		trips {
-			cpu-crit {
-				temperature	= <125000>;
-				hysteresis	= <0>;
-				type		= "critical";
-			};
-		};
-
-		cooling-maps {
-		};
-	};
-};
Documentation/devicetree/bindings/thermal/brcm,ns-thermal.yaml new file +60 -0

60 lines not on this page · raw message