[PATCH net-next] net: phy: mediatek: support MT7530 PHYs on EN71221 MCM
Daniel Golle
daniel at makrotopia.org
Wed Sep 9 16:02:22 PDT 2026
On Wed, Sep 09, 2026 at 09:32:50PM +0000, Caleb James DeLisle wrote:
> The EcoNet EN751221 multi-chip module implementation of the MT7530
> requires some additional configuration of the PHYs on startup.
> The reason for this is not known, but it is possible that it has
> to do with the fact that the EN751221 MCM implementation of the
> MT7530 runs at an abnormal PLL frequency (362.5Mhz).
>
> Detect whether the MT7530 PHY is attached to the MDIO bus of an
> EcoNet EN751221 switch and if so, apply the necessary register
> updates.
>
> Co-developed-by: Matheus Sampaio Queiroga <srherobrine20 at gmail.com>
> Signed-off-by: Matheus Sampaio Queiroga <srherobrine20 at gmail.com>
> Signed-off-by: Caleb James DeLisle <cjd at cjdns.fr>
> ---
> drivers/net/phy/mediatek/mtk-ge.c | 61 +++++++++++++++++++++++++++++++
> 1 file changed, 61 insertions(+)
>
> diff --git a/drivers/net/phy/mediatek/mtk-ge.c b/drivers/net/phy/mediatek/mtk-ge.c
> index 73d9b72f9d9e..42b06c40d703 100644
> --- a/drivers/net/phy/mediatek/mtk-ge.c
> +++ b/drivers/net/phy/mediatek/mtk-ge.c
> [...]
> static int mt7530_phy_config_init(struct phy_device *phydev)
> {
> + int ret;
> +
> + if (mt7530_phy_is_en751221_companion(phydev)) {
Please introduce a `.match_phy_device` operation for both, actual
MT7530 and EN751221, similar eg. to `ksz8051_match_phy_device` in
micrel.c.
More information about the Linux-mediatek
mailing list