1 /****************************************************************************** 2 * 3 * Copyright(c) 2009-2014 Realtek Corporation. 4 * 5 * This program is free software; you can redistribute it and/or modify it 6 * under the terms of version 2 of the GNU General Public License as 7 * published by the Free Software Foundation. 8 * 9 * This program is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 12 * more details. 13 * 14 * The full GNU General Public License is included in this distribution in the 15 * file called LICENSE. 16 * 17 * Contact Information: 18 * wlanfae <wlanfae@realtek.com> 19 * Realtek Corporation, No. 2, Innovation Road II, Hsinchu Science Park, 20 * Hsinchu 300, Taiwan. 21 * 22 * Created on 2010/ 5/18, 1:41 23 * 24 * Larry Finger <Larry.Finger@lwfinger.net> 25 * 26 *****************************************************************************/ 27 28 #include "table.h" 29 30 u32 RTL8723BEPHY_REG_1TARRAY[] = { 31 0x800, 0x80040000, 32 0x804, 0x00000003, 33 0x808, 0x0000FC00, 34 0x80C, 0x0000000A, 35 0x810, 0x10001331, 36 0x814, 0x020C3D10, 37 0x818, 0x02200385, 38 0x81C, 0x00000000, 39 0x820, 0x01000100, 40 0x824, 0x00190204, 41 0x828, 0x00000000, 42 0x82C, 0x00000000, 43 0x830, 0x00000000, 44 0x834, 0x00000000, 45 0x838, 0x00000000, 46 0x83C, 0x00000000, 47 0x840, 0x00010000, 48 0x844, 0x00000000, 49 0x848, 0x00000000, 50 0x84C, 0x00000000, 51 0x850, 0x00000000, 52 0x854, 0x00000000, 53 0x858, 0x569A11A9, 54 0x85C, 0x01000014, 55 0x860, 0x66F60110, 56 0x864, 0x061F0649, 57 0x868, 0x00000000, 58 0x86C, 0x27272700, 59 0x870, 0x07000760, 60 0x874, 0x25004000, 61 0x878, 0x00000808, 62 0x87C, 0x00000000, 63 0x880, 0xB0000C1C, 64 0x884, 0x00000001, 65 0x888, 0x00000000, 66 0x88C, 0xCCC000C0, 67 0x890, 0x00000800, 68 0x894, 0xFFFFFFFE, 69 0x898, 0x40302010, 70 0x89C, 0x00706050, 71 0x900, 0x00000000, 72 0x904, 0x00000023, 73 0x908, 0x00000000, 74 0x90C, 0x81121111, 75 0x910, 0x00000002, 76 0x914, 0x00000201, 77 0xA00, 0x00D047C8, 78 0xA04, 0x80FF800C, 79 0xA08, 0x8C838300, 80 0xA0C, 0x2E7F120F, 81 0xA10, 0x9500BB78, 82 0xA14, 0x1114D028, 83 0xA18, 0x00881117, 84 0xA1C, 0x89140F00, 85 0xA20, 0x1A1B0000, 86 0xA24, 0x090E1317, 87 0xA28, 0x00000204, 88 0xA2C, 0x00D30000, 89 0xA70, 0x101FBF00, 90 0xA74, 0x00000007, 91 0xA78, 0x00000900, 92 0xA7C, 0x225B0606, 93 0xA80, 0x21806490, 94 0xB2C, 0x00000000, 95 0xC00, 0x48071D40, 96 0xC04, 0x03A05611, 97 0xC08, 0x000000E4, 98 0xC0C, 0x6C6C6C6C, 99 0xC10, 0x08800000, 100 0xC14, 0x40000100, 101 0xC18, 0x08800000, 102 0xC1C, 0x40000100, 103 0xC20, 0x00000000, 104 0xC24, 0x00000000, 105 0xC28, 0x00000000, 106 0xC2C, 0x00000000, 107 0xC30, 0x69E9AC44, 108 0xC34, 0x469652AF, 109 0xC38, 0x49795994, 110 0xC3C, 0x0A97971C, 111 0xC40, 0x1F7C403F, 112 0xC44, 0x000100B7, 113 0xC48, 0xEC020107, 114 0xC4C, 0x007F037F, 115 0xC50, 0x69553420, 116 0xC54, 0x43BC0094, 117 0xC58, 0x00013147, 118 0xC5C, 0x00250492, 119 0xC60, 0x00000000, 120 0xC64, 0x7112848B, 121 0xC68, 0x47C00BFF, 122 0xC6C, 0x00000036, 123 0xC70, 0x2C7F000D, 124 0xC74, 0x020610DB, 125 0xC78, 0x0000001F, 126 0xC7C, 0x00B91612, 127 0xC80, 0x390000E4, 128 0xC84, 0x21F60000, 129 0xC88, 0x40000100, 130 0xC8C, 0x20200000, 131 0xC90, 0x00020E1A, 132 0xC94, 0x00000000, 133 0xC98, 0x00020E1A, 134 0xC9C, 0x00007F7F, 135 0xCA0, 0x00000000, 136 0xCA4, 0x000300A0, 137 0xCA8, 0x00000000, 138 0xCAC, 0x00000000, 139 0xCB0, 0x00000000, 140 0xCB4, 0x00000000, 141 0xCB8, 0x00000000, 142 0xCBC, 0x28000000, 143 0xCC0, 0x00000000, 144 0xCC4, 0x00000000, 145 0xCC8, 0x00000000, 146 0xCCC, 0x00000000, 147 0xCD0, 0x00000000, 148 0xCD4, 0x00000000, 149 0xCD8, 0x64B22427, 150 0xCDC, 0x00766932, 151 0xCE0, 0x00222222, 152 0xCE4, 0x00000000, 153 0xCE8, 0x37644302, 154 0xCEC, 0x2F97D40C, 155 0xD00, 0x00000740, 156 0xD04, 0x40020401, 157 0xD08, 0x0000907F, 158 0xD0C, 0x20010201, 159 0xD10, 0xA0633333, 160 0xD14, 0x3333BC53, 161 0xD18, 0x7A8F5B6F, 162 0xD2C, 0xCC979975, 163 0xD30, 0x00000000, 164 0xD34, 0x80608000, 165 0xD38, 0x00000000, 166 0xD3C, 0x00127353, 167 0xD40, 0x00000000, 168 0xD44, 0x00000000, 169 0xD48, 0x00000000, 170 0xD4C, 0x00000000, 171 0xD50, 0x6437140A, 172 0xD54, 0x00000000, 173 0xD58, 0x00000282, 174 0xD5C, 0x30032064, 175 0xD60, 0x4653DE68, 176 0xD64, 0x04518A3C, 177 0xD68, 0x00002101, 178 0xD6C, 0x2A201C16, 179 0xD70, 0x1812362E, 180 0xD74, 0x322C2220, 181 0xD78, 0x000E3C24, 182 0xE00, 0x2D2D2D2D, 183 0xE04, 0x2D2D2D2D, 184 0xE08, 0x0390272D, 185 0xE10, 0x2D2D2D2D, 186 0xE14, 0x2D2D2D2D, 187 0xE18, 0x2D2D2D2D, 188 0xE1C, 0x2D2D2D2D, 189 0xE28, 0x00000000, 190 0xE30, 0x1000DC1F, 191 0xE34, 0x10008C1F, 192 0xE38, 0x02140102, 193 0xE3C, 0x681604C2, 194 0xE40, 0x01007C00, 195 0xE44, 0x01004800, 196 0xE48, 0xFB000000, 197 0xE4C, 0x000028D1, 198 0xE50, 0x1000DC1F, 199 0xE54, 0x10008C1F, 200 0xE58, 0x02140102, 201 0xE5C, 0x28160D05, 202 0xE60, 0x00000008, 203 0xE68, 0x001B2556, 204 0xE6C, 0x00C00096, 205 0xE70, 0x00C00096, 206 0xE74, 0x01000056, 207 0xE78, 0x01000014, 208 0xE7C, 0x01000056, 209 0xE80, 0x01000014, 210 0xE84, 0x00C00096, 211 0xE88, 0x01000056, 212 0xE8C, 0x00C00096, 213 0xED0, 0x00C00096, 214 0xED4, 0x00C00096, 215 0xED8, 0x00C00096, 216 0xEDC, 0x000000D6, 217 0xEE0, 0x000000D6, 218 0xEEC, 0x01C00016, 219 0xF14, 0x00000003, 220 0xF4C, 0x00000000, 221 0xF00, 0x00000300, 222 0x820, 0x01000100, 223 0x800, 0x83040000, 224 225 }; 226 227 u32 RTL8723BEPHY_REG_1TARRAYLEN = 228 sizeof(RTL8723BEPHY_REG_1TARRAY) / sizeof(u32); 229 230 u32 RTL8723BEPHY_REG_ARRAY_PG[] = { 231 0, 0, 0, 0x00000e08, 0x0000ff00, 0x00003800, 232 0, 0, 0, 0x0000086c, 0xffffff00, 0x32343600, 233 0, 0, 0, 0x00000e00, 0xffffffff, 0x40424444, 234 0, 0, 0, 0x00000e04, 0xffffffff, 0x28323638, 235 0, 0, 0, 0x00000e10, 0xffffffff, 0x38404244, 236 0, 0, 0, 0x00000e14, 0xffffffff, 0x26303436 237 }; 238 239 u32 RTL8723BEPHY_REG_ARRAY_PGLEN = 240 sizeof(RTL8723BEPHY_REG_ARRAY_PG) / sizeof(u32); 241 242 u32 RTL8723BE_RADIOA_1TARRAY[] = { 243 0x000, 0x00010000, 244 0x0B0, 0x000DFFE0, 245 0x0FE, 0x00000000, 246 0x0FE, 0x00000000, 247 0x0FE, 0x00000000, 248 0x0B1, 0x00000018, 249 0x0FE, 0x00000000, 250 0x0FE, 0x00000000, 251 0x0FE, 0x00000000, 252 0x0B2, 0x00084C00, 253 0x0B5, 0x0000D2CC, 254 0x0B6, 0x000925AA, 255 0x0B7, 0x00000010, 256 0x0B8, 0x0000907F, 257 0x05C, 0x00000002, 258 0x07C, 0x00000002, 259 0x07E, 0x00000005, 260 0x08B, 0x0006FC00, 261 0x0B0, 0x000FF9F0, 262 0x01C, 0x000739D2, 263 0x01E, 0x00000000, 264 0x0DF, 0x00000780, 265 0x050, 0x00067435, 266 0x80002000, 0x00000000, 0x40000000, 0x00000000, 267 0x051, 0x0006F10E, 268 0x052, 0x000007D3, 269 0x90003000, 0x00000000, 0x40000000, 0x00000000, 270 0x051, 0x0006F10E, 271 0x052, 0x000007D3, 272 0x90004000, 0x00000000, 0x40000000, 0x00000000, 273 0x051, 0x0006F10E, 274 0x052, 0x000007D3, 275 0xA0000000, 0x00000000, 276 0x051, 0x0006B04E, 277 0x052, 0x000007D2, 278 0xB0000000, 0x00000000, 279 0x053, 0x00000000, 280 0x054, 0x00050400, 281 0x055, 0x0004026E, 282 0x0DD, 0x0000004C, 283 0x070, 0x00067435, 284 0x80002000, 0x00000000, 0x40000000, 0x00000000, 285 0x071, 0x0006F10E, 286 0x072, 0x000007D3, 287 0x90003000, 0x00000000, 0x40000000, 0x00000000, 288 0x071, 0x0006F10E, 289 0x072, 0x000007D3, 290 0x90004000, 0x00000000, 0x40000000, 0x00000000, 291 0x071, 0x0006F10E, 292 0x072, 0x000007D3, 293 0xA0000000, 0x00000000, 294 0x071, 0x0006B04E, 295 0x072, 0x000007D2, 296 0xB0000000, 0x00000000, 297 0x073, 0x00000000, 298 0x074, 0x00050400, 299 0x075, 0x0004026E, 300 0x0EF, 0x00000100, 301 0x034, 0x0000ADD7, 302 0x035, 0x00005C00, 303 0x034, 0x00009DD4, 304 0x035, 0x00005000, 305 0x034, 0x00008DD1, 306 0x035, 0x00004400, 307 0x034, 0x00007DCE, 308 0x035, 0x00003800, 309 0x034, 0x00006CD1, 310 0x035, 0x00004400, 311 0x034, 0x00005CCE, 312 0x035, 0x00003800, 313 0x034, 0x000048CE, 314 0x035, 0x00004400, 315 0x034, 0x000034CE, 316 0x035, 0x00003800, 317 0x034, 0x00002451, 318 0x035, 0x00004400, 319 0x034, 0x0000144E, 320 0x035, 0x00003800, 321 0x034, 0x00000051, 322 0x035, 0x00004400, 323 0x0EF, 0x00000000, 324 0x0EF, 0x00000100, 325 0x0ED, 0x00000010, 326 0x044, 0x0000ADD7, 327 0x044, 0x00009DD4, 328 0x044, 0x00008DD1, 329 0x044, 0x00007DCE, 330 0x044, 0x00006CC1, 331 0x044, 0x00005CCE, 332 0x044, 0x000044D1, 333 0x044, 0x000034CE, 334 0x044, 0x00002451, 335 0x044, 0x0000144E, 336 0x044, 0x00000051, 337 0x0EF, 0x00000000, 338 0x0ED, 0x00000000, 339 0x07F, 0x00020080, 340 0x0EF, 0x00002000, 341 0x03B, 0x000380EF, 342 0x03B, 0x000302FE, 343 0x03B, 0x00028CE6, 344 0x03B, 0x000200BC, 345 0x03B, 0x000188A5, 346 0x03B, 0x00010FBC, 347 0x03B, 0x00008F71, 348 0x03B, 0x00000900, 349 0x0EF, 0x00000000, 350 0x0ED, 0x00000001, 351 0x040, 0x000380EF, 352 0x040, 0x000302FE, 353 0x040, 0x00028CE6, 354 0x040, 0x000200BC, 355 0x040, 0x000188A5, 356 0x040, 0x00010FBC, 357 0x040, 0x00008F71, 358 0x040, 0x00000900, 359 0x0ED, 0x00000000, 360 0x082, 0x00080000, 361 0x083, 0x00008000, 362 0x084, 0x00048D80, 363 0x085, 0x00068000, 364 0x0A2, 0x00080000, 365 0x0A3, 0x00008000, 366 0x0A4, 0x00048D80, 367 0x0A5, 0x00068000, 368 0x0ED, 0x00000002, 369 0x0EF, 0x00000002, 370 0x056, 0x00000032, 371 0x076, 0x00000032, 372 0x001, 0x00000780, 373 374 }; 375 376 u32 RTL8723BE_RADIOA_1TARRAYLEN = 377 sizeof(RTL8723BE_RADIOA_1TARRAY) / sizeof(u32); 378 379 u32 RTL8723BEMAC_1T_ARRAY[] = { 380 0x02F, 0x00000030, 381 0x035, 0x00000000, 382 0x039, 0x00000008, 383 0x064, 0x00000000, 384 0x067, 0x00000020, 385 0x421, 0x0000000F, 386 0x428, 0x0000000A, 387 0x429, 0x00000010, 388 0x430, 0x00000000, 389 0x431, 0x00000000, 390 0x432, 0x00000000, 391 0x433, 0x00000001, 392 0x434, 0x00000004, 393 0x435, 0x00000005, 394 0x436, 0x00000007, 395 0x437, 0x00000008, 396 0x43C, 0x00000004, 397 0x43D, 0x00000005, 398 0x43E, 0x00000007, 399 0x43F, 0x00000008, 400 0x440, 0x0000005D, 401 0x441, 0x00000001, 402 0x442, 0x00000000, 403 0x444, 0x00000010, 404 0x445, 0x00000000, 405 0x446, 0x00000000, 406 0x447, 0x00000000, 407 0x448, 0x00000000, 408 0x449, 0x000000F0, 409 0x44A, 0x0000000F, 410 0x44B, 0x0000003E, 411 0x44C, 0x00000010, 412 0x44D, 0x00000000, 413 0x44E, 0x00000000, 414 0x44F, 0x00000000, 415 0x450, 0x00000000, 416 0x451, 0x000000F0, 417 0x452, 0x0000000F, 418 0x453, 0x00000000, 419 0x456, 0x0000005E, 420 0x460, 0x00000066, 421 0x461, 0x00000066, 422 0x4C8, 0x000000FF, 423 0x4C9, 0x00000008, 424 0x4CC, 0x000000FF, 425 0x4CD, 0x000000FF, 426 0x4CE, 0x00000001, 427 0x500, 0x00000026, 428 0x501, 0x000000A2, 429 0x502, 0x0000002F, 430 0x503, 0x00000000, 431 0x504, 0x00000028, 432 0x505, 0x000000A3, 433 0x506, 0x0000005E, 434 0x507, 0x00000000, 435 0x508, 0x0000002B, 436 0x509, 0x000000A4, 437 0x50A, 0x0000005E, 438 0x50B, 0x00000000, 439 0x50C, 0x0000004F, 440 0x50D, 0x000000A4, 441 0x50E, 0x00000000, 442 0x50F, 0x00000000, 443 0x512, 0x0000001C, 444 0x514, 0x0000000A, 445 0x516, 0x0000000A, 446 0x525, 0x0000004F, 447 0x550, 0x00000010, 448 0x551, 0x00000010, 449 0x559, 0x00000002, 450 0x55C, 0x00000050, 451 0x55D, 0x000000FF, 452 0x605, 0x00000030, 453 0x608, 0x0000000E, 454 0x609, 0x0000002A, 455 0x620, 0x000000FF, 456 0x621, 0x000000FF, 457 0x622, 0x000000FF, 458 0x623, 0x000000FF, 459 0x624, 0x000000FF, 460 0x625, 0x000000FF, 461 0x626, 0x000000FF, 462 0x627, 0x000000FF, 463 0x638, 0x00000050, 464 0x63C, 0x0000000A, 465 0x63D, 0x0000000A, 466 0x63E, 0x0000000E, 467 0x63F, 0x0000000E, 468 0x640, 0x00000040, 469 0x642, 0x00000040, 470 0x643, 0x00000000, 471 0x652, 0x000000C8, 472 0x66E, 0x00000005, 473 0x700, 0x00000021, 474 0x701, 0x00000043, 475 0x702, 0x00000065, 476 0x703, 0x00000087, 477 0x708, 0x00000021, 478 0x709, 0x00000043, 479 0x70A, 0x00000065, 480 0x70B, 0x00000087, 481 0x765, 0x00000018, 482 0x76E, 0x00000004, 483 484 }; 485 486 u32 RTL8723BEMAC_1T_ARRAYLEN = sizeof(RTL8723BEMAC_1T_ARRAY) / sizeof(u32); 487 488 u32 RTL8723BEAGCTAB_1TARRAY[] = { 489 0xC78, 0xFD000001, 490 0xC78, 0xFC010001, 491 0xC78, 0xFB020001, 492 0xC78, 0xFA030001, 493 0xC78, 0xF9040001, 494 0xC78, 0xF8050001, 495 0xC78, 0xF7060001, 496 0xC78, 0xF6070001, 497 0xC78, 0xF5080001, 498 0xC78, 0xF4090001, 499 0xC78, 0xF30A0001, 500 0xC78, 0xF20B0001, 501 0xC78, 0xF10C0001, 502 0xC78, 0xF00D0001, 503 0xC78, 0xEF0E0001, 504 0xC78, 0xEE0F0001, 505 0xC78, 0xED100001, 506 0xC78, 0xEC110001, 507 0xC78, 0xEB120001, 508 0xC78, 0xEA130001, 509 0xC78, 0xE9140001, 510 0xC78, 0xE8150001, 511 0xC78, 0xE7160001, 512 0xC78, 0xE6170001, 513 0xC78, 0xE5180001, 514 0xC78, 0xE4190001, 515 0xC78, 0xE31A0001, 516 0xC78, 0xA51B0001, 517 0xC78, 0xA41C0001, 518 0xC78, 0xA31D0001, 519 0xC78, 0x671E0001, 520 0xC78, 0x661F0001, 521 0xC78, 0x65200001, 522 0xC78, 0x64210001, 523 0xC78, 0x63220001, 524 0xC78, 0x4A230001, 525 0xC78, 0x49240001, 526 0xC78, 0x48250001, 527 0xC78, 0x47260001, 528 0xC78, 0x46270001, 529 0xC78, 0x45280001, 530 0xC78, 0x44290001, 531 0xC78, 0x432A0001, 532 0xC78, 0x422B0001, 533 0xC78, 0x292C0001, 534 0xC78, 0x282D0001, 535 0xC78, 0x272E0001, 536 0xC78, 0x262F0001, 537 0xC78, 0x0A300001, 538 0xC78, 0x09310001, 539 0xC78, 0x08320001, 540 0xC78, 0x07330001, 541 0xC78, 0x06340001, 542 0xC78, 0x05350001, 543 0xC78, 0x04360001, 544 0xC78, 0x03370001, 545 0xC78, 0x02380001, 546 0xC78, 0x01390001, 547 0xC78, 0x013A0001, 548 0xC78, 0x013B0001, 549 0xC78, 0x013C0001, 550 0xC78, 0x013D0001, 551 0xC78, 0x013E0001, 552 0xC78, 0x013F0001, 553 0xC78, 0xFC400001, 554 0xC78, 0xFB410001, 555 0xC78, 0xFA420001, 556 0xC78, 0xF9430001, 557 0xC78, 0xF8440001, 558 0xC78, 0xF7450001, 559 0xC78, 0xF6460001, 560 0xC78, 0xF5470001, 561 0xC78, 0xF4480001, 562 0xC78, 0xF3490001, 563 0xC78, 0xF24A0001, 564 0xC78, 0xF14B0001, 565 0xC78, 0xF04C0001, 566 0xC78, 0xEF4D0001, 567 0xC78, 0xEE4E0001, 568 0xC78, 0xED4F0001, 569 0xC78, 0xEC500001, 570 0xC78, 0xEB510001, 571 0xC78, 0xEA520001, 572 0xC78, 0xE9530001, 573 0xC78, 0xE8540001, 574 0xC78, 0xE7550001, 575 0xC78, 0xE6560001, 576 0xC78, 0xE5570001, 577 0xC78, 0xE4580001, 578 0xC78, 0xE3590001, 579 0xC78, 0xA65A0001, 580 0xC78, 0xA55B0001, 581 0xC78, 0xA45C0001, 582 0xC78, 0xA35D0001, 583 0xC78, 0x675E0001, 584 0xC78, 0x665F0001, 585 0xC78, 0x65600001, 586 0xC78, 0x64610001, 587 0xC78, 0x63620001, 588 0xC78, 0x62630001, 589 0xC78, 0x61640001, 590 0xC78, 0x48650001, 591 0xC78, 0x47660001, 592 0xC78, 0x46670001, 593 0xC78, 0x45680001, 594 0xC78, 0x44690001, 595 0xC78, 0x436A0001, 596 0xC78, 0x426B0001, 597 0xC78, 0x286C0001, 598 0xC78, 0x276D0001, 599 0xC78, 0x266E0001, 600 0xC78, 0x256F0001, 601 0xC78, 0x24700001, 602 0xC78, 0x09710001, 603 0xC78, 0x08720001, 604 0xC78, 0x07730001, 605 0xC78, 0x06740001, 606 0xC78, 0x05750001, 607 0xC78, 0x04760001, 608 0xC78, 0x03770001, 609 0xC78, 0x02780001, 610 0xC78, 0x01790001, 611 0xC78, 0x017A0001, 612 0xC78, 0x017B0001, 613 0xC78, 0x017C0001, 614 0xC78, 0x017D0001, 615 0xC78, 0x017E0001, 616 0xC78, 0x017F0001, 617 0xC50, 0x69553422, 618 0xC50, 0x69553420, 619 0x824, 0x00390204, 620 621 }; 622 623 u32 RTL8723BEAGCTAB_1TARRAYLEN = sizeof(RTL8723BEAGCTAB_1TARRAY) / sizeof(u32); 624