Re: [PATCH net-next v6 6/7] net: tn40xx: prepare tn40xx driver to find phy of the TN9510 card
From: Andrew Lunn
Date: Thu Mar 20 2025 - 17:29:05 EST
On Tue, Mar 18, 2025 at 11:06:57PM +0100, Hans-Frieder Vogt via B4 Relay wrote:
> From: Hans-Frieder Vogt <hfdevel@xxxxxxx>
>
> Prepare the tn40xx driver to load for Tehuti TN9510 cards, which require
> bit 3 in the register TN40_REG_MDIO_CMD_STAT to be set. The function of bit
> 3 is unclear, but may have something to do with the length of the preamble
> in the MDIO communication. If bit 3 is not set, the PHY will not be found
> when performing a scan for PHYs. Use the available tn40_mdio_set_speed
> function which includes setting bit 3. Just move the function to before the
> devm_mdio_register function, which scans the mdio bus for PHYs.
It might also have something to do with the bus speed. 802.3 says the
MDIO bus should be clocked only up to 2.5Mhz. Some MDIO devices do
work faster than that. So it could be the hardware defaults to
something very fast. By setting it to 6MHZ, you might be slowing it
down to speed which the aquantia PHY and board layout supports.
All just speculation, and does not stop getting the patch merged.
Andrew