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