mxl111sf-reg.h 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. /*
  2. * mxl111sf-reg.h - driver for the MaxLinear MXL111SF
  3. *
  4. * Copyright (C) 2010-2014 Michael Krufky <mkrufky@linuxtv.org>
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  19. */
  20. #ifndef _DVB_USB_MXL111SF_REG_H_
  21. #define _DVB_USB_MXL111SF_REG_H_
  22. #define CHIP_ID_REG 0xFC
  23. #define TOP_CHIP_REV_ID_REG 0xFA
  24. #define V6_SNR_RB_LSB_REG 0x27
  25. #define V6_SNR_RB_MSB_REG 0x28
  26. #define V6_N_ACCUMULATE_REG 0x11
  27. #define V6_RS_AVG_ERRORS_LSB_REG 0x2C
  28. #define V6_RS_AVG_ERRORS_MSB_REG 0x2D
  29. #define V6_IRQ_STATUS_REG 0x24
  30. #define IRQ_MASK_FEC_LOCK 0x10
  31. #define V6_SYNC_LOCK_REG 0x28
  32. #define SYNC_LOCK_MASK 0x10
  33. #define V6_RS_LOCK_DET_REG 0x28
  34. #define RS_LOCK_DET_MASK 0x08
  35. #define V6_INITACQ_NODETECT_REG 0x20
  36. #define V6_FORCE_NFFT_CPSIZE_REG 0x20
  37. #define V6_CODE_RATE_TPS_REG 0x29
  38. #define V6_CODE_RATE_TPS_MASK 0x07
  39. #define V6_CP_LOCK_DET_REG 0x28
  40. #define V6_CP_LOCK_DET_MASK 0x04
  41. #define V6_TPS_HIERACHY_REG 0x29
  42. #define V6_TPS_HIERARCHY_INFO_MASK 0x40
  43. #define V6_MODORDER_TPS_REG 0x2A
  44. #define V6_PARAM_CONSTELLATION_MASK 0x30
  45. #define V6_MODE_TPS_REG 0x2A
  46. #define V6_PARAM_FFT_MODE_MASK 0x0C
  47. #define V6_CP_TPS_REG 0x29
  48. #define V6_PARAM_GI_MASK 0x30
  49. #define V6_TPS_LOCK_REG 0x2A
  50. #define V6_PARAM_TPS_LOCK_MASK 0x40
  51. #define V6_FEC_PER_COUNT_REG 0x2E
  52. #define V6_FEC_PER_SCALE_REG 0x2B
  53. #define V6_FEC_PER_SCALE_MASK 0x03
  54. #define V6_FEC_PER_CLR_REG 0x20
  55. #define V6_FEC_PER_CLR_MASK 0x01
  56. #define V6_PIN_MUX_MODE_REG 0x1B
  57. #define V6_ENABLE_PIN_MUX 0x1E
  58. #define V6_I2S_NUM_SAMPLES_REG 0x16
  59. #define V6_MPEG_IN_CLK_INV_REG 0x17
  60. #define V6_MPEG_IN_CTRL_REG 0x18
  61. #define V6_INVERTED_CLK_PHASE 0x20
  62. #define V6_MPEG_IN_DATA_PARALLEL 0x01
  63. #define V6_MPEG_IN_DATA_SERIAL 0x02
  64. #define V6_INVERTED_MPEG_SYNC 0x04
  65. #define V6_INVERTED_MPEG_VALID 0x08
  66. #define TSIF_INPUT_PARALLEL 0
  67. #define TSIF_INPUT_SERIAL 1
  68. #define TSIF_NORMAL 0
  69. #define V6_MPEG_INOUT_BIT_ORDER_CTRL_REG 0x19
  70. #define V6_MPEG_SER_MSB_FIRST 0x80
  71. #define MPEG_SER_MSB_FIRST_ENABLED 0x01
  72. #define V6_656_I2S_BUFF_STATUS_REG 0x2F
  73. #define V6_656_OVERFLOW_MASK_BIT 0x08
  74. #define V6_I2S_OVERFLOW_MASK_BIT 0x01
  75. #define V6_I2S_STREAM_START_BIT_REG 0x14
  76. #define V6_I2S_STREAM_END_BIT_REG 0x15
  77. #define I2S_RIGHT_JUSTIFIED 0
  78. #define I2S_LEFT_JUSTIFIED 1
  79. #define I2S_DATA_FORMAT 2
  80. #define V6_TUNER_LOOP_THRU_CONTROL_REG 0x09
  81. #define V6_ENABLE_LOOP_THRU 0x01
  82. #define TOTAL_NUM_IF_OUTPUT_FREQ 16
  83. #define TUNER_NORMAL_IF_SPECTRUM 0x0
  84. #define TUNER_INVERT_IF_SPECTRUM 0x10
  85. #define V6_TUNER_IF_SEL_REG 0x06
  86. #define V6_TUNER_IF_FCW_REG 0x3C
  87. #define V6_TUNER_IF_FCW_BYP_REG 0x3D
  88. #define V6_RF_LOCK_STATUS_REG 0x23
  89. #define NUM_DIG_TV_CHANNEL 1000
  90. #define V6_DIG_CLK_FREQ_SEL_REG 0x07
  91. #define V6_REF_SYNTH_INT_REG 0x5C
  92. #define V6_REF_SYNTH_REMAIN_REG 0x58
  93. #define V6_DIG_RFREFSELECT_REG 0x32
  94. #define V6_XTAL_CLK_OUT_GAIN_REG 0x31
  95. #define V6_TUNER_LOOP_THRU_CTRL_REG 0x09
  96. #define V6_DIG_XTAL_ENABLE_REG 0x06
  97. #define V6_DIG_XTAL_BIAS_REG 0x66
  98. #define V6_XTAL_CAP_REG 0x08
  99. #define V6_GPO_CTRL_REG 0x18
  100. #define MXL_GPO_0 0x00
  101. #define MXL_GPO_1 0x01
  102. #define V6_GPO_0_MASK 0x10
  103. #define V6_GPO_1_MASK 0x20
  104. #define V6_111SF_GPO_CTRL_REG 0x19
  105. #define MXL_111SF_GPO_1 0x00
  106. #define MXL_111SF_GPO_2 0x01
  107. #define MXL_111SF_GPO_3 0x02
  108. #define MXL_111SF_GPO_4 0x03
  109. #define MXL_111SF_GPO_5 0x04
  110. #define MXL_111SF_GPO_6 0x05
  111. #define MXL_111SF_GPO_7 0x06
  112. #define MXL_111SF_GPO_0_MASK 0x01
  113. #define MXL_111SF_GPO_1_MASK 0x02
  114. #define MXL_111SF_GPO_2_MASK 0x04
  115. #define MXL_111SF_GPO_3_MASK 0x08
  116. #define MXL_111SF_GPO_4_MASK 0x10
  117. #define MXL_111SF_GPO_5_MASK 0x20
  118. #define MXL_111SF_GPO_6_MASK 0x40
  119. #define V6_ATSC_CONFIG_REG 0x0A
  120. #define MXL_MODE_REG 0x03
  121. #define START_TUNE_REG 0x1C
  122. #define V6_IDAC_HYSTERESIS_REG 0x0B
  123. #define V6_IDAC_SETTINGS_REG 0x0C
  124. #define IDAC_MANUAL_CONTROL 1
  125. #define IDAC_CURRENT_SINKING_ENABLE 1
  126. #define IDAC_MANUAL_CONTROL_BIT_MASK 0x80
  127. #define IDAC_CURRENT_SINKING_BIT_MASK 0x40
  128. #define V8_SPI_MODE_REG 0xE9
  129. #define V6_DIG_RF_PWR_LSB_REG 0x46
  130. #define V6_DIG_RF_PWR_MSB_REG 0x47
  131. #endif /* _DVB_USB_MXL111SF_REG_H_ */