aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/igb/e1000_phy.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/igb/e1000_phy.h')
-rw-r--r--drivers/net/igb/e1000_phy.h39
1 files changed, 38 insertions, 1 deletions
diff --git a/drivers/net/igb/e1000_phy.h b/drivers/net/igb/e1000_phy.h
index ebe4b616db8a..565a6dbb3714 100644
--- a/drivers/net/igb/e1000_phy.h
+++ b/drivers/net/igb/e1000_phy.h
@@ -43,7 +43,6 @@ enum e1000_smart_speed {
43 43
44s32 igb_check_downshift(struct e1000_hw *hw); 44s32 igb_check_downshift(struct e1000_hw *hw);
45s32 igb_check_reset_block(struct e1000_hw *hw); 45s32 igb_check_reset_block(struct e1000_hw *hw);
46s32 igb_copper_link_autoneg(struct e1000_hw *hw);
47s32 igb_copper_link_setup_igp(struct e1000_hw *hw); 46s32 igb_copper_link_setup_igp(struct e1000_hw *hw);
48s32 igb_copper_link_setup_m88(struct e1000_hw *hw); 47s32 igb_copper_link_setup_m88(struct e1000_hw *hw);
49s32 igb_phy_force_speed_duplex_igp(struct e1000_hw *hw); 48s32 igb_phy_force_speed_duplex_igp(struct e1000_hw *hw);
@@ -57,10 +56,21 @@ s32 igb_phy_sw_reset(struct e1000_hw *hw);
57s32 igb_phy_hw_reset(struct e1000_hw *hw); 56s32 igb_phy_hw_reset(struct e1000_hw *hw);
58s32 igb_read_phy_reg_igp(struct e1000_hw *hw, u32 offset, u16 *data); 57s32 igb_read_phy_reg_igp(struct e1000_hw *hw, u32 offset, u16 *data);
59s32 igb_set_d3_lplu_state(struct e1000_hw *hw, bool active); 58s32 igb_set_d3_lplu_state(struct e1000_hw *hw, bool active);
59s32 igb_setup_copper_link(struct e1000_hw *hw);
60s32 igb_write_phy_reg_igp(struct e1000_hw *hw, u32 offset, u16 data); 60s32 igb_write_phy_reg_igp(struct e1000_hw *hw, u32 offset, u16 data);
61s32 igb_phy_has_link(struct e1000_hw *hw, u32 iterations, 61s32 igb_phy_has_link(struct e1000_hw *hw, u32 iterations,
62 u32 usec_interval, bool *success); 62 u32 usec_interval, bool *success);
63void igb_power_up_phy_copper(struct e1000_hw *hw);
64void igb_power_down_phy_copper(struct e1000_hw *hw);
63s32 igb_phy_init_script_igp3(struct e1000_hw *hw); 65s32 igb_phy_init_script_igp3(struct e1000_hw *hw);
66s32 igb_read_phy_reg_mdic(struct e1000_hw *hw, u32 offset, u16 *data);
67s32 igb_write_phy_reg_mdic(struct e1000_hw *hw, u32 offset, u16 data);
68s32 igb_read_phy_reg_i2c(struct e1000_hw *hw, u32 offset, u16 *data);
69s32 igb_write_phy_reg_i2c(struct e1000_hw *hw, u32 offset, u16 data);
70s32 igb_copper_link_setup_82580(struct e1000_hw *hw);
71s32 igb_get_phy_info_82580(struct e1000_hw *hw);
72s32 igb_phy_force_speed_duplex_82580(struct e1000_hw *hw);
73s32 igb_get_cable_length_82580(struct e1000_hw *hw);
64 74
65/* IGP01E1000 Specific Registers */ 75/* IGP01E1000 Specific Registers */
66#define IGP01E1000_PHY_PORT_CONFIG 0x10 /* Port Config */ 76#define IGP01E1000_PHY_PORT_CONFIG 0x10 /* Port Config */
@@ -75,6 +85,33 @@ s32 igb_phy_init_script_igp3(struct e1000_hw *hw);
75#define IGP01E1000_PSCR_FORCE_MDI_MDIX 0x2000 /* 0=MDI, 1=MDIX */ 85#define IGP01E1000_PSCR_FORCE_MDI_MDIX 0x2000 /* 0=MDI, 1=MDIX */
76#define IGP01E1000_PSCFR_SMART_SPEED 0x0080 86#define IGP01E1000_PSCFR_SMART_SPEED 0x0080
77 87
88#define I82580_ADDR_REG 16
89#define I82580_CFG_REG 22
90#define I82580_CFG_ASSERT_CRS_ON_TX (1 << 15)
91#define I82580_CFG_ENABLE_DOWNSHIFT (3 << 10) /* auto downshift 100/10 */
92#define I82580_CTRL_REG 23
93#define I82580_CTRL_DOWNSHIFT_MASK (7 << 10)
94
95/* 82580 specific PHY registers */
96#define I82580_PHY_CTRL_2 18
97#define I82580_PHY_LBK_CTRL 19
98#define I82580_PHY_STATUS_2 26
99#define I82580_PHY_DIAG_STATUS 31
100
101/* I82580 PHY Status 2 */
102#define I82580_PHY_STATUS2_REV_POLARITY 0x0400
103#define I82580_PHY_STATUS2_MDIX 0x0800
104#define I82580_PHY_STATUS2_SPEED_MASK 0x0300
105#define I82580_PHY_STATUS2_SPEED_1000MBPS 0x0200
106#define I82580_PHY_STATUS2_SPEED_100MBPS 0x0100
107
108/* I82580 PHY Control 2 */
109#define I82580_PHY_CTRL2_AUTO_MDIX 0x0400
110#define I82580_PHY_CTRL2_FORCE_MDI_MDIX 0x0200
111
112/* I82580 PHY Diagnostics Status */
113#define I82580_DSTATUS_CABLE_LENGTH 0x03FC
114#define I82580_DSTATUS_CABLE_LENGTH_SHIFT 2
78/* Enable flexible speed on link-up */ 115/* Enable flexible speed on link-up */
79#define IGP02E1000_PM_D0_LPLU 0x0002 /* For D0a states */ 116#define IGP02E1000_PM_D0_LPLU 0x0002 /* For D0a states */
80#define IGP02E1000_PM_D3_LPLU 0x0004 /* For all other states */ 117#define IGP02E1000_PM_D3_LPLU 0x0004 /* For all other states */