stk1160-reg.h 3.6 KB

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