[PATCH] dt-bindings: arm: mediatek: convert ethsys controller to the json-schema
Rob Herring
robh at kernel.org
Sun Nov 19 07:52:43 PST 2023
On Fri, Nov 17, 2023 at 08:49:26AM +0100, Rafał Miłecki wrote:
> From: Rafał Miłecki <rafal at milecki.pl>
>
> This helps validating DTS files. The only introduced change was fixing
> "reg" value in example (1 address cell + 1 size cell).
>
> Signed-off-by: Rafał Miłecki <rafal at milecki.pl>
> ---
> For the record I was trying to simplify "compatible" syntax with
> following but "oneOf" apparently can't be used as a single item.
>
> items:
> - oneOf:
> - const: mediatek,mt2701-ethsys
> - const: mediatek,mt7622-ethsys
> - items:
> - const: mediatek,mt7623-ethsys
> - const: mediatek,mt2701-ethsys
> - const: mediatek,mt7629-ethsys
> - const: mediatek,mt7981-ethsys
> - const: mediatek,mt7986-ethsys
> - const: syscon
The problem is you have nested 'items' which forms a matrix.
You generally need a 'oneOf' for each possible length of an array unless
the value of each index is always the same (i.e. only the size of the
list varies).
>
> .../bindings/arm/mediatek/mediatek,ethsys.txt | 29 ----------
> .../arm/mediatek/mediatek,ethsys.yaml | 54 +++++++++++++++++++
> 2 files changed, 54 insertions(+), 29 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,ethsys.txt
> create mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,ethsys.yaml
Can you move this to bindings/clock/
With that,
Reviewed-by: Rob Herring <robh at kernel.org>
More information about the Linux-mediatek
mailing list