1 /* SPDX-License-Identifier: GPL-2.0 */
2 /******************************************************************************
4 * Copyright(c) 2007 - 2010 Realtek Corporation. All rights reserved.
6 ******************************************************************************/
7 #ifndef __RTL871X_EEPROM_H__
8 #define __RTL871X_EEPROM_H__
10 #include "osdep_service.h"
12 #define RTL8712_EEPROM_ID 0x8712
13 #define EEPROM_MAX_SIZE 256
14 #define CLOCK_RATE 50 /*100us*/
17 #define EEPROM_READ_OPCODE 06
18 #define EEPROM_WRITE_OPCODE 05
19 #define EEPROM_ERASE_OPCODE 07
20 #define EEPROM_EWEN_OPCODE 19 /* Erase/write enable*/
21 #define EEPROM_EWDS_OPCODE 16 /* Erase/write disable*/
23 #define EEPROM_CID_DEFAULT 0x0
24 #define EEPROM_CID_ALPHA 0x1
25 #define EEPROM_CID_Senao 0x3
26 #define EEPROM_CID_NetCore 0x5
27 #define EEPROM_CID_CAMEO 0X8
28 #define EEPROM_CID_SITECOM 0x9
29 #define EEPROM_CID_COREGA 0xB
30 #define EEPROM_CID_EDIMAX_BELKIN 0xC
31 #define EEPROM_CID_SERCOMM_BELKIN 0xE
32 #define EEPROM_CID_CAMEO1 0xF
33 #define EEPROM_CID_WNC_COREGA 0x12
34 #define EEPROM_CID_CLEVO 0x13
35 #define EEPROM_CID_WHQL 0xFE
39 RT_CID_8187_ALPHA0 = 1,
40 RT_CID_8187_SERCOMM_PS = 2,
41 RT_CID_8187_HW_LED = 3,
42 RT_CID_8187_NETGEAR = 4,
44 RT_CID_819x_CAMEO = 6,
45 RT_CID_819x_RUNTOP = 7,
46 RT_CID_819x_Senao = 8,
48 RT_CID_819x_Netcore = 10,
49 RT_CID_Nettronix = 11,
53 RT_CID_819x_ALPHA = 15,
54 RT_CID_819x_Sitecom = 16,
56 RT_CID_819x_Lenovo = 18,
58 RT_CID_819x_Edimax_Belkin = 20,
59 RT_CID_819x_Sercomm_Belkin = 21,
60 RT_CID_819x_CAMEO1 = 22,
62 RT_CID_819x_Acer = 24,
63 RT_CID_819x_AzWave_ASUS = 25,
64 RT_CID_819x_AzWave = 26,
65 RT_CID_819x_WNC_COREGA = 27,
66 RT_CID_819x_CLEVO = 28,
70 u8 bautoload_fail_flag;
80 u8 efuse_eeprom_data[EEPROM_MAX_SIZE];
81 enum RT_CUSTOMER_ID CustomerID;
84 void r8712_eeprom_write16(struct _adapter *padapter, u16 reg, u16 data);
85 u16 r8712_eeprom_read16(struct _adapter *padapter, u16 reg);
87 #endif /*__RTL871X_EEPROM_H__*/