phyreg_n.h 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. /*
  2. * Copyright (c) 2010 Broadcom Corporation
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for any
  5. * purpose with or without fee is hereby granted, provided that the above
  6. * copyright notice and this permission notice appear in all copies.
  7. *
  8. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
  9. * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
  10. * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
  11. * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
  12. * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
  13. * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
  14. * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  15. */
  16. #define NPHY_TBL_ID_GAIN1 0
  17. #define NPHY_TBL_ID_GAIN2 1
  18. #define NPHY_TBL_ID_GAINBITS1 2
  19. #define NPHY_TBL_ID_GAINBITS2 3
  20. #define NPHY_TBL_ID_GAINLIMIT 4
  21. #define NPHY_TBL_ID_WRSSIGainLimit 5
  22. #define NPHY_TBL_ID_RFSEQ 7
  23. #define NPHY_TBL_ID_AFECTRL 8
  24. #define NPHY_TBL_ID_ANTSWCTRLLUT 9
  25. #define NPHY_TBL_ID_IQLOCAL 15
  26. #define NPHY_TBL_ID_NOISEVAR 16
  27. #define NPHY_TBL_ID_SAMPLEPLAY 17
  28. #define NPHY_TBL_ID_CORE1TXPWRCTL 26
  29. #define NPHY_TBL_ID_CORE2TXPWRCTL 27
  30. #define NPHY_TBL_ID_CMPMETRICDATAWEIGHTTBL 30
  31. #define NPHY_TBL_ID_EPSILONTBL0 31
  32. #define NPHY_TBL_ID_SCALARTBL0 32
  33. #define NPHY_TBL_ID_EPSILONTBL1 33
  34. #define NPHY_TBL_ID_SCALARTBL1 34
  35. #define NPHY_TO_BPHY_OFF 0xc00
  36. #define NPHY_BandControl_currentBand 0x0001
  37. #define RFCC_CHIP0_PU 0x0400
  38. #define RFCC_POR_FORCE 0x0040
  39. #define RFCC_OE_POR_FORCE 0x0080
  40. #define NPHY_RfctrlIntc_override_OFF 0
  41. #define NPHY_RfctrlIntc_override_TRSW 1
  42. #define NPHY_RfctrlIntc_override_PA 2
  43. #define NPHY_RfctrlIntc_override_EXT_LNA_PU 3
  44. #define NPHY_RfctrlIntc_override_EXT_LNA_GAIN 4
  45. #define RIFS_ENABLE 0x80
  46. #define BPHY_BAND_SEL_UP20 0x10
  47. #define NPHY_MLenable 0x02
  48. #define NPHY_RfseqMode_CoreActv_override 0x0001
  49. #define NPHY_RfseqMode_Trigger_override 0x0002
  50. #define NPHY_RfseqCoreActv_TxRxChain0 (0x11)
  51. #define NPHY_RfseqCoreActv_TxRxChain1 (0x22)
  52. #define NPHY_RfseqTrigger_rx2tx 0x0001
  53. #define NPHY_RfseqTrigger_tx2rx 0x0002
  54. #define NPHY_RfseqTrigger_updategainh 0x0004
  55. #define NPHY_RfseqTrigger_updategainl 0x0008
  56. #define NPHY_RfseqTrigger_updategainu 0x0010
  57. #define NPHY_RfseqTrigger_reset2rx 0x0020
  58. #define NPHY_RfseqStatus_rx2tx 0x0001
  59. #define NPHY_RfseqStatus_tx2rx 0x0002
  60. #define NPHY_RfseqStatus_updategainh 0x0004
  61. #define NPHY_RfseqStatus_updategainl 0x0008
  62. #define NPHY_RfseqStatus_updategainu 0x0010
  63. #define NPHY_RfseqStatus_reset2rx 0x0020
  64. #define NPHY_ClassifierCtrl_cck_en 0x1
  65. #define NPHY_ClassifierCtrl_ofdm_en 0x2
  66. #define NPHY_ClassifierCtrl_waited_en 0x4
  67. #define NPHY_IQFlip_ADC1 0x0001
  68. #define NPHY_IQFlip_ADC2 0x0010
  69. #define NPHY_sampleCmd_STOP 0x0002
  70. #define RX_GF_OR_MM 0x0004
  71. #define RX_GF_MM_AUTO 0x0100
  72. #define NPHY_iqloCalCmdGctl_IQLO_CAL_EN 0x8000
  73. #define NPHY_IqestCmd_iqstart 0x1
  74. #define NPHY_IqestCmd_iqMode 0x2
  75. #define NPHY_TxPwrCtrlCmd_pwrIndex_init 0x40
  76. #define NPHY_TxPwrCtrlCmd_pwrIndex_init_rev7 0x19
  77. #define PRIM_SEL_UP20 0x8000
  78. #define NPHY_RFSEQ_RX2TX 0x0
  79. #define NPHY_RFSEQ_TX2RX 0x1
  80. #define NPHY_RFSEQ_RESET2RX 0x2
  81. #define NPHY_RFSEQ_UPDATEGAINH 0x3
  82. #define NPHY_RFSEQ_UPDATEGAINL 0x4
  83. #define NPHY_RFSEQ_UPDATEGAINU 0x5
  84. #define NPHY_RFSEQ_CMD_NOP 0x0
  85. #define NPHY_RFSEQ_CMD_RXG_FBW 0x1
  86. #define NPHY_RFSEQ_CMD_TR_SWITCH 0x2
  87. #define NPHY_RFSEQ_CMD_EXT_PA 0x3
  88. #define NPHY_RFSEQ_CMD_RXPD_TXPD 0x4
  89. #define NPHY_RFSEQ_CMD_TX_GAIN 0x5
  90. #define NPHY_RFSEQ_CMD_RX_GAIN 0x6
  91. #define NPHY_RFSEQ_CMD_SET_HPF_BW 0x7
  92. #define NPHY_RFSEQ_CMD_CLR_HIQ_DIS 0x8
  93. #define NPHY_RFSEQ_CMD_END 0xf
  94. #define NPHY_REV3_RFSEQ_CMD_NOP 0x0
  95. #define NPHY_REV3_RFSEQ_CMD_RXG_FBW 0x1
  96. #define NPHY_REV3_RFSEQ_CMD_TR_SWITCH 0x2
  97. #define NPHY_REV3_RFSEQ_CMD_INT_PA_PU 0x3
  98. #define NPHY_REV3_RFSEQ_CMD_EXT_PA 0x4
  99. #define NPHY_REV3_RFSEQ_CMD_RXPD_TXPD 0x5
  100. #define NPHY_REV3_RFSEQ_CMD_TX_GAIN 0x6
  101. #define NPHY_REV3_RFSEQ_CMD_RX_GAIN 0x7
  102. #define NPHY_REV3_RFSEQ_CMD_CLR_HIQ_DIS 0x8
  103. #define NPHY_REV3_RFSEQ_CMD_SET_HPF_H_HPC 0x9
  104. #define NPHY_REV3_RFSEQ_CMD_SET_LPF_H_HPC 0xa
  105. #define NPHY_REV3_RFSEQ_CMD_SET_HPF_M_HPC 0xb
  106. #define NPHY_REV3_RFSEQ_CMD_SET_LPF_M_HPC 0xc
  107. #define NPHY_REV3_RFSEQ_CMD_SET_HPF_L_HPC 0xd
  108. #define NPHY_REV3_RFSEQ_CMD_SET_LPF_L_HPC 0xe
  109. #define NPHY_REV3_RFSEQ_CMD_CLR_RXRX_BIAS 0xf
  110. #define NPHY_REV3_RFSEQ_CMD_END 0x1f
  111. #define NPHY_RSSI_SEL_W1 0x0
  112. #define NPHY_RSSI_SEL_W2 0x1
  113. #define NPHY_RSSI_SEL_NB 0x2
  114. #define NPHY_RSSI_SEL_IQ 0x3
  115. #define NPHY_RSSI_SEL_TSSI_2G 0x4
  116. #define NPHY_RSSI_SEL_TSSI_5G 0x5
  117. #define NPHY_RSSI_SEL_TBD 0x6
  118. #define NPHY_RAIL_I 0x0
  119. #define NPHY_RAIL_Q 0x1
  120. #define NPHY_FORCESIG_DECODEGATEDCLKS 0x8
  121. #define NPHY_REV7_RfctrlOverride_cmd_rxrf_pu 0x0
  122. #define NPHY_REV7_RfctrlOverride_cmd_rx_pu 0x1
  123. #define NPHY_REV7_RfctrlOverride_cmd_tx_pu 0x2
  124. #define NPHY_REV7_RfctrlOverride_cmd_rxgain 0x3
  125. #define NPHY_REV7_RfctrlOverride_cmd_txgain 0x4
  126. #define NPHY_REV7_RXGAINCODE_RFMXGAIN_MASK 0x000ff
  127. #define NPHY_REV7_RXGAINCODE_LPFGAIN_MASK 0x0ff00
  128. #define NPHY_REV7_RXGAINCODE_DVGAGAIN_MASK 0xf0000
  129. #define NPHY_REV7_TXGAINCODE_TGAIN_MASK 0x7fff
  130. #define NPHY_REV7_TXGAINCODE_LPFGAIN_MASK 0x8000
  131. #define NPHY_REV7_TXGAINCODE_BIQ0GAIN_SHIFT 14
  132. #define NPHY_REV7_RFCTRLOVERRIDE_ID0 0x0
  133. #define NPHY_REV7_RFCTRLOVERRIDE_ID1 0x1
  134. #define NPHY_REV7_RFCTRLOVERRIDE_ID2 0x2
  135. #define NPHY_IqestIqAccLo(core) ((core == 0) ? 0x12c : 0x134)
  136. #define NPHY_IqestIqAccHi(core) ((core == 0) ? 0x12d : 0x135)
  137. #define NPHY_IqestipwrAccLo(core) ((core == 0) ? 0x12e : 0x136)
  138. #define NPHY_IqestipwrAccHi(core) ((core == 0) ? 0x12f : 0x137)
  139. #define NPHY_IqestqpwrAccLo(core) ((core == 0) ? 0x130 : 0x138)
  140. #define NPHY_IqestqpwrAccHi(core) ((core == 0) ? 0x131 : 0x139)