fc8080_regs.h 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. /*****************************************************************************
  2. Copyright(c) 2013 FCI Inc. All Rights Reserved
  3. File name : fc8080_regs.h
  4. Description : register map header file
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 2 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program; if not, write to the Free Software
  15. Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  16. History :
  17. ----------------------------------------------------------------------
  18. *******************************************************************************/
  19. #ifndef __FC8080_REGS_H__
  20. #define __FC8080_REGS_H__
  21. #ifdef __cplusplus
  22. extern "C" {
  23. #endif
  24. /* INTERFACE */
  25. #if defined(CONFIG_TDMB_SPI)
  26. #define FC8080_SPI
  27. #elif defined(CONFIG_TDMB_TSIF_SLSI) || defined(CONFIG_TDMB_TSIF_QC)
  28. #define FC8080_I2C
  29. #elif defined(CONFIG_TDMB_EBI)
  30. #define FC8080_PPI
  31. #endif
  32. #ifdef FC8080_I2C
  33. /* #define FIC_USE_I2C */
  34. #endif
  35. /* X-TAL Frequency Configuration */
  36. /*#define FC8080_FREQ_XTAL 16000*/
  37. /*#define FC8080_FREQ_XTAL 16384*/
  38. /*#define FC8080_FREQ_XTAL 19200*/
  39. /*#define FC8080_FREQ_XTAL 24000*/
  40. #define FC8080_FREQ_XTAL 24576
  41. /*#define FC8080_FREQ_XTAL 26000*/
  42. /*#define FC8080_FREQ_XTAL 27000*/
  43. /*#define FC8080_FREQ_XTAL 27120*/
  44. /*#define FC8080_FREQ_XTAL 32000*/
  45. /*#define FC8080_FREQ_XTAL 38400*/
  46. /* INTERRUPT SOURCE */
  47. #define BBM_MF_INT 0x0001
  48. #define BBM_WAGC_INT 0x0002
  49. #define BBM_RECFG_INT 0x0004
  50. #define BBM_TII_INT 0x0008
  51. #define BBM_SYNC_INT 0x0010
  52. #define BBM_I2C_INT 0x0020
  53. /* COMMON */
  54. #define BBM_AP2APB_LT 0x0000
  55. #define BBM_MD_RESET 0x0001
  56. #define BBM_MD_INT_CLR 0x0002
  57. #define BBM_MD_INT_EN 0x0003
  58. #define BBM_MD_INT_STATUS 0x0004
  59. #define BBM_RD_FIC 0x0007
  60. #define BBM_RD_BUF0 0x0008
  61. #define BBM_RD_BUF1 0x0009
  62. #define BBM_RD_BUF2 0x000a
  63. #define BBM_RD_BUF3 0x000b
  64. #define BBM_TSO_CLKDIV 0x0010
  65. #define BBM_TSO_CTRL 0x0011
  66. #define BBM_TSO_SELREG 0x0012
  67. #define BBM_TSO_PAUSE 0x0013
  68. #define BBM_CHIP_ID 0x0018
  69. #define BBM_RF_BYPASS 0x001f
  70. #define BBM_TSGEN_GAP 0x0020
  71. #define BBM_LDO_VCTRL 0x0031
  72. #define BBM_XTAL_CCTRL 0x0032
  73. #define BBM_RF_XTAL_EN 0x0033
  74. #define BBM_RFRST_HIGH_HOLD 0x0035
  75. #define BBM_ADC_OPMODE 0x0036
  76. #define BBM_DM_CTRL 0x0039
  77. #define BBM_OVERRUN_GAP 0x003c
  78. /* RxFRONT */
  79. #define BBM_SYNC_RST_REQ_EN 0x0100
  80. #define BBM_QDD_COMMAND 0x0104
  81. #define BBM_DCE_CTRL 0x0111
  82. #define BBM_COEF00 0x0120
  83. #define BBM_COEF01 0x0121
  84. #define BBM_COEF02 0x0122
  85. #define BBM_COEF03 0x0123
  86. #define BBM_COEF04 0x0124
  87. #define BBM_COEF05 0x0125
  88. #define BBM_COEF06 0x0126
  89. #define BBM_COEF07 0x0127
  90. #define BBM_COEF08 0x0128
  91. #define BBM_COEF09 0x0129
  92. #define BBM_COEF0A 0x012a
  93. #define BBM_COEF0B 0x012b
  94. #define BBM_COEF0C 0x012c
  95. #define BBM_COEF0D 0x012d
  96. #define BBM_COEF0E 0x012e
  97. #define BBM_COEF0F 0x012f
  98. #define BBM_AGC530_EN 0x0132
  99. #define BBM_BLOCK_AVG_SIZE_LOCK 0x0134
  100. #define BBM_GAIN_CONSTANT 0x0138
  101. #define BBM_DET_CNT_BOUND 0x013c
  102. #define BBM_PGA_GAIN_MAX 0x0144
  103. #define BBM_PGA_GAIN_MIN 0x0145
  104. #define BBM_UNLOCK_DETECT_EN 0x0150
  105. /* SYNC */
  106. #define BBM_OFDM_DET 0x0220
  107. #define BBM_OFDM_DET_MAX_THRESHOLD 0x0222
  108. #define BBM_DETECT_OFDM 0x0228
  109. #define BBM_OFDM_DET_MODE_EN 0x022b
  110. #define BBM_FTOFFSET_RANGE 0x0234
  111. #define BBM_SYNC_MTH 0x0235
  112. #define BBM_SYNC_CNTRL 0x0236
  113. #define BBM_SYNC_STAT 0x0238
  114. #define BBM_NCO_OFFSET 0x0278
  115. #define BBM_NCO_INV 0x027c
  116. #define BBM_EZ_CONST 0x027d
  117. #define BBM_CLK_MODE 0x027e
  118. #define BBM_SFSYNC_ON 0x0280
  119. #define BBM_INV_CARRIER_FREQ 0x0281
  120. #define BBM_RESYNC_EN 0x02a0
  121. #define BBM_RESYNC_AUTO_CONDITION_EN 0x02a1
  122. #define BBM_RESYNC_CONDITION_INFO 0x02a2
  123. /* DIDP */
  124. #define BBM_DIDP_MODE 0x0601
  125. #define BBM_SCH0_SET_IDI 0x0602
  126. #define BBM_SCH1_SET_IDI 0x0603
  127. #define BBM_SCH2_SET_IDI 0x0604
  128. #define BBM_PS0_RF_ENABLE 0x060a
  129. #define BBM_PS0_RF_ADD_SHIFT 0x060b
  130. #define BBM_PS1_ADC_ENABLE 0x060c
  131. #define BBM_PS1_ADC_ADD_SHIFT 0x060d
  132. #define BBM_PS2_BB_ENABLE 0x060e
  133. #define BBM_PS2_BB_ADD_SHIFT 0x060f
  134. /* BUF */
  135. #define BBM_BUF_STATUS 0x0900
  136. #define BBM_BUF_OVERRUN 0x0902
  137. #define BBM_BUF_ENABLE 0x0904
  138. #define BBM_BUF_INT 0x0906
  139. #define BBM_BUF_STS_CH_ID 0x090a
  140. #define BBM_CLK_EN 0x090b
  141. #define BBM_MISC_CTRL 0x090c
  142. #define BBM_BUF_CH0_SUBID 0x0910
  143. #define BBM_BUF_CH1_SUBID 0x0911
  144. #define BBM_BUF_CH2_SUBID 0x0912
  145. #define BBM_BUF_CH3_SUBID 0x0913
  146. #define BBM_BUF_CH0_START 0x0918
  147. #define BBM_BUF_CH1_START 0x091a
  148. #define BBM_BUF_CH2_START 0x091c
  149. #define BBM_BUF_CH3_START 0x091e
  150. #define BBM_BUF_FIC_START 0x0928
  151. #define BBM_BUF_CH0_END 0x0930
  152. #define BBM_BUF_CH1_END 0x0932
  153. #define BBM_BUF_CH2_END 0x0934
  154. #define BBM_BUF_CH3_END 0x0936
  155. #define BBM_BUF_FIC_END 0x0940
  156. #define BBM_BUF_CH0_THR 0x0942
  157. #define BBM_BUF_CH1_THR 0x0944
  158. #define BBM_BUF_CH2_THR 0x0946
  159. #define BBM_BUF_CH3_THR 0x0948
  160. #define BBM_BUF_FIC_THR 0x0952
  161. /* I2C */
  162. #define BBM_RF_PRER 0x0a00
  163. #define BBM_RF_CTR 0x0a02
  164. #define BBM_RF_RXR 0x0a03
  165. #define BBM_RF_SR 0x0a04
  166. #define BBM_RF_TXR 0x0a05
  167. #define BBM_RF_CR 0x0a06
  168. #define BBM_AP_FLAG 0x0a07
  169. /* FEC */
  170. #define BBM_FEC_RST 0x0e00
  171. #define BBM_FEC_ON 0x0e02
  172. #define BBM_FIC_CER_RXD_CRC 0x0e50
  173. #define BBM_FIC_CER_ERR_CRC 0x0e52
  174. #define BBM_FIC_CFG_CRC16 0x0e08
  175. #define BBM_MSC_CFG_SCH0 0x0e0a
  176. #define BBM_MSC_CFG_SCH1 0x0e0b
  177. #define BBM_MSC_CFG_SPD 0x0e0e
  178. /* FIC I2C Read */
  179. #define BBM_FIC_I2C_RD 0x7000
  180. /* DM */
  181. #define BBM_DM 0xf000
  182. /* BUFFER MANAGEMENT */
  183. #define FIC_BUF_START 0x0000
  184. #define FIC_BUF_LENGTH (32 * 24)
  185. #define FIC_BUF_END (FIC_BUF_START + FIC_BUF_LENGTH - 1)
  186. #define FIC_BUF_THR (FIC_BUF_LENGTH / 2 - 1)
  187. #define CH0_BUF_START (FIC_BUF_START + FIC_BUF_LENGTH)
  188. #if defined(CONFIG_TDMB_TSIF_SLSI) || defined(CONFIG_TDMB_TSIF_QC)
  189. #define CH0_BUF_LENGTH (188*2)
  190. #else
  191. #define CH0_BUF_LENGTH (188*40*2)
  192. #endif
  193. #define CH0_BUF_END (CH0_BUF_START + CH0_BUF_LENGTH - 1)
  194. #define CH0_BUF_THR (CH0_BUF_LENGTH / 2 - 1)
  195. #define CH1_BUF_START (FIC_BUF_START + FIC_BUF_LENGTH)
  196. #if defined(CONFIG_TDMB_TSIF_SLSI) || defined(CONFIG_TDMB_TSIF_QC)
  197. #define CH1_BUF_LENGTH (188*2)
  198. #else
  199. #define CH1_BUF_LENGTH (188*40*2)
  200. #endif
  201. #define CH1_BUF_END (CH1_BUF_START + CH1_BUF_LENGTH - 1)
  202. #define CH1_BUF_THR (CH1_BUF_LENGTH / 2 - 1)
  203. #define CH2_BUF_START (FIC_BUF_START + FIC_BUF_LENGTH)
  204. #define CH2_BUF_LENGTH (128 * 6)
  205. #define CH2_BUF_END (CH2_BUF_START + CH2_BUF_LENGTH - 1)
  206. #define CH2_BUF_THR (CH2_BUF_LENGTH / 2 - 1)
  207. #if (CH2_BUF_END >= 16384)
  208. internal buffer is 16K, your setting value is big !!!!!!!!!!!!!!!
  209. #endif
  210. #ifdef __cplusplus
  211. }
  212. #endif
  213. #endif /* __FC8080_REGS_H__ */