aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/bnx2x/bnx2x_hsi.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/bnx2x/bnx2x_hsi.h')
-rw-r--r--drivers/net/bnx2x/bnx2x_hsi.h111
1 files changed, 105 insertions, 6 deletions
diff --git a/drivers/net/bnx2x/bnx2x_hsi.h b/drivers/net/bnx2x/bnx2x_hsi.h
index f494bc333f52..bab3b2d8cc7a 100644
--- a/drivers/net/bnx2x/bnx2x_hsi.h
+++ b/drivers/net/bnx2x/bnx2x_hsi.h
@@ -238,7 +238,88 @@ struct port_hw_cfg { /* port 0: 0x12c port 1: 0x2bc */
238 238
239 u16 xgxs_config_tx[4]; /* 0x1A0 */ 239 u16 xgxs_config_tx[4]; /* 0x1A0 */
240 240
241 u32 Reserved1[64]; /* 0x1A8 */ 241 u32 Reserved1[57]; /* 0x1A8 */
242 u32 speed_capability_mask2; /* 0x28C */
243#define PORT_HW_CFG_SPEED_CAPABILITY2_D3_MASK 0x0000FFFF
244#define PORT_HW_CFG_SPEED_CAPABILITY2_D3_SHIFT 0
245#define PORT_HW_CFG_SPEED_CAPABILITY2_D3_10M_FULL 0x00000001
246#define PORT_HW_CFG_SPEED_CAPABILITY2_D3__ 0x00000002
247#define PORT_HW_CFG_SPEED_CAPABILITY2_D3___ 0x00000004
248#define PORT_HW_CFG_SPEED_CAPABILITY2_D3_100M_FULL 0x00000008
249#define PORT_HW_CFG_SPEED_CAPABILITY2_D3_1G 0x00000010
250#define PORT_HW_CFG_SPEED_CAPABILITY2_D3_2_DOT_5G 0x00000020
251#define PORT_HW_CFG_SPEED_CAPABILITY2_D3_10G 0x00000040
252#define PORT_HW_CFG_SPEED_CAPABILITY2_D3_12G 0x00000080
253#define PORT_HW_CFG_SPEED_CAPABILITY2_D3_12_DOT_5G 0x00000100
254#define PORT_HW_CFG_SPEED_CAPABILITY2_D3_13G 0x00000200
255#define PORT_HW_CFG_SPEED_CAPABILITY2_D3_15G 0x00000400
256#define PORT_HW_CFG_SPEED_CAPABILITY2_D3_16G 0x00000800
257
258#define PORT_HW_CFG_SPEED_CAPABILITY2_D0_MASK 0xFFFF0000
259#define PORT_HW_CFG_SPEED_CAPABILITY2_D0_SHIFT 16
260#define PORT_HW_CFG_SPEED_CAPABILITY2_D0_10M_FULL 0x00010000
261#define PORT_HW_CFG_SPEED_CAPABILITY2_D0__ 0x00020000
262#define PORT_HW_CFG_SPEED_CAPABILITY2_D0___ 0x00040000
263#define PORT_HW_CFG_SPEED_CAPABILITY2_D0_100M_FULL 0x00080000
264#define PORT_HW_CFG_SPEED_CAPABILITY2_D0_1G 0x00100000
265#define PORT_HW_CFG_SPEED_CAPABILITY2_D0_2_DOT_5G 0x00200000
266#define PORT_HW_CFG_SPEED_CAPABILITY2_D0_10G 0x00400000
267#define PORT_HW_CFG_SPEED_CAPABILITY2_D0_12G 0x00800000
268#define PORT_HW_CFG_SPEED_CAPABILITY2_D0_12_DOT_5G 0x01000000
269#define PORT_HW_CFG_SPEED_CAPABILITY2_D0_13G 0x02000000
270#define PORT_HW_CFG_SPEED_CAPABILITY2_D0_15G 0x04000000
271#define PORT_HW_CFG_SPEED_CAPABILITY2_D0_16G 0x08000000
272
273 /* In the case where two media types (e.g. copper and fiber) are
274 present and electrically active at the same time, PHY Selection
275 will determine which of the two PHYs will be designated as the
276 Active PHY and used for a connection to the network. */
277 u32 multi_phy_config; /* 0x290 */
278#define PORT_HW_CFG_PHY_SELECTION_MASK 0x00000007
279#define PORT_HW_CFG_PHY_SELECTION_SHIFT 0
280#define PORT_HW_CFG_PHY_SELECTION_HARDWARE_DEFAULT 0x00000000
281#define PORT_HW_CFG_PHY_SELECTION_FIRST_PHY 0x00000001
282#define PORT_HW_CFG_PHY_SELECTION_SECOND_PHY 0x00000002
283#define PORT_HW_CFG_PHY_SELECTION_FIRST_PHY_PRIORITY 0x00000003
284#define PORT_HW_CFG_PHY_SELECTION_SECOND_PHY_PRIORITY 0x00000004
285
286 /* When enabled, all second phy nvram parameters will be swapped
287 with the first phy parameters */
288#define PORT_HW_CFG_PHY_SWAPPED_MASK 0x00000008
289#define PORT_HW_CFG_PHY_SWAPPED_SHIFT 3
290#define PORT_HW_CFG_PHY_SWAPPED_DISABLED 0x00000000
291#define PORT_HW_CFG_PHY_SWAPPED_ENABLED 0x00000008
292
293
294 /* Address of the second external phy */
295 u32 external_phy_config2; /* 0x294 */
296#define PORT_HW_CFG_XGXS_EXT_PHY2_ADDR_MASK 0x000000FF
297#define PORT_HW_CFG_XGXS_EXT_PHY2_ADDR_SHIFT 0
298
299 /* The second XGXS external PHY type */
300#define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_MASK 0x0000FF00
301#define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_SHIFT 8
302#define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_DIRECT 0x00000000
303#define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_BCM8071 0x00000100
304#define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_BCM8072 0x00000200
305#define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_BCM8073 0x00000300
306#define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_BCM8705 0x00000400
307#define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_BCM8706 0x00000500
308#define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_BCM8726 0x00000600
309#define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_BCM8481 0x00000700
310#define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_SFX7101 0x00000800
311#define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_BCM8727 0x00000900
312#define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_BCM8727_NOC 0x00000a00
313#define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_BCM84823 0x00000b00
314#define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_BCM54640 0x00000c00
315#define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_BCM84833 0x00000d00
316#define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_FAILURE 0x0000fd00
317#define PORT_HW_CFG_XGXS_EXT_PHY2_TYPE_NOT_CONN 0x0000ff00
318
319 /* 4 times 16 bits for all 4 lanes. For some external PHYs (such as
320 8706, 8726 and 8727) not all 4 values are needed. */
321 u16 xgxs_config2_rx[4]; /* 0x296 */
322 u16 xgxs_config2_tx[4]; /* 0x2A0 */
242 323
243 u32 lane_config; 324 u32 lane_config;
244#define PORT_HW_CFG_LANE_SWAP_CFG_MASK 0x0000ffff 325#define PORT_HW_CFG_LANE_SWAP_CFG_MASK 0x0000ffff
@@ -532,10 +613,17 @@ struct port_feat_cfg { /* port 0: 0x454 port 1: 0x4c8 */
532#define PORT_FEATURE_FLOW_CONTROL_NONE 0x00000400 613#define PORT_FEATURE_FLOW_CONTROL_NONE 0x00000400
533 614
534 /* The default for MCP link configuration, 615 /* The default for MCP link configuration,
535 uses the same defines as link_config */ 616 uses the same defines as link_config */
536 u32 mfw_wol_link_cfg; 617 u32 mfw_wol_link_cfg;
618 /* The default for the driver of the second external phy,
619 uses the same defines as link_config */
620 u32 link_config2; /* 0x47C */
537 621
538 u32 reserved[19]; 622 /* The default for MCP of the second external phy,
623 uses the same defines as link_config */
624 u32 mfw_wol_link_cfg2; /* 0x480 */
625
626 u32 Reserved2[17]; /* 0x484 */
539 627
540}; 628};
541 629
@@ -703,8 +791,14 @@ struct drv_func_mb {
703 * The optic module verification commands require bootcode 791 * The optic module verification commands require bootcode
704 * v5.0.6 or later 792 * v5.0.6 or later
705 */ 793 */
706#define DRV_MSG_CODE_VRFY_OPT_MDL 0xa0000000 794#define DRV_MSG_CODE_VRFY_FIRST_PHY_OPT_MDL 0xa0000000
707#define REQ_BC_VER_4_VRFY_OPT_MDL 0x00050006 795#define REQ_BC_VER_4_VRFY_FIRST_PHY_OPT_MDL 0x00050006
796 /*
797 * The specific optic module verification command requires bootcode
798 * v5.2.12 or later
799 */
800#define DRV_MSG_CODE_VRFY_SPECIFIC_PHY_OPT_MDL 0xa1000000
801#define REQ_BC_VER_4_VRFY_SPECIFIC_PHY_OPT_MDL 0x00050234
708 802
709#define BIOS_MSG_CODE_LIC_CHALLENGE 0xff010000 803#define BIOS_MSG_CODE_LIC_CHALLENGE 0xff010000
710#define BIOS_MSG_CODE_LIC_RESPONSE 0xff020000 804#define BIOS_MSG_CODE_LIC_RESPONSE 0xff020000
@@ -939,7 +1033,12 @@ struct shmem2_region {
939#define SHMEM_DCC_SUPPORT_SET_PROTOCOL_TLV 0x00000040 1033#define SHMEM_DCC_SUPPORT_SET_PROTOCOL_TLV 0x00000040
940#define SHMEM_DCC_SUPPORT_SET_PRIORITY_TLV 0x00000080 1034#define SHMEM_DCC_SUPPORT_SET_PRIORITY_TLV 0x00000080
941#define SHMEM_DCC_SUPPORT_DEFAULT SHMEM_DCC_SUPPORT_NONE 1035#define SHMEM_DCC_SUPPORT_DEFAULT SHMEM_DCC_SUPPORT_NONE
942 1036 u32 ext_phy_fw_version2[PORT_MAX];
1037 /*
1038 * For backwards compatibility, if the mf_cfg_addr does not exist
1039 * (the size filed is smaller than 0xc) the mf_cfg resides at the
1040 * end of struct shmem_region
1041 */
943}; 1042};
944 1043
945 1044