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