Re: [RFC PATCH v1 1/3] dt-bindings: power: convert rockchip-io-domain.txt to YAML

Rob Herring
2021-06-24T19:21:28Z

On Fri, Jun 11, 2021 at 04:38:19PM +0200, Johan Jonker wrote:
> Current dts files with 'io-domains' nodes are manually verified.
> In order to automate this process rockchip-io-domain.txt has to be
> converted to YAML.
>
> Changed:
> Add supply properties for:
> rockchip,rk3328-io-voltage-domain
> rockchip,rv1108-io-voltage-domain
> rockchip,rv1108-pmu-io-voltage-domain
>
> Signed-off-by: Johan Jonker <jbx6244@gmail.com>
> ---
>
> Due to the lack of a rv1108 TRM changes
> to grf.yaml or rv1108.dtsi not verified.
>
> ---
>
> Note for rob+dt:
>
> The driver is located in:
> drivers/soc/rockchip/io-domain.c
>
> The document is located in:
> Documentation/devicetree/bindings/power/rockchip-io-domain.yaml
>
> Is that still OK or should we move to:
> /Documentation/devicetree/bindings/soc/rockchip/rockchip-io-domain.yaml

I think the current location is fine. Vendor directories cause other
vendors to not look in them.

>
> ===
>
> This document is not able to correctly check for bogus properties.
> Adding more [additionalProperties: false] to [then:] gives warnings like this:
> ('status', 'compatible', '$nodename' were unexpected)
> Is there a way to do that in one document?

Drop the *-supply and use 'unevaluatedProperties: false' at the top
level. 'unevaluatedProperties' can see into if/then schema. That doesn't
do anything yet as unevaluatedProperties support isn't implemented yet
(but there's finally some work taking place, so soon).

Otherwise, pretty much looks fine to me. Some of the grf.yaml changes
should perhaps be a separate commit.

> ---
> .../bindings/power/rockchip-io-domain.txt | 135 ---------
> .../bindings/power/rockchip-io-domain.yaml | 307 +++++++++++++++++++++
> .../devicetree/bindings/soc/rockchip/grf.yaml | 18 +-
> 3 files changed, 319 insertions(+), 141 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/power/rockchip-io-domain.txt
> create mode 100644 Documentation/devicetree/bindings/power/rockchip-io-domain.yaml