Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: net: dsa: mediatek,mt7530: improve binding description

Fix inaccurate information about PHY muxing, and merge standalone and
multi-chip module MT7530 configuration methods.

Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20230212131258.47551-1-arinc.unal@arinc9.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>

authored by

Arınç ÜNAL and committed by
Paolo Abeni
a71fad0f 64816aa7

+21 -31
+21 -31
Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml
··· 24 24 25 25 There is only the standalone version of MT7531. 26 26 27 - Port 5 on MT7530 has got various ways of configuration. 28 - 29 - For standalone MT7530: 27 + Port 5 on MT7530 has got various ways of configuration: 30 28 31 29 - Port 5 can be used as a CPU port. 32 30 33 - - PHY 0 or 4 of the switch can be muxed to connect to the gmac of the SoC 34 - which port 5 is wired to. Usually used for connecting the wan port 35 - directly to the CPU to achieve 2 Gbps routing in total. 31 + - PHY 0 or 4 of the switch can be muxed to gmac5 of the switch. Therefore, 32 + the gmac of the SoC which is wired to port 5 can connect to the PHY. 33 + This is usually used for connecting the wan port directly to the CPU to 34 + achieve 2 Gbps routing in total. 36 35 37 - The driver looks up the reg on the ethernet-phy node which the phy-handle 38 - property refers to on the gmac node to mux the specified phy. 36 + The driver looks up the reg on the ethernet-phy node, which the phy-handle 37 + property on the gmac node refers to, to mux the specified phy. 39 38 40 39 The driver requires the gmac of the SoC to have "mediatek,eth-mac" as the 41 - compatible string and the reg must be 1. So, for now, only gmac1 of an 40 + compatible string and the reg must be 1. So, for now, only gmac1 of a 42 41 MediaTek SoC can benefit this. Banana Pi BPI-R2 suits this. 43 - Check out example 5 for a similar configuration. 44 - 45 - - Port 5 can be wired to an external phy. Port 5 becomes a DSA slave. 46 - Check out example 7 for a similar configuration. 47 - 48 - For multi-chip module MT7530: 49 - 50 - - Port 5 can be used as a CPU port. 51 - 52 - - PHY 0 or 4 of the switch can be muxed to connect to gmac1 of the SoC. 53 - Usually used for connecting the wan port directly to the CPU to achieve 2 54 - Gbps routing in total. 55 - 56 - The driver looks up the reg on the ethernet-phy node which the phy-handle 57 - property refers to on the gmac node to mux the specified phy. 58 42 59 43 For the MT7621 SoCs, rgmii2 group must be claimed with rgmii2 function. 44 + 60 45 Check out example 5. 61 46 62 - - In case of an external phy wired to gmac1 of the SoC, port 5 must not be 63 - enabled. 47 + - For the multi-chip module MT7530, in case of an external phy wired to 48 + gmac1 of the SoC, port 5 must not be enabled. 64 49 65 50 In case of muxing PHY 0 or 4, the external phy must not be enabled. 66 51 67 52 For the MT7621 SoCs, rgmii2 group must be claimed with rgmii2 function. 53 + 68 54 Check out example 6. 69 55 70 - - Port 5 can be muxed to an external phy. Port 5 becomes a DSA slave. 71 - The external phy must be wired TX to TX to gmac1 of the SoC for this to 72 - work. Ubiquiti EdgeRouter X SFP is wired this way. 56 + - Port 5 can be wired to an external phy. Port 5 becomes a DSA slave. 73 57 74 - Muxing PHY 0 or 4 won't work when the external phy is connected TX to TX. 58 + For the multi-chip module MT7530, the external phy must be wired TX to TX 59 + to gmac1 of the SoC for this to work. Ubiquiti EdgeRouter X SFP is wired 60 + this way. 61 + 62 + For the multi-chip module MT7530, muxing PHY 0 or 4 won't work when the 63 + external phy is connected TX to TX. 75 64 76 65 For the MT7621 SoCs, rgmii2 group must be claimed with gpio function. 66 + 77 67 Check out example 7. 78 68 79 69 properties: ··· 591 601 label = "lan4"; 592 602 }; 593 603 594 - /* Commented out, phy4 is muxed to gmac1. 604 + /* Commented out, phy4 is connected to gmac1. 595 605 port@4 { 596 606 reg = <4>; 597 607 label = "wan";