[PATCH net-next] net: phy: mediatek: support MT7530 PHYs on EN71221 MCM

Andrew Lunn andrew at lunn.ch
Wed Sep 9 19:03:19 PDT 2026


> +	/* Clause 22 local data. */
> +	ret = phy_write(phydev, MII_CTRL1000, 0x1e00);

Please express this using

/* 1000BASE-T Control register */
#define ADVERTISE_1000FULL	0x0200  /* Advertise 1000BASE-T full duplex */
#define ADVERTISE_1000HALF	0x0100  /* Advertise 1000BASE-T half duplex */
#define CTL1000_PREFER_MASTER	0x0400  /* prefer to operate as master */
#define CTL1000_AS_MASTER	0x0800
#define CTL1000_ENABLE_MASTER	0x1000

Once we have symbolic names, it might be obvious what this is doing,
and if there is a better way to do it.


> +	/* Vendor profile disables 100/1000BASE-T EEE advertisement. */
> +	ret = phy_write_mmd(phydev, MDIO_MMD_AN, 0x003c, 0x0000);
> +	if (ret < 0)
> +		return ret;

Any idea why? Is EEE broken? If it is, phy_disable_eee().

    Andrew



More information about the Linux-mediatek mailing list