Merge tag 'wberr-v4.14-1' of git://git.kernel.org/pub/scm/linux/kernel/git/jlayton...
[sfrench/cifs-2.6.git] / drivers / staging / rtlwifi / phydm / phydm_reg.h
1 /******************************************************************************
2  *
3  * Copyright(c) 2007 - 2016  Realtek Corporation.
4  *
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.
8  *
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
12  * more details.
13  *
14  * The full GNU General Public License is included in this distribution in the
15  * file called LICENSE.
16  *
17  * Contact Information:
18  * wlanfae <wlanfae@realtek.com>
19  * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park,
20  * Hsinchu 300, Taiwan.
21  *
22  * Larry Finger <Larry.Finger@lwfinger.net>
23  *
24  *****************************************************************************/
25 /* ************************************************************
26  * File Name: odm_reg.h
27  *
28  * Description:
29  *
30  * This file is for general register definition.
31  *
32  *
33  * *************************************************************/
34 #ifndef __HAL_ODM_REG_H__
35 #define __HAL_ODM_REG_H__
36
37 /*
38  * Register Definition
39  */
40
41 /* MAC REG */
42 #define ODM_BB_RESET 0x002
43 #define ODM_DUMMY 0x4fe
44 #define RF_T_METER_OLD 0x24
45 #define RF_T_METER_NEW 0x42
46
47 #define ODM_EDCA_VO_PARAM 0x500
48 #define ODM_EDCA_VI_PARAM 0x504
49 #define ODM_EDCA_BE_PARAM 0x508
50 #define ODM_EDCA_BK_PARAM 0x50C
51 #define ODM_TXPAUSE 0x522
52
53 /* LTE_COEX */
54 #define REG_LTECOEX_CTRL 0x07C0
55 #define REG_LTECOEX_WRITE_DATA 0x07C4
56 #define REG_LTECOEX_READ_DATA 0x07C8
57 #define REG_LTECOEX_PATH_CONTROL 0x70
58
59 /* BB REG */
60 #define ODM_FPGA_PHY0_PAGE8 0x800
61 #define ODM_PSD_SETTING 0x808
62 #define ODM_AFE_SETTING 0x818
63 #define ODM_TXAGC_B_6_18 0x830
64 #define ODM_TXAGC_B_24_54 0x834
65 #define ODM_TXAGC_B_MCS32_5 0x838
66 #define ODM_TXAGC_B_MCS0_MCS3 0x83c
67 #define ODM_TXAGC_B_MCS4_MCS7 0x848
68 #define ODM_TXAGC_B_MCS8_MCS11 0x84c
69 #define ODM_ANALOG_REGISTER 0x85c
70 #define ODM_RF_INTERFACE_OUTPUT 0x860
71 #define ODM_TXAGC_B_MCS12_MCS15 0x868
72 #define ODM_TXAGC_B_11_A_2_11 0x86c
73 #define ODM_AD_DA_LSB_MASK 0x874
74 #define ODM_ENABLE_3_WIRE 0x88c
75 #define ODM_PSD_REPORT 0x8b4
76 #define ODM_R_ANT_SELECT 0x90c
77 #define ODM_CCK_ANT_SELECT 0xa07
78 #define ODM_CCK_PD_THRESH 0xa0a
79 #define ODM_CCK_RF_REG1 0xa11
80 #define ODM_CCK_MATCH_FILTER 0xa20
81 #define ODM_CCK_RAKE_MAC 0xa2e
82 #define ODM_CCK_CNT_RESET 0xa2d
83 #define ODM_CCK_TX_DIVERSITY 0xa2f
84 #define ODM_CCK_FA_CNT_MSB 0xa5b
85 #define ODM_CCK_FA_CNT_LSB 0xa5c
86 #define ODM_CCK_NEW_FUNCTION 0xa75
87 #define ODM_OFDM_PHY0_PAGE_C 0xc00
88 #define ODM_OFDM_RX_ANT 0xc04
89 #define ODM_R_A_RXIQI 0xc14
90 #define ODM_R_A_AGC_CORE1 0xc50
91 #define ODM_R_A_AGC_CORE2 0xc54
92 #define ODM_R_B_AGC_CORE1 0xc58
93 #define ODM_R_AGC_PAR 0xc70
94 #define ODM_R_HTSTF_AGC_PAR 0xc7c
95 #define ODM_TX_PWR_TRAINING_A 0xc90
96 #define ODM_TX_PWR_TRAINING_B 0xc98
97 #define ODM_OFDM_FA_CNT1 0xcf0
98 #define ODM_OFDM_PHY0_PAGE_D 0xd00
99 #define ODM_OFDM_FA_CNT2 0xda0
100 #define ODM_OFDM_FA_CNT3 0xda4
101 #define ODM_OFDM_FA_CNT4 0xda8
102 #define ODM_TXAGC_A_6_18 0xe00
103 #define ODM_TXAGC_A_24_54 0xe04
104 #define ODM_TXAGC_A_1_MCS32 0xe08
105 #define ODM_TXAGC_A_MCS0_MCS3 0xe10
106 #define ODM_TXAGC_A_MCS4_MCS7 0xe14
107 #define ODM_TXAGC_A_MCS8_MCS11 0xe18
108 #define ODM_TXAGC_A_MCS12_MCS15 0xe1c
109
110 /* RF REG */
111 #define ODM_GAIN_SETTING 0x00
112 #define ODM_CHANNEL 0x18
113 #define ODM_RF_T_METER 0x24
114 #define ODM_RF_T_METER_92D 0x42
115 #define ODM_RF_T_METER_88E 0x42
116 #define ODM_RF_T_METER_92E 0x42
117 #define ODM_RF_T_METER_8812 0x42
118 #define REG_RF_TX_GAIN_OFFSET 0x55
119
120 /* ant Detect Reg */
121 #define ODM_DPDT 0x300
122
123 /* PSD Init */
124 #define ODM_PSDREG 0x808
125
126 /* 92D path Div */
127 #define PATHDIV_REG 0xB30
128 #define PATHDIV_TRI 0xBA0
129
130 /*
131  * Bitmap Definition
132  */
133
134 #define BIT_FA_RESET BIT(0)
135
136 #define REG_OFDM_0_XA_TX_IQ_IMBALANCE 0xC80
137 #define REG_OFDM_0_ECCA_THRESHOLD 0xC4C
138 #define REG_FPGA0_XB_LSSI_READ_BACK 0x8A4
139 #define REG_FPGA0_TX_GAIN_STAGE 0x80C
140 #define REG_OFDM_0_XA_AGC_CORE1 0xC50
141 #define REG_OFDM_0_XB_AGC_CORE1 0xC58
142 #define REG_A_TX_SCALE_JAGUAR 0xC1C
143 #define REG_B_TX_SCALE_JAGUAR 0xE1C
144
145 #define REG_AFE_XTAL_CTRL 0x0024
146 #define REG_AFE_PLL_CTRL 0x0028
147 #define REG_MAC_PHY_CTRL 0x002C
148
149 #define RF_CHNLBW 0x18
150
151 #endif