Thread (72 messages) flat view 72 messages, 7 authors, 2021-05-16
STALE1931d

[RFC PATCH net-next v4 24/28] devicetree: net: dsa: Document use of mdio node inside switch node

From: Ansuel Smith <ansuelsmth@gmail.com>
Date: 2021-05-08 00:31:25
Also in: linux-devicetree, lkml
Subsystem: networking drivers, networking [dsa], open firmware and flattened device tree bindings, the rest · Maintainers: Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Andrew Lunn, Vladimir Oltean, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Linus Torvalds

Switch node can contain mdio node to describe internal mdio and PHYs
connected to the switch ports.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
---
 .../devicetree/bindings/net/dsa/dsa.yaml      | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
diff --git a/Documentation/devicetree/bindings/net/dsa/dsa.yaml b/Documentation/devicetree/bindings/net/dsa/dsa.yaml
index 8a3494db4d8d..fbefaca884cc 100644
--- a/Documentation/devicetree/bindings/net/dsa/dsa.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/dsa.yaml
@@ -15,6 +15,9 @@ description:
   This binding represents Ethernet Switches which have a dedicated CPU
   port. That port is usually connected to an Ethernet Controller of the
   SoC. Such setups are typical for embedded devices.
+  Switch can also have PHY port connected to an internal mdio bus by
+  declaring a mdio node inside the switch node and declaring the
+  phy-handle for each required port.
 
 select: false
 
@@ -87,6 +90,31 @@ patternProperties:
 
         additionalProperties: false
 
+patternProperties:
+  mdio:
+    description:
+      Describes the internal mdio of the Ethernet switch
+    type: object
+    properties:
+      '#address-cells':
+        const: 1
+      '#size-cells':
+        const: 0
+
+    patternProperties:
+      phy:
+        type: object
+        description: Ethernet switch internal PHY
+
+        properties:
+          reg:
+            description: PHY address
+
+        required:
+            - reg
+
+        additionalProperties: false
+
 oneOf:
   - required:
       - ports
-- 
2.30.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help