dt-bindings: net: ethernet-switch: Make "#address-cells/#size-cells" required

The schema doesn't allow for a single (unaddressed) ethernet port node
nor does a single port switch make much sense. So if there's always
multiple child nodes, "#address-cells" and "#size-cells" should be
required.

Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Link: https://lore.kernel.org/r/20230404204213.635773-1-robh@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
Rob Herring 2023-04-04 15:42:13 -05:00 committed by Jakub Kicinski
parent acd11255ca
commit c8f1f2e946
2 changed files with 7 additions and 1 deletions

View File

@ -40,6 +40,10 @@ patternProperties:
type: object
description: Ethernet switch ports
required:
- "#address-cells"
- "#size-cells"
oneOf:
- required:
- ports

View File

@ -53,7 +53,9 @@ examples:
reg = <0x10>;
ports {
/* ... */
#address-cells = <1>;
#size-cells = <0>;
/* ... */
};
};
};