mxl5xx_regs.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Copyright (c) 2011-2013 MaxLinear, Inc. All rights reserved
  4. *
  5. * License type: GPLv2
  6. *
  7. * This program is free software; you can redistribute it and/or modify it under
  8. * the terms of the GNU General Public License as published by the Free Software
  9. * Foundation.
  10. *
  11. * This program is distributed in the hope that it will be useful, but WITHOUT
  12. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  13. * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  14. *
  15. * This program may alternatively be licensed under a proprietary license from
  16. * MaxLinear, Inc.
  17. *
  18. */
  19. #ifndef __MXL58X_REGISTERS_H__
  20. #define __MXL58X_REGISTERS_H__
  21. #define HYDRA_INTR_STATUS_REG 0x80030008
  22. #define HYDRA_INTR_MASK_REG 0x8003000C
  23. #define HYDRA_CRYSTAL_SETTING 0x3FFFC5F0 /* 0 - 24 MHz & 1 - 27 MHz */
  24. #define HYDRA_CRYSTAL_CAP 0x3FFFEDA4 /* 0 - 24 MHz & 1 - 27 MHz */
  25. #define HYDRA_CPU_RESET_REG 0x8003003C
  26. #define HYDRA_CPU_RESET_DATA 0x00000400
  27. #define HYDRA_RESET_TRANSPORT_FIFO_REG 0x80030028
  28. #define HYDRA_RESET_TRANSPORT_FIFO_DATA 0x00000000
  29. #define HYDRA_RESET_BBAND_REG 0x80030024
  30. #define HYDRA_RESET_BBAND_DATA 0x00000000
  31. #define HYDRA_RESET_XBAR_REG 0x80030020
  32. #define HYDRA_RESET_XBAR_DATA 0x00000000
  33. #define HYDRA_MODULES_CLK_1_REG 0x80030014
  34. #define HYDRA_DISABLE_CLK_1 0x00000000
  35. #define HYDRA_MODULES_CLK_2_REG 0x8003001C
  36. #define HYDRA_DISABLE_CLK_2 0x0000000B
  37. #define HYDRA_PRCM_ROOT_CLK_REG 0x80030018
  38. #define HYDRA_PRCM_ROOT_CLK_DISABLE 0x00000000
  39. #define HYDRA_CPU_RESET_CHECK_REG 0x80030008
  40. #define HYDRA_CPU_RESET_CHECK_OFFSET 0x40000000 /* <bit 30> */
  41. #define HYDRA_SKU_ID_REG 0x90000190
  42. #define FW_DL_SIGN_ADDR 0x3FFFEAE0
  43. /* Register to check if FW is running or not */
  44. #define HYDRA_HEAR_BEAT 0x3FFFEDDC
  45. /* Firmware version */
  46. #define HYDRA_FIRMWARE_VERSION 0x3FFFEDB8
  47. #define HYDRA_FW_RC_VERSION 0x3FFFCFAC
  48. /* Firmware patch version */
  49. #define HYDRA_FIRMWARE_PATCH_VERSION 0x3FFFEDC2
  50. /* SOC operating temperature in C */
  51. #define HYDRA_TEMPARATURE 0x3FFFEDB4
  52. /* Demod & Tuner status registers */
  53. /* Demod 0 status base address */
  54. #define HYDRA_DEMOD_0_BASE_ADDR 0x3FFFC64C
  55. /* Tuner 0 status base address */
  56. #define HYDRA_TUNER_0_BASE_ADDR 0x3FFFCE4C
  57. #define POWER_FROM_ADCRSSI_READBACK 0x3FFFEB6C
  58. /* Macros to determine base address of respective demod or tuner */
  59. #define HYDRA_DMD_STATUS_OFFSET(demodID) ((demodID) * 0x100)
  60. #define HYDRA_TUNER_STATUS_OFFSET(tunerID) ((tunerID) * 0x40)
  61. /* Demod status address offset from respective demod's base address */
  62. #define HYDRA_DMD_AGC_DIG_LEVEL_ADDR_OFFSET 0x3FFFC64C
  63. #define HYDRA_DMD_LOCK_STATUS_ADDR_OFFSET 0x3FFFC650
  64. #define HYDRA_DMD_ACQ_STATUS_ADDR_OFFSET 0x3FFFC654
  65. #define HYDRA_DMD_STANDARD_ADDR_OFFSET 0x3FFFC658
  66. #define HYDRA_DMD_SPECTRUM_INVERSION_ADDR_OFFSET 0x3FFFC65C
  67. #define HYDRA_DMD_SPECTRUM_ROLL_OFF_ADDR_OFFSET 0x3FFFC660
  68. #define HYDRA_DMD_SYMBOL_RATE_ADDR_OFFSET 0x3FFFC664
  69. #define HYDRA_DMD_MODULATION_SCHEME_ADDR_OFFSET 0x3FFFC668
  70. #define HYDRA_DMD_FEC_CODE_RATE_ADDR_OFFSET 0x3FFFC66C
  71. #define HYDRA_DMD_SNR_ADDR_OFFSET 0x3FFFC670
  72. #define HYDRA_DMD_FREQ_OFFSET_ADDR_OFFSET 0x3FFFC674
  73. #define HYDRA_DMD_CTL_FREQ_OFFSET_ADDR_OFFSET 0x3FFFC678
  74. #define HYDRA_DMD_STR_FREQ_OFFSET_ADDR_OFFSET 0x3FFFC67C
  75. #define HYDRA_DMD_FTL_FREQ_OFFSET_ADDR_OFFSET 0x3FFFC680
  76. #define HYDRA_DMD_STR_NBC_SYNC_LOCK_ADDR_OFFSET 0x3FFFC684
  77. #define HYDRA_DMD_CYCLE_SLIP_COUNT_ADDR_OFFSET 0x3FFFC688
  78. #define HYDRA_DMD_DISPLAY_I_ADDR_OFFSET 0x3FFFC68C
  79. #define HYDRA_DMD_DISPLAY_Q_ADDR_OFFSET 0x3FFFC68E
  80. #define HYDRA_DMD_DVBS2_CRC_ERRORS_ADDR_OFFSET 0x3FFFC690
  81. #define HYDRA_DMD_DVBS2_PER_COUNT_ADDR_OFFSET 0x3FFFC694
  82. #define HYDRA_DMD_DVBS2_PER_WINDOW_ADDR_OFFSET 0x3FFFC698
  83. #define HYDRA_DMD_DVBS_CORR_RS_ERRORS_ADDR_OFFSET 0x3FFFC69C
  84. #define HYDRA_DMD_DVBS_UNCORR_RS_ERRORS_ADDR_OFFSET 0x3FFFC6A0
  85. #define HYDRA_DMD_DVBS_BER_COUNT_ADDR_OFFSET 0x3FFFC6A4
  86. #define HYDRA_DMD_DVBS_BER_WINDOW_ADDR_OFFSET 0x3FFFC6A8
  87. /* Debug-purpose DVB-S DMD 0 */
  88. #define HYDRA_DMD_DVBS_1ST_CORR_RS_ERRORS_ADDR_OFFSET 0x3FFFC6C8 /* corrected RS Errors: 1st iteration */
  89. #define HYDRA_DMD_DVBS_1ST_UNCORR_RS_ERRORS_ADDR_OFFSET 0x3FFFC6CC /* uncorrected RS Errors: 1st iteration */
  90. #define HYDRA_DMD_DVBS_BER_COUNT_1ST_ADDR_OFFSET 0x3FFFC6D0
  91. #define HYDRA_DMD_DVBS_BER_WINDOW_1ST_ADDR_OFFSET 0x3FFFC6D4
  92. #define HYDRA_DMD_TUNER_ID_ADDR_OFFSET 0x3FFFC6AC
  93. #define HYDRA_DMD_DVBS2_PILOT_ON_OFF_ADDR_OFFSET 0x3FFFC6B0
  94. #define HYDRA_DMD_FREQ_SEARCH_RANGE_KHZ_ADDR_OFFSET 0x3FFFC6B4
  95. #define HYDRA_DMD_STATUS_LOCK_ADDR_OFFSET 0x3FFFC6B8
  96. #define HYDRA_DMD_STATUS_CENTER_FREQ_IN_KHZ_ADDR 0x3FFFC704
  97. #define HYDRA_DMD_STATUS_INPUT_POWER_ADDR 0x3FFFC708
  98. /* DVB-S new scaled_BER_count for a new BER API, see HYDRA-1343 "DVB-S post viterbi information" */
  99. #define DMD0_STATUS_DVBS_1ST_SCALED_BER_COUNT_ADDR 0x3FFFC710 /* DMD 0: 1st iteration BER count scaled by HYDRA_BER_COUNT_SCALING_FACTOR */
  100. #define DMD0_STATUS_DVBS_SCALED_BER_COUNT_ADDR 0x3FFFC714 /* DMD 0: 2nd iteration BER count scaled by HYDRA_BER_COUNT_SCALING_FACTOR */
  101. #define DMD0_SPECTRUM_MIN_GAIN_STATUS 0x3FFFC73C
  102. #define DMD0_SPECTRUM_MIN_GAIN_WB_SAGC_VALUE 0x3FFFC740
  103. #define DMD0_SPECTRUM_MIN_GAIN_NB_SAGC_VALUE 0x3FFFC744
  104. #define HYDRA_DMD_STATUS_END_ADDR_OFFSET 0x3FFFC748
  105. /* Tuner status address offset from respective tuners's base address */
  106. #define HYDRA_TUNER_DEMOD_ID_ADDR_OFFSET 0x3FFFCE4C
  107. #define HYDRA_TUNER_AGC_LOCK_OFFSET 0x3FFFCE50
  108. #define HYDRA_TUNER_SPECTRUM_STATUS_OFFSET 0x3FFFCE54
  109. #define HYDRA_TUNER_SPECTRUM_BIN_SIZE_OFFSET 0x3FFFCE58
  110. #define HYDRA_TUNER_SPECTRUM_ADDRESS_OFFSET 0x3FFFCE5C
  111. #define HYDRA_TUNER_ENABLE_COMPLETE 0x3FFFEB78
  112. #define HYDRA_DEMOD_STATUS_LOCK(devId, demodId) write_register(devId, (HYDRA_DMD_STATUS_LOCK_ADDR_OFFSET + HYDRA_DMD_STATUS_OFFSET(demodId)), MXL_YES)
  113. #define HYDRA_DEMOD_STATUS_UNLOCK(devId, demodId) write_register(devId, (HYDRA_DMD_STATUS_LOCK_ADDR_OFFSET + HYDRA_DMD_STATUS_OFFSET(demodId)), MXL_NO)
  114. #define HYDRA_VERSION 0x3FFFEDB8
  115. #define HYDRA_DEMOD0_VERSION 0x3FFFEDBC
  116. #define HYDRA_DEMOD1_VERSION 0x3FFFEDC0
  117. #define HYDRA_DEMOD2_VERSION 0x3FFFEDC4
  118. #define HYDRA_DEMOD3_VERSION 0x3FFFEDC8
  119. #define HYDRA_DEMOD4_VERSION 0x3FFFEDCC
  120. #define HYDRA_DEMOD5_VERSION 0x3FFFEDD0
  121. #define HYDRA_DEMOD6_VERSION 0x3FFFEDD4
  122. #define HYDRA_DEMOD7_VERSION 0x3FFFEDD8
  123. #define HYDRA_HEAR_BEAT 0x3FFFEDDC
  124. #define HYDRA_SKU_MGMT 0x3FFFEBC0
  125. #define MXL_HYDRA_FPGA_A_ADDRESS 0x91C00000
  126. #define MXL_HYDRA_FPGA_B_ADDRESS 0x91D00000
  127. /* TS control base address */
  128. #define HYDRA_TS_CTRL_BASE_ADDR 0x90700000
  129. #define MPEG_MUX_MODE_SLICE0_REG (HYDRA_TS_CTRL_BASE_ADDR + 0x08)
  130. #define MPEG_MUX_MODE_SLICE1_REG (HYDRA_TS_CTRL_BASE_ADDR + 0x08)
  131. #define PID_BANK_SEL_SLICE0_REG (HYDRA_TS_CTRL_BASE_ADDR + 0x190)
  132. #define PID_BANK_SEL_SLICE1_REG (HYDRA_TS_CTRL_BASE_ADDR + 0x1B0)
  133. #define MPEG_CLK_GATED_REG (HYDRA_TS_CTRL_BASE_ADDR + 0x20)
  134. #define MPEG_CLK_ALWAYS_ON_REG (HYDRA_TS_CTRL_BASE_ADDR + 0x1D4)
  135. #define HYDRA_REGULAR_PID_BANK_A_REG (HYDRA_TS_CTRL_BASE_ADDR + 0x190)
  136. #define HYDRA_FIXED_PID_BANK_A_REG (HYDRA_TS_CTRL_BASE_ADDR + 0x190)
  137. #define HYDRA_REGULAR_PID_BANK_B_REG (HYDRA_TS_CTRL_BASE_ADDR + 0x1B0)
  138. #define HYDRA_FIXED_PID_BANK_B_REG (HYDRA_TS_CTRL_BASE_ADDR + 0x1B0)
  139. #define FIXED_PID_TBL_REG_ADDRESS_0 (HYDRA_TS_CTRL_BASE_ADDR + 0x9000)
  140. #define FIXED_PID_TBL_REG_ADDRESS_1 (HYDRA_TS_CTRL_BASE_ADDR + 0x9100)
  141. #define FIXED_PID_TBL_REG_ADDRESS_2 (HYDRA_TS_CTRL_BASE_ADDR + 0x9200)
  142. #define FIXED_PID_TBL_REG_ADDRESS_3 (HYDRA_TS_CTRL_BASE_ADDR + 0x9300)
  143. #define FIXED_PID_TBL_REG_ADDRESS_4 (HYDRA_TS_CTRL_BASE_ADDR + 0xB000)
  144. #define FIXED_PID_TBL_REG_ADDRESS_5 (HYDRA_TS_CTRL_BASE_ADDR + 0xB100)
  145. #define FIXED_PID_TBL_REG_ADDRESS_6 (HYDRA_TS_CTRL_BASE_ADDR + 0xB200)
  146. #define FIXED_PID_TBL_REG_ADDRESS_7 (HYDRA_TS_CTRL_BASE_ADDR + 0xB300)
  147. #define REGULAR_PID_TBL_REG_ADDRESS_0 (HYDRA_TS_CTRL_BASE_ADDR + 0x8000)
  148. #define REGULAR_PID_TBL_REG_ADDRESS_1 (HYDRA_TS_CTRL_BASE_ADDR + 0x8200)
  149. #define REGULAR_PID_TBL_REG_ADDRESS_2 (HYDRA_TS_CTRL_BASE_ADDR + 0x8400)
  150. #define REGULAR_PID_TBL_REG_ADDRESS_3 (HYDRA_TS_CTRL_BASE_ADDR + 0x8600)
  151. #define REGULAR_PID_TBL_REG_ADDRESS_4 (HYDRA_TS_CTRL_BASE_ADDR + 0xA000)
  152. #define REGULAR_PID_TBL_REG_ADDRESS_5 (HYDRA_TS_CTRL_BASE_ADDR + 0xA200)
  153. #define REGULAR_PID_TBL_REG_ADDRESS_6 (HYDRA_TS_CTRL_BASE_ADDR + 0xA400)
  154. #define REGULAR_PID_TBL_REG_ADDRESS_7 (HYDRA_TS_CTRL_BASE_ADDR + 0xA600)
  155. /***************************************************************************/
  156. #define PAD_MUX_GPIO_00_SYNC_BASEADDR 0x90000188
  157. #define PAD_MUX_UART_RX_C_PINMUX_BASEADDR 0x9000001C
  158. #define XPT_PACKET_GAP_MIN_BASEADDR 0x90700044
  159. #define XPT_NCO_COUNT_BASEADDR 0x90700238
  160. #define XPT_NCO_COUNT_BASEADDR1 0x9070023C
  161. /* V2 DigRF status register */
  162. #define XPT_PID_BASEADDR 0x90708000
  163. #define XPT_PID_REMAP_BASEADDR 0x90708004
  164. #define XPT_KNOWN_PID_BASEADDR 0x90709000
  165. #define XPT_PID_BASEADDR1 0x9070A000
  166. #define XPT_PID_REMAP_BASEADDR1 0x9070A004
  167. #define XPT_KNOWN_PID_BASEADDR1 0x9070B000
  168. #define XPT_BERT_LOCK_BASEADDR 0x907000B8
  169. #define XPT_BERT_BASEADDR 0x907000BC
  170. #define XPT_BERT_INVERT_BASEADDR 0x907000C0
  171. #define XPT_BERT_HEADER_BASEADDR 0x907000C4
  172. #define XPT_BERT_BASEADDR1 0x907000C8
  173. #define XPT_BERT_BIT_COUNT0_BASEADDR 0x907000CC
  174. #define XPT_BERT_BIT_COUNT0_BASEADDR1 0x907000D0
  175. #define XPT_BERT_BIT_COUNT1_BASEADDR 0x907000D4
  176. #define XPT_BERT_BIT_COUNT1_BASEADDR1 0x907000D8
  177. #define XPT_BERT_BIT_COUNT2_BASEADDR 0x907000DC
  178. #define XPT_BERT_BIT_COUNT2_BASEADDR1 0x907000E0
  179. #define XPT_BERT_BIT_COUNT3_BASEADDR 0x907000E4
  180. #define XPT_BERT_BIT_COUNT3_BASEADDR1 0x907000E8
  181. #define XPT_BERT_BIT_COUNT4_BASEADDR 0x907000EC
  182. #define XPT_BERT_BIT_COUNT4_BASEADDR1 0x907000F0
  183. #define XPT_BERT_BIT_COUNT5_BASEADDR 0x907000F4
  184. #define XPT_BERT_BIT_COUNT5_BASEADDR1 0x907000F8
  185. #define XPT_BERT_BIT_COUNT6_BASEADDR 0x907000FC
  186. #define XPT_BERT_BIT_COUNT6_BASEADDR1 0x90700100
  187. #define XPT_BERT_BIT_COUNT7_BASEADDR 0x90700104
  188. #define XPT_BERT_BIT_COUNT7_BASEADDR1 0x90700108
  189. #define XPT_BERT_ERR_COUNT0_BASEADDR 0x9070010C
  190. #define XPT_BERT_ERR_COUNT0_BASEADDR1 0x90700110
  191. #define XPT_BERT_ERR_COUNT1_BASEADDR 0x90700114
  192. #define XPT_BERT_ERR_COUNT1_BASEADDR1 0x90700118
  193. #define XPT_BERT_ERR_COUNT2_BASEADDR 0x9070011C
  194. #define XPT_BERT_ERR_COUNT2_BASEADDR1 0x90700120
  195. #define XPT_BERT_ERR_COUNT3_BASEADDR 0x90700124
  196. #define XPT_BERT_ERR_COUNT3_BASEADDR1 0x90700128
  197. #define XPT_BERT_ERR_COUNT4_BASEADDR 0x9070012C
  198. #define XPT_BERT_ERR_COUNT4_BASEADDR1 0x90700130
  199. #define XPT_BERT_ERR_COUNT5_BASEADDR 0x90700134
  200. #define XPT_BERT_ERR_COUNT5_BASEADDR1 0x90700138
  201. #define XPT_BERT_ERR_COUNT6_BASEADDR 0x9070013C
  202. #define XPT_BERT_ERR_COUNT6_BASEADDR1 0x90700140
  203. #define XPT_BERT_ERR_COUNT7_BASEADDR 0x90700144
  204. #define XPT_BERT_ERR_COUNT7_BASEADDR1 0x90700148
  205. #define XPT_BERT_ERROR_BASEADDR 0x9070014C
  206. #define XPT_BERT_ANALYZER_BASEADDR 0x90700150
  207. #define XPT_BERT_ANALYZER_BASEADDR1 0x90700154
  208. #define XPT_BERT_ANALYZER_BASEADDR2 0x90700158
  209. #define XPT_BERT_ANALYZER_BASEADDR3 0x9070015C
  210. #define XPT_BERT_ANALYZER_BASEADDR4 0x90700160
  211. #define XPT_BERT_ANALYZER_BASEADDR5 0x90700164
  212. #define XPT_BERT_ANALYZER_BASEADDR6 0x90700168
  213. #define XPT_BERT_ANALYZER_BASEADDR7 0x9070016C
  214. #define XPT_BERT_ANALYZER_BASEADDR8 0x90700170
  215. #define XPT_BERT_ANALYZER_BASEADDR9 0x90700174
  216. #define XPT_DMD0_BASEADDR 0x9070024C
  217. /* V2 AGC Gain Freeze & step */
  218. #define DBG_ENABLE_DISABLE_AGC (0x3FFFCF60) /* 1: DISABLE, 0:ENABLE */
  219. #define WB_DFE0_DFE_FB_RF1_BASEADDR 0x903004A4
  220. #define WB_DFE1_DFE_FB_RF1_BASEADDR 0x904004A4
  221. #define WB_DFE2_DFE_FB_RF1_BASEADDR 0x905004A4
  222. #define WB_DFE3_DFE_FB_RF1_BASEADDR 0x906004A4
  223. #define AFE_REG_D2A_TA_RFFE_LNA_BO_1P8_BASEADDR 0x90200104
  224. #define AFE_REG_AFE_REG_SPARE_BASEADDR 0x902000A0
  225. #define AFE_REG_AFE_REG_SPARE_BASEADDR1 0x902000B4
  226. #define AFE_REG_AFE_REG_SPARE_BASEADDR2 0x902000C4
  227. #define AFE_REG_AFE_REG_SPARE_BASEADDR3 0x902000D4
  228. #define WB_DFE0_DFE_FB_AGC_BASEADDR 0x90300498
  229. #define WB_DFE1_DFE_FB_AGC_BASEADDR 0x90400498
  230. #define WB_DFE2_DFE_FB_AGC_BASEADDR 0x90500498
  231. #define WB_DFE3_DFE_FB_AGC_BASEADDR 0x90600498
  232. #define WDT_WD_INT_BASEADDR 0x8002000C
  233. #define FSK_TX_FTM_BASEADDR 0x80090000
  234. #define FSK_TX_FTM_TX_CNT_BASEADDR 0x80090018
  235. #define AFE_REG_D2A_FSK_BIAS_BASEADDR 0x90200040
  236. #define DMD_TEI_BASEADDR 0x3FFFEBE0
  237. #endif /* __MXL58X_REGISTERS_H__ */