xref: /OK3568_Linux_fs/kernel/drivers/net/wireless/rockchip_wlan/ssv6xxx/include/ssv6200_configuration.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /*
2  * Copyright (c) 2015 South Silicon Valley Microelectronics Inc.
3  * Copyright (c) 2015 iComm Corporation
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  * This program is distributed in the hope that it will be useful, but
10  * WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12  * See the GNU General Public License for more details.
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  */
16 
17 static ssv_cabrio_reg phy_setting[]={
18     {0xce0071bc, 0x565B565B},
19     {0xce000008, 0x0000006a},
20     {0xce00000c, 0x00000064},
21     {0xce000010, 0x00007FFF},
22     {0xce000014, 0x00000003},
23     {0xce000018, 0x0055003C},
24     {0xce00001c, 0x00000064},
25     {0xce000020, 0x20000000},
26     {0xce00002c, 0x00000000},
27     {0xce000030, 0x80046072},
28     {0xce000034, 0x1f300f6f},
29     {0xce000038, 0x660F36D0},
30     {0xce00003c, 0x106C0004},
31     {0xce000040, 0x01601400},
32     {0xce000044, 0x00600008},
33     {0xce000048, 0xff000160},
34     {0xce00004c, 0x00000840},
35     {0xce000060, 0x01000405},
36     {0xce000064, 0x06090813},
37     {0xce000068, 0x12070000},
38     {0xce00006c, 0x01000405},
39     {0xce000070, 0x06090813},
40     {0xce000074, 0x12010000},
41     {0xce000078, 0x00000000},
42     {0xce00007c, 0x10110003},
43     {0xce000080, 0x0110000F},
44     {0xce000084, 0x00000000},
45     {0xce000088, 0x00000000},
46     {0xce000094, 0x01012425},
47     {0xce000098, 0x01010101},
48     {0xce00009c, 0x00000011},
49     {0xce0000a0, 0x1fff0000},
50     {0xce0000a4, 0x1fff0000},
51     {0xce0000a8, 0x1fff0000},
52     {0xce0000ac, 0x1fff0000},
53     {0xce0000b8, 0x0000fe3e},
54     {0xce0000fc, 0xffffffff},
55     {0xce000108, 0x0ead04f5},
56     {0xce00010c, 0x0fd60080},
57     {0xce000110, 0x00000009},
58     {0xce0010a4, 0x0000002c},
59     {0xce0010b4, 0x00003001},
60     {0xce0010d4, 0x00000001},
61     {0xce002000, 0x00000044},
62     {0xce002004, 0x00040000},
63     {0xce002008, 0x20300050},
64     {0xce00200c, 0x00003467},
65     {0xce002010, 0x00430000},
66     {0xce002014, 0x20304015},
67     {0xce002018, 0x00390005},
68     {0xce00201c, 0x05555555},
69     {0xce002020, 0x00570057},
70     {0xce002024, 0x00570057},
71     {0xce002028, 0x00236700},
72     {0xce00202c, 0x000d1746},
73     {0xce002030, 0x05061787},
74     {0xce002034, 0x07800000},
75     {0xce00209c, 0x00900008},
76     {0xce0020a0, 0x00000000},
77     {0xce0023f8, 0x00000000},
78     {0xce0023fc, 0x00000001},
79     {0xce0030a4, 0x00001901},
80     {0xce0030b8, 0x5d08908e},
81     {0xce004000, 0x00000044},
82     {0xce004004, 0x00750075},
83     {0xce004008, 0x00000075},
84     {0xce00400c, 0x10000075},
85     {0xce004010, 0x3F384905},
86     {0xce004014, 0x40182000},
87     {0xce004018, 0x20600000},
88     {0xce00401c, 0x0C010120},
89     {0xce004020, 0x50505050},
90     {0xce004024, 0x50000000},
91     {0xce004028, 0x50505050},
92     {0xce00402c, 0x506070A0},
93     {0xce004030, 0xF0000000},
94     {0xce004034, 0x00002424},
95     {0xce004038, 0x00001420},
96     {0xce00409c, 0x0000300A},
97     {0xce0040c0, 0x20000280},
98     {0xce0040c4, 0x30023002},
99     {0xce0040c8, 0x0000003a},
100     {0xce004130, 0x40000000},
101     {0xce004164, 0x009C007E},
102     {0xce004180, 0x00044400},
103     {0xce004188, 0x82000000},
104     {0xce004190, 0x00000000},
105     {0xce004194, 0xffffffff},
106     {0xce004380, 0x00700010},
107     {0xce004384, 0x00007575},
108     {0xce004388, 0x0001fe3e},
109     {0xce00438c, 0x0000fe3e},
110     {0xce0043f8, 0x00000001},
111     {0xce007000, 0x00000000},
112     {0xce007004, 0x00008000},
113     {0xce007008, 0x00000000},
114     {0xce00700c, 0x00000000},
115     {0xce007010, 0x00000000},
116     {0xce007014, 0x00000000},
117     {0xce007018, 0x00000000},
118     {0xce00701c, 0x00000000},
119     {0xce007020, 0x00000000},
120     {0xce007024, 0x00000000},
121     {0xce007028, 0x00000000},
122     {0xce00702c, 0x00000000},
123     {0xce007030, 0x00000000},
124     {0xce007034, 0x00000000},
125     {0xce007038, 0x00000000},
126     {0xce00703c, 0x00000000},
127     {0xce007040, 0x02000200},
128     {0xce007048, 0x00000000},
129     {0xce00704c, 0x00000000},
130     {0xce007050, 0x00000000},
131     {0xce007054, 0x00000000},
132     {0xce007058, 0x000028ff},
133     {0xce00705c, 0x00000000},
134     {0xce007060, 0x00000000},
135     {0xce007064, 0x00000000},
136     {0xce007068, 0x00000000},
137     {0xce00706c, 0x00000202},
138     {0xce007070, 0x80ffc200},
139     {0xce007074, 0x00000000},
140     {0xce007078, 0x00000000},
141     {0xce00707c, 0x00000000},
142     {0xce007080, 0x00000000},
143     {0xce007084, 0x00000000},
144     {0xce007088, 0x00000000},
145     {0xce00708c, 0x00000000},
146     {0xce007090, 0x00000000},
147     {0xce007094, 0x00000000},
148     {0xce007098, 0x00000000},
149     {0xce00709c, 0x00000000},
150     {0xce0070a0, 0x00000000},
151     {0xce0070a4, 0x00000000},
152     {0xce0070a8, 0x00000000},
153     {0xce0070ac, 0x00000000},
154     {0xce0070b0, 0x00000000},
155     {0xce0070b4, 0x00000000},
156     {0xce0070b8, 0x00000000},
157     {0xce0070bc, 0x00000000},
158     {0xce0070c0, 0x00000000},
159     {0xce0070c4, 0x00000000},
160     {0xce0070c8, 0x00000000},
161     {0xce0070cc, 0x00000000},
162     {0xce0070d0, 0x00000000},
163     {0xce0070d4, 0x00000000},
164     {0xce0070d8, 0x00000000},
165     {0xce0070dc, 0x00000000},
166     {0xce0070e0, 0x00000000},
167     {0xce0070e4, 0x00000000},
168     {0xce0070e8, 0x00000000},
169     {0xce0070ec, 0x00000000},
170     {0xce0070f0, 0x00000000},
171     {0xce0070f4, 0x00000000},
172     {0xce0070f8, 0x00000000},
173     {0xce0070fc, 0x00000000},
174     {0xce007100, 0x00000000},
175     {0xce007104, 0x00000000},
176     {0xce007108, 0x00000000},
177     {0xce00710c, 0x00000000},
178     {0xce007110, 0x00000000},
179     {0xce007114, 0x00000000},
180     {0xce007118, 0x00000000},
181     {0xce00711c, 0x00000000},
182     {0xce007120, 0x02000200},
183     {0xce007124, 0x02000200},
184     {0xce007128, 0x02000200},
185     {0xce00712c, 0x02000200},
186     {0xce007130, 0x02000200},
187     {0xce007134, 0x02000200},
188     {0xce007138, 0x02000200},
189     {0xce00713c, 0x02000200},
190     {0xce007140, 0x02000200},
191     {0xce007144, 0x02000200},
192     {0xce007148, 0x02000200},
193     {0xce00714c, 0x02000200},
194     {0xce007150, 0x02000200},
195     {0xce007154, 0x02000200},
196     {0xce007158, 0x00000000},
197     {0xce00715c, 0x00000000},
198     {0xce007160, 0x00000000},
199     {0xce007164, 0x00000000},
200     {0xce007168, 0x00000000},
201     {0xce00716c, 0x00000000},
202     {0xce007170, 0x00000000},
203     {0xce007174, 0x00000000},
204     {0xce007178, 0x00000000},
205     {0xce00717c, 0x00000000},
206     {0xce007180, 0x00000000},
207     {0xce007184, 0x00000000},
208     {0xce007188, 0x00000000},
209     {0xce00718c, 0x00000000},
210     {0xce007190, 0x00000000},
211     {0xce007194, 0x00000000},
212     {0xce007198, 0x00000000},
213     {0xce00719c, 0x00000000},
214     {0xce0071a0, 0x00000000},
215     {0xce0071a4, 0x00000000},
216     {0xce0071a8, 0x00000000},
217     {0xce0071ac, 0x00000000},
218     {0xce0071b0, 0x00000000},
219     {0xce0071b4, 0x00000100},
220     {0xce0071b8, 0x00000000},
221     {0xce0071c0, 0x00000000},
222     {0xce0071c4, 0x00000000},
223     {0xce0071c8, 0x00000000},
224     {0xce0071cc, 0x00000000},
225     {0xce0071d0, 0x00000000},
226     {0xce0071d4, 0x00000000},
227     {0xce0071d8, 0x00000000},
228     {0xce0071dc, 0x00000000},
229     {0xce0071e0, 0x00000000},
230     {0xce0071e4, 0x00000000},
231     {0xce0071e8, 0x00000000},
232     {0xce0071ec, 0x00000000},
233     {0xce0071f0, 0x00000000},
234     {0xce0071f4, 0x00000000},
235     {0xce0071f8, 0x00000000},
236     {0xce0071fc, 0x00000000},
237 #ifdef CONFIG_SSV_CABRIO_E
238     {0xce0043fc, 0x000104E5},
239     {0xce007044, 0x00028080},
240     {0xce000000, 0x80000016},
241 #endif
242 #ifdef CONFIG_SSV_CABRIO_A
243     {0xce0043fc, 0x000004e1},
244     {0xce007044, 0x00038080},
245     {0xce000000, 0x0000001e},
246 #endif
247 };
248 static const u32 wifi_tx_gain[]={
249     0x79807980,
250     0x72797279,
251     0x6C726C72,
252     0x666C666C,
253     0x60666066,
254     0x5B605B60,
255     0x565B565B,
256     0x51565156,
257     0x4C514C51,
258     0x484C484C,
259     0x44484448,
260     0x40444044,
261     0x3C403C40,
262     0x3A3D3A3D,
263     0x36393639,
264 };
265 #ifndef CONFIG_SSV_CABRIO_A
266 static ssv_cabrio_reg asic_rf_setting[]={
267     {0xCE010038, 0x0003E07C},
268     {0xCE010060, 0x00406000},
269     {0xCE01009C, 0x00000024},
270     {0xCE0100A0, 0x00EC4CC5},
271     {0xCE010000, 0x40002000},
272     {0xCE010004, 0x00020FC0},
273     {0xCE010008, 0x000DF69B},
274     {0xCE010014, 0x3D3E84FE},
275     {0xCE010018, 0x01457D79},
276     {0xCE01001C, 0x000103A7},
277     {0xCE010020, 0x000103A6},
278     {0xCE01002C, 0x00032CA8},
279     {0xCE010048, 0xFCCCCF27},
280     {0xCE010050, 0x00444000},
281     {0xCE01000C, 0x151558C5},
282     {0xCE010010, 0x01011A88},
283     {0xCE010024, 0x00012001},
284     {0xCE010028, 0x00036000},
285     {0xCE010030, 0x20EA0224},
286     {0xCE010034, 0x44000755},
287     {0xCE01003C, 0x55D89D8A},
288     {0xCE010040, 0x005508BB},
289     {0xCE010044, 0x07C08BFF},
290     {0xCE01004C, 0x07700830},
291     {0xCE010054, 0x00007FF4},
292     {0xCE010058, 0x0000000E},
293     {0xCE01005C, 0x00088018},
294     {0xCE010064, 0x08820820},
295     {0xCE010068, 0x00820820},
296     {0xCE01006C, 0x00820820},
297     {0xCE010070, 0x00820820},
298     {0xCE010074, 0x00820820},
299     {0xCE010078, 0x00820820},
300     {0xCE01007C, 0x00820820},
301     {0xCE010080, 0x00820820},
302     {0xCE010084, 0x00004080},
303     {0xCE010088, 0x200800FE},
304     {0xCE01008C, 0xAAAAAAAA},
305     {0xCE010090, 0xAAAAAAAA},
306     {0xCE010094, 0x0000A487},
307     {0xCE010098, 0x0000070E},
308     {0xCE0100A4, 0x00000F43},
309     {0xCE0100A8, 0x00098900},
310     {0xCE0100AC, 0x00000000},
311     {0xC00003AC, 0x00000000},
312     {0xC00003B0, 0x00000000},
313     {0xC00003B4, 0x00000000},
314     {0xC00003BC, 0x00000000},
315     {0xC0001D00, 0x5E000040},
316     {0xC0001D04, 0x015D015D},
317     {0xC0001D08, 0x00000001},
318     {0xC0001D0C, 0x55550000},
319     {0xC0001D20, 0x7FFF0000},
320     {0xC0001D24, 0x00000003},
321     {0xC0001D28, 0x00000000},
322     {0xC0001D2C, 0x00000000},
323 };
324 #endif
325 #ifdef CONFIG_SSV_CABRIO_A
326 static ssv_cabrio_reg fpga_rf_setting[]=
327 {
328  {0xcb110000,0x5F00EFCE},
329  {0xcb110004,0x00001FC0},
330  {0xcb110008,0x1C96CA3A},
331  {0xcb11000c,0x15155A74},
332  {0xcb110010,0x01011A88},
333  {0xcb110014,0x3CBF703C},
334  {0xcb110018,0x00057579},
335  {0xcb11001c,0x000103A7},
336  {0xcb110020,0x000103A6},
337  {0xcb110024,0x00012001},
338  {0xcb110028,0x00036000},
339  {0xcb11002c,0x00000CA8},
340  {0xcb110030,0x002A0224},
341  {0xcb110034,0x00001E55},
342  {0xcb110038,0x00006C7C},
343  {0xcb11003c,0x55666666},
344  {0xcb110040,0x005508F8},
345  {0xcb110044,0x07C08BFF},
346  {0xcb110048,0xF1111A27},
347  {0xcb11004c,0x2773F53C},
348  {0xcb110050,0x00000A7C},
349  {0xcb110054,0x00087FF8},
350  {0xcb110058,0x00103014},
351  {0xcb11005c,0x0000848A},
352  {0xcb110060,0x00406030},
353  {0xcb110064,0x00820820},
354  {0xcb110068,0x00820820},
355  {0xcb11006c,0x00820820},
356  {0xcb110070,0x00820820},
357  {0xcb110074,0x00820820},
358  {0xcb110078,0x00820820},
359  {0xcb11007c,0x00820820},
360  {0xcb110080,0x00820820},
361  {0xcb110084,0x00004080},
362  {0xcb110088,0x00003EAA},
363  {0xcb11008c,0x5E00FFEB},
364  {0xcb110090,0xAAAAAAAA},
365  {0xcb110094,0x0000243F},
366  {0xcb110098,0x00018B10},
367  {0xcb120080,0x00000000},
368  {0xcb120084,0x00000000},
369  {0xcb120088,0x00000000},
370  {0xcb120090,0x00000813},
371  {0xcb120094,0x00000000},
372  {0xcb1203f8,0xFF000000},
373 };
374 #endif
375