+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