Lines Matching +full:0 +full:x7c00
127 #define XGBE_PHY_PORT_SPEED_100 BIT(0)
132 #define XGBE_MUTEX_RELEASE 0x80000000
137 #define XGBE_SFP_SERIAL_ID_ADDRESS 0x50
138 #define XGBE_SFP_DIAG_INFO_ADDRESS 0x51
139 #define XGBE_SFP_PHY_ADDRESS 0x56
140 #define XGBE_GPIO_ADDRESS_PCA9555 0x20
143 #define XGBE_GPIO_NO_TX_FAULT BIT(0)
160 XGBE_PORT_MODE_RSVD = 0,
174 XGBE_CONN_TYPE_NONE = 0,
184 XGBE_SFP_COMM_DIRECT = 0,
189 XGBE_SFP_CABLE_UNKNOWN = 0,
195 XGBE_SFP_BASE_UNKNOWN = 0,
208 XGBE_SFP_SPEED_UNKNOWN = 0,
214 /* SFP Serial ID Base ID values relative to an offset of 0 */
215 #define XGBE_SFP_BASE_ID 0
216 #define XGBE_SFP_ID_SFP 0x03
219 #define XGBE_SFP_EXT_ID_SFP 0x04
228 #define XGBE_SFP_BASE_1GBE_CC_SX BIT(0)
238 #define XGBE_SFP_BASE_BR_1GBE_MIN 0x0a
239 #define XGBE_SFP_BASE_BR_1GBE_MAX 0x0d
240 #define XGBE_SFP_BASE_BR_10GBE_MIN 0x64
241 #define XGBE_SFP_BASE_BR_10GBE_MAX 0x68
298 XGBE_MDIO_RESET_NONE = 0,
306 XGBE_PHY_REDRV_IF_MDIO = 0,
312 XGBE_PHY_REDRV_MODEL_4223 = 0,
322 #define XGBE_PHY_REDRV_MODE_REG 0x12b0
407 redrv_data[0] = ((reg >> 8) & 0xff) << 1; in xgbe_phy_redrv_write()
408 redrv_data[1] = reg & 0xff; in xgbe_phy_redrv_write()
413 csum = 0; in xgbe_phy_redrv_write()
414 for (i = 0; i < 4; i++) { in xgbe_phy_redrv_write()
449 if (redrv_data[0] != 0xff) { in xgbe_phy_redrv_write()
521 return 0; in xgbe_phy_sfp_put_mux()
524 mux_channel = 0; in xgbe_phy_sfp_put_mux()
540 return 0; in xgbe_phy_sfp_get_mux()
574 mutex_id = 0; in xgbe_phy_get_comm_ownership()
591 return 0; in xgbe_phy_get_comm_ownership()
627 mii_data[0] = reg & 0xff; in xgbe_phy_i2c_mii_write()
861 __ETHTOOL_DECLARE_LINK_MODE_MASK(supported) = { 0, }; in xgbe_phy_finisar_phy_quirks()
868 if ((phy_id & 0xfffffff0) != 0x01ff0cc0) in xgbe_phy_finisar_phy_quirks()
872 phy_write(phy_data->phydev, 0x16, 0x0001); in xgbe_phy_finisar_phy_quirks()
873 phy_write(phy_data->phydev, 0x00, 0x9140); in xgbe_phy_finisar_phy_quirks()
874 phy_write(phy_data->phydev, 0x16, 0x0000); in xgbe_phy_finisar_phy_quirks()
877 phy_write(phy_data->phydev, 0x1b, 0x9084); in xgbe_phy_finisar_phy_quirks()
878 phy_write(phy_data->phydev, 0x09, 0x0e00); in xgbe_phy_finisar_phy_quirks()
879 phy_write(phy_data->phydev, 0x00, 0x8140); in xgbe_phy_finisar_phy_quirks()
880 phy_write(phy_data->phydev, 0x04, 0x0d01); in xgbe_phy_finisar_phy_quirks()
881 phy_write(phy_data->phydev, 0x00, 0x9140); in xgbe_phy_finisar_phy_quirks()
902 __ETHTOOL_DECLARE_LINK_MODE_MASK(supported) = { 0, }; in xgbe_phy_belfuse_phy_quirks()
922 if ((phy_id & 0xfffffff0) != 0x03625d10) in xgbe_phy_belfuse_phy_quirks()
926 phy_write(phy_data->phydev, 0x18, 0x7007); in xgbe_phy_belfuse_phy_quirks()
927 reg = phy_read(phy_data->phydev, 0x18); in xgbe_phy_belfuse_phy_quirks()
928 phy_write(phy_data->phydev, 0x18, reg & ~0x0080); in xgbe_phy_belfuse_phy_quirks()
931 phy_write(phy_data->phydev, 0x1c, 0x7c00); in xgbe_phy_belfuse_phy_quirks()
932 reg = phy_read(phy_data->phydev, 0x1c); in xgbe_phy_belfuse_phy_quirks()
933 reg &= 0x03ff; in xgbe_phy_belfuse_phy_quirks()
934 reg &= ~0x0001; in xgbe_phy_belfuse_phy_quirks()
935 phy_write(phy_data->phydev, 0x1c, 0x8000 | 0x7c00 | reg | 0x0001); in xgbe_phy_belfuse_phy_quirks()
938 reg = phy_read(phy_data->phydev, 0x00); in xgbe_phy_belfuse_phy_quirks()
939 phy_write(phy_data->phydev, 0x00, reg | 0x00800); in xgbe_phy_belfuse_phy_quirks()
942 phy_write(phy_data->phydev, 0x1c, 0x7c00); in xgbe_phy_belfuse_phy_quirks()
943 reg = phy_read(phy_data->phydev, 0x1c); in xgbe_phy_belfuse_phy_quirks()
944 reg &= 0x03ff; in xgbe_phy_belfuse_phy_quirks()
945 reg &= ~0x0006; in xgbe_phy_belfuse_phy_quirks()
946 phy_write(phy_data->phydev, 0x1c, 0x8000 | 0x7c00 | reg | 0x0004); in xgbe_phy_belfuse_phy_quirks()
949 reg = phy_read(phy_data->phydev, 0x00); in xgbe_phy_belfuse_phy_quirks()
950 phy_write(phy_data->phydev, 0x00, reg & ~0x00800); in xgbe_phy_belfuse_phy_quirks()
953 phy_write(phy_data->phydev, 0x1c, 0x7c00); in xgbe_phy_belfuse_phy_quirks()
954 reg = phy_read(phy_data->phydev, 0x1c); in xgbe_phy_belfuse_phy_quirks()
955 reg &= 0x03ff; in xgbe_phy_belfuse_phy_quirks()
956 reg &= ~0x0001; in xgbe_phy_belfuse_phy_quirks()
957 phy_write(phy_data->phydev, 0x1c, 0x8000 | 0x7c00 | reg); in xgbe_phy_belfuse_phy_quirks()
960 reg = phy_read(phy_data->phydev, 0x00); in xgbe_phy_belfuse_phy_quirks()
961 phy_write(phy_data->phydev, 0x00, reg & ~0x00800); in xgbe_phy_belfuse_phy_quirks()
996 return 0; in xgbe_phy_find_phy_device()
999 pdata->an_again = 0; in xgbe_phy_find_phy_device()
1003 return 0; in xgbe_phy_find_phy_device()
1008 return 0; in xgbe_phy_find_phy_device()
1056 return 0; in xgbe_phy_find_phy_device()
1067 phy_data->sfp_phy_avail = 0; in xgbe_phy_sfp_external_phy()
1074 if (ret < 0) in xgbe_phy_sfp_external_phy()
1201 sfp_data[XGBE_SFP_BASE_VENDOR_NAME_LEN] = '\0'; in xgbe_phy_sfp_eeprom_info()
1207 sfp_data[XGBE_SFP_BASE_VENDOR_PN_LEN] = '\0'; in xgbe_phy_sfp_eeprom_info()
1213 sfp_data[XGBE_SFP_BASE_VENDOR_REV_LEN] = '\0'; in xgbe_phy_sfp_eeprom_info()
1219 sfp_data[XGBE_SFP_BASE_VENDOR_SN_LEN] = '\0'; in xgbe_phy_sfp_eeprom_info()
1228 for (cc = 0; len; buf++, len--) in xgbe_phy_sfp_verify_eeprom()
1249 eeprom_addr = 0; in xgbe_phy_sfp_read_eeprom()
1285 phy_data->sfp_changed = 0; in xgbe_phy_sfp_read_eeprom()
1301 gpio_reg = 0; in xgbe_phy_sfp_signals()
1311 phy_data->sfp_gpio_inputs = (gpio_ports[1] << 8) | gpio_ports[0]; in xgbe_phy_sfp_signals()
1323 phy_data->sfp_phy_avail = 0; in xgbe_phy_sfp_mod_absent()
1324 memset(&phy_data->sfp_eeprom, 0, sizeof(phy_data->sfp_eeprom)); in xgbe_phy_sfp_mod_absent()
1329 phy_data->sfp_rx_los = 0; in xgbe_phy_sfp_reset()
1330 phy_data->sfp_tx_fault = 0; in xgbe_phy_sfp_reset()
1424 eeprom_addr = 0; in xgbe_phy_module_eeprom()
1439 eeprom_addr = 0; in xgbe_phy_module_eeprom()
1452 for (i = 0, j = eeprom->offset; i < eeprom->len; i++, j++) { in xgbe_phy_module_eeprom()
1495 return 0; in xgbe_phy_module_info()
1502 u16 lcl_adv = 0, rmt_adv = 0; in xgbe_phy_phydev_flowctrl()
1505 pdata->phy.tx_pause = 0; in xgbe_phy_phydev_flowctrl()
1506 pdata->phy.rx_pause = 0; in xgbe_phy_phydev_flowctrl()
1581 if (lp_reg & 0x100) in xgbe_phy_an37_outcome()
1583 if (lp_reg & 0x80) in xgbe_phy_an37_outcome()
1588 pdata->phy.tx_pause = 0; in xgbe_phy_an37_outcome()
1589 pdata->phy.rx_pause = 0; in xgbe_phy_an37_outcome()
1591 if (ad_reg & lp_reg & 0x100) { in xgbe_phy_an37_outcome()
1594 } else if (ad_reg & lp_reg & 0x80) { in xgbe_phy_an37_outcome()
1595 if (ad_reg & 0x100) in xgbe_phy_an37_outcome()
1597 else if (lp_reg & 0x100) in xgbe_phy_an37_outcome()
1602 if (lp_reg & 0x20) in xgbe_phy_an37_outcome()
1607 mode = (ad_reg & 0x20) ? XGBE_MODE_X : XGBE_MODE_UNKNOWN; in xgbe_phy_an37_outcome()
1629 if (lp_reg & 0x80) in xgbe_phy_an73_redrv_outcome()
1631 if (lp_reg & 0x20) in xgbe_phy_an73_redrv_outcome()
1635 if (ad_reg & 0x80) { in xgbe_phy_an73_redrv_outcome()
1645 } else if (ad_reg & 0x20) { in xgbe_phy_an73_redrv_outcome()
1686 if (lp_reg & 0xc000) in xgbe_phy_an73_redrv_outcome()
1704 if (lp_reg & 0x400) in xgbe_phy_an73_outcome()
1706 if (lp_reg & 0x800) in xgbe_phy_an73_outcome()
1711 pdata->phy.tx_pause = 0; in xgbe_phy_an73_outcome()
1712 pdata->phy.rx_pause = 0; in xgbe_phy_an73_outcome()
1714 if (ad_reg & lp_reg & 0x400) { in xgbe_phy_an73_outcome()
1717 } else if (ad_reg & lp_reg & 0x800) { in xgbe_phy_an73_outcome()
1718 if (ad_reg & 0x400) in xgbe_phy_an73_outcome()
1720 else if (lp_reg & 0x400) in xgbe_phy_an73_outcome()
1728 if (lp_reg & 0x80) in xgbe_phy_an73_outcome()
1730 if (lp_reg & 0x20) in xgbe_phy_an73_outcome()
1734 if (ad_reg & 0x80) in xgbe_phy_an73_outcome()
1736 else if (ad_reg & 0x20) in xgbe_phy_an73_outcome()
1744 if (lp_reg & 0xc000) in xgbe_phy_an73_outcome()
1839 return 0; in xgbe_phy_an_config()
1907 redrv_reg = XGBE_PHY_REDRV_MODE_REG + (phy_data->redrv_lane * 0x1000); in xgbe_phy_set_redrv_mode_mdio()
1922 redrv_reg = XGBE_PHY_REDRV_MODE_REG + (phy_data->redrv_lane * 0x1000); in xgbe_phy_set_redrv_mode_i2c()
1959 unsigned int s0 = 0; in xgbe_phy_perform_ratechange()
1973 XP_IOWRITE(pdata, XP_DRIVER_SCRATCH_1, 0); in xgbe_phy_perform_ratechange()
1992 xgbe_phy_perform_ratechange(pdata, 5, 0); in xgbe_phy_rrc()
2002 xgbe_phy_perform_ratechange(pdata, 0, 0); in xgbe_phy_power_off()
2017 xgbe_phy_perform_ratechange(pdata, 3, 0); in xgbe_phy_sfi_mode()
2081 xgbe_phy_perform_ratechange(pdata, 4, 0); in xgbe_phy_kr_mode()
2095 xgbe_phy_perform_ratechange(pdata, 2, 0); in xgbe_phy_kx_2500_mode()
2550 *an_restart = 0; in xgbe_phy_link_status()
2558 return 0; in xgbe_phy_link_status()
2562 return 0; in xgbe_phy_link_status()
2568 if (ret < 0) in xgbe_phy_link_status()
2569 return 0; in xgbe_phy_link_status()
2573 return 0; in xgbe_phy_link_status()
2576 return 0; in xgbe_phy_link_status()
2589 phy_data->rrc_count = 0; in xgbe_phy_link_status()
2593 return 0; in xgbe_phy_link_status()
2690 gpio_data[0] = 2; in xgbe_phy_i2c_mdio_reset()
2691 gpio_data[1] = gpio_ports[0]; in xgbe_phy_i2c_mdio_reset()
2725 return 0; in xgbe_phy_mdio_reset()
2770 return 0; in xgbe_phy_mdio_reset_setup()
2795 return 0; in xgbe_phy_mdio_reset_setup()
2908 phy_data->phy_cdr_notrack = 0; in xgbe_phy_cdr_track()
3051 return 0; in xgbe_phy_start()
3071 return 0; in xgbe_phy_reset()
3316 dev_dbg(pdata->dev, "phy supported=0x%*pb\n", in xgbe_phy_init()
3357 mii->phy_mask = ~0; in xgbe_phy_init()
3366 return 0; in xgbe_phy_init()