diff mbox series

[v1] dt-bindings: power: actions,owl-sps: convert to YAML

Message ID 20241102221707.2857342-1-ivo.ivanov.ivanov1@gmail.com
State Not Applicable
Headers show
Series [v1] dt-bindings: power: actions,owl-sps: convert to YAML | expand

Checks

Context Check Description
robh/checkpatch warning total: 0 errors, 2 warnings, 58 lines checked
robh/patch-applied success
robh/dtbs-check warning build log
robh/dt-meta-schema success

Commit Message

Ivaylo Ivanov Nov. 2, 2024, 10:17 p.m. UTC
Convert the Actions Semi Owl Smart Power System (SPS) bindings to DT
schema.

Changes during conversion:
 - Rename file to match compatible
 - Add a description

Signed-off-by: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>
---
 .../bindings/power/actions,owl-sps.txt        | 21 --------
 .../bindings/power/actions,owl-sps.yaml       | 50 +++++++++++++++++++
 MAINTAINERS                                   |  2 +-
 3 files changed, 51 insertions(+), 22 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/power/actions,owl-sps.txt
 create mode 100644 Documentation/devicetree/bindings/power/actions,owl-sps.yaml

Comments

Krzysztof Kozlowski Nov. 3, 2024, 10:32 a.m. UTC | #1
On Sun, Nov 03, 2024 at 12:17:06AM +0200, Ivaylo Ivanov wrote:
> Convert the Actions Semi Owl Smart Power System (SPS) bindings to DT
> schema.
> 
> Changes during conversion:
>  - Rename file to match compatible

Where?
Old file: actions,owl-sps
New file: actions,owl-sps


>  - Add a description
> 
> Signed-off-by: Ivaylo Ivanov <ivo.ivanov.ivanov1@gmail.com>
> ---
>  .../bindings/power/actions,owl-sps.txt        | 21 --------
>  .../bindings/power/actions,owl-sps.yaml       | 50 +++++++++++++++++++
>  MAINTAINERS                                   |  2 +-
>  3 files changed, 51 insertions(+), 22 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/power/actions,owl-sps.txt
>  create mode 100644 Documentation/devicetree/bindings/power/actions,owl-sps.yaml

...

> +
> +maintainers:
> +  - Andreas Färber <afaerber@suse.de>
> +
> +description: |

Do not need '|' unless you need to preserve formatting.

> +  Actions Semi Owl SoCs feature a Smart Power System (SPS) that manages power
> +  domains to optimize power usage across various hardware blocks. Each power
> +  domain corresponds to a specific hardware block and is represented by a bit
> +  in the power control register and an acknowledgment bit, which is then
> +  translated into a corresponding voltage on a rail.
> +
> +properties:
> +  compatible:
> +    enum:
> +      - actions,s500-sps
> +      - actions,s700-sps
> +      - actions,s900-sps
> +
> +  reg:
> +    maxItems: 1
> +
> +  "#power-domain-cells":
> +    const: 1
> +
> +required:
> +  - compatible
> +  - reg
> +  - "#power-domain-cells"
> +
> +additionalProperties: false

Blank line

With changes above:

Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>

Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/power/actions,owl-sps.txt b/Documentation/devicetree/bindings/power/actions,owl-sps.txt
deleted file mode 100644
index a3571937b..000000000
--- a/Documentation/devicetree/bindings/power/actions,owl-sps.txt
+++ /dev/null
@@ -1,21 +0,0 @@ 
-Actions Semi Owl Smart Power System (SPS)
-
-Required properties:
-- compatible          :  "actions,s500-sps" for S500
-                         "actions,s700-sps" for S700
-                         "actions,s900-sps" for S900
-- reg                 :  Offset and length of the register set for the device.
-- #power-domain-cells :  Must be 1.
-                         See macros in:
-                          include/dt-bindings/power/owl-s500-powergate.h for S500
-                          include/dt-bindings/power/owl-s700-powergate.h for S700
-                          include/dt-bindings/power/owl-s900-powergate.h for S900
-
-
-Example:
-
-		sps: power-controller@b01b0100 {
-			compatible = "actions,s500-sps";
-			reg = <0xb01b0100 0x100>;
-			#power-domain-cells = <1>;
-		};
diff --git a/Documentation/devicetree/bindings/power/actions,owl-sps.yaml b/Documentation/devicetree/bindings/power/actions,owl-sps.yaml
new file mode 100644
index 000000000..6496f3a71
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/actions,owl-sps.yaml
@@ -0,0 +1,50 @@ 
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/power/actions,owl-sps.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Actions Semi Owl Smart Power System (SPS)
+
+maintainers:
+  - Andreas Färber <afaerber@suse.de>
+
+description: |
+  Actions Semi Owl SoCs feature a Smart Power System (SPS) that manages power
+  domains to optimize power usage across various hardware blocks. Each power
+  domain corresponds to a specific hardware block and is represented by a bit
+  in the power control register and an acknowledgment bit, which is then
+  translated into a corresponding voltage on a rail.
+
+properties:
+  compatible:
+    enum:
+      - actions,s500-sps
+      - actions,s700-sps
+      - actions,s900-sps
+
+  reg:
+    maxItems: 1
+
+  "#power-domain-cells":
+    const: 1
+
+required:
+  - compatible
+  - reg
+  - "#power-domain-cells"
+
+additionalProperties: false
+examples:
+  - |
+    #include <dt-bindings/power/owl-s500-powergate.h>
+    soc {
+      #address-cells = <1>;
+      #size-cells = <1>;
+      sps: power-controller@b01b0100 {
+        compatible = "actions,s500-sps";
+        reg = <0xb01b0100 0x100>;
+        #power-domain-cells = <1>;
+      };
+    };
+...
diff --git a/MAINTAINERS b/MAINTAINERS
index 76ea65128..420d06d37 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2023,7 +2023,7 @@  F:	Documentation/devicetree/bindings/interrupt-controller/actions,owl-sirq.yaml
 F:	Documentation/devicetree/bindings/mmc/owl-mmc.yaml
 F:	Documentation/devicetree/bindings/net/actions,owl-emac.yaml
 F:	Documentation/devicetree/bindings/pinctrl/actions,*
-F:	Documentation/devicetree/bindings/power/actions,owl-sps.txt
+F:	Documentation/devicetree/bindings/power/actions,owl-sps.yaml
 F:	Documentation/devicetree/bindings/timer/actions,owl-timer.yaml
 F:	arch/arm/boot/dts/actions/
 F:	arch/arm/mach-actions/