The binding has neither a compatible nor a select, so dtschema never
applies it to a node: neither the example nor any devicetree is checked
against it.
Add the compatible of the PHY ID, optionally followed by the generic
ethernet-phy-ieee802.3-c22, which several devicetrees use. Select on the
PHY ID only, as the fallback alone would select every clause 22 PHY.
Nodes without a compatible stay valid, but are not checked.
The binding also references ethernet-controller.yaml, which describes
MACs; its node name pattern does not match a PHY node. Reference
ethernet-phy.yaml instead, which also describes reset-gpios and the
other generic PHY properties existing devicetrees use.
Signed-off-by: Steffen Trumtrar <redacted>
---
Documentation/devicetree/bindings/net/ti,dp83867.yaml | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/net/ti,dp83867.yaml b/Documentation/devicetree/bindings/net/ti,dp83867.yaml
index 4bc1f98fd9fe..2cd8311ece5e 100644
--- a/Documentation/devicetree/bindings/net/ti,dp83867.yaml
+++ b/Documentation/devicetree/bindings/net/ti,dp83867.yaml
@@ -8,7 +8,16 @@ $schema: http://devicetree.org/meta-schemas/core.yaml#
title: TI DP83867 ethernet PHY
allOf:
- - $ref: ethernet-controller.yaml#
+ - $ref: ethernet-phy.yaml#
+
+# only the PHY ID, not every PHY with the c22 fallback
+select:
+ properties:
+ compatible:
+ contains:
+ const: ethernet-phy-id2000.a231
+ required:
+ - compatible
maintainers:
- Andrew Davis <afd@ti.com>
@@ -28,6 +37,12 @@ description: |
https://www.ti.com/lit/gpn/dp83867ir
properties:
+ compatible:
+ minItems: 1
+ items:
+ - const: ethernet-phy-id2000.a231
+ - const: ethernet-phy-ieee802.3-c22
+
reg:
maxItems: 1
@@ -130,6 +145,7 @@ examples:
#address-cells = <1>;
#size-cells = <0>;
ethphy0: ethernet-phy@0 {
+ compatible = "ethernet-phy-id2000.a231";
reg = <0>;
tx-fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
rx-fifo-depth = <DP83867_PHYCR_FIFO_DEPTH_4_B_NIB>;
--
2.56.0