Lines Matching +full:switch +full:- +full:x +full:- +full:sgmii
7 * Copyright (C) 2003-2018 Cavium, Inc.
14 * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty
21 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
29 * Functions for SGMII initialization, configuration,
35 #include <asm/octeon/cvmx-config.h>
37 #include <asm/octeon/cvmx-helper.h>
38 #include <asm/octeon/cvmx-helper-board.h>
40 #include <asm/octeon/cvmx-gmxx-defs.h>
41 #include <asm/octeon/cvmx-pcsx-defs.h>
42 #include <asm/octeon/cvmx-pcsxx-defs.h>
45 * Perform initialization required only once for an SGMII port.
54 const uint64_t clock_mhz = cvmx_sysinfo_get()->cpu_clock_hz / 1000000; in __cvmx_helper_sgmii_hardware_init_one_time()
66 * appropriate value. 1000BASE-X specifies a 10ms in __cvmx_helper_sgmii_hardware_init_one_time()
67 * interval. SGMII specifies a 1.6ms interval. in __cvmx_helper_sgmii_hardware_init_one_time()
74 /* 1000BASE-X */ in __cvmx_helper_sgmii_hardware_init_one_time()
78 /* SGMII */ in __cvmx_helper_sgmii_hardware_init_one_time()
88 * 1000BASE-X mode, tx_Config_Reg<D15:D0> is PCS*_AN*_ADV_REG. in __cvmx_helper_sgmii_hardware_init_one_time()
89 * In SGMII PHY mode, tx_Config_Reg<D15:D0> is in __cvmx_helper_sgmii_hardware_init_one_time()
90 * PCS*_SGM*_AN_ADV_REG. In SGMII MAC mode, in __cvmx_helper_sgmii_hardware_init_one_time()
95 /* 1000BASE-X */ in __cvmx_helper_sgmii_hardware_init_one_time()
122 /* MAC Mode - Nothing to do */ in __cvmx_helper_sgmii_hardware_init_one_time()
151 if (cvmx_sysinfo_get()->board_type != CVMX_BOARD_TYPE_SIM) { in __cvmx_helper_sgmii_hardware_init_link()
158 cvmx_dprintf("SGMII%d: Timeout waiting for port %d " in __cvmx_helper_sgmii_hardware_init_link()
161 return -1; in __cvmx_helper_sgmii_hardware_init_link()
167 * sgmii negotiation starts. in __cvmx_helper_sgmii_hardware_init_link()
177 * that sgmii autonegotiation is complete. In MAC mode this in __cvmx_helper_sgmii_hardware_init_link()
181 if ((cvmx_sysinfo_get()->board_type != CVMX_BOARD_TYPE_SIM) && in __cvmx_helper_sgmii_hardware_init_link()
185 /* cvmx_dprintf("SGMII%d: Port %d link timeout\n", interface, index); */ in __cvmx_helper_sgmii_hardware_init_link()
186 return -1; in __cvmx_helper_sgmii_hardware_init_link()
192 * Configure an SGMII link to the specified speed after the SERTES
224 ("SGMII%d: Timeout waiting for port %d to be idle\n", in __cvmx_helper_sgmii_hardware_init_link_speed()
226 return -1; in __cvmx_helper_sgmii_hardware_init_link_speed()
250 switch (link_info.s.speed) { in __cvmx_helper_sgmii_hardware_init_link_speed()
255 /* Setting from GMX-603 */ in __cvmx_helper_sgmii_hardware_init_link_speed()
298 * Bring up the SGMII interface to be ready for packet I/O but
321 if (cvmx_sysinfo_get()->board_type == CVMX_BOARD_TYPE_SIM) in __cvmx_helper_sgmii_hardware_init()
334 * Probe a SGMII interface and determine the number of ports
335 * connected to it. The SGMII interface should still be down after
347 * Due to errata GMX-700 on CN56XXp1.x and CN52XXp1.x, the in __cvmx_helper_sgmii_probe()
358 * Bringup and enable a SGMII interface. After this call packet
407 if (cvmx_sysinfo_get()->board_type == CVMX_BOARD_TYPE_SIM) { in __cvmx_helper_sgmii_link_get()
428 /* 1000BASE-X */ in __cvmx_helper_sgmii_link_get()
465 switch (pcsx_anx_results_reg.s.spd) { in __cvmx_helper_sgmii_link_get()