Home
last modified time | relevance | path

Searched full:xpcs (Results 1 – 25 of 34) sorted by relevance

12

/openbmc/linux/drivers/net/pcs/
H A Dpcs-xpcs-wx.c4 #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_GENCTL1); in txgbe_pma_config_10gbaser()
[all …]
H A Dpcs-xpcs.c4 * Synopsys DesignWare XPCS helpers
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()
[all …]
H A Dpcs-xpcs-nxp.c4 #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_VEND2, SJA1110_LANE_DRIVER2_1, val); in nxp_sja1110_pma_config()
[all …]
H A Dpcs-xpcs.h4 * Synopsys DesignWare XPCS helpers
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);
H A DMakefile4 pcs_xpcs-$(CONFIG_PCS_XPCS) := pcs-xpcs.o pcs-xpcs-nxp.o pcs-xpcs-wx.o
H A DKconfig12 This module provides helper functions for Synopsys DesignWare XPCS
/openbmc/linux/drivers/net/ethernet/stmicro/stmmac/
H A Ddwmac-tegra.c24 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 + XPCS_WRAP_UPHY_RX_CONTROL); in mgbe_uphy_lane_bringup_serdes_up()
[all …]
H A Dstmmac_mdio.c502 struct dw_xpcs *xpcs; in stmmac_xpcs_setup() local
508 /* Try to probe the XPCS by scanning all addresses. */ in stmmac_xpcs_setup()
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()
519 dev_warn(priv->device, "No xPCS found\n"); 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 Dcommon.h18 #include <linux/pcs/pcs-xpcs.h>
592 struct dw_xpcs *xpcs; member
H A Dstmmac_main.c494 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()
1223 /* If we have an xpcs, it defines which PHY interfaces are supported. */ in stmmac_phy_setup()
1224 if (priv->hw->xpcs) in stmmac_phy_setup()
1225 xpcs_get_interfaces(priv->hw->xpcs, in stmmac_phy_setup()
3825 (!priv->hw->xpcs || in __stmmac_open()
[all...]
H A Ddwmac-intel.c603 /* Ensure mdio bus scan skips intel serdes and pcs-xpcs */ in intel_mgbe_common_data()
/openbmc/linux/include/linux/pcs/
H A Dpcs-xpcs.h4 * Synopsys DesignWare XPCS helpers
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);
/openbmc/linux/drivers/net/dsa/sja1105/
H A Dsja1105_mdio.c4 #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[port] = NULL; in sja1105_mdiobus_pcs_register()
449 if (!priv->xpcs[port]) in sja1105_mdiobus_pcs_unregister()
[all …]
H A Dsja1105_main.c18 #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()
1402 * sense, because that is done through the XPCS. We allow in sja1105_phylink_get_caps()
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, priv->phy_mode[i], NULL, neg_mode); in sja1105_static_config_reload()
2403 xpcs_link_up(&xpcs->pcs, neg_mode, priv->phy_mode[i], in sja1105_static_config_reload()
H A Dsja1105.h281 struct dw_xpcs *xpcs[SJA1105_MAX_NUM_PORTS]; member
/openbmc/linux/drivers/net/ethernet/wangxun/txgbe/
H A Dtxgbe_phy.c13 #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()
H A Dtxgbe_type.h183 struct dw_xpcs *xpcs; member
/openbmc/linux/drivers/net/ethernet/amd/xgbe/
H A Dxgbe-pci.c268 dev_err(dev, "xpcs ioremap failed\n"); in xgbe_pci_probe()
305 dev_dbg(dev, "xpcs window def = %#010x\n", in xgbe_pci_probe()
307 dev_dbg(dev, "xpcs window sel = %#010x\n", in xgbe_pci_probe()
309 dev_dbg(dev, "xpcs window = %#010x\n", in xgbe_pci_probe()
311 dev_dbg(dev, "xpcs window size = %#010x\n", in xgbe_pci_probe()
313 dev_dbg(dev, "xpcs window mask = %#010x\n", in xgbe_pci_probe()
H A Dxgbe-platform.c366 dev_err(dev, "xpcs ioremap failed\n"); in xgbe_platform_probe()
462 /* Always have XGMAC and XPCS (auto-negotiation) interrupts */ in xgbe_platform_probe()
H A Dxgbe.h1066 /* XGMAC/XPCS related mmio registers */
1068 void __iomem *xpcs_regs; /* XPCS MMD registers */
1085 /* XPCS indirect addressing lock */
/openbmc/linux/Documentation/devicetree/bindings/net/
H A Dnvidia,tegra234-mgbe.yaml24 - const: xpcs
121 reg-names = "hypervisor", "mac", "xpcs";
/openbmc/linux/drivers/net/ethernet/marvell/mvpp2/
H A Dmvpp2_main.c1572 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 + MVPP22_XPCS_CFG0); in mvpp22_pcs_reset_deassert()
[all …]
H A Dmvpp2.h598 /* XPCS registers.PPv2.2 and PPv2.3 */
618 /* XPCS registers. PPv2.2 and PPv2.3 */
/openbmc/linux/arch/arm64/boot/dts/nvidia/
H A Dtegra234.dtsi1435 reg-names = "hypervisor", "mac", "xpcs";
1469 reg-names = "hypervisor", "mac", "xpcs";
1503 reg-names = "hypervisor", "mac", "xpcs";
1537 reg-names = "hypervisor", "mac", "xpcs";
/openbmc/linux/drivers/net/ethernet/sun/
H A Dniu.c8283 /* 10G fiber, XPCS */ in niu_phy_type_prop_decode()
8293 /* 10G copper, XPCS */ in niu_phy_type_prop_decode()
8450 /* 10G copper, XPCS */ in niu_pci_probe_sprom()
8457 /* 10G fiber, XPCS */ in niu_pci_probe_sprom()
9720 (np->mac_xcvr == MAC_XCVR_PCS ? "PCS" : "XPCS")), in niu_device_announce()
9731 (np->mac_xcvr == MAC_XCVR_PCS ? "PCS" : "XPCS")), in niu_device_announce()

12