1
2
3
4#ifndef __RTL8821AE_PWRSEQ_H__
5#define __RTL8821AE_PWRSEQ_H__
6
7#include "../pwrseqcmd.h"
8#include "../btcoexist/halbt_precomp.h"
9
10#define RTL8812_TRANS_CARDEMU_TO_ACT_STEPS 15
11#define RTL8812_TRANS_ACT_TO_CARDEMU_STEPS 15
12#define RTL8812_TRANS_CARDEMU_TO_SUS_STEPS 15
13#define RTL8812_TRANS_SUS_TO_CARDEMU_STEPS 15
14#define RTL8812_TRANS_CARDEMU_TO_PDN_STEPS 25
15#define RTL8812_TRANS_PDN_TO_CARDEMU_STEPS 15
16#define RTL8812_TRANS_ACT_TO_LPS_STEPS 15
17#define RTL8812_TRANS_LPS_TO_ACT_STEPS 15
18#define RTL8812_TRANS_END_STEPS 1
19
20
21
22
23
24#define RTL8812_TRANS_CARDEMU_TO_ACT \
25 {0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
26 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT2, 0 \
27 }, \
28 {0x0006, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
29 PWR_BASEADDR_MAC, PWR_CMD_POLLING, BIT1, BIT1 \
30 }, \
31 {0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
32 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT7, 0 \
33 }, \
34 {0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
35 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT3, 0 \
36 }, \
37 {0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
38 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT0, BIT0 \
39 }, \
40 {0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
41 PWR_BASEADDR_MAC, PWR_CMD_POLLING, BIT0, 0},
42
43#define RTL8812_TRANS_ACT_TO_CARDEMU \
44 {0x0c00, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
45 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0x04 \
46 }, \
47 {0x0e00, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
48 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0x04 \
49 }, \
50 {0x0002, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
51 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT0, 0 \
52 }, \
53 {0x0002, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
54 PWR_BASEADDR_MAC, PWR_CMD_DELAY, 0, PWRSEQ_DELAY_US \
55 }, \
56 {0x0002, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_PCI_MSK,\
57 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT1, 0 \
58 }, \
59 {0x0007, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
60 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0x2A \
61 }, \
62 {0x0008, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK,\
63 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0x02, 0 \
64 }, \
65 {0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
66 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT1, BIT1 \
67 }, \
68 {0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
69 PWR_BASEADDR_MAC, PWR_CMD_POLLING, BIT1, 0 \
70 },
71
72#define RTL8812_TRANS_CARDEMU_TO_SUS \
73 {0x0042, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK,\
74 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xF0, 0xc0}, \
75 {0x0042, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_PCI_MSK,\
76 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xF0, 0xE0}, \
77 {0x0043, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
78 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0x07 \
79 }, \
80 {0x0045, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
81 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0x00 \
82 }, \
83 {0x0046, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
84 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0xff \
85 }, \
86 {0x0047, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
87 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0 \
88 }, \
89 {0x0007, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK,\
90 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0 \
91 }, \
92 {0x0014, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
93 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0x80, BIT7 \
94 }, \
95 {0x0015, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
96 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0x01, BIT0 \
97 }, \
98 {0x0023, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
99 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0x10, BIT4 \
100 }, \
101 {0x0008, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK,\
102 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0x02, 0 \
103 }, \
104 {0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
105 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT3, BIT3 \
106 },
107
108#define RTL8812_TRANS_SUS_TO_CARDEMU \
109 {0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
110 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT3, 0 \
111 }, \
112 {0x0023, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
113 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0x10, 0 \
114 }, \
115 {0x0015, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
116 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0x01, 0 \
117 }, \
118 {0x0014, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
119 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0x80, 0 \
120 }, \
121 {0x0046, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
122 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0x00 \
123 }, \
124 {0x0043, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
125 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0x00 \
126 },
127
128#define RTL8812_TRANS_CARDEMU_TO_CARDDIS \
129 {0x0003, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
130 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT2, 0 \
131 }, \
132 {0x0080, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
133 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0x05 \
134 }, \
135 {0x0042, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK,\
136 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xF0, 0xcc}, \
137 {0x0042, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_PCI_MSK,\
138 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xF0, 0xEC}, \
139 {0x0043, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
140 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0x07 \
141 }, \
142 {0x0045, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
143 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0x00 \
144 }, \
145 {0x0046, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
146 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0xff \
147 }, \
148 {0x0047, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
149 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0 \
150 }, \
151 {0x0014, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
152 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0x80, BIT7 \
153 }, \
154 {0x0015, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
155 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0x01, BIT0 \
156 }, \
157 {0x0012, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
158 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0x01, 0 \
159 }, \
160 {0x0023, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
161 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0x10, BIT4 \
162 }, \
163 {0x0008, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK,\
164 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0x02, 0 \
165 }, \
166 {0x0007, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK,\
167 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0x20 \
168 }, \
169 {0x001f, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK,\
170 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT1, 0 \
171 }, \
172 {0x0076, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK,\
173 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT1, 0 \
174 }, \
175 {0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
176 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT3, BIT3 \
177 },
178
179#define RTL8812_TRANS_CARDDIS_TO_CARDEMU \
180 {0x0012, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
181 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT0, BIT0 \
182 }, \
183 {0x0014, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
184 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0x80, 0 \
185 }, \
186 {0x0015, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
187 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0x01, 0 \
188 }, \
189 {0x0023, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
190 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0x10, 0 \
191 }, \
192 {0x0046, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
193 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0x00 \
194 }, \
195 {0x0043, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
196 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0x00 \
197 }, \
198 {0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_PCI_MSK,\
199 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT2, 0 \
200 }, \
201 {0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
202 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT3, 0 \
203 }, \
204 {0x0003, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
205 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT2, BIT2 \
206 }, \
207 {0x0301, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_PCI_MSK,\
208 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0 \
209 },
210
211#define RTL8812_TRANS_CARDEMU_TO_PDN \
212 {0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
213 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT7, BIT7 \
214 },
215
216#define RTL8812_TRANS_PDN_TO_CARDEMU \
217 {0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
218 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT7, 0 \
219 },
220
221#define RTL8812_TRANS_ACT_TO_LPS \
222 {0x0301, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_PCI_MSK,\
223 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0xFF \
224 }, \
225 {0x0522, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
226 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0x7F \
227 }, \
228 {0x05F8, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
229 PWR_BASEADDR_MAC, PWR_CMD_POLLING, 0xFF, 0 \
230 }, \
231 {0x05F9, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
232 PWR_BASEADDR_MAC, PWR_CMD_POLLING, 0xFF, 0 \
233 }, \
234 {0x05FA, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
235 PWR_BASEADDR_MAC, PWR_CMD_POLLING, 0xFF, 0 \
236 }, \
237 {0x05FB, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
238 PWR_BASEADDR_MAC, PWR_CMD_POLLING, 0xFF, 0 \
239 }, \
240 {0x0c00, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
241 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0x04 \
242 }, \
243 {0x0e00, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
244 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0x04 \
245 }, \
246 {0x0002, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
247 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT0, 0 \
248 }, \
249 {0x0002, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
250 PWR_BASEADDR_MAC, PWR_CMD_DELAY, 0, PWRSEQ_DELAY_US \
251 }, \
252 {0x0002, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK,\
253 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT1, 0 \
254 }, \
255 {0x0100, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
256 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0x03 \
257 }, \
258 {0x0101, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
259 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT1, 0 \
260 }, \
261 {0x0553, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
262 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT5, BIT5 \
263 },
264
265#define RTL8812_TRANS_LPS_TO_ACT \
266 {0x0080, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK,\
267 PWR_BASEADDR_SDIO, PWR_CMD_WRITE, 0xFF, 0x84 \
268 }, \
269 {0xFE58, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK,\
270 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0x84 \
271 }, \
272 {0x0361, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_PCI_MSK,\
273 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0x84 \
274 }, \
275 {0x0002, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
276 PWR_BASEADDR_MAC, PWR_CMD_DELAY, 0, PWRSEQ_DELAY_MS \
277 }, \
278 {0x0008, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
279 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT4, 0 \
280 }, \
281 {0x0109, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
282 PWR_BASEADDR_MAC, PWR_CMD_POLLING, BIT7, 0 \
283 }, \
284 {0x0029, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
285 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT6|BIT7, 0 \
286 }, \
287 {0x0101, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
288 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT1, BIT1 \
289 }, \
290 {0x0100, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
291 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0xFF \
292 }, \
293 {0x0002, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
294 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT1|BIT0, BIT1|BIT0 \
295 }, \
296 {0x0522, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
297 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0 \
298 },
299
300#define RTL8812_TRANS_END \
301 {0xFFFF, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK, \
302 0, PWR_CMD_END, 0, 0},
303
304extern struct wlan_pwr_cfg rtl8812_power_on_flow
305 [RTL8812_TRANS_CARDEMU_TO_ACT_STEPS +
306 RTL8812_TRANS_END_STEPS];
307extern struct wlan_pwr_cfg rtl8812_radio_off_flow
308 [RTL8812_TRANS_ACT_TO_CARDEMU_STEPS +
309 RTL8812_TRANS_END_STEPS];
310extern struct wlan_pwr_cfg rtl8812_card_disable_flow
311 [RTL8812_TRANS_ACT_TO_CARDEMU_STEPS +
312 RTL8812_TRANS_CARDEMU_TO_PDN_STEPS +
313 RTL8812_TRANS_END_STEPS];
314extern struct wlan_pwr_cfg rtl8812_card_enable_flow
315 [RTL8812_TRANS_ACT_TO_CARDEMU_STEPS +
316 RTL8812_TRANS_CARDEMU_TO_PDN_STEPS +
317 RTL8812_TRANS_END_STEPS];
318extern struct wlan_pwr_cfg rtl8812_suspend_flow
319 [RTL8812_TRANS_ACT_TO_CARDEMU_STEPS +
320 RTL8812_TRANS_CARDEMU_TO_SUS_STEPS +
321 RTL8812_TRANS_END_STEPS];
322extern struct wlan_pwr_cfg rtl8812_resume_flow
323 [RTL8812_TRANS_ACT_TO_CARDEMU_STEPS +
324 RTL8812_TRANS_CARDEMU_TO_SUS_STEPS +
325 RTL8812_TRANS_END_STEPS];
326extern struct wlan_pwr_cfg rtl8812_hwpdn_flow
327 [RTL8812_TRANS_ACT_TO_CARDEMU_STEPS +
328 RTL8812_TRANS_CARDEMU_TO_PDN_STEPS +
329 RTL8812_TRANS_END_STEPS];
330extern struct wlan_pwr_cfg rtl8812_enter_lps_flow
331 [RTL8812_TRANS_ACT_TO_LPS_STEPS +
332 RTL8812_TRANS_END_STEPS];
333extern struct wlan_pwr_cfg rtl8812_leave_lps_flow
334 [RTL8812_TRANS_LPS_TO_ACT_STEPS +
335 RTL8812_TRANS_END_STEPS];
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357#define RTL8821A_TRANS_CARDEMU_TO_ACT_STEPS 25
358#define RTL8821A_TRANS_ACT_TO_CARDEMU_STEPS 15
359#define RTL8821A_TRANS_CARDEMU_TO_SUS_STEPS 15
360#define RTL8821A_TRANS_SUS_TO_CARDEMU_STEPS 15
361#define RTL8821A_TRANS_CARDDIS_TO_CARDEMU_STEPS 15
362#define RTL8821A_TRANS_CARDEMU_TO_PDN_STEPS 15
363#define RTL8821A_TRANS_PDN_TO_CARDEMU_STEPS 15
364#define RTL8821A_TRANS_ACT_TO_LPS_STEPS 15
365#define RTL8821A_TRANS_LPS_TO_ACT_STEPS 15
366#define RTL8821A_TRANS_END_STEPS 1
367
368#define RTL8821A_TRANS_CARDEMU_TO_ACT \
369 {0x0020, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, \
370 PWR_INTF_USB_MSK|PWR_INTF_SDIO_MSK,\
371 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT0, BIT0 \
372 }, \
373 {0x0067, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, \
374 PWR_INTF_USB_MSK|PWR_INTF_SDIO_MSK,\
375 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT4, 0 \
376 }, \
377 {0x0001, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, \
378 PWR_INTF_USB_MSK|PWR_INTF_SDIO_MSK,\
379 PWR_BASEADDR_MAC, PWR_CMD_DELAY, 1, PWRSEQ_DELAY_MS \
380 }, \
381 {0x0000, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, \
382 PWR_INTF_USB_MSK|PWR_INTF_SDIO_MSK,\
383 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT5, 0 \
384 }, \
385 {0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
386 PWR_BASEADDR_MAC, PWR_CMD_WRITE, (BIT4|BIT3|BIT2), 0 \
387 }, \
388 {0x0075, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_PCI_MSK,\
389 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT0 , BIT0 \
390 }, \
391 {0x0006, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
392 PWR_BASEADDR_MAC, PWR_CMD_POLLING, BIT1, BIT1 \
393 }, \
394 {0x0075, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_PCI_MSK,\
395 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT0 , 0 \
396 }, \
397 {0x0006, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
398 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT0, BIT0 \
399 }, \
400 {0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
401 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT7, 0 \
402 }, \
403 {0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
404 PWR_BASEADDR_MAC, PWR_CMD_WRITE, (BIT4|BIT3), 0 \
405 }, \
406 {0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
407 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT0, BIT0 \
408 }, \
409 {0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
410 PWR_BASEADDR_MAC, PWR_CMD_POLLING, BIT0, 0 \
411 }, \
412 {0x004F, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
413 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT0, BIT0 \
414 },\
415 {0x0067, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
416 PWR_BASEADDR_MAC, PWR_CMD_WRITE, (BIT5|BIT4), (BIT5|BIT4) \
417
418},\
419 {0x0025, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
420 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT6, 0 \
421 },\
422 {0x0049, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
423 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT1, BIT1 \
424 },\
425 {0x0063, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
426 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT1, BIT1 \
427 },\
428 {0x0062, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
429 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT1, 0 \
430 },\
431 {0x0058, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
432 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT0, BIT0 \
433 },\
434 {0x005A, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
435 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT1, BIT1 \
436 },\
437 {0x007A, PWR_CUT_TESTCHIP_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
438 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0x3A \
439 },\
440 {0x002E, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
441 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF , 0x82 \
442 }, \
443 {0x0010, PWR_CUT_A_MSK , PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
444 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT6 , BIT6 \
445 },
446
447#define RTL8821A_TRANS_ACT_TO_CARDEMU \
448 {0x001F, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
449 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0 \
450 }, \
451 {0x004F, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
452 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT0, 0 \
453
454},\
455 {0x0049, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
456 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT1, 0 \
457 }, \
458 {0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
459 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT1, BIT1 \
460 }, \
461 {0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
462 PWR_BASEADDR_MAC, PWR_CMD_POLLING, BIT1, 0 \
463 }, \
464 {0x0000, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, \
465 PWR_INTF_USB_MSK|PWR_INTF_SDIO_MSK,\
466 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT5, BIT5 \
467 }, \
468 {0x0020, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, \
469 PWR_INTF_USB_MSK|PWR_INTF_SDIO_MSK,\
470 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT0, 0 \
471 },
472
473#define RTL8821A_TRANS_CARDEMU_TO_SUS \
474 {0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_PCI_MSK,\
475 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT4|BIT3, (BIT4|BIT3) \
476 }, \
477 {0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, \
478 PWR_INTF_USB_MSK|PWR_INTF_SDIO_MSK,\
479 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT3|BIT4, BIT3 \
480 }, \
481 {0x0023, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK,\
482 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT4, BIT4 \
483 }, \
484 {0x0007, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK,\
485 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0x20 \
486 }, \
487 {0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_PCI_MSK,\
488 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT3|BIT4, BIT3|BIT4 \
489 }, \
490 {0x0086, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK,\
491 PWR_BASEADDR_SDIO, PWR_CMD_WRITE, BIT0, BIT0 \
492 }, \
493 {0x0086, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK,\
494 PWR_BASEADDR_SDIO, PWR_CMD_POLLING, BIT1, 0 \
495 },
496
497#define RTL8821A_TRANS_SUS_TO_CARDEMU \
498 {0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
499 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT3 | BIT7, 0 \
500 }, \
501 {0x0086, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK,\
502 PWR_BASEADDR_SDIO, PWR_CMD_WRITE, BIT0, 0 \
503 }, \
504 {0x0086, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK,\
505 PWR_BASEADDR_SDIO, PWR_CMD_POLLING, BIT1, BIT1 \
506 },\
507 {0x0023, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK,\
508 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT4, 0 \
509 }, \
510 {0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
511 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT3|BIT4, 0 \
512 },
513
514#define RTL8821A_TRANS_CARDEMU_TO_CARDDIS \
515 {0x0007, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK,\
516 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0x20 \
517 }, \
518 {0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, \
519 PWR_INTF_USB_MSK|PWR_INTF_SDIO_MSK,\
520 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT3|BIT4, BIT3 \
521 }, \
522 {0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_PCI_MSK,\
523 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT2, BIT2 \
524 }, \
525 {0x004A, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK,\
526 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT0, 1 \
527 }, \
528 {0x0023, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK,\
529 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT4, BIT4 \
530 }, \
531 {0x0086, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK,\
532 PWR_BASEADDR_SDIO, PWR_CMD_WRITE, BIT0, BIT0 \
533 }, \
534 {0x0086, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK,\
535 PWR_BASEADDR_SDIO, PWR_CMD_POLLING, BIT1, 0 \
536 },
537
538#define RTL8821A_TRANS_CARDDIS_TO_CARDEMU \
539 {0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
540 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT3 | BIT7, 0 \
541 }, \
542 {0x0086, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK,\
543 PWR_BASEADDR_SDIO, PWR_CMD_WRITE, BIT0, 0 \
544 }, \
545 {0x0086, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK,\
546 PWR_BASEADDR_SDIO, PWR_CMD_POLLING, BIT1, BIT1 \
547 },\
548 {0x004A, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK,\
549 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT0, 0 \
550 }, \
551 {0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
552 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT3|BIT4, 0 \
553 },\
554 {0x0023, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK,\
555 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT4, 0 \
556 }, \
557 {0x0301, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_PCI_MSK,\
558 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0 \
559 },
560
561#define RTL8821A_TRANS_CARDEMU_TO_PDN \
562 {0x0023, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK,\
563 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT4, BIT4 \
564 }, \
565 {0x0007, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, \
566 PWR_INTF_SDIO_MSK|PWR_INTF_USB_MSK,\
567 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0x20 \
568 }, \
569 {0x0006, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
570 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT0, 0 \
571 },\
572 {0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
573 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT7, BIT7 \
574 },
575
576#define RTL8821A_TRANS_PDN_TO_CARDEMU \
577 {0x0005, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
578 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT7, 0 \
579 },
580
581#define RTL8821A_TRANS_ACT_TO_LPS \
582 {0x0301, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_PCI_MSK,\
583 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0xFF \
584 }, \
585 {0x0522, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
586 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0xFF \
587 }, \
588 {0x05F8, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
589 PWR_BASEADDR_MAC, PWR_CMD_POLLING, 0xFF, 0 \
590 }, \
591 {0x05F9, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
592 PWR_BASEADDR_MAC, PWR_CMD_POLLING, 0xFF, 0 \
593 }, \
594 {0x05FA, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
595 PWR_BASEADDR_MAC, PWR_CMD_POLLING, 0xFF, 0 \
596 }, \
597 {0x05FB, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
598 PWR_BASEADDR_MAC, PWR_CMD_POLLING, 0xFF, 0 \
599 }, \
600 {0x0002, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
601 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT0, 0 \
602 }, \
603 {0x0002, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
604 PWR_BASEADDR_MAC, PWR_CMD_DELAY, 0, PWRSEQ_DELAY_US \
605 }, \
606 {0x0002, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
607 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT1, 0 \
608 }, \
609 {0x0100, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
610 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0x03 \
611 }, \
612 {0x0101, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
613 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT1, 0 \
614 }, \
615 {0x0093, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK,\
616 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0x00 \
617 }, \
618 {0x0553, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
619 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT5, BIT5 \
620 },
621
622#define RTL8821A_TRANS_LPS_TO_ACT \
623 {0x0080, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_SDIO_MSK,\
624 PWR_BASEADDR_SDIO, PWR_CMD_WRITE, 0xFF, 0x84 \
625 },\
626 {0xFE58, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK,\
627 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0x84 \
628 },\
629 {0x0361, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_PCI_MSK,\
630 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0x84 \
631 },\
632 {0x0002, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
633 PWR_BASEADDR_MAC, PWR_CMD_DELAY, 0, PWRSEQ_DELAY_MS \
634 },\
635 {0x0008, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
636 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT4, 0 \
637 },\
638 {0x0109, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
639 PWR_BASEADDR_MAC, PWR_CMD_POLLING, BIT7, 0 \
640 },\
641 {0x0029, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
642 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT6|BIT7, 0 \
643 },\
644 {0x0101, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
645 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT1, BIT1 \
646 },\
647 {0x0100, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
648 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0xFF \
649 },\
650 {0x0002, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
651 PWR_BASEADDR_MAC, PWR_CMD_WRITE, BIT1|BIT0, BIT1|BIT0 \
652 },\
653 {0x0522, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
654 PWR_BASEADDR_MAC, PWR_CMD_WRITE, 0xFF, 0 \
655 },
656
657#define RTL8821A_TRANS_END \
658 {0xFFFF, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_ALL_MSK,\
659 0, PWR_CMD_END, 0, 0},
660
661extern struct wlan_pwr_cfg rtl8821A_power_on_flow
662 [RTL8821A_TRANS_CARDEMU_TO_ACT_STEPS +
663 RTL8821A_TRANS_END_STEPS];
664extern struct wlan_pwr_cfg rtl8821A_radio_off_flow
665 [RTL8821A_TRANS_ACT_TO_CARDEMU_STEPS +
666 RTL8821A_TRANS_END_STEPS];
667extern struct wlan_pwr_cfg rtl8821A_card_disable_flow
668 [RTL8821A_TRANS_ACT_TO_CARDEMU_STEPS +
669 RTL8821A_TRANS_CARDEMU_TO_PDN_STEPS +
670 RTL8821A_TRANS_END_STEPS];
671extern struct wlan_pwr_cfg rtl8821A_card_enable_flow
672 [RTL8821A_TRANS_ACT_TO_CARDEMU_STEPS +
673 RTL8821A_TRANS_CARDEMU_TO_ACT_STEPS +
674 RTL8821A_TRANS_END_STEPS];
675extern struct wlan_pwr_cfg rtl8821A_suspend_flow
676 [RTL8821A_TRANS_ACT_TO_CARDEMU_STEPS +
677 RTL8821A_TRANS_CARDEMU_TO_SUS_STEPS +
678 RTL8821A_TRANS_END_STEPS];
679extern struct wlan_pwr_cfg rtl8821A_resume_flow
680 [RTL8821A_TRANS_ACT_TO_CARDEMU_STEPS +
681 RTL8821A_TRANS_CARDEMU_TO_SUS_STEPS +
682 RTL8821A_TRANS_END_STEPS];
683extern struct wlan_pwr_cfg rtl8821A_hwpdn_flow
684 [RTL8821A_TRANS_ACT_TO_CARDEMU_STEPS +
685 RTL8821A_TRANS_CARDEMU_TO_PDN_STEPS +
686 RTL8821A_TRANS_END_STEPS];
687extern struct wlan_pwr_cfg rtl8821A_enter_lps_flow
688 [RTL8821A_TRANS_ACT_TO_LPS_STEPS +
689 RTL8821A_TRANS_END_STEPS];
690extern struct wlan_pwr_cfg rtl8821A_leave_lps_flow
691 [RTL8821A_TRANS_LPS_TO_ACT_STEPS +
692 RTL8821A_TRANS_END_STEPS];
693
694
695#define RTL8812_NIC_PWR_ON_FLOW rtl8812_power_on_flow
696#define RTL8812_NIC_RF_OFF_FLOW rtl8812_radio_off_flow
697#define RTL8812_NIC_DISABLE_FLOW rtl8812_card_disable_flow
698#define RTL8812_NIC_ENABLE_FLOW rtl8812_card_enable_flow
699#define RTL8812_NIC_SUSPEND_FLOW rtl8812_suspend_flow
700#define RTL8812_NIC_RESUME_FLOW rtl8812_resume_flow
701#define RTL8812_NIC_PDN_FLOW rtl8812_hwpdn_flow
702#define RTL8812_NIC_LPS_ENTER_FLOW rtl8812_enter_lps_flow
703#define RTL8812_NIC_LPS_LEAVE_FLOW rtl8812_leave_lps_flow
704
705
706#define RTL8821A_NIC_PWR_ON_FLOW rtl8821A_power_on_flow
707#define RTL8821A_NIC_RF_OFF_FLOW rtl8821A_radio_off_flow
708#define RTL8821A_NIC_DISABLE_FLOW rtl8821A_card_disable_flow
709#define RTL8821A_NIC_ENABLE_FLOW rtl8821A_card_enable_flow
710#define RTL8821A_NIC_SUSPEND_FLOW rtl8821A_suspend_flow
711#define RTL8821A_NIC_RESUME_FLOW rtl8821A_resume_flow
712#define RTL8821A_NIC_PDN_FLOW rtl8821A_hwpdn_flow
713#define RTL8821A_NIC_LPS_ENTER_FLOW rtl8821A_enter_lps_flow
714#define RTL8821A_NIC_LPS_LEAVE_FLOW rtl8821A_leave_lps_flow
715
716#endif
717