dt-bindings: thermal: Convert i.MX8MM to json-schema
Subsystems (3)
PATCH v2 1/1 dt-bindings: thermal: Convert i.MX8MM to json-schema
Convert the i.MX8MM thermal binding to DT schema format using json-schema
---
Changes since V1:
- Add description to mention that i.MX8MM thermal driver supports both i.MX8MM(1 sensor) and i.MX8MP(2 sensors).
- Remove ./thermal.txt reference.
--- .../devicetree/bindings/thermal/imx8mm-thermal.txt | 15 ------ .../bindings/thermal/imx8mm-thermal.yaml | 62 ++++++++++++++++++++++ 2 files changed, 62 insertions(+), 15 deletions(-) delete mode 100644 Documentation/devicetree/bindings/thermal/imx8mm-thermal.txt create mode 100644 Documentation/devicetree/bindings/thermal/imx8mm-thermal.yaml
Documentation/devicetree/bindings/thermal/imx8mm-thermal.txt deleted +0 -15
@@ -1,15 +0,0 @@ -* Thermal Monitoring Unit (TMU) on Freescale i.MX8MM SoC - -Required properties: -- compatible : Must be "fsl,imx8mm-tmu" or "fsl,imx8mp-tmu". -- reg : Address range of TMU registers. -- clocks : TMU's clock source. -- #thermal-sensor-cells : Should be 0 or 1. See ./thermal.txt for a description. - -Example: -tmu: tmu@30260000 { - compatible = "fsl,imx8mm-tmu"; - reg = <0x30260000 0x10000>; - clocks = <&clk IMX8MM_CLK_TMU_ROOT>; - #thermal-sensor-cells = <0>; -};
Documentation/devicetree/bindings/thermal/imx8mm-thermal.yaml new file +62 -0
62 lines not on this page · raw message
Signature · 1 line
2.7.4
Rob Herring
maintainerQuoted 57 lines · Anson Huang
Convert the i.MX8MM thermal binding to DT schema format using json-schema
Signed-off-by Anson Huang <[email protected]>---
Changes since V1:
- Add description to mention that i.MX8MM thermal driver supports bothi.MX8MM(1 sensor)andi.MX8MP(2 sensors).
- Remove ./thermal.txt reference.--- .../devicetree/bindings/thermal/imx8mm-thermal.txt | 15 ------ .../bindings/thermal/imx8mm-thermal.yaml | 62 ++++++++++++++++++++++ 2 files changed, 62 insertions(+), 15 deletions(-) delete mode 100644 Documentation/devicetree/bindings/thermal/imx8mm-thermal.txt create mode 100644 Documentation/devicetree/bindings/thermal/imx8mm-thermal.yamlDocumentation/devicetree/bindings/thermal/imx8mm-thermal.txt deleted +0
-15@@ -1,15 +0,0 @@ -* Thermal Monitoring Unit (TMU) on Freescale i.MX8MM SoC - -Required properties: -- compatible : Must be "fsl,imx8mm-tmu" or "fsl,imx8mp-tmu". -- reg : Address range of TMU registers. -- clocks : TMU's clock source. -- #thermal-sensor-cells : Should be 0 or 1. See ./thermal.txt for a description. - -Example: -tmu: tmu@30260000 { - compatible = "fsl,imx8mm-tmu"; - reg = <0x30260000 0x10000>; - clocks = <&clk IMX8MM_CLK_TMU_ROOT>; - #thermal-sensor-cells = <0>; -};Documentation/devicetree/bindings/thermal/imx8mm-thermal.yaml new file +15
-0@@ -0,0 +1,62 @@ +# SPDX-License-Identifier: GPL-2.0 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/thermal/imx8mm-thermal.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NXP i.MX8M Mini Thermal Binding + +maintainers: + - Anson Huang <[email protected]> + +description: | + i.MX8MM has TMU IP to allow temperature measurement, there are + currently two distinct major versions of the IP that is supported + by a single driver. The IP versions are named v1 and v2, v1 is
Documentation/devicetree/bindings/thermal/imx8mm-thermal.yaml line 25
Quoted 10 lines
Documentation/devicetree/bindings/thermal/imx8mm-thermal.yaml new file +10
-0+ for i.MX8MM which has ONLY 1 sensor, v2 is for i.MX8MP which has + 2 sensors. + +properties: + compatible: + oneOf: + - items: + - enum: + - fsl,imx8mm-tmu + - fsl,imx8mp-tmu
Just:
compatible:
enum:
- fsl,imx8mm-tmu
- fsl,imx8mp-tmu
Documentation/devicetree/bindings/thermal/imx8mm-thermal.yaml line 28
Quoted 3 lines
Documentation/devicetree/bindings/thermal/imx8mm-thermal.yaml new file +3
-0+ reg: + description: | + Address range of TMU registers.
Drop this.
Documentation/devicetree/bindings/thermal/imx8mm-thermal.yaml line 29
Quoted 1 line
Documentation/devicetree/bindings/thermal/imx8mm-thermal.yaml new file +1
-0+ maxItems: 1
Blank line here.
Documentation/devicetree/bindings/thermal/imx8mm-thermal.yaml line 32
Quoted 3 lines
Documentation/devicetree/bindings/thermal/imx8mm-thermal.yaml new file +3
-0+ clocks: + description: | + TMU's clock source.
Drop
Quoted 13 lines
Documentation/devicetree/bindings/thermal/imx8mm-thermal.yaml new file +13
-0+ maxItems: 1 + + "#thermal-sensor-cells": + description: | + Number of cells required to uniquely identify the thermal + sensors, 0 for ONLY one sensor and 1 for multiple sensors. + enum: + - 0 + - 1 + +required: + - compatible + - reg
Documentation/devicetree/bindings/thermal/imx8mm-thermal.yaml line 55
Quoted 10 lines
Documentation/devicetree/bindings/thermal/imx8mm-thermal.yaml new file +10
-0+ - clocks + - '#thermal-sensor-cells' + +additionalProperties: false + +examples: + - | + #include <dt-bindings/clock/imx8mm-clock.h> + + tmu: tmu@30260000 {
thermal-sensor@...
Quoted 10 lines
Documentation/devicetree/bindings/thermal/imx8mm-thermal.yaml new file +7
-0+ compatible = "fsl,imx8mm-tmu"; + reg = <0x30260000 0x10000>; + clocks = <&clk IMX8MM_CLK_TMU_ROOT>; + #thermal-sensor-cells = <0>; + }; + +...Signature · 1 line
2.7.4