1 From 0c994a28e7518f098c84a3049cb2915780db873a Mon Sep 17 00:00:00 2001
2 From: Ansuel Smith <ansuelsmth@gmail.com>
3 Date: Fri, 14 May 2021 23:00:11 +0200
4 Subject: [PATCH] devicetree: bindings: dsa: qca8k: Document internal mdio
7 Document new way of declare mapping of internal PHY to port.
8 The new implementation directly declare the PHY connected to the port
9 by adding a node in the switch node. The driver detect this and register
10 an internal mdiobus using the mapping defined in the mdio node.
12 Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
13 Reviewed-by: Rob Herring <robh@kernel.org>
14 Signed-off-by: David S. Miller <davem@davemloft.net>
16 .../devicetree/bindings/net/dsa/qca8k.txt | 39 +++++++++++++++++++
17 1 file changed, 39 insertions(+)
19 --- a/Documentation/devicetree/bindings/net/dsa/qca8k.txt
20 +++ b/Documentation/devicetree/bindings/net/dsa/qca8k.txt
21 @@ -21,6 +21,10 @@ described in dsa/dsa.txt. If the QCA8K s
22 mdio-bus each subnode describing a port needs to have a valid phandle
23 referencing the internal PHY it is connected to. This is because there's no
24 N:N mapping of port and PHY id.
25 +To declare the internal mdio-bus configuration, declare a mdio node in the
26 +switch node and declare the phandle for the port referencing the internal
27 +PHY is connected to. In this config a internal mdio-bus is registered and
28 +the mdio MASTER is used as communication.
30 Don't use mixed external and internal mdio-bus configurations, as this is
31 not supported by the hardware.
32 @@ -150,26 +154,61 @@ for the internal master mdio-bus configu
36 + phy-mode = "internal";
37 + phy-handle = <&phy_port1>;
43 + phy-mode = "internal";
44 + phy-handle = <&phy_port2>;
50 + phy-mode = "internal";
51 + phy-handle = <&phy_port3>;
57 + phy-mode = "internal";
58 + phy-handle = <&phy_port4>;
64 + phy-mode = "internal";
65 + phy-handle = <&phy_port5>;
70 + #address-cells = <1>;