diff mbox series

[06/10] dt-bindings: arm: freescale: Add fsl,scu-pd yaml file

Message ID 20220607105951.1821519-7-abel.vesa@nxp.com
State Changes Requested, archived
Headers show
Series dt-bindings: arm: freescale: Switch fsl,scu from txt to yaml | expand

Checks

Context Check Description
robh/checkpatch success
robh/patch-applied success
robh/dt-meta-schema fail build log

Commit Message

Abel Vesa June 7, 2022, 10:59 a.m. UTC
This documents separately the PD child node of the SCU main node.

Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
---
 .../bindings/arm/freescale/fsl,scu-pd.yaml    | 32 +++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/freescale/fsl,scu-pd.yaml

Comments

Krzysztof Kozlowski June 7, 2022, 5:29 p.m. UTC | #1
On 07/06/2022 12:59, Abel Vesa wrote:
> This documents separately the PD child node of the SCU main node.
> 
> Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
> ---
>  .../bindings/arm/freescale/fsl,scu-pd.yaml    | 32 +++++++++++++++++++
>  1 file changed, 32 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/arm/freescale/fsl,scu-pd.yaml
> 
> diff --git a/Documentation/devicetree/bindings/arm/freescale/fsl,scu-pd.yaml b/Documentation/devicetree/bindings/arm/freescale/fsl,scu-pd.yaml
> new file mode 100644
> index 000000000000..154a63495436
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/arm/freescale/fsl,scu-pd.yaml
> @@ -0,0 +1,32 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/arm/freescale/fsl,scu-pd.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: i.MX SCU Client Device Node - Power domain bindings based on SCU Message Protocol
> +
> +maintainers:
> +  - Shawn Guo <shawnguo@kernel.org>
> +
> +description: i.MX SCU Client Device Node
> +  Client nodes are maintained as children of the relevant IMX-SCU device node.
> +  Power domain bindings based on SCU Message Protocol
> +  This binding for the SCU power domain providers uses the generic power
> +  domain binding (Documentation/devicetree/bindings/power/power-domain.yaml)

Using of other bindings is reflected by '$ref'. Mentioning it in
description means nothing and it is not helpful. Reference the proper
schema instead.

> +
> +properties:
> +  compatible:
> +    items:
> +      - enum:
> +          - fsl,imx8qm-scu-pd
> +          - fsl,imx8qxp-scu-pd
> +      - const: fsl,scu-pd
> +  '#power-domain-cells':
> +    const: 1
> +
> +additionalProperties: false

Use the same order as in example-schema.yaml, so for regular case:
properties+required+additionalProperties

when referencing other schema, without any if-then-else:
allOf:properties+required+additionalProperties

When having if-then-else:
properties+required+allOf+additionalProperties

> +
> +required:
> +  - compatible
> +  - '#power-domain-cells'


Best regards,
Krzysztof
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/arm/freescale/fsl,scu-pd.yaml b/Documentation/devicetree/bindings/arm/freescale/fsl,scu-pd.yaml
new file mode 100644
index 000000000000..154a63495436
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/freescale/fsl,scu-pd.yaml
@@ -0,0 +1,32 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/freescale/fsl,scu-pd.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: i.MX SCU Client Device Node - Power domain bindings based on SCU Message Protocol
+
+maintainers:
+  - Shawn Guo <shawnguo@kernel.org>
+
+description: i.MX SCU Client Device Node
+  Client nodes are maintained as children of the relevant IMX-SCU device node.
+  Power domain bindings based on SCU Message Protocol
+  This binding for the SCU power domain providers uses the generic power
+  domain binding (Documentation/devicetree/bindings/power/power-domain.yaml)
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - fsl,imx8qm-scu-pd
+          - fsl,imx8qxp-scu-pd
+      - const: fsl,scu-pd
+  '#power-domain-cells':
+    const: 1
+
+additionalProperties: false
+
+required:
+  - compatible
+  - '#power-domain-cells'