dt-bindings: Document the Rockchip RGA bindings
[firefly-linux-kernel-4.4.55.git] / drivers / net / wireless / rockchip_wlan / rtl8723bs / hal / OUTSRC-BTCoexist / HalBtc8812a2Ant.h
1 //===========================================\r
2 // The following is for 8812A 2Ant BT Co-exist definition\r
3 //===========================================\r
4 #define BT_AUTO_REPORT_ONLY_8812A_2ANT                          0\r
5 \r
6 #define BT_INFO_8812A_2ANT_B_FTP                                                BIT7\r
7 #define BT_INFO_8812A_2ANT_B_A2DP                                       BIT6\r
8 #define BT_INFO_8812A_2ANT_B_HID                                                BIT5\r
9 #define BT_INFO_8812A_2ANT_B_SCO_BUSY                           BIT4\r
10 #define BT_INFO_8812A_2ANT_B_ACL_BUSY                           BIT3\r
11 #define BT_INFO_8812A_2ANT_B_INQ_PAGE                           BIT2\r
12 #define BT_INFO_8812A_2ANT_B_SCO_ESCO                           BIT1\r
13 #define BT_INFO_8812A_2ANT_B_CONNECTION                         BIT0\r
14 \r
15 #define BT_INFO_8812A_2ANT_A2DP_BASIC_RATE(_BT_INFO_EXT_)       \\r
16                 (((_BT_INFO_EXT_&BIT0))? TRUE:FALSE)\r
17 \r
18 #define         BTC_RSSI_COEX_THRESH_TOL_8812A_2ANT             2\r
19 \r
20 typedef enum _BT_INFO_SRC_8812A_2ANT{\r
21         BT_INFO_SRC_8812A_2ANT_WIFI_FW                  = 0x0,\r
22         BT_INFO_SRC_8812A_2ANT_BT_RSP                           = 0x1,\r
23         BT_INFO_SRC_8812A_2ANT_BT_ACTIVE_SEND           = 0x2,\r
24         BT_INFO_SRC_8812A_2ANT_MAX\r
25 }BT_INFO_SRC_8812A_2ANT,*PBT_INFO_SRC_8812A_2ANT;\r
26 \r
27 typedef enum _BT_8812A_2ANT_BT_STATUS{\r
28         BT_8812A_2ANT_BT_STATUS_NON_CONNECTED_IDLE      = 0x0,\r
29         BT_8812A_2ANT_BT_STATUS_CONNECTED_IDLE          = 0x1,\r
30         BT_8812A_2ANT_BT_STATUS_INQ_PAGE                                = 0x2,\r
31         BT_8812A_2ANT_BT_STATUS_ACL_BUSY                                = 0x3,\r
32         BT_8812A_2ANT_BT_STATUS_SCO_BUSY                                = 0x4,\r
33         BT_8812A_2ANT_BT_STATUS_ACL_SCO_BUSY                    = 0x5,\r
34         BT_8812A_2ANT_BT_STATUS_MAX\r
35 }BT_8812A_2ANT_BT_STATUS,*PBT_8812A_2ANT_BT_STATUS;\r
36 \r
37 typedef enum _BT_8812A_2ANT_COEX_ALGO{\r
38         BT_8812A_2ANT_COEX_ALGO_UNDEFINED               = 0x0,\r
39         BT_8812A_2ANT_COEX_ALGO_SCO                             = 0x1,\r
40         BT_8812A_2ANT_COEX_ALGO_SCO_HID                 = 0x2,\r
41         BT_8812A_2ANT_COEX_ALGO_HID                             = 0x3,\r
42         BT_8812A_2ANT_COEX_ALGO_A2DP                    = 0x4,\r
43         BT_8812A_2ANT_COEX_ALGO_A2DP_PANHS              = 0x5,\r
44         BT_8812A_2ANT_COEX_ALGO_PANEDR                  = 0x6,\r
45         BT_8812A_2ANT_COEX_ALGO_PANHS                   = 0x7,\r
46         BT_8812A_2ANT_COEX_ALGO_PANEDR_A2DP             = 0x8,\r
47         BT_8812A_2ANT_COEX_ALGO_PANEDR_HID              = 0x9,\r
48         BT_8812A_2ANT_COEX_ALGO_HID_A2DP_PANEDR = 0xa,\r
49         BT_8812A_2ANT_COEX_ALGO_HID_A2DP_PANHS  = 0xb,\r
50         BT_8812A_2ANT_COEX_ALGO_HID_A2DP                = 0xc,\r
51         BT_8812A_2ANT_COEX_ALGO_MAX                             = 0xd\r
52 }BT_8812A_2ANT_COEX_ALGO,*PBT_8812A_2ANT_COEX_ALGO;\r
53 \r
54 typedef struct _COEX_DM_8812A_2ANT{\r
55         // fw mechanism\r
56         u1Byte          preBtDecPwrLvl;\r
57         u1Byte          curBtDecPwrLvl;\r
58         u1Byte          preFwDacSwingLvl;\r
59         u1Byte          curFwDacSwingLvl;\r
60         BOOLEAN         bCurIgnoreWlanAct;\r
61         BOOLEAN         bPreIgnoreWlanAct;\r
62         u1Byte          prePsTdma;\r
63         u1Byte          curPsTdma;\r
64         u1Byte          psTdmaPara[5];\r
65         u1Byte          psTdmaDuAdjType;\r
66         BOOLEAN         bAutoTdmaAdjust;\r
67         BOOLEAN         bAutoTdmaAdjustLowRssi;\r
68         BOOLEAN         bPrePsTdmaOn;\r
69         BOOLEAN         bCurPsTdmaOn;\r
70         BOOLEAN         bPreBtAutoReport;\r
71         BOOLEAN         bCurBtAutoReport;\r
72         u1Byte          preLps;\r
73         u1Byte          curLps;\r
74         u1Byte          preRpwm;\r
75         u1Byte          curRpwm;\r
76 \r
77         // sw mechanism\r
78         BOOLEAN         bPreRfRxLpfShrink;\r
79         BOOLEAN         bCurRfRxLpfShrink;\r
80         u4Byte          btRf0x1eBackup;\r
81         BOOLEAN         bPreLowPenaltyRa;\r
82         BOOLEAN         bCurLowPenaltyRa;\r
83         BOOLEAN         bPreDacSwingOn;\r
84         u4Byte          preDacSwingLvl;\r
85         BOOLEAN         bCurDacSwingOn;\r
86         u4Byte          curDacSwingLvl;\r
87         BOOLEAN         bPreAdcBackOff;\r
88         BOOLEAN         bCurAdcBackOff;\r
89         BOOLEAN         bPreAgcTableEn;\r
90         BOOLEAN         bCurAgcTableEn;\r
91         u4Byte          preVal0x6c0;\r
92         u4Byte          curVal0x6c0;\r
93         u4Byte          preVal0x6c4;\r
94         u4Byte          curVal0x6c4;\r
95         u4Byte          preVal0x6c8;\r
96         u4Byte          curVal0x6c8;\r
97         u1Byte          preVal0x6cc;\r
98         u1Byte          curVal0x6cc;\r
99         BOOLEAN         bLimitedDig;\r
100         u4Byte          backupArfrCnt1; // Auto Rate Fallback Retry cnt\r
101         u4Byte          backupArfrCnt2; // Auto Rate Fallback Retry cnt\r
102         u2Byte          backupRetryLimit;\r
103         u1Byte          backupAmpduMaxTime;\r
104 \r
105         // algorithm related\r
106         u1Byte          preAlgorithm;\r
107         u1Byte          curAlgorithm;\r
108         u1Byte          btStatus;\r
109         u1Byte          wifiChnlInfo[3];\r
110 \r
111         u4Byte          preRaMask;\r
112         u4Byte          curRaMask;\r
113         u1Byte          curRaMaskType;\r
114         u1Byte          preArfrType;\r
115         u1Byte          curArfrType;\r
116         u1Byte          preRetryLimitType;\r
117         u1Byte          curRetryLimitType;\r
118         u1Byte          preAmpduTimeType;\r
119         u1Byte          curAmpduTimeType;\r
120 } COEX_DM_8812A_2ANT, *PCOEX_DM_8812A_2ANT;\r
121 \r
122 typedef struct _COEX_STA_8812A_2ANT{\r
123         BOOLEAN                                 bBtLinkExist;\r
124         BOOLEAN                                 bScoExist;\r
125         BOOLEAN                                 bA2dpExist;\r
126         BOOLEAN                                 bHidExist;\r
127         BOOLEAN                                 bPanExist;\r
128 \r
129         BOOLEAN                                 bUnderLps;\r
130         BOOLEAN                                 bUnderIps;\r
131         u4Byte                                  highPriorityTx;\r
132         u4Byte                                  highPriorityRx;\r
133         u4Byte                                  lowPriorityTx;\r
134         u4Byte                                  lowPriorityRx;\r
135         u1Byte                                  btRssi;\r
136         u1Byte                                  preBtRssiState;\r
137         u1Byte                                  preWifiRssiState[4];\r
138         BOOLEAN                                 bC2hBtInfoReqSent;\r
139         u1Byte                                  btInfoC2h[BT_INFO_SRC_8812A_2ANT_MAX][10];\r
140         u4Byte                                  btInfoC2hCnt[BT_INFO_SRC_8812A_2ANT_MAX];\r
141         u4Byte                                  btInfoQueryCnt;\r
142         BOOLEAN                                 bC2hBtInquiryPage;\r
143         u1Byte                                  btRetryCnt;\r
144         u1Byte                                  btInfoExt;\r
145 }COEX_STA_8812A_2ANT, *PCOEX_STA_8812A_2ANT;\r
146 \r
147 //===========================================\r
148 // The following is interface which will notify coex module.\r
149 //===========================================\r
150 VOID\r
151 EXhalbtc8812a2ant_PowerOnSetting(\r
152         IN      PBTC_COEXIST            pBtCoexist\r
153         );\r
154 VOID\r
155 EXhalbtc8812a2ant_InitHwConfig(\r
156         IN      PBTC_COEXIST            pBtCoexist,\r
157         IN      BOOLEAN                         bWifiOnly\r
158         );\r
159 VOID\r
160 EXhalbtc8812a2ant_InitCoexDm(\r
161         IN      PBTC_COEXIST            pBtCoexist\r
162         );\r
163 VOID\r
164 EXhalbtc8812a2ant_IpsNotify(\r
165         IN      PBTC_COEXIST            pBtCoexist,\r
166         IN      u1Byte                  type\r
167         );\r
168 VOID\r
169 EXhalbtc8812a2ant_LpsNotify(\r
170         IN      PBTC_COEXIST            pBtCoexist,\r
171         IN      u1Byte                  type\r
172         );\r
173 VOID\r
174 EXhalbtc8812a2ant_ScanNotify(\r
175         IN      PBTC_COEXIST            pBtCoexist,\r
176         IN      u1Byte                  type\r
177         );\r
178 VOID\r
179 EXhalbtc8812a2ant_ConnectNotify(\r
180         IN      PBTC_COEXIST            pBtCoexist,\r
181         IN      u1Byte                  type\r
182         );\r
183 VOID\r
184 EXhalbtc8812a2ant_MediaStatusNotify(\r
185         IN      PBTC_COEXIST                    pBtCoexist,\r
186         IN      u1Byte                          type\r
187         );\r
188 VOID\r
189 EXhalbtc8812a2ant_SpecialPacketNotify(\r
190         IN      PBTC_COEXIST                    pBtCoexist,\r
191         IN      u1Byte                          type\r
192         );\r
193 VOID\r
194 EXhalbtc8812a2ant_BtInfoNotify(\r
195         IN      PBTC_COEXIST            pBtCoexist,\r
196         IN      pu1Byte                 tmpBuf,\r
197         IN      u1Byte                  length\r
198         );\r
199 VOID\r
200 EXhalbtc8812a2ant_HaltNotify(\r
201         IN      PBTC_COEXIST                    pBtCoexist\r
202         );\r
203 VOID\r
204 EXhalbtc8812a2ant_Periodical(\r
205         IN      PBTC_COEXIST                    pBtCoexist\r
206         );\r
207 VOID\r
208 EXhalbtc8812a2ant_DisplayCoexInfo(\r
209         IN      PBTC_COEXIST            pBtCoexist\r
210         );\r
211 VOID\r
212 EXhalbtc8812a2ant_DbgControl(\r
213         IN      PBTC_COEXIST                    pBtCoexist,\r
214         IN      u1Byte                          opCode,\r
215         IN      u1Byte                          opLen,\r
216         IN      pu1Byte                         pData\r
217         );\r
218 \r