1#- 2# Copyright (c) 2015-2016 Landon Fuller <landon@landonf.org> 3# Copyright (C) 2008-2015, Broadcom Corporation. 4# All Rights Reserved. 5# 6# The contents of this file (variable names, descriptions, and offsets) were 7# extracted or derived from Broadcom's ISC-licensed sources. 8# 9# Permission to use, copy, modify, and/or distribute this software for any 10# purpose with or without fee is hereby granted, provided that the above 11# copyright notice and this permission notice appear in all copies. 12# 13# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 14# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 15# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 16# SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 17# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION 18# OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN 19# CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 20# 21# $FreeBSD$ 22 23# 24# NVRAM variable definitions and revision-specific SPROM offsets. 25# 26# Processed by nvram_map_gen.awk to produce bhnd_nvram_map.h 27# 28# NOTE: file was originally generated automatically by using libclang 29# to analyze and extract format information and descriptions from Broadcom's 30# available ISC-licensed CIS and SROM code and associated headers. 31# 32 33# Board Info 34# 35 36u16 boardvendor {} # PCI vendor ID (SoC NVRAM-only) 37u16 subvid { srom >= 2 0x6 } # PCI subvendor ID 38u16 devid { srom >= 8 0x60 } # PCI device ID 39 40u32 boardflags { 41 srom 1 u16 0x72 42 srom 2 u16 0x72 | u16 0x38 (<<16) 43 srom 3 u16 0x72 | u16 0x7A (<<16) 44 srom 4 0x44 45 srom 5-7 0x4A 46 srom >= 8 0x84 47} 48u32 boardflags2 { 49 srom 4 0x48 50 srom 5-7 0x4E 51 srom >= 8 0x88 52} 53u32 boardflags3 { 54 srom >= 11 0x8C 55} 56 57# Board serial number, independent of mac addr 58u16 boardnum { 59 srom 1-2 0x4C 60 srom 3 0x4E 61 srom 4 0x50 62 srom 5-7 0x56 63 srom 8-10 0x90 64 srom >= 11 0x94 65} 66 67# Board revision 68u16 boardrev { 69 srom 1-3 u8 0x5D 70 srom 4-7 0x42 71 srom >= 8 0x82 72} 73 74# Board type 75u16 boardtype { 76 srom >= 2 0x4 77} 78 79# SROM revision 80u8 sromrev { 81 srom 1-3 0x74 82 srom 4-9 0x1B6 83 srom 10 0x1CA 84 srom 11 0x1D2 85} 86 87# Antennas available 88u8 aa2g { 89 srom 1-3 0x5C (&0x30, >>4) 90 srom 4-7 0x5D 91 srom 8-10 0x9D 92 srom >= 11 0xA1 93} 94u8 aa5g { 95 srom 1-3 0x5C (&0xC0, >>6) 96 srom 4-7 0x5C 97 srom 8-10 0x9C 98 srom >= 11 0xA0 99} 100 101# ACPHY PA trimming parameters: 40 102u16[12] pa5gbw40a0 { 103 srom >= 11 0x110 104} 105 106# ACPHY PA trimming parameters: 80 107u16[12] pa5gbw80a0 { 108 srom >= 11 0x138 109} 110 111# ACPHY PA trimming parameters: 40/80 112u16[12] pa5gbw4080a0 { 113 srom >= 11 0x138 114} 115u16[12] pa5gbw4080a1 { 116 srom >= 11 u16 0xB6, u16 0xBC, u16 0xCE, u16 0xD4, u16[8] 0x128 117} 118 119# ACPHY PA trimming parameters: CCK 120u16[3] pa2gccka0 { 121 srom >= 11 0x102 122} 123 124# ACPHY Power-per-rate 2gpo 125u16 dot11agofdmhrbw202gpo { 126 srom >= 11 0x15C 127} 128u16 ofdmlrbw202gpo { 129 srom >= 11 0x15E 130} 131 132# ACPHY Power-per-rate 5gpo 133u32 mcsbw805glpo { 134 srom >= 11 0x168 135} 136u32 mcsbw805gmpo { 137 srom >= 11 0x178 138} 139u32 mcsbw805ghpo { 140 srom >= 11 0x188 141} 142u16 mcslr5glpo { 143 srom >= 11 0x190 (&0xFFF) 144} 145u16 mcslr5gmpo { 146 srom >= 11 0x192 147} 148u16 mcslr5ghpo { 149 srom >= 11 0x194 150} 151 152# ACPHY Power-per-rate sbpo 153u16 sb20in40hrpo { 154 srom >= 11 0x196 155} 156u16 sb20in80and160hr5glpo { 157 srom >= 11 0x198 158} 159u16 sb40and80hr5glpo { 160 srom >= 11 0x19A 161} 162u16 sb20in80and160hr5gmpo { 163 srom >= 11 0x19C 164} 165u16 sb40and80hr5gmpo { 166 srom >= 11 0x19E 167} 168u16 sb20in80and160hr5ghpo { 169 srom >= 11 0x1A0 170} 171u16 sb40and80hr5ghpo { 172 srom >= 11 0x1A2 173} 174u16 sb20in40lrpo { 175 srom >= 11 0x1A4 176} 177u16 sb20in80and160lr5glpo { 178 srom >= 11 0x1A6 179} 180u16 sb40and80lr5glpo { 181 srom >= 11 0x1A8 182} 183u16 sb20in80and160lr5gmpo { 184 srom >= 11 0x1AA 185} 186u16 sb40and80lr5gmpo { 187 srom >= 11 0x1AC 188} 189u16 sb20in80and160lr5ghpo { 190 srom >= 11 0x1AE 191} 192u16 sb40and80lr5ghpo { 193 srom >= 11 0x1B0 194} 195u16 dot11agduphrpo { 196 srom >= 11 0x1B2 197} 198u16 dot11agduplrpo { 199 srom >= 11 0x1B4 200} 201 202# Antenna gain 203u8 ag0 { 204 srom 1-3 0x75 205 srom 4-7 0x5F 206 srom 8-10 0x9F 207} 208u8 ag1 { 209 srom 1-3 0x74 210 srom 4-7 0x5E 211 srom 8-10 0x9E 212} 213u8 ag2 { 214 srom 4-7 0x61 215 srom 8-10 0xA1 216} 217u8 ag3 { 218 srom 4-7 0x60 219 srom 8-10 0xA0 220} 221 222u8 agbg0 { 223 srom >= 11 0xA2 224} 225u8 agbg1 { 226 srom >= 11 0xA3 227} 228u8 agbg2 { 229 srom >= 11 0xA4 230} 231u8 aga0 { 232 srom >= 11 0xA5 233} 234u8 aga1 { 235 srom >= 11 0xA6 236} 237u8 aga2 { 238 srom >= 11 0xA7 239} 240 241# Default country code (sromrev == 1) 242u8 cc { 243 srom 1 0x5C (&0xF) 244} 245 246# 2 bytes each 247# CCK Power offsets for 20 MHz rates (11, 5.5, 2, 1Mbps) 248# cckbw202gpo cckbw20ul2gpo 249# 250u16 cckbw202gpo { 251 srom 9-10 0x140 252 srom >= 11 0x150 253} 254u16 cckbw20ul2gpo { 255 srom 9-10 0x142 256 srom >= 11 0x152 257} 258 259# Country code (2 bytes ascii + 1 byte cctl) 260# in rev 2 261# 262char[2] ccode { 263 sfmt ccode 264 srom 0-3 0x76 265 srom 4 0x52 266 srom 5-7 0x44 267 srom 8-10 0x92 268 srom >= 11 0x96 269} 270 271# 2 byte; txchain, rxchain 272u8 txchain { 273 all1 ignore 274 srom 4-7 0x7B (&0xF) 275 srom 8-10 0xA3 (&0xF) 276 srom >= 11 0xA9 (&0xF) 277} 278u8 rxchain { 279 all1 ignore 280 srom 4-7 0x7B (&0xF0, >>4) 281 srom 8-10 0xA3 (&0xF0, >>4) 282 srom >= 11 0xA9 (&0xF0, >>4) 283} 284u16 antswitch { 285 all1 ignore 286 srom 4-7 u8 0x7A 287 srom 8-10 u8 0xA2 288 srom >= 11 u8 0xA8 289} 290 291u8 elna2g { 292 srom 8-10 0xBB 293} 294 295u8 elna5g { 296 srom 8-10 0xBA 297} 298 299# 11n front-end specification 300u8 antswctl2g { 301 srom 8-10 0xAE (&0xF8, >>3) 302} 303u8 triso2g { 304 srom 8-10 0xAE (&0x7) 305} 306u8 pdetrange2g { 307 srom 8-10 0xAF (&0xF8, >>3) 308} 309u8 extpagain2g { 310 srom 8-10 0xAF (&0x6, >>1) 311} 312u8 tssipos2g { 313 srom 8-10 0xAF (&0x1) 314} 315u8 antswctl5g { 316 srom 8-10 0xB0 (&0xF8, >>3) 317} 318u8 triso5g { 319 srom 8-10 0xB0 (&0x7) 320} 321u8 pdetrange5g { 322 srom 8-10 0xB1 (&0xF8, >>3) 323} 324u8 extpagain5g { 325 srom 8-10 0xB1 (&0x6, >>1) 326} 327u8 tssipos5g { 328 srom 8-10 0xB1 (&0x1) 329} 330 331# FEM config 332u8 femctrl { 333 sfmt decimal 334 srom >= 11 0xAA (&0xF8, >>3) 335} 336u8 papdcap2g { 337 sfmt decimal 338 srom >= 11 0xAA (&0x4, >>2) 339} 340u8 tworangetssi2g { 341 sfmt decimal 342 srom >= 11 0xAA (&0x2, >>1) 343} 344u8 pdgain2g { 345 sfmt decimal 346 srom >= 11 u16 0xAA (&0x1F0, >>4) 347} 348u8 epagain2g { 349 sfmt decimal 350 srom >= 11 0xAB (&0xE, >>1) 351} 352u8 tssiposslope2g { 353 sfmt decimal 354 srom >= 11 0xAB (&0x1) 355} 356u8 gainctrlsph { 357 sfmt decimal 358 srom >= 11 0xAC (&0xF8, >>3) 359} 360u8 papdcap5g { 361 sfmt decimal 362 srom >= 11 0xAC (&0x4, >>2) 363} 364u8 tworangetssi5g { 365 sfmt decimal 366 srom >= 11 0xAC (&0x2, >>1) 367} 368u8 pdgain5g { 369 sfmt decimal 370 srom >= 11 u16 0xAC (&0x1F0, >>4) 371} 372u8 epagain5g { 373 sfmt decimal 374 srom >= 11 0xAD (&0xE, >>1) 375} 376u8 tssiposslope5g { 377 sfmt decimal 378 srom >= 11 0xAD (&0x1) 379} 380 381# LED duty cycle 382u8[2] leddc { 383 sfmt led_dc 384 all1 ignore 385 srom 3 0x7C 386 srom 4 0x5A 387 srom 5-7 0x5A 388 srom 8-10 0x9A 389 srom >= 11 0x9E 390} 391 392# LED set 393u8 ledbh0 { 394 all1 ignore 395 srom 1-3 0x65 396 srom 4 0x57 397 srom 5-7 0x77 398 srom 8-10 0x97 399 srom >= 11 0x9B 400} 401u8 ledbh1 { 402 all1 ignore 403 srom 1-3 0x64 404 srom 4 0x56 405 srom 5-7 0x76 406 srom 8-10 0x96 407 srom >= 11 0x9A 408} 409u8 ledbh2 { 410 all1 ignore 411 srom 1-3 0x67 412 srom 4 0x59 413 srom 5-7 0x79 414 srom 8-10 0x99 415 srom >= 11 0x9D 416} 417u8 ledbh3 { 418 all1 ignore 419 srom 1-3 0x66 420 srom 4 0x58 421 srom 5-7 0x78 422 srom 8-10 0x98 423 srom >= 11 0x9C 424} 425 426# 2 bytes total 427# Additional power offset for Legacy Dup40 transmissions. 428# Applied in addition to legofdmbw20ulXpo, X=2g, 5gl, 5gm, or 5gh. 429# LSB nibble: 2G band, MSB nibble: 5G band high subband. 430# leg40dup5ghpo, leg40dup5gmpo, leg40dup5glpo, leg40dup2gpo 431# 432u16 legofdm40duppo { 433 srom 9-10 0x196 434} 435 436# 4 bytes each 437# OFDM power offsets for 20 MHz Legacy rates 438# (54, 48, 36, 24, 18, 12, 9, 6 Mbps) 439# legofdmbw202gpo legofdmbw20ul2gpo 440# 441u32 legofdmbw202gpo { 442 srom 9-10 0x144 443} 444u32 legofdmbw20ul2gpo { 445 srom 9-10 0x148 446} 447 448# 4 bytes each 449# 5G band: OFDM power offsets for 20 MHz Legacy rates 450# (54, 48, 36, 24, 18, 12, 9, 6 Mbps) 451# low subband : legofdmbw205glpo legofdmbw20ul2glpo 452# mid subband :legofdmbw205gmpo legofdmbw20ul2gmpo 453# high subband :legofdmbw205ghpo legofdmbw20ul2ghpo 454# 455u32 legofdmbw205glpo { 456 srom 9-10 0x14C 457} 458u32 legofdmbw20ul5glpo { 459 srom 9-10 0x150 460} 461u32 legofdmbw205gmpo { 462 srom 9-10 0x154 463} 464u32 legofdmbw20ul5gmpo { 465 srom 9-10 0x158 466} 467u32 legofdmbw205ghpo { 468 srom 9-10 0x15C 469} 470u32 legofdmbw20ul5ghpo { 471 srom 9-10 0x160 472} 473 474# mac addr override for the standard CIS LAN_NID 475u8[6] macaddr { 476 sfmt macaddr 477 srom 3 u8 0x4B, u8 0x4A, u8 0x4D, u8 0x4C, u8 0x4F, u8 0x4E 478 srom 4 u8 0x4D, u8 0x4C, u8 0x4F, u8 0x4E, u8 0x51, u8 0x50 479 srom 5-7 u8 0x53, u8 0x52, u8 0x55, u8 0x54, u8 0x57, u8 0x56 480 srom 8-10 u8 0x8D, u8 0x8C, u8 0x8F, u8 0x8E, u8 0x91, u8 0x90 481 srom >= 11 u8 0x91, u8 0x90, u8 0x93, u8 0x92, u8 0x95, u8 0x94 482} 483 484# 4 bytes each 485# mcs 0-7 power-offset. LSB nibble: m0, MSB nibble: m7 486# mcsbw202gpo mcsbw20ul2gpo mcsbw402gpo 487# 488u32 mcsbw202gpo { 489 srom 9-10 0x164 490 srom >= 11 0x154 491} 492u32 mcsbw20ul2gpo { 493 srom 9-10 0x168 494} 495u32 mcsbw402gpo { 496 srom 9-10 0x16C 497 srom >= 11 0x158 498} 499 500# 4 bytes each 501# 5G high subband mcs 0-7 power-offset. 502# LSB nibble: m0, MSB nibble: m7 503# mcsbw205ghpo mcsbw20ul5ghpo mcsbw405ghpo 504# 505u32 mcsbw205ghpo { 506 srom 9-10 0x188 507 srom >= 11 0x180 508} 509u32 mcsbw20ul5ghpo { 510 srom 9-10 0x18C 511} 512u32 mcsbw405ghpo { 513 srom 9-10 0x190 514 srom >= 11 0x184 515} 516 517# 4 bytes each 518# 5G low subband mcs 0-7 power-offset. 519# LSB nibble: m0, MSB nibble: m7 520# mcsbw205glpo mcsbw20ul5glpo mcsbw405glpo 521# 522u32 mcsbw205glpo { 523 srom 9-10 0x170 524 srom >= 11 0x160 525} 526u32 mcsbw20ul5glpo { 527 srom 9-10 0x174 528} 529u32 mcsbw405glpo { 530 srom 9-10 0x178 531 srom >= 11 0x164 532} 533 534# 4 bytes each 535# 5G mid subband mcs 0-7 power-offset. 536# LSB nibble: m0, MSB nibble: m7 537# mcsbw205gmpo mcsbw20ul5gmpo mcsbw405gmpo 538# 539u32 mcsbw205gmpo { 540 srom 9-10 0x17C 541 srom >= 11 0x170 542} 543u32 mcsbw20ul5gmpo { 544 srom 9-10 0x180 545} 546u32 mcsbw405gmpo { 547 srom 9-10 0x184 548 srom >= 11 0x174 549} 550 551# 2 bytes total 552# mcs-32 power offset for each band/subband. 553# LSB nibble: 2G band, MSB nibble: 554# mcs322ghpo, mcs325gmpo, mcs325glpo, mcs322gpo 555# 556u16 mcs32po { 557 srom 9-10 0x194 558} 559 560u8 measpower { 561 srom 8-10 0xB4 (&0xFE, >>1) 562 srom >= 11 0xB0 (&0xFE, >>1) 563} 564u8 measpower1 { 565 srom 8-10 0xBF (&0x7F) 566 srom >= 11 0xBB (&0x7F) 567} 568u8 measpower2 { 569 srom 8-10 u16 0xBE (&0x3F80, >>7) 570 srom >= 11 u16 0xBA (&0x3F80, >>7) 571} 572u16 rawtempsense { 573 srom 8-10 0xB4 (&0x1FF) 574 srom >= 11 0xB0 (&0x1FF) 575} 576 577u8 noiselvl2ga0 { 578 sfmt decimal 579 srom 8-10 0x1AB (&0x1F) 580 srom >= 11 0x1BD (&0x1F) 581} 582u8 noiselvl2ga1 { 583 sfmt decimal 584 srom 8-10 u16 0x1AA (&0x3E0, >>5) 585 srom >= 11 u16 0x1BC (&0x3E0, >>5) 586} 587u8 noiselvl2ga2 { 588 sfmt decimal 589 srom 8-10 0x1AA (&0x7C, >>2) 590 srom >= 11 0x1BC (&0x7C, >>2) 591} 592u8[4] noiselvl5ga0 { 593 sfmt decimal 594 srom >= 11 u8 0x1BF (&0x1F), u8 0x1C1 (&0x1F), u8 0x1C3 (&0x1F), u8 0x1C5 (&0x1F) 595} 596u8[4] noiselvl5ga1 { 597 sfmt decimal 598 srom >= 11 u16[4] 0x1BE (&0x3E0, >>5) 599} 600u8[4] noiselvl5ga2 { 601 sfmt decimal 602 srom >= 11 u8 0x1BE (&0x7C, >>2), u8 0x1C0 (&0x7C, >>2), u8 0x1C2 (&0x7C, >>2), u8 0x1C4 (&0x7C, >>2) 603} 604 605# paparambwver 606u8 paparambwver { 607 sfmt decimal 608 srom >= 11 0x190 (&0xF0, >>4) 609} 610 611# PA parameters: 8 (sromrev == 1) 612# or 9 (sromrev > 1) bytes 613# 614u16 pa0b0 { 615 sfmt decimal 616 srom 1-3 0x5E 617 srom 8-10 0xC2 618} 619u16 pa0b1 { 620 sfmt decimal 621 srom 1-3 0x60 622 srom 8-10 0xC4 623} 624u16 pa0b2 { 625 sfmt decimal 626 srom 1-3 0x62 627 srom 8-10 0xC6 628} 629u8 pa0itssit { 630 sfmt decimal 631 srom 1-3 0x71 632 srom 8-10 0xC0 633} 634u8 pa0maxpwr { 635 sfmt decimal 636 srom 1-3 0x69 637 srom 8-10 0xC1 638} 639u8 opo { 640 srom 2-3 0x79 641 srom 8-10 0x143 642} 643 644# 5G PA params 645u16 pa1b0 { 646 sfmt decimal 647 srom 1-3 0x6A 648 srom 8-10 0xCC 649} 650u16 pa1b1 { 651 sfmt decimal 652 srom 1-3 0x6C 653 srom 8-10 0xCE 654} 655u16 pa1b2 { 656 sfmt decimal 657 srom 1-3 0x6E 658 srom 8-10 0xD0 659} 660u16 pa1lob0 { 661 sfmt decimal 662 srom 2-3 0x3C 663 srom 8-10 0xD2 664} 665u16 pa1lob1 { 666 sfmt decimal 667 srom 2-3 0x3E 668 srom 8-10 0xD4 669} 670u16 pa1lob2 { 671 sfmt decimal 672 srom 2-3 0x40 673 srom 8-10 0xD6 674} 675u16 pa1hib0 { 676 sfmt decimal 677 srom 2-3 0x42 678 srom 8-10 0xD8 679} 680u16 pa1hib1 { 681 sfmt decimal 682 srom 2-3 0x44 683 srom 8-10 0xDA 684} 685u16 pa1hib2 { 686 sfmt decimal 687 srom 2-3 0x46 688 srom 8-10 0xDC 689} 690u8 pa1itssit { 691 sfmt decimal 692 srom 1-3 0x70 693 srom 8-10 0xC8 694} 695u8 pa1maxpwr { 696 sfmt decimal 697 srom 1-3 0x68 698 srom 8-10 0xC9 699} 700u8 pa1lomaxpwr { 701 sfmt decimal 702 srom 2-3 0x3A 703 srom 8-10 0xCA 704} 705u8 pa1himaxpwr { 706 sfmt decimal 707 srom 2-3 0x3B 708 srom 8-10 0xCB 709} 710 711u16 pdoffset40ma0 { 712 srom >= 11 0xCA 713} 714u16 pdoffset40ma1 { 715 srom >= 11 0xCC 716} 717u16 pdoffset40ma2 { 718 srom >= 11 0xCE 719} 720u16 pdoffset80ma0 { 721 srom >= 11 0xD0 722} 723u16 pdoffset80ma1 { 724 srom >= 11 0xD2 725} 726u16 pdoffset80ma2 { 727 srom >= 11 0xD4 728} 729 730u8 pdoffset2g40ma0 { 731 srom >= 11 0xC9 (&0xF) 732} 733u8 pdoffset2g40ma1 { 734 srom >= 11 0xC9 (&0xF0, >>4) 735} 736u8 pdoffset2g40ma2 { 737 srom >= 11 0xC8 (&0xF) 738} 739u8 pdoffset2g40mvalid { 740 srom >= 11 0xC8 (&0x80, >>7) 741} 742 743# 40Mhz channel 2g/5g power offset 744u16 bw40po { 745 srom 4-7 0x18E 746 srom 8 0x196 747} 748 749# 40Mhz channel dup 2g/5g power offset 750u16 bwduppo { 751 srom 4-7 0x190 752 srom 8 0x198 753} 754 755# cck2g/ofdm2g/ofdm5g power offset 756u16 cck2gpo { 757 srom 4-7 0x138 758 srom 8 0x140 759} 760u32 ofdm2gpo { 761 srom 4-7 0x13A 762 srom 8 0x142 763} 764u32 ofdm5gpo { 765 srom 4-7 0x13E 766 srom 8 0x146 767} 768u32 ofdm5glpo { 769 srom 4-7 0x142 770 srom 8 0x14A 771} 772u32 ofdm5ghpo { 773 srom 4-7 0x146 774 srom 8 0x14E 775} 776 777# cdd2g/5g power offset 778u16 cddpo { 779 srom 4-7 0x18A 780 srom 8 0x192 781} 782 783# mcs2g power offset 784u16 mcs2gpo0 { 785 srom 4-7 0x14A 786 srom 8 0x152 787} 788u16 mcs2gpo1 { 789 srom 4-7 0x14C 790 srom 8 0x154 791} 792u16 mcs2gpo2 { 793 srom 4-7 0x14E 794 srom 8 0x156 795} 796u16 mcs2gpo3 { 797 srom 4-7 0x150 798 srom 8 0x158 799} 800u16 mcs2gpo4 { 801 srom 4-7 0x152 802 srom 8 0x15A 803} 804u16 mcs2gpo5 { 805 srom 4-7 0x154 806 srom 8 0x15C 807} 808u16 mcs2gpo6 { 809 srom 4-7 0x156 810 srom 8 0x15E 811} 812u16 mcs2gpo7 { 813 srom 4-7 0x158 814 srom 8 0x160 815} 816 817# mcs5g low-high band power offset 818u16 mcs5glpo0 { 819 srom 4-7 0x16A 820 srom 8 0x172 821} 822u16 mcs5glpo1 { 823 srom 4-7 0x16C 824 srom 8 0x174 825} 826u16 mcs5glpo2 { 827 srom 4-7 0x16E 828 srom 8 0x176 829} 830u16 mcs5glpo3 { 831 srom 4-7 0x170 832 srom 8 0x178 833} 834u16 mcs5glpo4 { 835 srom 4-7 0x172 836 srom 8 0x17A 837} 838u16 mcs5glpo5 { 839 srom 4-7 0x174 840 srom 8 0x17C 841} 842u16 mcs5glpo6 { 843 srom 4-7 0x176 844 srom 8 0x17E 845} 846u16 mcs5glpo7 { 847 srom 4-7 0x178 848 srom 8 0x180 849} 850u16 mcs5ghpo0 { 851 srom 4-7 0x17A 852 srom 8 0x182 853} 854u16 mcs5ghpo1 { 855 srom 4-7 0x17C 856 srom 8 0x184 857} 858u16 mcs5ghpo2 { 859 srom 4-7 0x17E 860 srom 8 0x186 861} 862u16 mcs5ghpo3 { 863 srom 4-7 0x180 864 srom 8 0x188 865} 866u16 mcs5ghpo4 { 867 srom 4-7 0x182 868 srom 8 0x18A 869} 870u16 mcs5ghpo5 { 871 srom 4-7 0x184 872 srom 8 0x18C 873} 874u16 mcs5ghpo6 { 875 srom 4-7 0x186 876 srom 8 0x18E 877} 878u16 mcs5ghpo7 { 879 srom 4-7 0x188 880 srom 8 0x190 881} 882 883# mcs5g mid band power offset 884u16 mcs5gpo0 { 885 srom 4-7 0x15A 886 srom 8 0x162 887} 888u16 mcs5gpo1 { 889 srom 4-7 0x15C 890 srom 8 0x164 891} 892u16 mcs5gpo2 { 893 srom 4-7 0x15E 894 srom 8 0x166 895} 896u16 mcs5gpo3 { 897 srom 4-7 0x160 898 srom 8 0x168 899} 900u16 mcs5gpo4 { 901 srom 4-7 0x162 902 srom 8 0x16A 903} 904u16 mcs5gpo5 { 905 srom 4-7 0x164 906 srom 8 0x16C 907} 908u16 mcs5gpo6 { 909 srom 4-7 0x166 910 srom 8 0x16E 911} 912u16 mcs5gpo7 { 913 srom 4-7 0x168 914 srom 8 0x170 915} 916 917# stbc2g/5g power offset 918u16 stbcpo { 919 srom 4-7 0x18C 920 srom 8 0x194 921} 922 923u8 regrev { 924 srom 3 0x78 925 srom 4 0x55 926 srom 5-7 0x47 927 srom 8-10 0x95 928 srom >= 11 0x99 929} 930 931# 4328 2G RSSI mid pt sel & board switch arch, 932# 2 bytes, rev 3. 933# 934u8 rssismf2g { 935 srom 3 0x51 (&0xF) 936 srom 8-10 0xA5 (&0xF) 937} 938u8 rssismc2g { 939 srom 3 0x51 (&0xF0, >>4) 940 srom 8-10 0xA5 (&0xF0, >>4) 941} 942u8 rssisav2g { 943 srom 3 0x50 (&0x7) 944 srom 8-10 0xA4 (&0x7) 945} 946u8 bxa2g { 947 srom 3 0x50 (&0x18, >>3) 948 srom 8-10 0xA4 (&0x18, >>3) 949} 950 951# 4328 5G RSSI mid pt sel & board switch arch, 952# 2 bytes, rev 3. 953# 954u8 rssismf5g { 955 srom 3 0x53 (&0xF) 956 srom 8-10 0xA7 (&0xF) 957} 958u8 rssismc5g { 959 srom 3 0x53 (&0xF0, >>4) 960 srom 8-10 0xA7 (&0xF0, >>4) 961} 962u8 rssisav5g { 963 srom 3 0x52 (&0x7) 964 srom 8-10 0xA6 (&0x7) 965} 966u8 bxa5g { 967 srom 3 0x52 (&0x18, >>3) 968 srom 8-10 0xA6 (&0x18, >>3) 969} 970 971u8 rxgainerr2ga0 { 972 srom 8-10 0x19B (&0x3F) 973 srom >= 11 0x1C7 (&0x3F) 974} 975u8 rxgainerr2ga1 { 976 srom 8-10 u16 0x19A (&0x7C0, >>6) 977 srom >= 11 u16 0x1C6 (&0x7C0, >>6) 978} 979u8 rxgainerr2ga2 { 980 srom 8-10 0x19A (&0xF8, >>3) 981 srom >= 11 0x1C6 (&0xF8, >>3) 982} 983u8[4] rxgainerr5ga0 { 984 srom >= 11 u8 0x1C9 (&0x3F), u8 0x1CB (&0x3F), u8 0x1CD (&0x3F), u8 0x1CF (&0x3F) 985} 986u8[4] rxgainerr5ga1 { 987 srom >= 11 u16[4] 0x1C8 (&0x7C0, >>6) 988} 989u8[4] rxgainerr5ga2 { 990 srom >= 11 u8 0x1C8 (&0xF8, >>3), u8 0x1CA (&0xF8, >>3), u8 0x1CC (&0xF8, >>3), u8 0x1CE (&0xF8, >>3) 991} 992u8 rxgainerr5gha0 { 993 srom 8-10 0x1A1 (&0x3F) 994} 995u8 rxgainerr5gha1 { 996 srom 8-10 u16 0x1A0 (&0x7C0, >>6) 997} 998u8 rxgainerr5gha2 { 999 srom 8-10 0x1A0 (&0xF8, >>3) 1000} 1001u8 rxgainerr5gla0 { 1002 srom 8-10 0x19D (&0x3F) 1003} 1004u8 rxgainerr5gla1 { 1005 srom 8-10 u16 0x19C (&0x7C0, >>6) 1006} 1007u8 rxgainerr5gla2 { 1008 srom 8-10 0x19C (&0xF8, >>3) 1009} 1010u8 rxgainerr5gma0 { 1011 srom 8-10 0x19F (&0x3F) 1012} 1013u8 rxgainerr5gma1 { 1014 srom 8-10 u16 0x19E (&0x7C0, >>6) 1015} 1016u8 rxgainerr5gma2 { 1017 srom 8-10 0x19E (&0xF8, >>3) 1018} 1019u8 rxgainerr5gua0 { 1020 srom 8-10 0x1A3 (&0x3F) 1021} 1022u8 rxgainerr5gua1 { 1023 srom 8-10 u16 0x1A2 (&0x7C0, >>6) 1024} 1025u8 rxgainerr5gua2 { 1026 srom 8-10 0x1A2 (&0xF8, >>3) 1027} 1028 1029# 4328 2G RX power offset 1030i8 rxpo2g { 1031 sfmt decimal 1032 srom 3 0x5B 1033 srom 8-10 0xAD 1034} 1035 1036# 4328 5G RX power offset 1037i8 rxpo5g { 1038 sfmt decimal 1039 srom 3 0x5A 1040 srom 8-10 0xAC 1041} 1042 1043u16 subband5gver { 1044 srom 8-10 u8 0x1A5 (&0x7) 1045 srom >= 11 0xD6 1046} 1047 1048# 2 bytes 1049# byte1 tempthresh 1050# byte2 period(msb 4 bits) | hysterisis(lsb 4 bits) 1051# 1052u8 tempthresh { 1053 srom 8-10 0xB2 1054 srom >= 11 0xAE 1055} 1056u8 temps_period { 1057 sfmt decimal 1058 srom 8-10 0xBC (&0xF) 1059 srom >= 11 0xB8 (&0xF) 1060} 1061u8 temps_hysteresis { 1062 sfmt decimal 1063 srom 8-10 0xBC (&0xF0, >>4) 1064 srom >= 11 0xB8 (&0xF0, >>4) 1065} 1066u8 tempoffset { 1067 sfmt decimal 1068 srom 8-10 0xB3 1069 srom >= 11 0xAF 1070} 1071u8 tempsense_slope { 1072 srom 8-10 0xB7 1073 srom >= 11 0xB3 1074} 1075u8 tempcorrx { 1076 srom 8-10 0xB6 (&0xFC, >>2) 1077 srom >= 11 0xB2 (&0xFC, >>2) 1078} 1079u8 tempsense_option { 1080 srom 8-10 0xB6 (&0x3) 1081 srom >= 11 0xB2 (&0x3) 1082} 1083u8 phycal_tempdelta { 1084 sfmt decimal 1085 srom 8-10 0xBD 1086 srom >= 11 0xB9 1087} 1088 1089# 4328 2G TR isolation, 1 byte 1090u8 tri2g { 1091 srom 3 0x55 1092 srom 8-10 0xA9 1093} 1094 1095# 4328 5G TR isolation, 3 bytes 1096u8 tri5gl { 1097 srom 3 0x57 1098 srom 8-10 0xAB 1099} 1100u8 tri5g { 1101 srom 3 0x54 1102 srom 8-10 0xA8 1103} 1104u8 tri5gh { 1105 srom 3 0x56 1106 srom 8-10 0xAA 1107} 1108 1109# phy txbf rpcalvars 1110u16 rpcal2g { 1111 srom >= 11 0x16C 1112} 1113u16 rpcal5gb0 { 1114 srom >= 11 0x16E 1115} 1116u16 rpcal5gb1 { 1117 srom >= 11 0x17C 1118} 1119u16 rpcal5gb2 { 1120 srom >= 11 0x17E 1121} 1122u16 rpcal5gb3 { 1123 srom >= 11 0x18C 1124} 1125 1126# Crystal frequency in kilohertz 1127u32 xtalfreq { 1128 sfmt decimal 1129 srom >= 11 u16 0xB4 1130} 1131 1132# N-PHY tx power workaround 1133u8 txpid2ga0 { 1134 srom 4-7 0x63 1135} 1136u8 txpid2ga1 { 1137 srom 4-7 0x62 1138} 1139u8 txpid2ga2 { 1140 srom 4-7 0x65 1141} 1142u8 txpid2ga3 { 1143 srom 4-7 0x64 1144} 1145u8 txpid5ga0 { 1146 srom 4-7 0x67 1147} 1148u8 txpid5ga1 { 1149 srom 4-7 0x66 1150} 1151u8 txpid5ga2 { 1152 srom 4-7 0x69 1153} 1154u8 txpid5ga3 { 1155 srom 4-7 0x68 1156} 1157u8 txpid5gha0 { 1158 srom 4-7 0x6F 1159} 1160u8 txpid5gha1 { 1161 srom 4-7 0x6E 1162} 1163u8 txpid5gha2 { 1164 srom 4-7 0x71 1165} 1166u8 txpid5gha3 { 1167 srom 4-7 0x70 1168} 1169u8 txpid5gla0 { 1170 srom 4-7 0x6B 1171} 1172u8 txpid5gla1 { 1173 srom 4-7 0x6A 1174} 1175u8 txpid5gla2 { 1176 srom 4-7 0x6D 1177} 1178u8 txpid5gla3 { 1179 srom 4-7 0x6C 1180} 1181 1182u16 cckPwrOffset { 1183 srom 10 0x1B4 1184} 1185u8[6] et1macaddr { 1186 sfmt macaddr 1187 srom 0-2 u8 0x55, u8 0x54, u8 0x57, u8 0x56, u8 0x59, u8 0x58 1188} 1189u8 eu_edthresh2g { 1190 srom 8 0x1A9 1191 srom 9 0x199 1192 srom 10 0x199 1193 srom 11 0x1D1 1194} 1195u8 eu_edthresh5g { 1196 srom 8 0x1A8 1197 srom 9 0x198 1198 srom 10 0x198 1199 srom 11 0x1D0 1200} 1201u8 freqoffset_corr { 1202 srom 8-10 0xB9 (&0xF) 1203} 1204u8 hw_iqcal_en { 1205 srom 8-10 0xB9 (&0x20, >>5) 1206} 1207u8[6] il0macaddr { 1208 sfmt macaddr 1209 srom 0-2 u8 0x49, u8 0x48, u8 0x51, u8 0x50, u8 0x53, u8 0x52 1210} 1211u8 iqcal_swp_dis { 1212 srom 8-10 0xB9 (&0x10, >>4) 1213} 1214 1215u8 noisecaloffset { 1216 srom 8-9 0x1B5 1217} 1218u8 noisecaloffset5g { 1219 srom 8-9 0x1B4 1220} 1221u8 noiselvl5gha0 { 1222 srom 8-10 0x1B1 (&0x1F) 1223} 1224u8 noiselvl5gha1 { 1225 srom 8-10 u16 0x1B0 (&0x3E0, >>5) 1226} 1227u8 noiselvl5gha2 { 1228 srom 8-10 0x1B0 (&0x7C, >>2) 1229} 1230u8 noiselvl5gla0 { 1231 srom 8-10 0x1AD (&0x1F) 1232} 1233u8 noiselvl5gla1 { 1234 srom 8-10 u16 0x1AC (&0x3E0, >>5) 1235} 1236u8 noiselvl5gla2 { 1237 srom 8-10 0x1AC (&0x7C, >>2) 1238} 1239u8 noiselvl5gma0 { 1240 srom 8-10 0x1AF (&0x1F) 1241} 1242u8 noiselvl5gma1 { 1243 srom 8-10 u16 0x1AE (&0x3E0, >>5) 1244} 1245u8 noiselvl5gma2 { 1246 srom 8-10 0x1AE (&0x7C, >>2) 1247} 1248u8 noiselvl5gua0 { 1249 srom 8-10 0x1B3 (&0x1F) 1250} 1251u8 noiselvl5gua1 { 1252 srom 8-10 u16 0x1B2 (&0x3E0, >>5) 1253} 1254u8 noiselvl5gua2 { 1255 srom 8-10 0x1B2 (&0x7C, >>2) 1256} 1257 1258u8 pcieingress_war { 1259 srom 8-10 0x1A7 (&0xF) 1260} 1261 1262u8 pdoffsetcckma0 { 1263 srom >= 11 0x18F (&0xF) 1264} 1265u8 pdoffsetcckma1 { 1266 srom >= 11 0x18F (&0xF0, >>4) 1267} 1268u8 pdoffsetcckma2 { 1269 srom >= 11 0x18E (&0xF) 1270} 1271 1272u8 sar2g { 1273 srom 9-10 0x1A9 1274 srom >= 11 0x1BB 1275} 1276u8 sar5g { 1277 srom 9-10 0x1A8 1278 srom >= 11 0x1BA 1279} 1280 1281u32[5] swctrlmap_2g { 1282 srom 10 u32[4] 0x1B8, u16 0x1C8 1283} 1284 1285u16 tssifloor2g { 1286 srom >= 11 0xBE (&0x3FF) 1287} 1288u16[4] tssifloor5g { 1289 srom >= 11 0xC0 (&0x3FF) 1290} 1291 1292u8 txidxcap2g { 1293 srom >= 11 u16 0x1A8 (&0xFF0, >>4) 1294} 1295u8 txidxcap5g { 1296 srom >= 11 u16 0x1AC (&0xFF0, >>4) 1297} 1298 1299# 1300# Any variables defined within a `struct` block will be interpreted relative to 1301# the provided array of SPROM base addresses; this is used to define 1302# a common layout defined at the given base addresses. 1303# 1304# To produce SPROM variable names matching those used in the Broadcom HND 1305# ASCII 'key=value\0' NVRAM, the index number of the variable's 1306# struct instance will be appended (e.g., given a variable of noiselvl5ga, the 1307# generated variable instances will be named noiselvl5ga0, noiselvl5ga1, 1308# noiselvl5ga2, noiselvl5ga3 ...) 1309# 1310 1311# PHY chain[0-4] parameters 1312struct phy_chains[] { 1313 srom 4-7 [0x080, 0x0AE, 0x0DC, 0x10A] 1314 srom 8-10 [0x0C0, 0x0E0, 0x100, 0x120] 1315 srom >= 11 [0x0D8, 0x100, 0x128] 1316 1317 # AC-PHY PA parameters 1318 u8[4] maxp5ga { 1319 srom 4-7 u8 0xB 1320 srom 8-10 u8 0x9 1321 srom >= 11 u8 0xD, u8 0xC, u8 0xF, u8 0xE 1322 } 1323 u16[3] pa2ga { 1324 srom >= 11 0x2 1325 } 1326 u8 maxp2ga { 1327 srom 4-7 0x1 1328 srom 8-10 0x1 1329 srom >= 11 0x1 1330 } 1331 u16[12] pa5ga { 1332 srom >= 11 0x10 1333 } 1334 1335 # AC-PHY rxgains 1336 u8 rxgains5ghtrelnabypa { 1337 srom >= 11 0x8 (&0x80, >>7) 1338 } 1339 u8 rxgains5ghelnagaina { 1340 srom >= 11 0x8 (&0x7) 1341 } 1342 u8 rxgains5gelnagaina { 1343 srom >= 11 0xA (&0x7) 1344 } 1345 u8 rxgains5gmtrelnabypa { 1346 srom >= 11 0x9 (&0x80, >>7) 1347 } 1348 u8 rxgains2gtrelnabypa { 1349 srom >= 11 0xB (&0x80, >>7) 1350 } 1351 u8 rxgains5gmtrisoa { 1352 srom >= 11 0x9 (&0x78, >>3) 1353 } 1354 u8 rxgains5gmelnagaina { 1355 srom >= 11 0x9 (&0x7) 1356 } 1357 u8 rxgains2gelnagaina { 1358 srom >= 11 0xB (&0x7) 1359 } 1360 u8 rxgains5gtrisoa { 1361 srom >= 11 0xA (&0x78, >>3) 1362 } 1363 u8 rxgains5gtrelnabypa { 1364 srom >= 11 0xA (&0x80, >>7) 1365 } 1366 u8 rxgains2gtrisoa { 1367 srom >= 11 0xB (&0x78, >>3) 1368 } 1369 u8 rxgains5ghtrisoa { 1370 srom >= 11 0x8 (&0x78, >>3) 1371 } 1372 1373 # 11n PA parameters 1374 u16 pa5gw2a { 1375 srom 4-7 0x12 1376 srom 8-10 0x10 1377 } 1378 u16 pa5ghw1a { 1379 srom 4-7 0x20 1380 srom 8-10 0x1A 1381 } 1382 u16 pa5glw3a { 1383 srom 4-7 0x1C 1384 } 1385 u16 pa5glw1a { 1386 srom 4-7 0x18 1387 srom 8-10 0x14 1388 } 1389 u16 pa5gw1a { 1390 srom 4-7 0x10 1391 srom 8-10 0xE 1392 } 1393 u16 pa5glw0a { 1394 srom 4-7 0x16 1395 srom 8-10 0x12 1396 } 1397 u16 pa5gw3a { 1398 srom 4-7 0x14 1399 } 1400 u16 pa5glw2a { 1401 srom 4-7 0x1A 1402 srom 8-10 0x16 1403 } 1404 u16 pa5ghw3a { 1405 srom 4-7 0x24 1406 } 1407 u16 pa5gw0a { 1408 srom 4-7 0xE 1409 srom 8-10 0xC 1410 } 1411 u8 maxp5gha { 1412 srom 4-7 0xD 1413 srom 8-10 0xB 1414 } 1415 u16 pa5ghw2a { 1416 srom 4-7 0x22 1417 srom 8-10 0x1C 1418 } 1419 u16 pa5ghw0a { 1420 srom 4-7 0x1E 1421 srom 8-10 0x18 1422 } 1423 u16 pa2gw3a { 1424 srom 4-7 0x8 1425 } 1426 u16 pa2gw2a { 1427 srom 4-7 0x6 1428 srom 8-10 0x6 1429 } 1430 u16 pa2gw1a { 1431 srom 4-7 0x4 1432 srom 8-10 0x4 1433 } 1434 u16 pa2gw0a { 1435 srom 4-7 0x2 1436 srom 8-10 0x2 1437 } 1438 u8 maxp5gla { 1439 srom 4-7 0xC 1440 srom 8-10 0xA 1441 } 1442 u8 itt5ga { 1443 srom 4-7 0xA 1444 srom 8-10 0x8 1445 } 1446 u8 itt2ga { 1447 srom 4-7 0x0 1448 srom 8-10 0x0 1449 } 1450} 1451