[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <019bcd38dadb138fda4cf8b113c13b77a4581168.camel@gmail.com>
Date: Wed, 07 Jan 2026 10:18:35 +0000
From: Nuno Sá <noname.nuno@...il.com>
To: Andrew Lunn <andrew@...n.ch>, Osose Itua
<osose.itua@...oirfairelinux.com>
Cc: netdev@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, michael.hennerich@...log.com,
jerome.oufella@...oirfairelinux.com
Subject: Re: [PATCH v2 1/2] net: phy: adin: enable configuration of the LP
Termination Register
On Tue, 2025-12-23 at 10:36 +0100, Andrew Lunn wrote:
> > +static int adin_config_zptm100(struct phy_device *phydev)
> > +{
> > + struct device *dev = &phydev->mdio.dev;
> > + int reg;
> > + int rc;
> > +
> > + if (!(device_property_read_bool(dev, "adi,low-cmode-impedance")))
> > + return 0;
> > +
> > + /* set to 0 to configure for lowest common-mode impedance */
> > + rc = phy_write_mmd(phydev, MDIO_MMD_VEND1, ADIN1300_B_100_ZPTM_DIMRX, 0x0);
> > + if (rc < 0)
> > + return rc;
> > +
> > + reg = phy_read_mmd(phydev, MDIO_MMD_VEND1, ADIN1300_B_100_ZPTM_DIMRX);
> > + if (reg < 0)
> > + return reg;
> > +
> > + if (!(reg & ADIN1300_B_100_ZPTM_EN_DIMRX)) {
> > + phydev_err(phydev, "Failed to set lowest common-mode impedance.\n");
> > + return -EINVAL;
> > + }
>
> Under what condition do you think this could happen? Do you think
> there are variants of the hardware which do not have this register?
>
> Andrew
I think he's just reading back the register to make sure the value was really updated...
If we were going to that for every write our lives would be miserable :).
I looked at both adin1200 and adin1300 and they support this in the same way so the above
should just be:
return phy_write_mmd()...
- Nuno Sá
Powered by blists - more mailing lists