/kernel/linux/linux-6.6/drivers/net/pcs/ |
H A D | pcs-xpcs-wx.c | 4 #include <linux/pcs/pcs-xpcs.h> 6 #include "pcs-xpcs.h" 49 static int txgbe_read_pma(struct dw_xpcs *xpcs, int reg) in txgbe_read_pma() argument 51 return xpcs_read(xpcs, MDIO_MMD_PMAPMD, TXGBE_PMA_MMD + reg); in txgbe_read_pma() 54 static int txgbe_write_pma(struct dw_xpcs *xpcs, int reg, u16 val) in txgbe_write_pma() argument 56 return xpcs_write(xpcs, MDIO_MMD_PMAPMD, TXGBE_PMA_MMD + reg, val); in txgbe_write_pma() 59 static void txgbe_pma_config_10gbaser(struct dw_xpcs *xpcs) in txgbe_pma_config_10gbaser() argument 63 txgbe_write_pma(xpcs, TXGBE_MPLLA_CTL0, 0x21); in txgbe_pma_config_10gbaser() 64 txgbe_write_pma(xpcs, TXGBE_MPLLA_CTL3, 0); in txgbe_pma_config_10gbaser() 65 val = txgbe_read_pma(xpcs, TXGBE_TX_GENCTL in txgbe_pma_config_10gbaser() 93 txgbe_pma_config_1g(struct dw_xpcs *xpcs) txgbe_pma_config_1g() argument 127 txgbe_pcs_poll_power_up(struct dw_xpcs *xpcs) txgbe_pcs_poll_power_up() argument 142 txgbe_pma_init_done(struct dw_xpcs *xpcs) txgbe_pma_init_done() argument 158 txgbe_xpcs_mode_quirk(struct dw_xpcs *xpcs) txgbe_xpcs_mode_quirk() argument 173 txgbe_xpcs_switch_mode(struct dw_xpcs *xpcs, phy_interface_t interface) txgbe_xpcs_switch_mode() argument [all...] |
H A D | pcs-xpcs.c | 10 #include <linux/pcs/pcs-xpcs.h> 14 #include "pcs-xpcs.h" 152 int (*pma_config)(struct dw_xpcs *xpcs); 177 int xpcs_get_an_mode(struct dw_xpcs *xpcs, phy_interface_t interface) in xpcs_get_an_mode() argument 181 compat = xpcs_find_compat(xpcs->id, interface); in xpcs_get_an_mode() 204 int xpcs_read(struct dw_xpcs *xpcs, int dev, u32 reg) in xpcs_read() argument 206 return mdiodev_c45_read(xpcs->mdiodev, dev, reg); in xpcs_read() 209 int xpcs_write(struct dw_xpcs *xpcs, int dev, u32 reg, u16 val) in xpcs_write() argument 211 return mdiodev_c45_write(xpcs->mdiodev, dev, reg, val); in xpcs_write() 214 static int xpcs_modify_changed(struct dw_xpcs *xpcs, in argument 220 xpcs_read_vendor(struct dw_xpcs *xpcs, int dev, u32 reg) xpcs_read_vendor() argument 225 xpcs_write_vendor(struct dw_xpcs *xpcs, int dev, int reg, u16 val) xpcs_write_vendor() argument 231 xpcs_read_vpcs(struct dw_xpcs *xpcs, int reg) xpcs_read_vpcs() argument 236 xpcs_write_vpcs(struct dw_xpcs *xpcs, int reg, u16 val) xpcs_write_vpcs() argument 241 xpcs_dev_flag(struct dw_xpcs *xpcs) xpcs_dev_flag() argument 264 xpcs_poll_reset(struct dw_xpcs *xpcs, int dev) xpcs_poll_reset() argument 280 xpcs_soft_reset(struct dw_xpcs *xpcs, const struct xpcs_compat *compat) xpcs_soft_reset() argument 312 xpcs_read_fault_c73(struct dw_xpcs *xpcs, struct phylink_link_state *state, u16 pcs_stat1) xpcs_read_fault_c73() argument 360 xpcs_config_usxgmii(struct dw_xpcs *xpcs, int speed) xpcs_config_usxgmii() argument 421 _xpcs_config_aneg_c73(struct dw_xpcs *xpcs, const struct xpcs_compat *compat) _xpcs_config_aneg_c73() argument 466 xpcs_config_aneg_c73(struct dw_xpcs *xpcs, const struct xpcs_compat *compat) xpcs_config_aneg_c73() argument 484 xpcs_aneg_done_c73(struct dw_xpcs *xpcs, struct phylink_link_state *state, const struct xpcs_compat *compat, u16 an_stat1) xpcs_aneg_done_c73() argument 507 xpcs_read_lpa_c73(struct dw_xpcs *xpcs, struct phylink_link_state *state, u16 an_stat1) xpcs_read_lpa_c73() argument 534 xpcs_get_max_xlgmii_speed(struct dw_xpcs *xpcs, struct phylink_link_state *state) xpcs_get_max_xlgmii_speed() argument 588 xpcs_resolve_pma(struct dw_xpcs *xpcs, struct phylink_link_state *state) xpcs_resolve_pma() argument 612 struct dw_xpcs *xpcs; xpcs_validate() local 631 xpcs_get_interfaces(struct dw_xpcs *xpcs, unsigned long *interfaces) xpcs_get_interfaces() argument 645 xpcs_config_eee(struct dw_xpcs *xpcs, int mult_fact_100ns, int enable) xpcs_config_eee() argument 683 xpcs_config_aneg_c37_sgmii(struct dw_xpcs *xpcs, unsigned int neg_mode) xpcs_config_aneg_c37_sgmii() argument 762 xpcs_config_aneg_c37_1000basex(struct dw_xpcs *xpcs, unsigned int neg_mode, const unsigned long *advertising) xpcs_config_aneg_c37_1000basex() argument 829 xpcs_config_2500basex(struct dw_xpcs *xpcs) xpcs_config_2500basex() argument 851 xpcs_do_config(struct dw_xpcs *xpcs, phy_interface_t interface, const unsigned long *advertising, unsigned int neg_mode) xpcs_do_config() argument 912 struct dw_xpcs *xpcs = phylink_pcs_to_xpcs(pcs); xpcs_config() local 917 xpcs_get_state_c73(struct dw_xpcs *xpcs, struct phylink_link_state *state, const struct xpcs_compat *compat) xpcs_get_state_c73() argument 990 xpcs_get_state_c37_sgmii(struct dw_xpcs *xpcs, struct phylink_link_state *state) xpcs_get_state_c37_sgmii() argument 1058 xpcs_get_state_c37_1000basex(struct dw_xpcs *xpcs, struct phylink_link_state *state) xpcs_get_state_c37_1000basex() argument 1096 struct dw_xpcs *xpcs = phylink_pcs_to_xpcs(pcs); xpcs_get_state() local 1135 xpcs_link_up_sgmii(struct dw_xpcs *xpcs, unsigned int neg_mode, int speed, int duplex) xpcs_link_up_sgmii() argument 1149 xpcs_link_up_1000basex(struct dw_xpcs *xpcs, unsigned int neg_mode, int speed, int duplex) xpcs_link_up_1000basex() argument 1181 struct dw_xpcs *xpcs = phylink_pcs_to_xpcs(pcs); xpcs_link_up() local 1194 struct dw_xpcs *xpcs = phylink_pcs_to_xpcs(pcs); xpcs_an_restart() local 1204 xpcs_get_id(struct dw_xpcs *xpcs) xpcs_get_id() argument 1343 struct dw_xpcs *xpcs; xpcs_create() local 1398 xpcs_destroy(struct dw_xpcs *xpcs) xpcs_destroy() argument 1410 struct dw_xpcs *xpcs; xpcs_create_mdiodev() local [all...] |
H A D | pcs-xpcs-nxp.c | 4 #include <linux/pcs/pcs-xpcs.h> 5 #include "pcs-xpcs.h" 72 int nxp_sja1105_sgmii_pma_config(struct dw_xpcs *xpcs) in nxp_sja1105_sgmii_pma_config() argument 74 return xpcs_write(xpcs, MDIO_MMD_VEND2, DW_VR_MII_DIG_CTRL2, in nxp_sja1105_sgmii_pma_config() 78 static int nxp_sja1110_pma_config(struct dw_xpcs *xpcs, in nxp_sja1110_pma_config() argument 89 ret = xpcs_write(xpcs, MDIO_MMD_VEND2, SJA1110_TXPLL_CTRL0, in nxp_sja1110_pma_config() 94 ret = xpcs_write(xpcs, MDIO_MMD_VEND2, SJA1110_TXPLL_CTRL1, in nxp_sja1110_pma_config() 100 ret = xpcs_write(xpcs, MDIO_MMD_VEND2, SJA1110_LANE_DRIVER1_0, in nxp_sja1110_pma_config() 107 ret = xpcs_write(xpcs, MDIO_MMD_VEND2, SJA1110_LANE_DRIVER2_0, val); in nxp_sja1110_pma_config() 113 ret = xpcs_write(xpcs, MDIO_MMD_VEND in nxp_sja1110_pma_config() 177 nxp_sja1110_sgmii_pma_config(struct dw_xpcs *xpcs) nxp_sja1110_sgmii_pma_config() argument 182 nxp_sja1110_2500basex_pma_config(struct dw_xpcs *xpcs) nxp_sja1110_2500basex_pma_config() argument [all...] |
H A D | pcs-xpcs.h | 121 int xpcs_read(struct dw_xpcs *xpcs, int dev, u32 reg); 122 int xpcs_write(struct dw_xpcs *xpcs, int dev, u32 reg, u16 val); 123 int xpcs_read_vpcs(struct dw_xpcs *xpcs, int reg); 124 int xpcs_write_vpcs(struct dw_xpcs *xpcs, int reg, u16 val); 125 int nxp_sja1105_sgmii_pma_config(struct dw_xpcs *xpcs); 126 int nxp_sja1110_sgmii_pma_config(struct dw_xpcs *xpcs); 127 int nxp_sja1110_2500basex_pma_config(struct dw_xpcs *xpcs); 128 int txgbe_xpcs_switch_mode(struct dw_xpcs *xpcs, phy_interface_t interface);
|
/kernel/linux/linux-5.10/drivers/net/pcs/ |
H A D | pcs-xpcs.c | 10 #include <linux/pcs/pcs-xpcs.h> 147 static int xpcs_read(struct mdio_xpcs_args *xpcs, int dev, u32 reg) in xpcs_read() argument 151 return mdiobus_read(xpcs->bus, xpcs->addr, reg_addr); in xpcs_read() 154 static int xpcs_write(struct mdio_xpcs_args *xpcs, int dev, u32 reg, u16 val) in xpcs_write() argument 158 return mdiobus_write(xpcs->bus, xpcs->addr, reg_addr, val); in xpcs_write() 161 static int xpcs_read_vendor(struct mdio_xpcs_args *xpcs, int dev, u32 reg) in xpcs_read_vendor() argument 163 return xpcs_read(xpcs, dev, DW_VENDOR | reg); in xpcs_read_vendor() 166 static int xpcs_write_vendor(struct mdio_xpcs_args *xpcs, in argument 172 xpcs_read_vpcs(struct mdio_xpcs_args *xpcs, int reg) xpcs_read_vpcs() argument 177 xpcs_write_vpcs(struct mdio_xpcs_args *xpcs, int reg, u16 val) xpcs_write_vpcs() argument 182 xpcs_poll_reset(struct mdio_xpcs_args *xpcs, int dev) xpcs_poll_reset() argument 198 xpcs_soft_reset(struct mdio_xpcs_args *xpcs, int dev) xpcs_soft_reset() argument 215 xpcs_read_fault(struct mdio_xpcs_args *xpcs, struct phylink_link_state *state) xpcs_read_fault() argument 266 xpcs_read_link(struct mdio_xpcs_args *xpcs, bool an) xpcs_read_link() argument 306 xpcs_config_usxgmii(struct mdio_xpcs_args *xpcs, int speed) xpcs_config_usxgmii() argument 360 xpcs_config_aneg_c73(struct mdio_xpcs_args *xpcs) xpcs_config_aneg_c73() argument 404 xpcs_config_aneg(struct mdio_xpcs_args *xpcs) xpcs_config_aneg() argument 421 xpcs_aneg_done(struct mdio_xpcs_args *xpcs, struct phylink_link_state *state) xpcs_aneg_done() argument 447 xpcs_read_lpa(struct mdio_xpcs_args *xpcs, struct phylink_link_state *state) xpcs_read_lpa() argument 496 xpcs_resolve_lpa(struct mdio_xpcs_args *xpcs, struct phylink_link_state *state) xpcs_resolve_lpa() argument 506 xpcs_get_max_xlgmii_speed(struct mdio_xpcs_args *xpcs, struct phylink_link_state *state) xpcs_get_max_xlgmii_speed() argument 560 xpcs_resolve_pma(struct mdio_xpcs_args *xpcs, struct phylink_link_state *state) xpcs_resolve_pma() argument 579 xpcs_validate(struct mdio_xpcs_args *xpcs, unsigned long *supported, struct phylink_link_state *state) xpcs_validate() argument 588 xpcs_config(struct mdio_xpcs_args *xpcs, const struct phylink_link_state *state) xpcs_config() argument 602 xpcs_get_state(struct mdio_xpcs_args *xpcs, struct phylink_link_state *state) xpcs_get_state() argument 635 xpcs_link_up(struct mdio_xpcs_args *xpcs, int speed, phy_interface_t interface) xpcs_link_up() argument 644 xpcs_get_id(struct mdio_xpcs_args *xpcs) xpcs_get_id() argument 662 xpcs_check_features(struct mdio_xpcs_args *xpcs, struct xpcs_id *match, phy_interface_t interface) xpcs_check_features() argument 682 xpcs_probe(struct mdio_xpcs_args *xpcs, phy_interface_t interface) xpcs_probe() argument [all...] |
/kernel/linux/linux-6.6/drivers/net/ethernet/stmicro/stmmac/ |
H A D | dwmac-tegra.c | 24 void __iomem *xpcs; member 89 value = readl(mgbe->xpcs + XPCS_WRAP_UPHY_STATUS); in tegra_mgbe_resume() 91 value = readl(mgbe->xpcs + XPCS_WRAP_UPHY_HW_INIT_CTRL); in tegra_mgbe_resume() 93 writel(value, mgbe->xpcs + XPCS_WRAP_UPHY_HW_INIT_CTRL); in tegra_mgbe_resume() 96 err = readl_poll_timeout(mgbe->xpcs + XPCS_WRAP_UPHY_HW_INIT_CTRL, value, in tegra_mgbe_resume() 118 value = readl(mgbe->xpcs + XPCS_WRAP_UPHY_RX_CONTROL); in mgbe_uphy_lane_bringup_serdes_up() 120 writel(value, mgbe->xpcs + XPCS_WRAP_UPHY_RX_CONTROL); in mgbe_uphy_lane_bringup_serdes_up() 122 value = readl(mgbe->xpcs + XPCS_WRAP_UPHY_RX_CONTROL); in mgbe_uphy_lane_bringup_serdes_up() 124 writel(value, mgbe->xpcs + XPCS_WRAP_UPHY_RX_CONTROL); in mgbe_uphy_lane_bringup_serdes_up() 126 value = readl(mgbe->xpcs in mgbe_uphy_lane_bringup_serdes_up() [all...] |
H A D | stmmac_mdio.c | 502 struct dw_xpcs *xpcs; in stmmac_xpcs_setup() local 510 xpcs = xpcs_create_mdiodev(bus, addr, mode); in stmmac_xpcs_setup() 511 if (IS_ERR(xpcs)) in stmmac_xpcs_setup() 514 priv->hw->xpcs = xpcs; in stmmac_xpcs_setup() 518 if (!priv->hw->xpcs) { in stmmac_xpcs_setup() 682 if (priv->hw->xpcs) in stmmac_mdio_unregister() 683 xpcs_destroy(priv->hw->xpcs); in stmmac_mdio_unregister()
|
H A D | common.h | 18 #include <linux/pcs/pcs-xpcs.h> 591 struct dw_xpcs *xpcs; member
|
H A D | stmmac_main.c | 494 if (priv->hw->xpcs) in stmmac_eee_init() 495 xpcs_config_eee(priv->hw->xpcs, in stmmac_eee_init() 507 if (priv->hw->xpcs) in stmmac_eee_init() 508 xpcs_config_eee(priv->hw->xpcs, in stmmac_eee_init() 944 if (priv->hw->xpcs) in stmmac_mac_select_pcs() 945 return &priv->hw->xpcs->pcs; in stmmac_mac_select_pcs() 1234 /* If we have an xpcs, it defines which PHY interfaces are supported. */ in stmmac_phy_setup() 1235 if (priv->hw->xpcs) in stmmac_phy_setup() 1236 xpcs_get_interfaces(priv->hw->xpcs, in stmmac_phy_setup() 3839 (!priv->hw->xpcs || in __stmmac_open() [all...] |
/kernel/linux/linux-5.10/include/linux/pcs/ |
H A D | pcs-xpcs.h | 20 int (*validate)(struct mdio_xpcs_args *xpcs, 23 int (*config)(struct mdio_xpcs_args *xpcs, 25 int (*get_state)(struct mdio_xpcs_args *xpcs, 27 int (*link_up)(struct mdio_xpcs_args *xpcs, int speed, 29 int (*probe)(struct mdio_xpcs_args *xpcs, phy_interface_t interface);
|
/kernel/linux/linux-6.6/include/linux/pcs/ |
H A D | pcs-xpcs.h | 39 int xpcs_get_an_mode(struct dw_xpcs *xpcs, phy_interface_t interface); 42 int xpcs_do_config(struct dw_xpcs *xpcs, phy_interface_t interface, 44 void xpcs_get_interfaces(struct dw_xpcs *xpcs, unsigned long *interfaces); 45 int xpcs_config_eee(struct dw_xpcs *xpcs, int mult_fact_100ns, 49 void xpcs_destroy(struct dw_xpcs *xpcs);
|
/kernel/linux/linux-6.6/drivers/net/dsa/sja1105/ |
H A D | sja1105_mdio.c | 4 #include <linux/pcs/pcs-xpcs.h> 403 struct dw_xpcs *xpcs; in sja1105_mdiobus_pcs_register() local 412 xpcs = xpcs_create_mdiodev(bus, port, priv->phy_mode[port]); in sja1105_mdiobus_pcs_register() 413 if (IS_ERR(xpcs)) { in sja1105_mdiobus_pcs_register() 414 rc = PTR_ERR(xpcs); in sja1105_mdiobus_pcs_register() 418 priv->xpcs[port] = xpcs; in sja1105_mdiobus_pcs_register() 427 if (!priv->xpcs[port]) in sja1105_mdiobus_pcs_register() 430 xpcs_destroy(priv->xpcs[port]); in sja1105_mdiobus_pcs_register() 431 priv->xpcs[por in sja1105_mdiobus_pcs_register() [all...] |
H A D | sja1105_main.c | 18 #include <linux/pcs/pcs-xpcs.h> 1362 struct dw_xpcs *xpcs = priv->xpcs[port]; in sja1105_mac_select_pcs() local 1364 if (xpcs) in sja1105_mac_select_pcs() 1365 return &xpcs->pcs; in sja1105_mac_select_pcs() 2315 if (priv->xpcs[i]) in sja1105_static_config_reload() 2372 struct dw_xpcs *xpcs = priv->xpcs[i]; in sja1105_static_config_reload() local 2379 if (!xpcs) in sja1105_static_config_reload() 2387 rc = xpcs_do_config(xpcs, pri in sja1105_static_config_reload() [all...] |
H A D | sja1105.h | 281 struct dw_xpcs *xpcs[SJA1105_MAX_NUM_PORTS]; member
|
/kernel/linux/linux-5.10/drivers/net/ethernet/stmicro/stmmac/ |
H A D | stmmac_mdio.c | 445 priv->hw->xpcs = mdio_xpcs_get_ops(); in stmmac_mdio_register() 446 if (!priv->hw->xpcs) { in stmmac_mdio_register() 514 if (priv->hw->xpcs) { in stmmac_mdio_register() 515 struct mdio_xpcs_args *xpcs = &priv->hw->xpcs_args; in stmmac_mdio_register() local 519 xpcs->bus = new_bus; in stmmac_mdio_register() 523 xpcs->addr = addr; in stmmac_mdio_register() 525 ret = stmmac_xpcs_probe(priv, xpcs, mode); in stmmac_mdio_register()
|
H A D | common.h | 18 #include <linux/pcs/pcs-xpcs.h> 469 const struct mdio_xpcs_ops *xpcs; member
|
H A D | hwif.h | 597 stmmac_do_callback(__priv, xpcs, validate, __args) 599 stmmac_do_callback(__priv, xpcs, config, __args) 601 stmmac_do_callback(__priv, xpcs, get_state, __args) 603 stmmac_do_callback(__priv, xpcs, link_up, __args) 605 stmmac_do_callback(__priv, xpcs, probe, __args)
|
H A D | stmmac_main.c | 2871 priv->hw->xpcs == NULL) { in stmmac_open()
|
/kernel/linux/linux-6.6/drivers/net/ethernet/wangxun/txgbe/ |
H A D | txgbe_phy.c | 13 #include <linux/pcs/pcs-xpcs.h> 125 struct dw_xpcs *xpcs; in txgbe_mdio_pcs_init() local 150 xpcs = xpcs_create_mdiodev(mii_bus, 0, PHY_INTERFACE_MODE_10GBASER); in txgbe_mdio_pcs_init() 151 if (IS_ERR(xpcs)) in txgbe_mdio_pcs_init() 152 return PTR_ERR(xpcs); in txgbe_mdio_pcs_init() 154 txgbe->xpcs = xpcs; in txgbe_mdio_pcs_init() 165 return &txgbe->xpcs->pcs; in txgbe_phylink_mac_select() 813 xpcs_destroy(txgbe->xpcs); in txgbe_init_phy() 833 xpcs_destroy(txgbe->xpcs); in txgbe_remove_phy() [all...] |
H A D | txgbe_type.h | 183 struct dw_xpcs *xpcs; member
|
/kernel/linux/linux-5.10/drivers/net/ethernet/marvell/mvpp2/ |
H A D | mvpp2_main.c | 1289 void __iomem *xpcs = priv->iface_base + MVPP22_XPCS_BASE(port->gop_id); in mvpp22_gop_init_10gkr() local 1292 val = readl(xpcs + MVPP22_XPCS_CFG0); in mvpp22_gop_init_10gkr() 1296 writel(val, xpcs + MVPP22_XPCS_CFG0); in mvpp22_gop_init_10gkr() 1855 void __iomem *mpcs, *xpcs; in mvpp22_pcs_reset_assert() local 1862 xpcs = priv->iface_base + MVPP22_XPCS_BASE(port->gop_id); in mvpp22_pcs_reset_assert() 1869 val = readl(xpcs + MVPP22_XPCS_CFG0); in mvpp22_pcs_reset_assert() 1870 writel(val & ~MVPP22_XPCS_CFG0_RESET_DIS, xpcs + MVPP22_XPCS_CFG0); in mvpp22_pcs_reset_assert() 1876 void __iomem *mpcs, *xpcs; in mvpp22_pcs_reset_deassert() local 1883 xpcs = priv->iface_base + MVPP22_XPCS_BASE(port->gop_id); in mvpp22_pcs_reset_deassert() 1895 val = readl(xpcs in mvpp22_pcs_reset_deassert() [all...] |
/kernel/linux/linux-6.6/drivers/net/ethernet/marvell/mvpp2/ |
H A D | mvpp2_main.c | 1572 void __iomem *xpcs = priv->iface_base + MVPP22_XPCS_BASE(port->gop_id); in mvpp22_gop_init_10gkr() local 1575 val = readl(xpcs + MVPP22_XPCS_CFG0); in mvpp22_gop_init_10gkr() 1579 writel(val, xpcs + MVPP22_XPCS_CFG0); in mvpp22_gop_init_10gkr() 2184 void __iomem *mpcs, *xpcs; in mvpp22_pcs_reset_assert() local 2191 xpcs = priv->iface_base + MVPP22_XPCS_BASE(port->gop_id); in mvpp22_pcs_reset_assert() 2198 val = readl(xpcs + MVPP22_XPCS_CFG0); in mvpp22_pcs_reset_assert() 2199 writel(val & ~MVPP22_XPCS_CFG0_RESET_DIS, xpcs + MVPP22_XPCS_CFG0); in mvpp22_pcs_reset_assert() 2206 void __iomem *mpcs, *xpcs; in mvpp22_pcs_reset_deassert() local 2213 xpcs = priv->iface_base + MVPP22_XPCS_BASE(port->gop_id); in mvpp22_pcs_reset_deassert() 2226 val = readl(xpcs in mvpp22_pcs_reset_deassert() [all...] |