Re: [PATCH net v1] net: phy: motorcomm: yt8821: disable MDIO broadcast address 0

From: Jakub Vaněk

Date: Sat Feb 21 2026 - 23:29:57 EST


On 2/22/26 04:35, Andrew Lunn wrote:
> On Sun, Feb 22, 2026 at 03:32:45AM +0100, Jakub Vaněk wrote:
>> Hello Daniel, Qingfang, SkyLake,
>>
>> do you happen to know if the MediaTek Gigabit PHY in the MT7981B
>> can be remapped to a MDIO address other than address 0?
>>
>> I wasn't able to find public documentation describing the registers
>> of internal PHY or whether its MDIO address is configurable.
>>
>> Being able to move the internal PHY off address 0 in U-Boot could be
>> a better way of resolving a MDIO address conflict between the internal
>> PHY and the broadcast address used by an external Motorcomm YT8821 PHY.
>>
>> Any pointers would be appreciated.
>
> Even if you can avoid the conflict, you still need to handle the fact
> the YT8821 appears on two addresses. phylib has no idea it is the same
> device in two places, so it can instantiate two struct phy_device for
> it. This can cause problems, i think suspend/resume will break, etc.

I had hoped this would not happen on the Cudy router. The MediaTek
Ethernet subsystem driver uses of_mdiobus_register(), so PHY address 0
should not be probed unless it is explicitly described in the device
tree. That said, I agree that with mdiobus_register() this would still
be an issue.

I was also hoping that moving the internal PHY would provide more
flexibility in the device tree description of the YT8821. If the
workaround were implemented in U-Boot by writing YT8821 MDIO registers
at boot time, Linux would not be able to assert the YT8821 reset pin
without losing that workaround.

Jakub

> There is nothing in IEEE 802.3 clause 22 or 45 that allows for this
> behaviour. So rather than living with all the issues it causes, you
> really do want to get the PHY into standards conformance.
>
> Andrew