Hi Vladimir,
On Thu, Jul 04, 2024 at 08:16:04PM +0300, Vladimir Oltean wrote:
On Thu, Jul 04, 2024 at 04:08:22PM +0100, Daniel Golle wrote:
The MDIO address of the MT7530 and MT7531 switch ICs can be configured
using bootstrap pins. However, there are only 4 possible options for the
switch itself: 7, 15, 23 and 31. As in MediaTek's SDK the address of the
switch is wrongly stated in the device tree as 0 (while in reality it is
31), warn the user about such broken device tree and make a good guess
what was actually intended.
Zero is the MDIO broadcast address. Doesn't the switch respond to it, or
what's exactly the problem?
No, MT7530 main device (ie. the switch itself, not the built-in PHYs
which on MT7530 can also be exposed on the same bus) only responds to
address 31 (default), 7, 15 or 23 (the latter 3 via non-default
bootstrap configuration).
MT7531 always uses address 31 by default and also doesn't respond on
address 0.
See also https://lkml.org/lkml/2024/5/31/236
as with commit 868ff5f4944a ("net: dsa: mt7530-mdio: read PHY address of
switch from device tree") the address in device tree will be taken into
account, while before it was hard-coded to 0x1f.
Fixes: b8f126a8d543 ("net-next: dsa: add dsa support for Mediatek MT7530 switch")
I fail to understand the logic behind blaming this commit. There was no
observable issue prior to 868ff5f4944a ("net: dsa: mt7530-mdio: read PHY
address of switch from device tree"), was there?
Please see the lengthy debate here:
https://lore.kernel.org/linux-arm-kernel/af561268-9793-4b5d-aa0f-d09698fd6fb0@xxxxxxxxxx/T/#mc967f795a062f6aaedea7375a3be104266e88cc4
I should have provided a reference to that in the commit message or
cover letter.