1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17#ifndef __HAL8188EPWRSEQ_H__
18#define __HAL8188EPWRSEQ_H__
19
20#include "pwrseqcmd.h"
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45#define RTL8188E_TRANS_CARDEMU_TO_ACT_STEPS 10
46#define RTL8188E_TRANS_ACT_TO_CARDEMU_STEPS 10
47#define RTL8188E_TRANS_CARDEMU_TO_SUS_STEPS 10
48#define RTL8188E_TRANS_SUS_TO_CARDEMU_STEPS 10
49#define RTL8188E_TRANS_CARDEMU_TO_PDN_STEPS 10
50#define RTL8188E_TRANS_PDN_TO_CARDEMU_STEPS 10
51#define RTL8188E_TRANS_ACT_TO_LPS_STEPS 15
52#define RTL8188E_TRANS_LPS_TO_ACT_STEPS 15
53#define RTL8188E_TRANS_END_STEPS 1
54
55
56#define RTL8188E_TRANS_CARDEMU_TO_ACT \
57
58
59
60
61 \
62 {0x0006, PWR_CUT_ALL_MSK, PWR_CMD_POLLING, BIT(1), BIT(1)}, \
63 \
64 {0x0002, PWR_CUT_ALL_MSK, PWR_CMD_WRITE, BIT(0) | BIT(1), 0}, \
65 \
66 {0x0026, PWR_CUT_ALL_MSK, PWR_CMD_WRITE, BIT(7), BIT(7)}, \
67 \
68 {0x0005, PWR_CUT_ALL_MSK, PWR_CMD_WRITE, BIT(7), 0}, \
69 \
70 {0x0005, PWR_CUT_ALL_MSK, PWR_CMD_WRITE, BIT(4) | BIT(3), 0}, \
71 \
72 {0x0005, PWR_CUT_ALL_MSK, PWR_CMD_WRITE, BIT(0), BIT(0)}, \
73 \
74 {0x0005, PWR_CUT_ALL_MSK, PWR_CMD_POLLING, BIT(0), 0}, \
75 \
76 {0x0023, PWR_CUT_ALL_MSK, PWR_CMD_WRITE, BIT(4), 0}, \
77
78
79#define RTL8188E_TRANS_ACT_TO_CARDEMU \
80
81
82
83
84 \
85 {0x001F, PWR_CUT_ALL_MSK, PWR_CMD_WRITE, 0xFF, 0}, \
86 \
87 {0x0023, PWR_CUT_ALL_MSK, PWR_CMD_WRITE, BIT(4), BIT(4)}, \
88 \
89 {0x0005, PWR_CUT_ALL_MSK, PWR_CMD_WRITE, BIT(1), BIT(1)}, \
90 \
91 {0x0005, PWR_CUT_ALL_MSK, PWR_CMD_POLLING, BIT(1), 0}, \
92
93
94#define RTL8188E_TRANS_CARDEMU_TO_SUS \
95
96
97
98
99 \
100 {0x0005, PWR_CUT_ALL_MSK, PWR_CMD_WRITE, BIT(3) | BIT(4), BIT(3)}, \
101 \
102 {0x0007, PWR_CUT_ALL_MSK, PWR_CMD_WRITE, 0xFF, BIT(7)}, \
103 \
104 {0x0041, PWR_CUT_ALL_MSK, PWR_CMD_WRITE, BIT(4), 0}, \
105 \
106 {0xfe10, PWR_CUT_ALL_MSK, PWR_CMD_WRITE, BIT(4), BIT(4)}, \
107
108
109#define RTL8188E_TRANS_SUS_TO_CARDEMU \
110
111
112
113
114 \
115 {0x0005, PWR_CUT_ALL_MSK, PWR_CMD_WRITE, BIT(3) | BIT(4), 0}, \
116
117
118#define RTL8188E_TRANS_CARDEMU_TO_CARDDIS \
119
120
121
122
123 \
124 {0x0026, PWR_CUT_ALL_MSK, PWR_CMD_WRITE, BIT(7), BIT(7)}, \
125 \
126 {0x0005, PWR_CUT_ALL_MSK, PWR_CMD_WRITE, BIT(3) | BIT(4), BIT(3)}, \
127 \
128 {0x0007, PWR_CUT_ALL_MSK, PWR_CMD_WRITE, 0xFF, 0}, \
129 \
130 {0x0041, PWR_CUT_ALL_MSK, PWR_CMD_WRITE, BIT(4), 0}, \
131 \
132 {0xfe10, PWR_CUT_ALL_MSK, PWR_CMD_WRITE, BIT(4), BIT(4)}, \
133
134
135#define RTL8188E_TRANS_CARDDIS_TO_CARDEMU \
136
137
138
139
140 \
141 {0x0005, PWR_CUT_ALL_MSK, PWR_CMD_WRITE, BIT(3) | BIT(4), 0}, \
142
143
144#define RTL8188E_TRANS_CARDEMU_TO_PDN \
145
146
147
148
149 \
150 {0x0006, PWR_CUT_ALL_MSK, PWR_CMD_WRITE, BIT(0), 0}, \
151 \
152 {0x0005, PWR_CUT_ALL_MSK, PWR_CMD_WRITE, BIT(7), BIT(7)}, \
153
154
155#define RTL8188E_TRANS_PDN_TO_CARDEMU \
156
157
158
159
160 \
161 {0x0005, PWR_CUT_ALL_MSK, PWR_CMD_WRITE, BIT(7), 0}, \
162
163
164
165#define RTL8188E_TRANS_ACT_TO_LPS \
166
167
168
169
170 \
171 {0x0522, PWR_CUT_ALL_MSK, PWR_CMD_WRITE, 0xFF, 0x7F}, \
172 {0x05F8, PWR_CUT_ALL_MSK, PWR_CMD_POLLING, 0xFF, 0}, \
173 \
174 {0x05F9, PWR_CUT_ALL_MSK, PWR_CMD_POLLING, 0xFF, 0}, \
175 \
176 {0x05FA, PWR_CUT_ALL_MSK, PWR_CMD_POLLING, 0xFF, 0}, \
177 \
178 {0x05FB, PWR_CUT_ALL_MSK, PWR_CMD_POLLING, 0xFF, 0}, \
179 \
180 {0x0002, PWR_CUT_ALL_MSK, PWR_CMD_WRITE, BIT(0), 0}, \
181 \
182 {0x0002, PWR_CUT_ALL_MSK, PWR_CMD_DELAY, 0, PWRSEQ_DELAY_US}, \
183 \
184 {0x0100, PWR_CUT_ALL_MSK, PWR_CMD_WRITE, 0xFF, 0x3F}, \
185 \
186 {0x0101, PWR_CUT_ALL_MSK, PWR_CMD_WRITE, BIT(1), 0}, \
187 \
188 {0x0553, PWR_CUT_ALL_MSK, PWR_CMD_WRITE, BIT(5), BIT(5)}, \
189
190
191
192#define RTL8188E_TRANS_LPS_TO_ACT \
193
194
195
196
197 \
198 {0xFE58, PWR_CUT_ALL_MSK, PWR_CMD_WRITE, 0xFF, 0x84}, \
199 \
200 {0x0002, PWR_CUT_ALL_MSK, PWR_CMD_DELAY, 0, PWRSEQ_DELAY_MS}, \
201 \
202 {0x0008, PWR_CUT_ALL_MSK, PWR_CMD_WRITE, BIT(4), 0}, \
203 \
204 {0x0109, PWR_CUT_ALL_MSK, PWR_CMD_POLLING, BIT(7), 0}, \
205 \
206 {0x0029, PWR_CUT_ALL_MSK, PWR_CMD_WRITE, BIT(6) | BIT(7), 0}, \
207 \
208 {0x0101, PWR_CUT_ALL_MSK, PWR_CMD_WRITE, BIT(1), BIT(1)}, \
209 \
210 {0x0100, PWR_CUT_ALL_MSK, PWR_CMD_WRITE, 0xFF, 0xFF}, \
211 \
212 {0x0002, PWR_CUT_ALL_MSK, \
213 PWR_CMD_WRITE, BIT(1) | BIT(0), BIT(1) | BIT(0)}, \
214 \
215 {0x0522, PWR_CUT_ALL_MSK, PWR_CMD_WRITE, 0xFF, 0},
216
217#define RTL8188E_TRANS_END \
218
219
220
221
222 \
223 {0xFFFF, PWR_CUT_ALL_MSK, PWR_CMD_END, 0, 0},
224
225
226extern struct wl_pwr_cfg rtl8188E_power_on_flow
227 [RTL8188E_TRANS_CARDEMU_TO_ACT_STEPS + RTL8188E_TRANS_END_STEPS];
228extern struct wl_pwr_cfg rtl8188E_radio_off_flow
229 [RTL8188E_TRANS_ACT_TO_CARDEMU_STEPS + RTL8188E_TRANS_END_STEPS];
230extern struct wl_pwr_cfg rtl8188E_card_disable_flow
231 [RTL8188E_TRANS_ACT_TO_CARDEMU_STEPS +
232 RTL8188E_TRANS_CARDEMU_TO_PDN_STEPS +
233 RTL8188E_TRANS_END_STEPS];
234extern struct wl_pwr_cfg rtl8188E_card_enable_flow
235 [RTL8188E_TRANS_ACT_TO_CARDEMU_STEPS +
236 RTL8188E_TRANS_CARDEMU_TO_PDN_STEPS +
237 RTL8188E_TRANS_END_STEPS];
238extern struct wl_pwr_cfg rtl8188E_suspend_flow[
239 RTL8188E_TRANS_ACT_TO_CARDEMU_STEPS +
240 RTL8188E_TRANS_CARDEMU_TO_SUS_STEPS +
241 RTL8188E_TRANS_END_STEPS];
242extern struct wl_pwr_cfg rtl8188E_resume_flow
243 [RTL8188E_TRANS_ACT_TO_CARDEMU_STEPS +
244 RTL8188E_TRANS_CARDEMU_TO_SUS_STEPS +
245 RTL8188E_TRANS_END_STEPS];
246extern struct wl_pwr_cfg rtl8188E_hwpdn_flow
247 [RTL8188E_TRANS_ACT_TO_CARDEMU_STEPS +
248 RTL8188E_TRANS_CARDEMU_TO_PDN_STEPS + RTL8188E_TRANS_END_STEPS];
249extern struct wl_pwr_cfg rtl8188E_enter_lps_flow
250 [RTL8188E_TRANS_ACT_TO_LPS_STEPS + RTL8188E_TRANS_END_STEPS];
251extern struct wl_pwr_cfg rtl8188E_leave_lps_flow
252 [RTL8188E_TRANS_LPS_TO_ACT_STEPS + RTL8188E_TRANS_END_STEPS];
253
254#endif
255