Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'net-phy-adin-enable-configuration-of-the-lp-termination-register'

Osose Itua says:

====================
net: phy: adin: enable configuration of the LP Termination Register
====================

Link: https://patch.msgid.link/20260107221913.1334157-1-osose.itua@savoirfairelinux.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

+34
+14
Documentation/devicetree/bindings/net/adi,adin.yaml
··· 52 52 description: Enable 25MHz reference clock output on CLK25_REF pin. 53 53 type: boolean 54 54 55 + adi,low-cmode-impedance: 56 + description: | 57 + Configure PHY for the lowest common-mode impedance on the receive pair 58 + for 100BASE-TX. This is suited for capacitive coupled applications and 59 + other applications where there may be a path for high common-mode noise 60 + to reach the PHY. 61 + If not present, by default the PHY is configured for normal termination 62 + (zero-power termination) mode. 63 + 64 + Note: There is a trade-off of 12 mW increased power consumption with 65 + the lowest common-mode impedance setting, but in all cases the 66 + differential impedance is 100 ohms. 67 + type: boolean 68 + 55 69 unevaluatedProperties: false 56 70 57 71 examples:
+20
drivers/net/phy/adin.c
··· 89 89 #define ADIN1300_CLOCK_STOP_REG 0x9400 90 90 #define ADIN1300_LPI_WAKE_ERR_CNT_REG 0xa000 91 91 92 + #define ADIN1300_B_100_ZPTM_DIMRX 0xB685 93 + #define ADIN1300_B_100_ZPTM_EN_DIMRX BIT(0) 94 + 92 95 #define ADIN1300_CDIAG_RUN 0xba1b 93 96 #define ADIN1300_CDIAG_RUN_EN BIT(0) 94 97 ··· 525 522 ADIN1300_GE_CLK_CFG_MASK, sel); 526 523 } 527 524 525 + static int adin_config_zptm100(struct phy_device *phydev) 526 + { 527 + struct device *dev = &phydev->mdio.dev; 528 + 529 + if (!(device_property_read_bool(dev, "adi,low-cmode-impedance"))) 530 + return 0; 531 + 532 + /* clear bit 0 to configure for lowest common-mode impedance */ 533 + return phy_clear_bits_mmd(phydev, MDIO_MMD_VEND1, 534 + ADIN1300_B_100_ZPTM_DIMRX, 535 + ADIN1300_B_100_ZPTM_EN_DIMRX); 536 + } 537 + 528 538 static int adin_config_init(struct phy_device *phydev) 529 539 { 530 540 int rc; ··· 561 545 return rc; 562 546 563 547 rc = adin_config_clk_out(phydev); 548 + if (rc < 0) 549 + return rc; 550 + 551 + rc = adin_config_zptm100(phydev); 564 552 if (rc < 0) 565 553 return rc; 566 554