2021-04-16 08:11:11

by Johan Jonker

[permalink] [raw]
Subject: [PATCH v8 11/15] dt-bindings: arm: rockchip: convert pmu.txt to YAML

Current dts files with 'pmu' nodes are manually verified.
In order to automate this process pmu.txt
has to be converted to yaml.

Signed-off-by: Johan Jonker <[email protected]>
---
.../devicetree/bindings/arm/rockchip/pmu.txt | 16 -------
.../devicetree/bindings/arm/rockchip/pmu.yaml | 49 ++++++++++++++++++++++
2 files changed, 49 insertions(+), 16 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/arm/rockchip/pmu.txt
create mode 100644 Documentation/devicetree/bindings/arm/rockchip/pmu.yaml

diff --git a/Documentation/devicetree/bindings/arm/rockchip/pmu.txt b/Documentation/devicetree/bindings/arm/rockchip/pmu.txt
deleted file mode 100644
index 3ee9b428b..000000000
--- a/Documentation/devicetree/bindings/arm/rockchip/pmu.txt
+++ /dev/null
@@ -1,16 +0,0 @@
-Rockchip power-management-unit:
--------------------------------
-
-The pmu is used to turn off and on different power domains of the SoCs
-This includes the power to the CPU cores.
-
-Required node properties:
-- compatible value : = "rockchip,rk3066-pmu";
-- reg : physical base address and the size of the registers window
-
-Example:
-
- pmu@20004000 {
- compatible = "rockchip,rk3066-pmu";
- reg = <0x20004000 0x100>;
- };
diff --git a/Documentation/devicetree/bindings/arm/rockchip/pmu.yaml b/Documentation/devicetree/bindings/arm/rockchip/pmu.yaml
new file mode 100644
index 000000000..0b816943d
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/rockchip/pmu.yaml
@@ -0,0 +1,49 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/rockchip/pmu.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Rockchip Power Management Unit (PMU)
+
+maintainers:
+ - Elaine Zhang <[email protected]>
+ - Heiko Stuebner <[email protected]>
+
+description: |
+ The PMU is used to turn on and off different power domains of the SoCs.
+ This includes the power to the CPU cores.
+
+select:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - rockchip,rk3066-pmu
+
+ required:
+ - compatible
+
+properties:
+ compatible:
+ items:
+ - enum:
+ - rockchip,rk3066-pmu
+ - const: syscon
+ - const: simple-mfd
+
+ reg:
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+
+additionalProperties: true
+
+examples:
+ - |
+ pmu@20004000 {
+ compatible = "rockchip,rk3066-pmu", "syscon", "simple-mfd";
+ reg = <0x20004000 0x100>;
+ };
--
2.11.0


2021-04-16 19:33:36

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH v8 11/15] dt-bindings: arm: rockchip: convert pmu.txt to YAML

On Fri, 16 Apr 2021 10:03:38 +0200, Johan Jonker wrote:
> Current dts files with 'pmu' nodes are manually verified.
> In order to automate this process pmu.txt
> has to be converted to yaml.
>
> Signed-off-by: Johan Jonker <[email protected]>
> ---
> .../devicetree/bindings/arm/rockchip/pmu.txt | 16 -------
> .../devicetree/bindings/arm/rockchip/pmu.yaml | 49 ++++++++++++++++++++++
> 2 files changed, 49 insertions(+), 16 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/arm/rockchip/pmu.txt
> create mode 100644 Documentation/devicetree/bindings/arm/rockchip/pmu.yaml
>

Reviewed-by: Rob Herring <[email protected]>