The AN7589 carries the AN7583 SCU MDIO controller three times, the third one at offset 0xd8. Document it as a fallback pair on the AN7583 compatible. Allow the new offset for the AN7589 only. Signed-off-by: John Crispin --- .../bindings/net/airoha,an7583-mdio.yaml | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/net/airoha,an7583-mdio.yaml b/Documentation/devicetree/bindings/net/airoha,an7583-mdio.yaml index 3e7e68ec1560..41dc295ce6cf 100644 --- a/Documentation/devicetree/bindings/net/airoha,an7583-mdio.yaml +++ b/Documentation/devicetree/bindings/net/airoha,an7583-mdio.yaml @@ -17,14 +17,20 @@ description: The other 2 (that this schema describe) live under the SCU register supporting both C22 and C45 PHYs. + The Airoha AN7589 has a third controller of this kind under the SCU. + $ref: mdio.yaml# properties: compatible: - const: airoha,an7583-mdio + oneOf: + - const: airoha,an7583-mdio + - items: + - const: airoha,an7589-mdio + - const: airoha,an7583-mdio reg: - enum: [0xc8, 0xcc] + maxItems: 1 clocks: maxItems: 1 @@ -41,6 +47,21 @@ required: - clocks - resets +allOf: + - if: + properties: + compatible: + contains: + const: airoha,an7589-mdio + then: + properties: + reg: + enum: [0xc8, 0xcc, 0xd8] + else: + properties: + reg: + enum: [0xc8, 0xcc] + unevaluatedProperties: false examples: base-commit: ddfe51b0a0f5dc9e415cc2c8ad8db17532dd426b -- 2.34.1