Re: [PATCH 3/7] dt-bindings: net: mdio: Add child nodes

From
Rob Herring <robh+dt@kernel.org>
Date
2019-07-03 13:53:43
Reply to
Maxime Ripard, 2019-07-03
On Wed, Jul 3, 2019 at 3:55 AM Maxime Ripard [off-list ref] wrote:
The child nodes of a mdio bus are supposed to be ethernet PHYs, with a reg
property. Make sure that's validated as well.
I don't think this is always true. I seem to recall there's some
timestamping devices connected via mdio.

In any case, it's not a long list of names, so we can probably just
enumerate them as needed. Does this generate any warnings?
quoted hunk ↗ jump to hunk
Signed-off-by: Maxime Ripard <redacted>
---
 Documentation/devicetree/bindings/net/mdio.yaml | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
diff --git a/Documentation/devicetree/bindings/net/mdio.yaml b/Documentation/devicetree/bindings/net/mdio.yaml
index 24d67074d494..5d08d2ffd4eb 100644
--- a/Documentation/devicetree/bindings/net/mdio.yaml
+++ b/Documentation/devicetree/bindings/net/mdio.yaml
@@ -39,6 +39,20 @@ properties:
       and must therefore be appropriately determined based on all PHY
       requirements (maximum value of all per-PHY RESET pulse widths).

+patternProperties:
+  "^ethernet-phy@[0-9a-f]+$":
+    type: object
+
+    properties:
+      reg:
+        minimum: 0
+        maximum: 31
+        description:
+          The ID number for the PHY.
+
+    required:
+      - reg
+
 examples:
   - |
     davinci_mdio: mdio@5c030000 {
--
2.21.0
Thread (13 messages) 13 messages, 2 authors, last reply 2019-07-03
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help