Re: [PATCH 2/2] dt-bindings: net: dsa: mediatek,mt7530: document MDIO-bus

From: Arınç ÜNAL
Date: Sun Apr 30 2023 - 12:18:21 EST


On 30.04.2023 15:34, Arınç ÜNAL wrote:
On 30.04.2023 14:28, David Bauer wrote:
Document the ability to add nodes for the MDIO bus connecting the
switch-internal PHYs.

This is quite interesting. Currently the PHY muxing feature for the MT7530 switch looks for some fake ethernet-phy definitions on the mdio-bus where the switch is also defined.

Looking at the binding here, there will be an mdio node under the switch node. This could be useful to define the ethernet-phys for PHY muxing here instead, so we don't waste the register addresses on the parent mdio-bus for fake things. It looks like this should work right out of the box. I will do some tests.

Once I start using the mdio node it forces me to define all the PHYs which were defined as ports.

[ 4.159534] mt7530-mdio mdio-bus:1f lan0 (uninitialized): no phy at 1
[ 4.166002] mt7530-mdio mdio-bus:1f lan0 (uninitialized): failed to connect to PHY: -ENODEV
[ 4.174421] mt7530-mdio mdio-bus:1f lan0 (uninitialized): error -19 setting up PHY for tree 0, switch 0, port 1
[ 4.185236] mt7530-mdio mdio-bus:1f lan1 (uninitialized): no phy at 2
[ 4.191753] mt7530-mdio mdio-bus:1f lan1 (uninitialized): failed to connect to PHY: -ENODEV
[ 4.200150] mt7530-mdio mdio-bus:1f lan1 (uninitialized): error -19 setting up PHY for tree 0, switch 0, port 2
[ 4.210844] mt7530-mdio mdio-bus:1f lan2 (uninitialized): no phy at 3
[ 4.217361] mt7530-mdio mdio-bus:1f lan2 (uninitialized): failed to connect to PHY: -ENODEV
[ 4.225734] mt7530-mdio mdio-bus:1f lan2 (uninitialized): error -19 setting up PHY for tree 0, switch 0, port 3
[ 4.236394] mt7530-mdio mdio-bus:1f lan3 (uninitialized): no phy at 4
[ 4.242901] mt7530-mdio mdio-bus:1f lan3 (uninitialized): failed to connect to PHY: -ENODEV
[ 4.251297] mt7530-mdio mdio-bus:1f lan3 (uninitialized): error -19 setting up PHY for tree 0, switch 0, port 4

We can either force defining the PHYs on the mdio node which would break the ABI, or forget about doing PHY muxing this way.

Arınç