xref: /OK3568_Linux_fs/kernel/drivers/net/wireless/rockchip_wlan/ssv6xxx/smac/efuse.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /*
2  * Copyright (c) 2015 South Silicon Valley Microelectronics Inc.
3  * Copyright (c) 2015 iComm 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, either version 3 of the License, or
8  * (at your option) any later version.
9  * This program is distributed in the hope that it will be useful, but
10  * WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12  * See the GNU General Public License for more details.
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  */
16 
17 #ifndef _SSV_EFUSE_H_
18 #define _SSV_EFUSE_H_
19 #include "dev.h"
20 struct efuse_map {
21     u8 offset;
22     u8 byte_cnts;
23     u16 value;
24 };
25 enum efuse_data_item {
26    EFUSE_R_CALIBRATION_RESULT = 1,
27    EFUSE_SAR_RESULT,
28    EFUSE_MAC,
29    EFUSE_CRYSTAL_FREQUENCY_OFFSET,
30    EFUSE_TX_POWER_INDEX_1,
31    EFUSE_TX_POWER_INDEX_2
32 };
33 #define EFUSE_HWSET_MAX_SIZE (256-32)
34 #define EFUSE_MAX_SECTION_MAP (EFUSE_HWSET_MAX_SIZE>>5)
35 #define SSV_EFUSE_ID_READ_SWITCH 0xC2000128
36 #define SSV_EFUSE_ID_RAW_DATA_BASE 0xC200014C
37 #define SSV_EFUSE_READ_SWITCH 0xC200012C
38 #define SSV_EFUSE_RAW_DATA_BASE 0xC2000150
39 void efuse_read_all_map(struct ssv_hw *sh);
40 #endif
41