Re: [net-next v4 2/3] net: motorcomm: phy: set drive strength in YT8531s RGMII
From: Minda Chen
Date: Tue May 26 2026 - 05:38:43 EST
>
> On Wed, May 20, 2026 at 06:13:09PM +0800, Minda Chen wrote:
> > Set RXD and RX CLK pin drive strength while in YT8531s connect with
> > RGMII. Need to check 8531s PHY ID because 8521 and 8531s pin drive
> > strength is different, 8521 can not call yt8531_set_ds().
> >
> > Signed-off-by: Minda Chen <minda.chen@xxxxxxxxxxxxxxxx>
> > ---
> > drivers/net/phy/motorcomm.c | 5 +++++
> > 1 file changed, 5 insertions(+)
> >
> > diff --git a/drivers/net/phy/motorcomm.c b/drivers/net/phy/motorcomm.c
> > index 688679457ef9..3977ec5e45f7 100644
> > --- a/drivers/net/phy/motorcomm.c
> > +++ b/drivers/net/phy/motorcomm.c
> > @@ -1697,6 +1697,11 @@ static int yt8521_config_init(struct phy_device
> *phydev)
> > if (ret < 0)
> > goto err_restore_page;
> > }
> > +
> > + if (phy_interface_is_rgmii(phydev) &&
> > + (phydev->drv->phy_id == PHY_ID_YT8531S))
>
> phydev_id_compare() is probably better, since it takes into account the mask of
> how many bits are the version. The PHY_ID_YT8531S has 0 bits, but i did not
> know that until i looked it up to see if this actually works. phydev_id_compare() i
> would be more likely to just trust is correct.
>
> Andrew
I think is Okay. The phy id mask is GENMASK(31, 0), can match exactly.