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