* [PATCH V3] dt-bindings: thermal: convert Mediatek Thermal to the json-schema
@ 2023-11-17 5:22 Rafał Miłecki
2023-11-19 15:33 ` Rob Herring
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Rafał Miłecki @ 2023-11-17 5:22 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
AngeloGioacchino Del Regno
Cc: Rafael J . Wysocki, Daniel Lezcano, Zhang Rui, Lukasz Luba,
Sascha Hauer, linux-pm, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek, Rafał Miłecki
From: Rafał Miłecki <rafal@milecki.pl>
This helps validating DTS files. Introduced changes:
1. Improved title
2. Simplified description (dropped "This describes the device tree...")
3. Dropped undocumented "reset-names" from example
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
V2: Add "maintainers"
V3: Introduce changes described in commit body
Fix schema syntax
Move unevaluatedProperties to the bottom
Rename file to match compatible more closely
I'm totally sorry for sending broken schema patch yesterday. Brainfart.
There is no excuse for sth that doesn't even pass dt_binding_check.
DTEX Documentation/devicetree/bindings/thermal/mediatek,thermal.example.dts
DTC_CHK Documentation/devicetree/bindings/thermal/mediatek,thermal.example.dtb
.../bindings/thermal/mediatek,thermal.yaml | 99 +++++++++++++++++++
.../bindings/thermal/mediatek-thermal.txt | 52 ----------
2 files changed, 99 insertions(+), 52 deletions(-)
create mode 100644 Documentation/devicetree/bindings/thermal/mediatek,thermal.yaml
delete mode 100644 Documentation/devicetree/bindings/thermal/mediatek-thermal.txt
diff --git a/Documentation/devicetree/bindings/thermal/mediatek,thermal.yaml b/Documentation/devicetree/bindings/thermal/mediatek,thermal.yaml
new file mode 100644
index 000000000000..d96a2e32bd8f
--- /dev/null
+++ b/Documentation/devicetree/bindings/thermal/mediatek,thermal.yaml
@@ -0,0 +1,99 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/thermal/mediatek,thermal.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Mediatek thermal controller for on-SoC temperatures
+
+maintainers:
+ - Sascha Hauer <s.hauer@pengutronix.de>
+
+description:
+ This device does not have its own ADC, instead it directly controls the AUXADC
+ via AHB bus accesses. For this reason it needs phandles to the AUXADC. Also it
+ controls a mux in the apmixedsys register space via AHB bus accesses, so a
+ phandle to the APMIXEDSYS is also needed.
+
+allOf:
+ - $ref: thermal-sensor.yaml#
+
+properties:
+ compatible:
+ enum:
+ - mediatek,mt2701-thermal
+ - mediatek,mt2712-thermal
+ - mediatek,mt7622-thermal
+ - mediatek,mt7981-thermal
+ - mediatek,mt7986-thermal
+ - mediatek,mt8173-thermal
+ - mediatek,mt8183-thermal
+ - mediatek,mt8365-thermal
+ - mediatek,mt8516-thermal
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ clocks:
+ items:
+ - description: Main clock needed for register access
+ - description: The AUXADC clock
+
+ clock-names:
+ items:
+ - const: therm
+ - const: auxadc
+
+ mediatek,auxadc:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description: A phandle to the AUXADC which the thermal controller uses
+
+ mediatek,apmixedsys:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description: A phandle to the APMIXEDSYS controller
+
+ resets:
+ description: Reset controller controlling the thermal controller
+
+ nvmem-cells:
+ items:
+ - description:
+ NVMEM cell with EEPROMA phandle to the calibration data provided by an
+ NVMEM device. If unspecified default values shall be used.
+
+ nvmem-cell-names:
+ items:
+ - const: calibration-data
+
+required:
+ - reg
+ - interrupts
+ - clocks
+ - clock-names
+ - mediatek,auxadc
+ - mediatek,apmixedsys
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+ #include <dt-bindings/clock/mt8173-clk.h>
+ #include <dt-bindings/reset/mt8173-resets.h>
+
+ thermal@1100b000 {
+ compatible = "mediatek,mt8173-thermal";
+ reg = <0x1100b000 0x1000>;
+ interrupts = <0 70 IRQ_TYPE_LEVEL_LOW>;
+ clocks = <&pericfg CLK_PERI_THERM>, <&pericfg CLK_PERI_AUXADC>;
+ clock-names = "therm", "auxadc";
+ resets = <&pericfg MT8173_PERI_THERM_SW_RST>;
+ mediatek,auxadc = <&auxadc>;
+ mediatek,apmixedsys = <&apmixedsys>;
+ nvmem-cells = <&thermal_calibration_data>;
+ nvmem-cell-names = "calibration-data";
+ #thermal-sensor-cells = <1>;
+ };
diff --git a/Documentation/devicetree/bindings/thermal/mediatek-thermal.txt b/Documentation/devicetree/bindings/thermal/mediatek-thermal.txt
deleted file mode 100644
index ac39c7156fde..000000000000
--- a/Documentation/devicetree/bindings/thermal/mediatek-thermal.txt
+++ /dev/null
@@ -1,52 +0,0 @@
-* Mediatek Thermal
-
-This describes the device tree binding for the Mediatek thermal controller
-which measures the on-SoC temperatures. This device does not have its own ADC,
-instead it directly controls the AUXADC via AHB bus accesses. For this reason
-this device needs phandles to the AUXADC. Also it controls a mux in the
-apmixedsys register space via AHB bus accesses, so a phandle to the APMIXEDSYS
-is also needed.
-
-Required properties:
-- compatible:
- - "mediatek,mt8173-thermal" : For MT8173 family of SoCs
- - "mediatek,mt2701-thermal" : For MT2701 family of SoCs
- - "mediatek,mt2712-thermal" : For MT2712 family of SoCs
- - "mediatek,mt7622-thermal" : For MT7622 SoC
- - "mediatek,mt7981-thermal", "mediatek,mt7986-thermal" : For MT7981 SoC
- - "mediatek,mt7986-thermal" : For MT7986 SoC
- - "mediatek,mt8183-thermal" : For MT8183 family of SoCs
- - "mediatek,mt8365-thermal" : For MT8365 family of SoCs
- - "mediatek,mt8516-thermal", "mediatek,mt2701-thermal : For MT8516 family of SoCs
-- reg: Address range of the thermal controller
-- interrupts: IRQ for the thermal controller
-- clocks, clock-names: Clocks needed for the thermal controller. required
- clocks are:
- "therm": Main clock needed for register access
- "auxadc": The AUXADC clock
-- mediatek,auxadc: A phandle to the AUXADC which the thermal controller uses
-- mediatek,apmixedsys: A phandle to the APMIXEDSYS controller.
-- #thermal-sensor-cells : Should be 0. See Documentation/devicetree/bindings/thermal/thermal-sensor.yaml for a description.
-
-Optional properties:
-- resets: Reference to the reset controller controlling the thermal controller.
-- nvmem-cells: A phandle to the calibration data provided by a nvmem device. If
- unspecified default values shall be used.
-- nvmem-cell-names: Should be "calibration-data"
-
-Example:
-
- thermal: thermal@1100b000 {
- #thermal-sensor-cells = <1>;
- compatible = "mediatek,mt8173-thermal";
- reg = <0 0x1100b000 0 0x1000>;
- interrupts = <0 70 IRQ_TYPE_LEVEL_LOW>;
- clocks = <&pericfg CLK_PERI_THERM>, <&pericfg CLK_PERI_AUXADC>;
- clock-names = "therm", "auxadc";
- resets = <&pericfg MT8173_PERI_THERM_SW_RST>;
- reset-names = "therm";
- mediatek,auxadc = <&auxadc>;
- mediatek,apmixedsys = <&apmixedsys>;
- nvmem-cells = <&thermal_calibration_data>;
- nvmem-cell-names = "calibration-data";
- };
--
2.35.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH V3] dt-bindings: thermal: convert Mediatek Thermal to the json-schema
2023-11-17 5:22 [PATCH V3] dt-bindings: thermal: convert Mediatek Thermal to the json-schema Rafał Miłecki
@ 2023-11-19 15:33 ` Rob Herring
2023-11-20 14:19 ` AngeloGioacchino Del Regno
2023-11-29 12:14 ` Daniel Lezcano
2 siblings, 0 replies; 4+ messages in thread
From: Rob Herring @ 2023-11-19 15:33 UTC (permalink / raw)
To: Rafał Miłecki
Cc: Rob Herring, Lukasz Luba, Daniel Lezcano, Zhang Rui, linux-pm,
devicetree, Conor Dooley, linux-mediatek,
AngeloGioacchino Del Regno, linux-arm-kernel, Rafael J . Wysocki,
Matthias Brugger, linux-kernel, Rafał Miłecki,
Krzysztof Kozlowski, Sascha Hauer
On Fri, 17 Nov 2023 06:22:14 +0100, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
>
> This helps validating DTS files. Introduced changes:
> 1. Improved title
> 2. Simplified description (dropped "This describes the device tree...")
> 3. Dropped undocumented "reset-names" from example
>
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
> ---
> V2: Add "maintainers"
> V3: Introduce changes described in commit body
> Fix schema syntax
> Move unevaluatedProperties to the bottom
> Rename file to match compatible more closely
>
> I'm totally sorry for sending broken schema patch yesterday. Brainfart.
> There is no excuse for sth that doesn't even pass dt_binding_check.
> DTEX Documentation/devicetree/bindings/thermal/mediatek,thermal.example.dts
> DTC_CHK Documentation/devicetree/bindings/thermal/mediatek,thermal.example.dtb
>
> .../bindings/thermal/mediatek,thermal.yaml | 99 +++++++++++++++++++
> .../bindings/thermal/mediatek-thermal.txt | 52 ----------
> 2 files changed, 99 insertions(+), 52 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/thermal/mediatek,thermal.yaml
> delete mode 100644 Documentation/devicetree/bindings/thermal/mediatek-thermal.txt
>
Reviewed-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH V3] dt-bindings: thermal: convert Mediatek Thermal to the json-schema
2023-11-17 5:22 [PATCH V3] dt-bindings: thermal: convert Mediatek Thermal to the json-schema Rafał Miłecki
2023-11-19 15:33 ` Rob Herring
@ 2023-11-20 14:19 ` AngeloGioacchino Del Regno
2023-11-29 12:14 ` Daniel Lezcano
2 siblings, 0 replies; 4+ messages in thread
From: AngeloGioacchino Del Regno @ 2023-11-20 14:19 UTC (permalink / raw)
To: Rafał Miłecki, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Matthias Brugger
Cc: Rafael J . Wysocki, Daniel Lezcano, Zhang Rui, Lukasz Luba,
Sascha Hauer, linux-pm, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek, Rafał Miłecki
Il 17/11/23 06:22, Rafał Miłecki ha scritto:
> From: Rafał Miłecki <rafal@milecki.pl>
>
> This helps validating DTS files. Introduced changes:
> 1. Improved title
> 2. Simplified description (dropped "This describes the device tree...")
> 3. Dropped undocumented "reset-names" from example
>
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH V3] dt-bindings: thermal: convert Mediatek Thermal to the json-schema
2023-11-17 5:22 [PATCH V3] dt-bindings: thermal: convert Mediatek Thermal to the json-schema Rafał Miłecki
2023-11-19 15:33 ` Rob Herring
2023-11-20 14:19 ` AngeloGioacchino Del Regno
@ 2023-11-29 12:14 ` Daniel Lezcano
2 siblings, 0 replies; 4+ messages in thread
From: Daniel Lezcano @ 2023-11-29 12:14 UTC (permalink / raw)
To: Rafał Miłecki, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Matthias Brugger, AngeloGioacchino Del Regno
Cc: Rafael J . Wysocki, Zhang Rui, Lukasz Luba, Sascha Hauer,
linux-pm, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, Rafał Miłecki
On 17/11/2023 06:22, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal@milecki.pl>
>
> This helps validating DTS files. Introduced changes:
> 1. Improved title
> 2. Simplified description (dropped "This describes the device tree...")
> 3. Dropped undocumented "reset-names" from example
>
> Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
> ---
Applied, thanks
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-11-29 12:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-17 5:22 [PATCH V3] dt-bindings: thermal: convert Mediatek Thermal to the json-schema Rafał Miłecki
2023-11-19 15:33 ` Rob Herring
2023-11-20 14:19 ` AngeloGioacchino Del Regno
2023-11-29 12:14 ` Daniel Lezcano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).