1 /******************************************************************************
3 * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of version 2 of the GNU General Public License as
7 * published by the Free Software Foundation.
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 ******************************************************************************/
15 #ifndef __RTW_EEPROM_H__
16 #define __RTW_EEPROM_H__
19 #define RTL8712_EEPROM_ID 0x8712
20 /* define EEPROM_MAX_SIZE 256 */
22 #define HWSET_MAX_SIZE_128 128
23 #define HWSET_MAX_SIZE_256 256
24 #define HWSET_MAX_SIZE_512 512
26 #define EEPROM_MAX_SIZE HWSET_MAX_SIZE_512
28 #define CLOCK_RATE 50 /* 100us */
31 #define EEPROM_READ_OPCODE 06
32 #define EEPROM_WRITE_OPCODE 05
33 #define EEPROM_ERASE_OPCODE 07
34 #define EEPROM_EWEN_OPCODE 19 /* Erase/write enable */
35 #define EEPROM_EWDS_OPCODE 16 /* Erase/write disable */
39 #define EUROPE 0x1 /* temp, should be provided later */
40 #define JAPAN 0x2 /* temp, should be provided later */
42 #define eeprom_cis0_sz 17
43 #define eeprom_cis1_sz 50
46 /* Customer ID, note that: */
47 /* This variable is initiailzed through EEPROM or registry, */
48 /* however, its definition may be different with that in EEPROM for */
49 /* EEPROM size consideration. So, we have to perform proper translation between them. */
50 /* Besides, CustomerID of registry has precedence of that of EEPROM. */
51 /* defined below. 060703, by rcnjko. */
53 typedef enum _RT_CUSTOMER_ID
56 RT_CID_8187_ALPHA0 = 1,
57 RT_CID_8187_SERCOMM_PS = 2,
58 RT_CID_8187_HW_LED = 3,
59 RT_CID_8187_NETGEAR = 4,
61 RT_CID_819x_CAMEO = 6,
62 RT_CID_819x_RUNTOP = 7,
63 RT_CID_819x_Senao = 8,
64 RT_CID_TOSHIBA = 9, /* Merge by Jacken, 2008/01/31. */
65 RT_CID_819x_Netcore = 10,
66 RT_CID_Nettronix = 11,
70 RT_CID_CHINA_MOBILE = 15,
71 RT_CID_819x_ALPHA = 16,
72 RT_CID_819x_Sitecom = 17,
73 RT_CID_CCX = 18, /* It's set under CCX logo test and isn't demanded for CCX functions, but for test behavior like retry limit and tx report. By Bruce, 2009-02-17. */
74 RT_CID_819x_Lenovo = 19,
76 RT_CID_819x_Edimax_Belkin = 21,
77 RT_CID_819x_Sercomm_Belkin = 22,
78 RT_CID_819x_CAMEO1 = 23,
80 RT_CID_819x_Acer = 25,
81 RT_CID_819x_AzWave_ASUS = 26,
82 RT_CID_819x_AzWave = 27, /* For AzWave in PCIe, The ID is AzWave use and not only Asus */
84 RT_CID_819x_WNC_COREGA = 29,
85 RT_CID_819x_Arcadyan_Belkin = 30,
86 RT_CID_819x_SAMSUNG = 31,
87 RT_CID_819x_CLEVO = 32,
88 RT_CID_819x_DELL = 33,
89 RT_CID_819x_PRONETS = 34,
90 RT_CID_819x_Edimax_ASUS = 35,
94 RT_CID_819x_Xavi = 39,
95 RT_CID_LENOVO_CHINA = 40,
96 RT_CID_INTEL_CHINA = 41,
97 RT_CID_TPLINK_HPWR = 42,
98 RT_CID_819x_Sercomm_Netgear = 43,
99 RT_CID_819x_ALPHA_Dlink = 44,/* add by ylb 20121012 for customer led for alpha */
100 RT_CID_WNC_NEC = 45,/* add by page for NEC */
101 RT_CID_DNI_BUFFALO = 46,/* add by page for NEC */
102 }RT_CUSTOMER_ID, *PRT_CUSTOMER_ID;
106 u8 bautoload_fail_flag;
107 u8 bloadfile_fail_flag;
108 u8 bloadmac_fail_flag;
111 u8 mac_addr[6]; /* PermanentAddress */
116 u8 efuse_eeprom_data[EEPROM_MAX_SIZE]; /* 92C:256bytes, 88E:512bytes, we use union set (512bytes) */
119 u8 EEPROMRFGainOffset;
124 u8 cis0[eeprom_cis0_sz];
125 u8 cis1[eeprom_cis1_sz];
128 #endif /* __RTL871X_EEPROM_H__ */