Lines Matching +full:4 +full:- +full:lane
1 // SPDX-License-Identifier: GPL-2.0
7 * WingMan Kwok <w-kwok2@ti.com>
17 /* PCS-R registers */
26 #define MASK_WID_SH(w, s) (((1 << w) - 1) << s)
146 /* lane is 0 based */
148 void __iomem *serdes_regs, int lane) in netcp_xgbe_serdes_lane_config() argument
152 /* lane setup */ in netcp_xgbe_serdes_lane_config()
156 (0x200 * lane), in netcp_xgbe_serdes_lane_config()
162 reg_rmw(serdes_regs + (0x200 * lane) + 0x0380, in netcp_xgbe_serdes_lane_config()
166 reg_rmw(serdes_regs + (0x200 * lane) + 0x03c0, in netcp_xgbe_serdes_lane_config()
182 void __iomem *serdes_regs, int lane) in netcp_xgbe_serdes_lane_enable() argument
184 /* Set Lane Control Rate */ in netcp_xgbe_serdes_lane_enable()
185 writel(0xe0e9e038, serdes_regs + 0x1fe0 + (4 * lane)); in netcp_xgbe_serdes_lane_enable()
212 val_0 = (readl(sw_regs + XGBE_SGMII_1_OFFSET) & BIT(4)); in netcp_xgbe_wait_pll_locked()
213 val_1 = (readl(sw_regs + XGBE_SGMII_2_OFFSET) & BIT(4)); in netcp_xgbe_wait_pll_locked()
219 ret = -ETIMEDOUT; in netcp_xgbe_wait_pll_locked()
258 /* For 2 lane Phy-B, lane0 is actually lane1 */ in netcp_xgbe_serdes_write_tbus_addr()
283 void __iomem *sig_detect_reg, int lane) in netcp_xgbe_serdes_reset_cdr() argument
289 serdes_regs, lane + 1, 5); in netcp_xgbe_serdes_reset_cdr()
298 tbus = netcp_xgbe_serdes_read_select_tbus(serdes_regs, lane + in netcp_xgbe_serdes_reset_cdr()
301 pr_debug("XGBE: CDR centered, DLPF: %4d,%d,%d.\n", in netcp_xgbe_serdes_reset_cdr()
336 pr_debug("XGBE PCSR Linked Lane: %d\n", i); in netcp_xgbe_check_link_status()
342 pr_debug("XGBE PCSR Recover Lane: %d\n", i); in netcp_xgbe_check_link_status()
413 pr_debug("XGBE: detected link down on lane 0\n"); in netcp_xgbe_serdes_check_lane()
416 pr_debug("XGBE: detected link down on lane 1\n"); in netcp_xgbe_serdes_check_lane()
420 return -ETIMEDOUT; in netcp_xgbe_serdes_check_lane()
430 int lane, int cm, int c1, int c2) in netcp_xgbe_serdes_setup_cm_c1_c2() argument
435 reg_rmw(serdes_regs + cfg_cm_c1_c2[i].ofs + (0x200 * lane), in netcp_xgbe_serdes_setup_cm_c1_c2()
465 /* This is EVM + RTM-BOC specific */ in netcp_xgbe_serdes_config()
487 /* read COMLANE bits 4:0 */ in netcp_xgbe_serdes_init()
490 pr_debug("XGBE: serdes already in operation - reset\n"); in netcp_xgbe_serdes_init()