dt-bindings: Document the Rockchip RGA bindings
[firefly-linux-kernel-4.4.55.git] / drivers / net / wireless / rockchip_wlan / rtl8723bs / hal / OUTSRC-BTCoexist / HalBtc8821a2Ant.h
1 //===========================================\r
2 // The following is for 8821A 2Ant BT Co-exist definition\r
3 //===========================================\r
4 #define BT_INFO_8821A_2ANT_B_FTP                                                BIT7\r
5 #define BT_INFO_8821A_2ANT_B_A2DP                                       BIT6\r
6 #define BT_INFO_8821A_2ANT_B_HID                                                BIT5\r
7 #define BT_INFO_8821A_2ANT_B_SCO_BUSY                           BIT4\r
8 #define BT_INFO_8821A_2ANT_B_ACL_BUSY                           BIT3\r
9 #define BT_INFO_8821A_2ANT_B_INQ_PAGE                           BIT2\r
10 #define BT_INFO_8821A_2ANT_B_SCO_ESCO                           BIT1\r
11 #define BT_INFO_8821A_2ANT_B_CONNECTION                         BIT0\r
12 \r
13 #define         BTC_RSSI_COEX_THRESH_TOL_8821A_2ANT             2\r
14 \r
15 typedef enum _BT_INFO_SRC_8821A_2ANT{\r
16         BT_INFO_SRC_8821A_2ANT_WIFI_FW                  = 0x0,\r
17         BT_INFO_SRC_8821A_2ANT_BT_RSP                           = 0x1,\r
18         BT_INFO_SRC_8821A_2ANT_BT_ACTIVE_SEND           = 0x2,\r
19         BT_INFO_SRC_8821A_2ANT_MAX\r
20 }BT_INFO_SRC_8821A_2ANT,*PBT_INFO_SRC_8821A_2ANT;\r
21 \r
22 typedef enum _BT_8821A_2ANT_BT_STATUS{\r
23         BT_8821A_2ANT_BT_STATUS_IDLE                            = 0x0,\r
24         BT_8821A_2ANT_BT_STATUS_CONNECTED_IDLE  = 0x1,\r
25         BT_8821A_2ANT_BT_STATUS_NON_IDLE                        = 0x2,\r
26         BT_8821A_2ANT_BT_STATUS_MAX\r
27 }BT_8821A_2ANT_BT_STATUS,*PBT_8821A_2ANT_BT_STATUS;\r
28 \r
29 typedef enum _BT_8821A_2ANT_COEX_ALGO{\r
30         BT_8821A_2ANT_COEX_ALGO_UNDEFINED                       = 0x0,\r
31         BT_8821A_2ANT_COEX_ALGO_SCO                             = 0x1,\r
32         BT_8821A_2ANT_COEX_ALGO_HID                             = 0x2,\r
33         BT_8821A_2ANT_COEX_ALGO_A2DP                            = 0x3,\r
34         BT_8821A_2ANT_COEX_ALGO_A2DP_PANHS              = 0x4,\r
35         BT_8821A_2ANT_COEX_ALGO_PANEDR                  = 0x5,\r
36         BT_8821A_2ANT_COEX_ALGO_PANHS                   = 0x6,\r
37         BT_8821A_2ANT_COEX_ALGO_PANEDR_A2DP             = 0x7,\r
38         BT_8821A_2ANT_COEX_ALGO_PANEDR_HID              = 0x8,\r
39         BT_8821A_2ANT_COEX_ALGO_HID_A2DP_PANEDR = 0x9,\r
40         BT_8821A_2ANT_COEX_ALGO_HID_A2DP                        = 0xa,\r
41         BT_8821A_2ANT_COEX_ALGO_MAX                             = 0xb,\r
42 }BT_8821A_2ANT_COEX_ALGO,*PBT_8821A_2ANT_COEX_ALGO;\r
43 \r
44 typedef struct _COEX_DM_8821A_2ANT{\r
45         // fw mechanism\r
46         BOOLEAN         bPreDecBtPwr;\r
47         BOOLEAN         bCurDecBtPwr;\r
48         u1Byte          preFwDacSwingLvl;\r
49         u1Byte          curFwDacSwingLvl;\r
50         BOOLEAN         bCurIgnoreWlanAct;\r
51         BOOLEAN         bPreIgnoreWlanAct;\r
52         u1Byte          prePsTdma;\r
53         u1Byte          curPsTdma;\r
54         u1Byte          psTdmaPara[5];\r
55         u1Byte          psTdmaDuAdjType;\r
56         BOOLEAN         bResetTdmaAdjust;\r
57         BOOLEAN         bPrePsTdmaOn;\r
58         BOOLEAN         bCurPsTdmaOn;\r
59         BOOLEAN         bPreBtAutoReport;\r
60         BOOLEAN         bCurBtAutoReport;\r
61 \r
62         // sw mechanism\r
63         BOOLEAN         bPreRfRxLpfShrink;\r
64         BOOLEAN         bCurRfRxLpfShrink;\r
65         u4Byte          btRf0x1eBackup;\r
66         BOOLEAN         bPreLowPenaltyRa;\r
67         BOOLEAN         bCurLowPenaltyRa;\r
68         BOOLEAN         bPreDacSwingOn;\r
69         u4Byte          preDacSwingLvl;\r
70         BOOLEAN         bCurDacSwingOn;\r
71         u4Byte          curDacSwingLvl;\r
72         BOOLEAN         bPreAdcBackOff;\r
73         BOOLEAN         bCurAdcBackOff;\r
74         BOOLEAN         bPreAgcTableEn;\r
75         BOOLEAN         bCurAgcTableEn;\r
76         u4Byte          preVal0x6c0;\r
77         u4Byte          curVal0x6c0;\r
78         u4Byte          preVal0x6c4;\r
79         u4Byte          curVal0x6c4;\r
80         u4Byte          preVal0x6c8;\r
81         u4Byte          curVal0x6c8;\r
82         u1Byte          preVal0x6cc;\r
83         u1Byte          curVal0x6cc;\r
84         BOOLEAN         bLimitedDig;\r
85 \r
86         // algorithm related\r
87         u1Byte          preAlgorithm;\r
88         u1Byte          curAlgorithm;\r
89         u1Byte          btStatus;\r
90         u1Byte          wifiChnlInfo[3];\r
91 } COEX_DM_8821A_2ANT, *PCOEX_DM_8821A_2ANT;\r
92 \r
93 typedef struct _COEX_STA_8821A_2ANT{\r
94         BOOLEAN                                 bBtLinkExist;\r
95         BOOLEAN                                 bScoExist;\r
96         BOOLEAN                                 bA2dpExist;\r
97         BOOLEAN                                 bHidExist;\r
98         BOOLEAN                                 bPanExist;\r
99 \r
100         BOOLEAN                                 bUnderLps;\r
101         BOOLEAN                                 bUnderIps;\r
102         u4Byte                                  highPriorityTx;\r
103         u4Byte                                  highPriorityRx;\r
104         u4Byte                                  lowPriorityTx;\r
105         u4Byte                                  lowPriorityRx;\r
106         u1Byte                                  btRssi;\r
107         u1Byte                                  preBtRssiState;\r
108         u1Byte                                  preWifiRssiState[4];\r
109         BOOLEAN                                 bC2hBtInfoReqSent;\r
110         u1Byte                                  btInfoC2h[BT_INFO_SRC_8821A_2ANT_MAX][10];\r
111         u4Byte                                  btInfoC2hCnt[BT_INFO_SRC_8821A_2ANT_MAX];\r
112         BOOLEAN                                 bC2hBtInquiryPage;\r
113         u1Byte                                  btRetryCnt;\r
114         u1Byte                                  btInfoExt;\r
115 }COEX_STA_8821A_2ANT, *PCOEX_STA_8821A_2ANT;\r
116 \r
117 //===========================================\r
118 // The following is interface which will notify coex module.\r
119 //===========================================\r
120 VOID\r
121 EXhalbtc8821a2ant_PowerOnSetting(\r
122         IN      PBTC_COEXIST            pBtCoexist\r
123         );\r
124 VOID\r
125 EXhalbtc8821a2ant_InitHwConfig(\r
126         IN      PBTC_COEXIST            pBtCoexist,\r
127         IN      BOOLEAN                         bWifiOnly\r
128         );\r
129 VOID\r
130 EXhalbtc8821a2ant_InitCoexDm(\r
131         IN      PBTC_COEXIST            pBtCoexist\r
132         );\r
133 VOID\r
134 EXhalbtc8821a2ant_IpsNotify(\r
135         IN      PBTC_COEXIST            pBtCoexist,\r
136         IN      u1Byte                  type\r
137         );\r
138 VOID\r
139 EXhalbtc8821a2ant_LpsNotify(\r
140         IN      PBTC_COEXIST            pBtCoexist,\r
141         IN      u1Byte                  type\r
142         );\r
143 VOID\r
144 EXhalbtc8821a2ant_ScanNotify(\r
145         IN      PBTC_COEXIST            pBtCoexist,\r
146         IN      u1Byte                  type\r
147         );\r
148 VOID\r
149 EXhalbtc8821a2ant_ConnectNotify(\r
150         IN      PBTC_COEXIST            pBtCoexist,\r
151         IN      u1Byte                  type\r
152         );\r
153 VOID\r
154 EXhalbtc8821a2ant_MediaStatusNotify(\r
155         IN      PBTC_COEXIST                    pBtCoexist,\r
156         IN      u1Byte                          type\r
157         );\r
158 VOID\r
159 EXhalbtc8821a2ant_SpecialPacketNotify(\r
160         IN      PBTC_COEXIST                    pBtCoexist,\r
161         IN      u1Byte                          type\r
162         );\r
163 VOID\r
164 EXhalbtc8821a2ant_BtInfoNotify(\r
165         IN      PBTC_COEXIST            pBtCoexist,\r
166         IN      pu1Byte                 tmpBuf,\r
167         IN      u1Byte                  length\r
168         );\r
169 VOID\r
170 EXhalbtc8821a2ant_HaltNotify(\r
171         IN      PBTC_COEXIST                    pBtCoexist\r
172         );\r
173 VOID\r
174 EXhalbtc8821a2ant_PnpNotify(\r
175         IN      PBTC_COEXIST                    pBtCoexist,\r
176         IN      u1Byte                          pnpState\r
177         );\r
178 VOID\r
179 EXhalbtc8821a2ant_Periodical(\r
180         IN      PBTC_COEXIST                    pBtCoexist\r
181         );\r
182 VOID\r
183 EXhalbtc8821a2ant_DisplayCoexInfo(\r
184         IN      PBTC_COEXIST            pBtCoexist\r
185         );\r
186 \r