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

From: Krzysztof Kozlowski
Date: Tue Jun 07 2022 - 13:46:55 EST


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@xxxxxxx>
> ---
> .../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@xxxxxxxxxx>
> +
> +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