With fixed-link there is no phy-handle, make phy-handle required only when no fixed-link is declared. A fixed link gets no MDIO bus by default. In such case, MDIO devices must be placed under the mdio node, and PHY nodes directly under the ethernet node are rejected. Signed-off-by: David Yang --- .../bindings/net/hisilicon,hisi-gmac-v1.yaml | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/net/hisilicon,hisi-gmac-v1.yaml b/Documentation/devicetree/bindings/net/hisilicon,hisi-gmac-v1.yaml index a71529825955..2f1c0e0afb88 100644 --- a/Documentation/devicetree/bindings/net/hisilicon,hisi-gmac-v1.yaml +++ b/Documentation/devicetree/bindings/net/hisilicon,hisi-gmac-v1.yaml @@ -13,6 +13,22 @@ maintainers: allOf: - $ref: /schemas/net/ethernet-controller.yaml# - $ref: /schemas/net/mdio.yaml# + - if: + not: + required: + - fixed-link + then: + required: + - phy-handle + - if: + required: + - fixed-link + then: + not: + required: + - phy-handle + patternProperties: + '@[0-9a-f]+$': false properties: compatible: @@ -58,7 +74,8 @@ properties: unevaluatedProperties: false description: Node containing PHY children. If this node is not present, then PHYs will - be direct children. + be direct children. With fixed-link, MDIO devices must be placed under the + mdio node. hisilicon,phy-reset-delays-us: description: Triplet of PHY reset delays in microseconds. @@ -74,7 +91,6 @@ required: - clocks - clock-names - phy-mode - - phy-handle unevaluatedProperties: false -- 2.53.0