stk1160-reg.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. /*
  2. * STK1160 driver
  3. *
  4. * Copyright (C) 2012 Ezequiel Garcia
  5. * <elezegarcia--a.t--gmail.com>
  6. *
  7. * Based on Easycap driver by R.M. Thomas
  8. * Copyright (C) 2010 R.M. Thomas
  9. * <rmthomas--a.t--sciolus.org>
  10. *
  11. * This program is free software; you can redistribute it and/or modify
  12. * it under the terms of the GNU General Public License as published by
  13. * the Free Software Foundation; either version 2 of the License, or
  14. * (at your option) any later version.
  15. *
  16. * This program is distributed in the hope that it will be useful,
  17. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. * GNU General Public License for more details.
  20. *
  21. */
  22. /* GPIO Control */
  23. #define STK1160_GCTRL 0x000
  24. /* Remote Wakup Control */
  25. #define STK1160_RMCTL 0x00c
  26. /* Power-on Strapping Data */
  27. #define STK1160_POSVA 0x010
  28. #define STK1160_POSV_L 0x010
  29. #define STK1160_POSV_M 0x011
  30. #define STK1160_POSV_H 0x012
  31. #define STK1160_POSV_L_ACDOUT BIT(3)
  32. #define STK1160_POSV_L_ACSYNC BIT(2)
  33. /*
  34. * Decoder Control Register:
  35. * This byte controls capture start/stop
  36. * with bit #7 (0x?? OR 0x80 to activate).
  37. */
  38. #define STK1160_DCTRL 0x100
  39. /*
  40. * Decimation Control Register:
  41. * Byte 104: Horizontal Decimation Line Unit Count
  42. * Byte 105: Vertical Decimation Line Unit Count
  43. * Byte 106: Decimation Control
  44. * Bit 0 - Horizontal Decimation Control
  45. * 0 Horizontal decimation is disabled.
  46. * 1 Horizontal decimation is enabled.
  47. * Bit 1 - Decimates Half or More Column
  48. * 0 Decimates less than half from original column,
  49. * send count unit (0x105) before each unit skipped.
  50. * 1 Decimates half or more from original column,
  51. * skip count unit (0x105) before each unit sent.
  52. * Bit 2 - Vertical Decimation Control
  53. * 0 Vertical decimation is disabled.
  54. * 1 Vertical decimation is enabled.
  55. * Bit 3 - Vertical Greater or Equal to Half
  56. * 0 Decimates less than half from original row,
  57. * send count unit (0x105) before each unit skipped.
  58. * 1 Decimates half or more from original row,
  59. * skip count unit (0x105) before each unit sent.
  60. * Bit 4 - Decimation Unit
  61. * 0 Decimation will work with 2 rows or columns per unit.
  62. * 1 Decimation will work with 4 rows or columns per unit.
  63. */
  64. #define STK1160_DMCTRL_H_UNITS 0x104
  65. #define STK1160_DMCTRL_V_UNITS 0x105
  66. #define STK1160_DMCTRL 0x106
  67. #define STK1160_H_DEC_EN BIT(0)
  68. #define STK1160_H_DEC_MODE BIT(1)
  69. #define STK1160_V_DEC_EN BIT(2)
  70. #define STK1160_V_DEC_MODE BIT(3)
  71. #define STK1160_DEC_UNIT_SIZE BIT(4)
  72. /* Capture Frame Start Position */
  73. #define STK116_CFSPO 0x110
  74. #define STK116_CFSPO_STX_L 0x110
  75. #define STK116_CFSPO_STX_H 0x111
  76. #define STK116_CFSPO_STY_L 0x112
  77. #define STK116_CFSPO_STY_H 0x113
  78. /* Capture Frame End Position */
  79. #define STK116_CFEPO 0x114
  80. #define STK116_CFEPO_ENX_L 0x114
  81. #define STK116_CFEPO_ENX_H 0x115
  82. #define STK116_CFEPO_ENY_L 0x116
  83. #define STK116_CFEPO_ENY_H 0x117
  84. /* Serial Interface Control */
  85. #define STK1160_SICTL 0x200
  86. #define STK1160_SICTL_CD 0x202
  87. #define STK1160_SICTL_SDA 0x203
  88. /* Serial Bus Write */
  89. #define STK1160_SBUSW 0x204
  90. #define STK1160_SBUSW_WA 0x204
  91. #define STK1160_SBUSW_WD 0x205
  92. /* Serial Bus Read */
  93. #define STK1160_SBUSR 0x208
  94. #define STK1160_SBUSR_RA 0x208
  95. #define STK1160_SBUSR_RD 0x209
  96. /* Alternate Serial Inteface Control */
  97. #define STK1160_ASIC 0x2fc
  98. /* PLL Select Options */
  99. #define STK1160_PLLSO 0x018
  100. /* PLL Frequency Divider */
  101. #define STK1160_PLLFD 0x01c
  102. /* Timing Generator */
  103. #define STK1160_TIGEN 0x300
  104. /* Timing Control Parameter */
  105. #define STK1160_TICTL 0x350
  106. /* AC97 Audio Control */
  107. #define STK1160_AC97CTL_0 0x500
  108. #define STK1160_AC97CTL_1 0x504
  109. #define STK1160_AC97CTL_0_CR BIT(1)
  110. #define STK1160_AC97CTL_0_CW BIT(2)
  111. /* Use [0:6] bits of register 0x504 to set codec command address */
  112. #define STK1160_AC97_ADDR 0x504
  113. /* Use [16:31] bits of register 0x500 to set codec command data */
  114. #define STK1160_AC97_CMD 0x502
  115. /* Audio I2S Interface */
  116. #define STK1160_I2SCTL 0x50c
  117. /* EEPROM Interface */
  118. #define STK1160_EEPROM_SZ 0x5f0