1 /* Broadcom NetXtreme-C/E network driver.
2  *
3  * Copyright (c) 2014-2015 Broadcom Corporation
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation.
8  */
9 
10 #ifndef __BNXT_FW_HDR_H__
11 #define __BNXT_FW_HDR_H__
12 
13 #define BNXT_FIRMWARE_BIN_SIGNATURE     0x1a4d4342	/* "BCM"+0x1a */
14 
15 enum SUPPORTED_FAMILY {
16 	DEVICE_5702_3_4_FAMILY,		/* 0  - Denali, Vinson, K2 */
17 	DEVICE_5705_FAMILY,		/* 1  - Bachelor */
18 	DEVICE_SHASTA_FAMILY,		/* 2  - 5751 */
19 	DEVICE_5706_FAMILY,		/* 3  - Teton */
20 	DEVICE_5714_FAMILY,		/* 4  - Hamilton */
21 	DEVICE_STANFORD_FAMILY,		/* 5  - 5755 */
22 	DEVICE_STANFORD_ME_FAMILY,	/* 6  - 5756 */
23 	DEVICE_SOLEDAD_FAMILY,		/* 7  - 5761[E] */
24 	DEVICE_CILAI_FAMILY,		/* 8  - 57780/60/90/91 */
25 	DEVICE_ASPEN_FAMILY,		/* 9  - 57781/85/61/65/91/95 */
26 	DEVICE_ASPEN_PLUS_FAMILY,	/* 10 - 57786 */
27 	DEVICE_LOGAN_FAMILY,		/* 11 - Any device in the Logan family
28 					 */
29 	DEVICE_LOGAN_5762,		/* 12 - Logan Enterprise (aka Columbia)
30 					 */
31 	DEVICE_LOGAN_57767,		/* 13 - Logan Client */
32 	DEVICE_LOGAN_57787,		/* 14 - Logan Consumer */
33 	DEVICE_LOGAN_5725,		/* 15 - Logan Server (TruManage-enabled)
34 					 */
35 	DEVICE_SAWTOOTH_FAMILY,		/* 16 - 5717/18 */
36 	DEVICE_COTOPAXI_FAMILY,		/* 17 - 5719 */
37 	DEVICE_SNAGGLETOOTH_FAMILY,	/* 18 - 5720 */
38 	DEVICE_CUMULUS_FAMILY,		/* 19 - Cumulus/Whitney */
39 	MAX_DEVICE_FAMILY
40 };
41 
42 enum SUPPORTED_CODE {
43 	CODE_ASF1,		/* 0  - ASF VERSION 1.03 <deprecated> */
44 	CODE_ASF2,		/* 1  - ASF VERSION 2.00 <deprecated> */
45 	CODE_PASSTHRU,		/* 2  - PassThru         <deprecated> */
46 	CODE_PT_SEC,		/* 3  - PassThru with security <deprecated> */
47 	CODE_UMP,		/* 4  - UMP                     <deprecated> */
48 	CODE_BOOT,		/* 5  - Bootcode */
49 	CODE_DASH,		/* 6  - TruManage (DASH + ASF + PMCI)
50 				 *	Management firmwares
51 				 */
52 	CODE_MCTP_PASSTHRU,	/* 7  - NCSI / MCTP Passt-hrough firmware */
53 	CODE_PM_OFFLOAD,	/* 8  - Power-Management Proxy Offload firmwares
54 				 */
55 	CODE_MDNS_SD_OFFLOAD,	/* 9  - Multicast DNS Service Discovery Proxys
56 				 *	Offload firmware
57 				 */
58 	CODE_DISC_OFFLOAD,	/* 10 - Discovery Offload firmware */
59 	CODE_MUSTANG,		/* 11 - I2C Error reporting APE firmwares
60 				 *	<deprecated>
61 				 */
62 	CODE_ARP_BATCH,		/* 12 - ARP Batch firmware */
63 	CODE_SMASH,		/* 13 - TruManage (SMASH + DCMI/IPMI + PMCI)
64 				 *	Management firmware
65 				 */
66 	CODE_APE_DIAG,		/* 14 - APE Test Diag firmware */
67 	CODE_APE_PATCH,		/* 15 - APE Patch firmware */
68 	CODE_TANG_PATCH,	/* 16 - TANG Patch firmware */
69 	CODE_KONG_FW,		/* 17 - KONG firmware */
70 	CODE_KONG_PATCH,	/* 18 - KONG Patch firmware */
71 	CODE_BONO_FW,		/* 19 - BONO firmware */
72 	CODE_BONO_PATCH,	/* 20 - BONO Patch firmware */
73 
74 	MAX_CODE_TYPE,
75 };
76 
77 enum SUPPORTED_MEDIA {
78 	MEDIA_COPPER,		/* 0 */
79 	MEDIA_FIBER,		/* 1 */
80 	MEDIA_NONE,		/* 2 */
81 	MEDIA_COPPER_FIBER,	/* 3 */
82 	MAX_MEDIA_TYPE,
83 };
84 
85 struct bnxt_fw_header {
86 	__le32 signature;	/* constains the constant value of
87 				 * BNXT_Firmware_Bin_Signatures
88 				 */
89 	u8 flags;		/* reserved for ChiMP use */
90 	u8 code_type;		/* enum SUPPORTED_CODE */
91 	u8 device;		/* enum SUPPORTED_FAMILY */
92 	u8 media;		/* enum SUPPORTED_MEDIA */
93 	u8 version[16];		/* the null terminated version string to
94 				 * indicate the version of the
95 				 * file, this will be copied from the binary
96 				 * file version string
97 				 */
98 	u8 build;
99 	u8 revision;
100 	u8 minor_ver;
101 	u8 major_ver;
102 };
103 
104 #endif
105