1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24#ifndef _E1000_I210_H_
25#define _E1000_I210_H_
26
27s32 igb_acquire_swfw_sync_i210(struct e1000_hw *hw, u16 mask);
28void igb_release_swfw_sync_i210(struct e1000_hw *hw, u16 mask);
29s32 igb_valid_led_default_i210(struct e1000_hw *hw, u16 *data);
30s32 igb_read_invm_version(struct e1000_hw *hw,
31 struct e1000_fw_version *invm_ver);
32s32 igb_read_xmdio_reg(struct e1000_hw *hw, u16 addr, u8 dev_addr, u16 *data);
33s32 igb_write_xmdio_reg(struct e1000_hw *hw, u16 addr, u8 dev_addr, u16 data);
34s32 igb_init_nvm_params_i210(struct e1000_hw *hw);
35bool igb_get_flash_presence_i210(struct e1000_hw *hw);
36s32 igb_pll_workaround_i210(struct e1000_hw *hw);
37s32 igb_get_cfg_done_i210(struct e1000_hw *hw);
38
39#define E1000_STM_OPCODE 0xDB00
40#define E1000_EEPROM_FLASH_SIZE_WORD 0x11
41
42#define INVM_DWORD_TO_RECORD_TYPE(invm_dword) \
43 (u8)((invm_dword) & 0x7)
44#define INVM_DWORD_TO_WORD_ADDRESS(invm_dword) \
45 (u8)(((invm_dword) & 0x0000FE00) >> 9)
46#define INVM_DWORD_TO_WORD_DATA(invm_dword) \
47 (u16)(((invm_dword) & 0xFFFF0000) >> 16)
48
49enum E1000_INVM_STRUCTURE_TYPE {
50 E1000_INVM_UNINITIALIZED_STRUCTURE = 0x00,
51 E1000_INVM_WORD_AUTOLOAD_STRUCTURE = 0x01,
52 E1000_INVM_CSR_AUTOLOAD_STRUCTURE = 0x02,
53 E1000_INVM_PHY_REGISTER_AUTOLOAD_STRUCTURE = 0x03,
54 E1000_INVM_RSA_KEY_SHA256_STRUCTURE = 0x04,
55 E1000_INVM_INVALIDATED_STRUCTURE = 0x0F,
56};
57
58#define E1000_INVM_RSA_KEY_SHA256_DATA_SIZE_IN_DWORDS 8
59#define E1000_INVM_CSR_AUTOLOAD_DATA_SIZE_IN_DWORDS 1
60#define E1000_INVM_ULT_BYTES_SIZE 8
61#define E1000_INVM_RECORD_SIZE_IN_BYTES 4
62#define E1000_INVM_VER_FIELD_ONE 0x1FF8
63#define E1000_INVM_VER_FIELD_TWO 0x7FE000
64#define E1000_INVM_IMGTYPE_FIELD 0x1F800000
65
66#define E1000_INVM_MAJOR_MASK 0x3F0
67#define E1000_INVM_MINOR_MASK 0xF
68#define E1000_INVM_MAJOR_SHIFT 4
69
70#define ID_LED_DEFAULT_I210 ((ID_LED_OFF1_ON2 << 8) | \
71 (ID_LED_DEF1_DEF2 << 4) | \
72 (ID_LED_OFF1_OFF2))
73#define ID_LED_DEFAULT_I210_SERDES ((ID_LED_DEF1_DEF2 << 8) | \
74 (ID_LED_DEF1_DEF2 << 4) | \
75 (ID_LED_OFF1_ON2))
76
77
78#define NVM_INIT_CTRL_2_DEFAULT_I211 0X7243
79#define NVM_INIT_CTRL_4_DEFAULT_I211 0x00C1
80#define NVM_LED_1_CFG_DEFAULT_I211 0x0184
81#define NVM_LED_0_2_CFG_DEFAULT_I211 0x200C
82
83
84#define E1000_PCI_PMCSR 0x44
85#define E1000_PCI_PMCSR_D3 0x03
86#define E1000_MAX_PLL_TRIES 5
87#define E1000_PHY_PLL_UNCONF 0xFF
88#define E1000_PHY_PLL_FREQ_PAGE 0xFC
89#define E1000_PHY_PLL_FREQ_REG 0x000E
90#define E1000_INVM_DEFAULT_AL 0x202F
91#define E1000_INVM_AUTOLOAD 0x0A
92#define E1000_INVM_PLL_WO_VAL 0x0010
93
94#endif
95