[PATCH net-next v5] net: phy: add driver for MediaTek SoC built-in GE PHYs

Andrew Lunn andrew at lunn.ch
Sun Jun 11 08:16:56 PDT 2023


On Sun, Jun 11, 2023 at 12:48:10AM +0100, Daniel Golle wrote:
> Some of MediaTek's Filogic SoCs come with built-in gigabit Ethernet
> PHYs which require calibration data from the SoC's efuse.
> Despite the similar design the driver doesn't share any code with the
> existing mediatek-ge.c.
> Add support for such PHYs by introducing a new driver with basic
> support for MediaTek SoCs MT7981 and MT7988 built-in 1GE PHYs.
> 
> Signed-off-by: Daniel Golle <daniel at makrotopia.org>

Reviewed-by: Andrew Lunn <andrew at lunn.ch>

> +static void mt798x_phy_eee(struct phy_device *phydev)
> +{
> +	phy_modify_mmd(phydev, MDIO_MMD_VEND1,
> +		       MTK_PHY_RG_LPI_PCS_DSP_CTRL_REG120,
> +		       MTK_PHY_LPI_SIG_EN_LO_THRESH1000_MASK |
> +		       MTK_PHY_LPI_SIG_EN_HI_THRESH1000_MASK,
> +		       FIELD_PREP(MTK_PHY_LPI_SIG_EN_LO_THRESH1000_MASK, 0x0) |
> +		       FIELD_PREP(MTK_PHY_LPI_SIG_EN_HI_THRESH1000_MASK, 0x14));

Does this PHY have SmartEEE? Where the PHY itself does EEE without the
help of the MAC? At some point we would like to properly support that,
but first we need to sort out the mess MAC/PHY EEE is in.

    Andrew



More information about the linux-arm-kernel mailing list