dt-bindings: thermal: Convert marvell,armada370-thermal to DT schema
Subsystems (2)
Rob Herring (Arm)
maintainerPATCH 1/1 dt-bindings: thermal: Convert marvell,armada370-thermal to DT schema
Convert the Marvell Armada 3xx/XP thermal binding to schema.
Drop the AP80x and CP110 as they have long been deprecated and have been replaced by a new binding.
--- .../bindings/thermal/armada-thermal.txt | 42 ------------------- .../thermal/marvell,armada370-thermal.yaml | 37 ++++++++++++++++ 2 files changed, 37 insertions(+), 42 deletions(-) delete mode 100644 Documentation/devicetree/bindings/thermal/armada-thermal.txt create mode 100644 Documentation/devicetree/bindings/thermal/marvell,armada370-thermal.yaml
Documentation/devicetree/bindings/thermal/armada-thermal.txt deleted +0 -42
@@ -1,42 +0,0 @@ -* Marvell Armada 370/375/380/XP thermal management - -Required properties: - -- compatible: Should be set to one of the following: - * marvell,armada370-thermal - * marvell,armada375-thermal - * marvell,armada380-thermal - * marvell,armadaxp-thermal - * marvell,armada-ap806-thermal - * marvell,armada-ap807-thermal - * marvell,armada-cp110-thermal - -Note: these bindings are deprecated for AP806/CP110 and should instead -follow the rules described in: -Documentation/devicetree/bindings/arm/marvell/ap80x-system-controller.txt -Documentation/devicetree/bindings/arm/marvell/cp110-system-controller.txt - -- reg: Device's register space. - Two entries are expected, see the examples below. The first one points - to the status register (4B). The second one points to the control - registers (8B). - Note: The compatibles marvell,armada370-thermal, - marvell,armada380-thermal, and marvell,armadaxp-thermal must point to - "control MSB/control 1", with size of 4 (deprecated binding), or point - to "control LSB/control 0" with size of 8 (current binding). All other - compatibles must point to "control LSB/control 0" with size of 8. - -Examples: - - /* Legacy bindings */ - thermal@d0018300 { - compatible = "marvell,armada370-thermal"; - reg = <0xd0018300 0x4 - 0xd0018304 0x4>; - }; - - ap_thermal: thermal@6f8084 { - compatible = "marvell,armada-ap806-thermal"; - reg = <0x6f808C 0x4>, - <0x6f8084 0x8>; - };
Documentation/devicetree/bindings/thermal/marvell,armada370-thermal.yaml new file +37 -0
@@ -0,0 +1,37 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/thermal/marvell,armada370-thermal.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Marvell Armada 3xx/XP thermal management + +maintainers: + - Miquel Raynal <[email protected]> + +properties: + compatible: + enum: + - marvell,armada370-thermal + - marvell,armada375-thermal + - marvell,armada380-thermal + - marvell,armadaxp-thermal + + reg: + items: + - description: status register (4B) + - description: control register (4B or 8B) + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + thermal@d0018300 { + compatible = "marvell,armada370-thermal"; + reg = <0xd0018300 0x4 + 0xd0018304 0x4>; + };
Signature · 1 line
2.47.2
Hi Rob,
Quoted 4 lines · Rob Herring (Arm)
Convert the Marvell Armada 3xx/XP thermal binding to schema.
Drop the AP80x and CP110 as they have long been deprecated and have been replaced by a new binding.
Totally fine with that, but then I would go even further and also drop the legacy binding implying a size of 4 on the second reg range?
Quoted 2 lines
Signed-off-by Rob Herring (Arm) <[email protected]>---
...
Documentation/devicetree/bindings/thermal/marvell,armada370-thermal.yaml line 37
Quoted 7 lines
Documentation/devicetree/bindings/thermal/marvell,armada370-thermal.yaml new file +7
-0+examples: + - | + thermal@d0018300 { + compatible = "marvell,armada370-thermal"; + reg = <0xd0018300 0x4 + 0xd0018304 0x4>; + };
This example is showing a legacy binding. Even if we decide to keep supporting it, I think you would prefer to replace the second line:
reg = <0xd0018300 0x4
- 0xd0018304 0x4>;
+ 0xd0018304 0x8>;
Thanks,
Miquèl