am437x-vpfe_regs.h 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. /*
  2. * TI AM437x Image Sensor Interface Registers
  3. *
  4. * Copyright (C) 2013 - 2014 Texas Instruments, Inc.
  5. *
  6. * Benoit Parrot <bparrot@ti.com>
  7. * Lad, Prabhakar <prabhakar.csengg@gmail.com>
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License version 2 as
  11. * published by the Free Software Foundation.
  12. *
  13. * This program is distributed "as is" WITHOUT ANY WARRANTY of any
  14. * kind, whether express or implied; without even the implied warranty
  15. * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. */
  18. #ifndef AM437X_VPFE_REGS_H
  19. #define AM437X_VPFE_REGS_H
  20. /* VPFE module register offset */
  21. #define VPFE_REVISION 0x0
  22. #define VPFE_PCR 0x4
  23. #define VPFE_SYNMODE 0x8
  24. #define VPFE_HD_VD_WID 0xc
  25. #define VPFE_PIX_LINES 0x10
  26. #define VPFE_HORZ_INFO 0x14
  27. #define VPFE_VERT_START 0x18
  28. #define VPFE_VERT_LINES 0x1c
  29. #define VPFE_CULLING 0x20
  30. #define VPFE_HSIZE_OFF 0x24
  31. #define VPFE_SDOFST 0x28
  32. #define VPFE_SDR_ADDR 0x2c
  33. #define VPFE_CLAMP 0x30
  34. #define VPFE_DCSUB 0x34
  35. #define VPFE_COLPTN 0x38
  36. #define VPFE_BLKCMP 0x3c
  37. #define VPFE_VDINT 0x48
  38. #define VPFE_ALAW 0x4c
  39. #define VPFE_REC656IF 0x50
  40. #define VPFE_CCDCFG 0x54
  41. #define VPFE_DMA_CNTL 0x98
  42. #define VPFE_SYSCONFIG 0x104
  43. #define VPFE_CONFIG 0x108
  44. #define VPFE_IRQ_EOI 0x110
  45. #define VPFE_IRQ_STS_RAW 0x114
  46. #define VPFE_IRQ_STS 0x118
  47. #define VPFE_IRQ_EN_SET 0x11c
  48. #define VPFE_IRQ_EN_CLR 0x120
  49. #define VPFE_REG_END 0x124
  50. /* Define bit fields within selected registers */
  51. #define VPFE_FID_POL_MASK 1
  52. #define VPFE_FID_POL_SHIFT 4
  53. #define VPFE_HD_POL_MASK 1
  54. #define VPFE_HD_POL_SHIFT 3
  55. #define VPFE_VD_POL_MASK 1
  56. #define VPFE_VD_POL_SHIFT 2
  57. #define VPFE_HSIZE_OFF_MASK 0xffffffe0
  58. #define VPFE_32BYTE_ALIGN_VAL 31
  59. #define VPFE_FRM_FMT_MASK 0x1
  60. #define VPFE_FRM_FMT_SHIFT 7
  61. #define VPFE_DATA_SZ_MASK 7
  62. #define VPFE_DATA_SZ_SHIFT 8
  63. #define VPFE_PIX_FMT_MASK 3
  64. #define VPFE_PIX_FMT_SHIFT 12
  65. #define VPFE_VP2SDR_DISABLE 0xfffbffff
  66. #define VPFE_WEN_ENABLE (1 << 17)
  67. #define VPFE_SDR2RSZ_DISABLE 0xfff7ffff
  68. #define VPFE_VDHDEN_ENABLE (1 << 16)
  69. #define VPFE_LPF_ENABLE (1 << 14)
  70. #define VPFE_ALAW_ENABLE (1 << 3)
  71. #define VPFE_ALAW_GAMMA_WD_MASK 7
  72. #define VPFE_BLK_CLAMP_ENABLE (1 << 31)
  73. #define VPFE_BLK_SGAIN_MASK 0x1f
  74. #define VPFE_BLK_ST_PXL_MASK 0x7fff
  75. #define VPFE_BLK_ST_PXL_SHIFT 10
  76. #define VPFE_BLK_SAMPLE_LN_MASK 7
  77. #define VPFE_BLK_SAMPLE_LN_SHIFT 28
  78. #define VPFE_BLK_SAMPLE_LINE_MASK 7
  79. #define VPFE_BLK_SAMPLE_LINE_SHIFT 25
  80. #define VPFE_BLK_DC_SUB_MASK 0x03fff
  81. #define VPFE_BLK_COMP_MASK 0xff
  82. #define VPFE_BLK_COMP_GB_COMP_SHIFT 8
  83. #define VPFE_BLK_COMP_GR_COMP_SHIFT 16
  84. #define VPFE_BLK_COMP_R_COMP_SHIFT 24
  85. #define VPFE_LATCH_ON_VSYNC_DISABLE (1 << 15)
  86. #define VPFE_DATA_PACK_ENABLE (1 << 11)
  87. #define VPFE_HORZ_INFO_SPH_SHIFT 16
  88. #define VPFE_VERT_START_SLV0_SHIFT 16
  89. #define VPFE_VDINT_VDINT0_SHIFT 16
  90. #define VPFE_VDINT_VDINT1_MASK 0xffff
  91. #define VPFE_PPC_RAW 1
  92. #define VPFE_DCSUB_DEFAULT_VAL 0
  93. #define VPFE_CLAMP_DEFAULT_VAL 0
  94. #define VPFE_COLPTN_VAL 0xbb11bb11
  95. #define VPFE_TWO_BYTES_PER_PIXEL 2
  96. #define VPFE_INTERLACED_IMAGE_INVERT 0x4b6d
  97. #define VPFE_INTERLACED_NO_IMAGE_INVERT 0x0249
  98. #define VPFE_PROGRESSIVE_IMAGE_INVERT 0x4000
  99. #define VPFE_PROGRESSIVE_NO_IMAGE_INVERT 0
  100. #define VPFE_INTERLACED_HEIGHT_SHIFT 1
  101. #define VPFE_SYN_MODE_INPMOD_SHIFT 12
  102. #define VPFE_SYN_MODE_INPMOD_MASK 3
  103. #define VPFE_SYN_MODE_8BITS (7 << 8)
  104. #define VPFE_SYN_MODE_10BITS (6 << 8)
  105. #define VPFE_SYN_MODE_11BITS (5 << 8)
  106. #define VPFE_SYN_MODE_12BITS (4 << 8)
  107. #define VPFE_SYN_MODE_13BITS (3 << 8)
  108. #define VPFE_SYN_MODE_14BITS (2 << 8)
  109. #define VPFE_SYN_MODE_15BITS (1 << 8)
  110. #define VPFE_SYN_MODE_16BITS (0 << 8)
  111. #define VPFE_SYN_FLDMODE_MASK 1
  112. #define VPFE_SYN_FLDMODE_SHIFT 7
  113. #define VPFE_REC656IF_BT656_EN 3
  114. #define VPFE_SYN_MODE_VD_POL_NEGATIVE (1 << 2)
  115. #define VPFE_CCDCFG_Y8POS_SHIFT 11
  116. #define VPFE_CCDCFG_BW656_10BIT (1 << 5)
  117. #define VPFE_SDOFST_FIELD_INTERLEAVED 0x249
  118. #define VPFE_NO_CULLING 0xffff00ff
  119. #define VPFE_VDINT0 (1 << 0)
  120. #define VPFE_VDINT1 (1 << 1)
  121. #define VPFE_VDINT2 (1 << 2)
  122. #define VPFE_DMA_CNTL_OVERFLOW (1 << 31)
  123. #define VPFE_CONFIG_PCLK_INV_SHIFT 0
  124. #define VPFE_CONFIG_PCLK_INV_MASK 1
  125. #define VPFE_CONFIG_PCLK_INV_NOT_INV 0
  126. #define VPFE_CONFIG_PCLK_INV_INV 1
  127. #define VPFE_CONFIG_EN_SHIFT 1
  128. #define VPFE_CONFIG_EN_MASK 2
  129. #define VPFE_CONFIG_EN_DISABLE 0
  130. #define VPFE_CONFIG_EN_ENABLE 1
  131. #define VPFE_CONFIG_ST_SHIFT 2
  132. #define VPFE_CONFIG_ST_MASK 4
  133. #define VPFE_CONFIG_ST_OCP_ACTIVE 0
  134. #define VPFE_CONFIG_ST_OCP_STANDBY 1
  135. #endif /* AM437X_VPFE_REGS_H */