stk1160-reg.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  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. /*
  27. * Decoder Control Register:
  28. * This byte controls capture start/stop
  29. * with bit #7 (0x?? OR 0x80 to activate).
  30. */
  31. #define STK1160_DCTRL 0x100
  32. /*
  33. * Decimation Control Register:
  34. * Byte 104: Horizontal Decimation Line Unit Count
  35. * Byte 105: Vertical Decimation Line Unit Count
  36. * Byte 106: Decimation Control
  37. * Bit 0 - Horizontal Decimation Control
  38. * 0 Horizontal decimation is disabled.
  39. * 1 Horizontal decimation is enabled.
  40. * Bit 1 - Decimates Half or More Column
  41. * 0 Decimates less than half from original column,
  42. * send count unit (0x105) before each unit skipped.
  43. * 1 Decimates half or more from original column,
  44. * skip count unit (0x105) before each unit sent.
  45. * Bit 2 - Vertical Decimation Control
  46. * 0 Vertical decimation is disabled.
  47. * 1 Vertical decimation is enabled.
  48. * Bit 3 - Vertical Greater or Equal to Half
  49. * 0 Decimates less than half from original row,
  50. * send count unit (0x105) before each unit skipped.
  51. * 1 Decimates half or more from original row,
  52. * skip count unit (0x105) before each unit sent.
  53. * Bit 4 - Decimation Unit
  54. * 0 Decimation will work with 2 rows or columns per unit.
  55. * 1 Decimation will work with 4 rows or columns per unit.
  56. */
  57. #define STK1160_DMCTRL_H_UNITS 0x104
  58. #define STK1160_DMCTRL_V_UNITS 0x105
  59. #define STK1160_DMCTRL 0x106
  60. #define STK1160_H_DEC_EN BIT(0)
  61. #define STK1160_H_DEC_MODE BIT(1)
  62. #define STK1160_V_DEC_EN BIT(2)
  63. #define STK1160_V_DEC_MODE BIT(3)
  64. #define STK1160_DEC_UNIT_SIZE BIT(4)
  65. /* Capture Frame Start Position */
  66. #define STK116_CFSPO 0x110
  67. #define STK116_CFSPO_STX_L 0x110
  68. #define STK116_CFSPO_STX_H 0x111
  69. #define STK116_CFSPO_STY_L 0x112
  70. #define STK116_CFSPO_STY_H 0x113
  71. /* Capture Frame End Position */
  72. #define STK116_CFEPO 0x114
  73. #define STK116_CFEPO_ENX_L 0x114
  74. #define STK116_CFEPO_ENX_H 0x115
  75. #define STK116_CFEPO_ENY_L 0x116
  76. #define STK116_CFEPO_ENY_H 0x117
  77. /* Serial Interface Control */
  78. #define STK1160_SICTL 0x200
  79. #define STK1160_SICTL_CD 0x202
  80. #define STK1160_SICTL_SDA 0x203
  81. /* Serial Bus Write */
  82. #define STK1160_SBUSW 0x204
  83. #define STK1160_SBUSW_WA 0x204
  84. #define STK1160_SBUSW_WD 0x205
  85. /* Serial Bus Read */
  86. #define STK1160_SBUSR 0x208
  87. #define STK1160_SBUSR_RA 0x208
  88. #define STK1160_SBUSR_RD 0x209
  89. /* Alternate Serial Inteface Control */
  90. #define STK1160_ASIC 0x2fc
  91. /* PLL Select Options */
  92. #define STK1160_PLLSO 0x018
  93. /* PLL Frequency Divider */
  94. #define STK1160_PLLFD 0x01c
  95. /* Timing Generator */
  96. #define STK1160_TIGEN 0x300
  97. /* Timing Control Parameter */
  98. #define STK1160_TICTL 0x350
  99. /* AC97 Audio Control */
  100. #define STK1160_AC97CTL_0 0x500
  101. #define STK1160_AC97CTL_1 0x504
  102. /* Use [0:6] bits of register 0x504 to set codec command address */
  103. #define STK1160_AC97_ADDR 0x504
  104. /* Use [16:31] bits of register 0x500 to set codec command data */
  105. #define STK1160_AC97_CMD 0x502
  106. /* Audio I2S Interface */
  107. #define STK1160_I2SCTL 0x50c
  108. /* EEPROM Interface */
  109. #define STK1160_EEPROM_SZ 0x5f0