Subject: Re: [PATCH v4 10/12] net: pcs: add driver for MediaTek SGMII PCS

From: "Russell King (Oracle)" <[email-masked]>
Date: Sat, 11 Feb 2023 12:53:02 +0000

Hi Daniel,

On Fri, Feb 10, 2023 at 11:39:59PM +0000, Daniel Golle wrote:
> +	if (mpcs->interface != interface) {
> +		/* PHYA power down */
> +		regmap_update_bits(mpcs->regmap, SGMSYS_QPHY_PWR_STATE_CTRL,
> +				   SGMII_PHYA_PWD, SGMII_PHYA_PWD);
> +
> +		/* Reset SGMII PCS state */
> +		regmap_update_bits(mpcs->regmap, SGMII_RESERVED_0,
> +				   SGMII_SW_RESET, SGMII_SW_RESET);
> +
> +		if (mpcs->flags & MTK_SGMII_FLAG_PN_SWAP)
> +			regmap_update_bits(mpcs->regmap, SGMSYS_QPHY_WRAP_CTRL,
> +					   SGMII_PN_SWAP_MASK,
> +					   SGMII_PN_SWAP_TX_RX);
> +
> +		if (interface == PHY_INTERFACE_MODE_2500BASEX)
> +			rgc3 = RG_PHY_SPEED_3_125G;
> +		else
> +			rgc3 = 0;
> +
> +		/* Configure the underlying interface speed */
> +		regmap_update_bits(mpcs->regmap, mpcs->ana_rgc3,
> +				   RG_PHY_SPEED_MASK, rgc3);
> +
> +		/* Setup the link timer and QPHY power up inside SGMIISYS */
> +		link_timer = phylink_get_link_timer_ns(interface);
> +		if (link_timer < 0)
> +			return link_timer;

The change in patch 7 needs to be propagated to this patch (moving this
to the beginning of this block of code.)

Otherwise, LGTM. Thanks.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!