Re: [PATCH v9 13/15] dt-bindings: power: rockchip: Convert to json-schema

2021-04-20 Thread Rob Herring
On Sat, 17 Apr 2021 13:29:50 +0200, Johan Jonker wrote:
> From: Enric Balletbo i Serra 
> 
> Convert the soc/rockchip/power_domain.txt binding document to
> json-schema and move to the power bindings directory.
> 
> Signed-off-by: Enric Balletbo i Serra 
> Signed-off-by: Elaine Zhang 
> Signed-off-by: Johan Jonker 
> ---
> Note for rob+dt:
> A tag was not added on purpose, because:
>   Add "rockchip," prefix to the qos compatible name
>   in example.
>   Changed maintainers.
>   Size reg description is reduced.
>   Little style changes '' to ""
>   Restyle patternProperties
> Please have a look at it again.
> 
> For some SoC nodes this patch serie generates notifications
> for undocumented "assigned-clocks" and "assigned-clock-parents"
> properties till there is consensus of what to do with it.
> ---
> Changed V9:
>   Rename definitions to $defs
>   Restyle patternProperties
> Changed V8:
>   Add pd-node ref schema
> Changed V7:
>   Fix commit message and author format
>   Changed SPDX-License-Identifier back to GPL-2.0
>   Remove "clocks", "assigned-clocks" and "assigned-clock-parents"
>   Fix indent example
> Changed V6:
>   Changed author
> Changed V5:
>   Change SPDX-License-Identifier to  GPL-2.0-only OR BSD-2-Clause
>   Remove a maintainer
>   Changed patternProperties to power-domain
>   Add "clocks", "assigned-clocks" and "assigned-clock-parents"
> Changed V4:
>   Remove new compatible string
>   Style changes '' to ""
> Changed V3:
>   Use Enric's conversion with rk3399 example
> Changed V2:
>   Convert power_domain.txt to YAML with rk3568 example
> ---
>  .../bindings/power/rockchip,power-controller.yaml  | 246 
> +
>  .../bindings/soc/rockchip/power_domain.txt | 136 
>  2 files changed, 246 insertions(+), 136 deletions(-)
>  create mode 100644 
> Documentation/devicetree/bindings/power/rockchip,power-controller.yaml
>  delete mode 100644 
> Documentation/devicetree/bindings/soc/rockchip/power_domain.txt
> 

Reviewed-by: Rob Herring 


[PATCH v9 13/15] dt-bindings: power: rockchip: Convert to json-schema

2021-04-17 Thread Johan Jonker
From: Enric Balletbo i Serra 

Convert the soc/rockchip/power_domain.txt binding document to
json-schema and move to the power bindings directory.

Signed-off-by: Enric Balletbo i Serra 
Signed-off-by: Elaine Zhang 
Signed-off-by: Johan Jonker 
---
Note for rob+dt:
A tag was not added on purpose, because:
  Add "rockchip," prefix to the qos compatible name
  in example.
  Changed maintainers.
  Size reg description is reduced.
  Little style changes '' to ""
  Restyle patternProperties
Please have a look at it again.

For some SoC nodes this patch serie generates notifications
for undocumented "assigned-clocks" and "assigned-clock-parents"
properties till there is consensus of what to do with it.
---
Changed V9:
  Rename definitions to $defs
  Restyle patternProperties
Changed V8:
  Add pd-node ref schema
Changed V7:
  Fix commit message and author format
  Changed SPDX-License-Identifier back to GPL-2.0
  Remove "clocks", "assigned-clocks" and "assigned-clock-parents"
  Fix indent example
Changed V6:
  Changed author
Changed V5:
  Change SPDX-License-Identifier to  GPL-2.0-only OR BSD-2-Clause
  Remove a maintainer
  Changed patternProperties to power-domain
  Add "clocks", "assigned-clocks" and "assigned-clock-parents"
Changed V4:
  Remove new compatible string
  Style changes '' to ""
Changed V3:
  Use Enric's conversion with rk3399 example
Changed V2:
  Convert power_domain.txt to YAML with rk3568 example
---
 .../bindings/power/rockchip,power-controller.yaml  | 246 +
 .../bindings/soc/rockchip/power_domain.txt | 136 
 2 files changed, 246 insertions(+), 136 deletions(-)
 create mode 100644 
Documentation/devicetree/bindings/power/rockchip,power-controller.yaml
 delete mode 100644 
Documentation/devicetree/bindings/soc/rockchip/power_domain.txt

diff --git 
a/Documentation/devicetree/bindings/power/rockchip,power-controller.yaml 
b/Documentation/devicetree/bindings/power/rockchip,power-controller.yaml
new file mode 100644
index 0..f71569de9
--- /dev/null
+++ b/Documentation/devicetree/bindings/power/rockchip,power-controller.yaml
@@ -0,0 +1,246 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/power/rockchip,power-controller.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Rockchip Power Domains
+
+maintainers:
+  - Elaine Zhang 
+  - Heiko Stuebner 
+
+description: |
+  Rockchip processors include support for multiple power domains
+  which can be powered up/down by software based on different
+  application scenarios to save power.
+
+  Power domains contained within power-controller node are
+  generic power domain providers documented in
+  Documentation/devicetree/bindings/power/power-domain.yaml.
+
+  IP cores belonging to a power domain should contain a
+  "power-domains" property that is a phandle for the
+  power domain node representing the domain.
+
+properties:
+  $nodename:
+const: power-controller
+
+  compatible:
+enum:
+  - rockchip,px30-power-controller
+  - rockchip,rk3036-power-controller
+  - rockchip,rk3066-power-controller
+  - rockchip,rk3128-power-controller
+  - rockchip,rk3188-power-controller
+  - rockchip,rk3228-power-controller
+  - rockchip,rk3288-power-controller
+  - rockchip,rk3328-power-controller
+  - rockchip,rk3366-power-controller
+  - rockchip,rk3368-power-controller
+  - rockchip,rk3399-power-controller
+
+  "#power-domain-cells":
+const: 1
+
+  "#address-cells":
+const: 1
+
+  "#size-cells":
+const: 0
+
+required:
+  - compatible
+  - "#power-domain-cells"
+
+additionalProperties: false
+
+patternProperties:
+  "^power-domain@[0-9a-f]+$":
+
+$ref: "#/$defs/pd-node"
+
+unevaluatedProperties: false
+
+properties:
+  "#address-cells":
+const: 1
+
+  "#size-cells":
+const: 0
+
+patternProperties:
+  "^power-domain@[0-9a-f]+$":
+
+$ref: "#/$defs/pd-node"
+
+unevaluatedProperties: false
+
+properties:
+  "#address-cells":
+const: 1
+
+  "#size-cells":
+const: 0
+
+patternProperties:
+  "^power-domain@[0-9a-f]+$":
+
+$ref: "#/$defs/pd-node"
+
+unevaluatedProperties: false
+
+properties:
+  "#power-domain-cells":
+const: 0
+
+$defs:
+  pd-node:
+type: object
+description: |
+  Represents the power domains within the power controller node.
+
+properties:
+  reg:
+maxItems: 1
+description: |
+  Power domain index. Valid values are defined in
+  "include/dt-bindings/power/px30-power.h"
+  "include/dt-bindings/power/rk3036-power.h"
+  "include/dt-bindings/power/rk3066-power.h"
+  "include/dt-bindings/power/rk3128-power.h"
+  "include/dt-bindings/power/rk3188-power.h"
+  "include/dt-bindings/power/rk3228-power.h"
+