atmel-isc-regs.h 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. #ifndef __ATMEL_ISC_REGS_H
  2. #define __ATMEL_ISC_REGS_H
  3. #include <linux/bitops.h>
  4. /* ISC Control Enable Register 0 */
  5. #define ISC_CTRLEN 0x00000000
  6. /* ISC Control Disable Register 0 */
  7. #define ISC_CTRLDIS 0x00000004
  8. /* ISC Control Status Register 0 */
  9. #define ISC_CTRLSR 0x00000008
  10. #define ISC_CTRL_CAPTURE BIT(0)
  11. #define ISC_CTRL_UPPRO BIT(1)
  12. #define ISC_CTRL_HISREQ BIT(2)
  13. #define ISC_CTRL_HISCLR BIT(3)
  14. /* ISC Parallel Front End Configuration 0 Register */
  15. #define ISC_PFE_CFG0 0x0000000c
  16. #define ISC_PFE_CFG0_HPOL_LOW BIT(0)
  17. #define ISC_PFE_CFG0_VPOL_LOW BIT(1)
  18. #define ISC_PFE_CFG0_PPOL_LOW BIT(2)
  19. #define ISC_PFE_CFG0_MODE_PROGRESSIVE (0x0 << 4)
  20. #define ISC_PFE_CFG0_MODE_MASK GENMASK(6, 4)
  21. #define ISC_PFE_CFG0_BPS_EIGHT (0x4 << 28)
  22. #define ISC_PFG_CFG0_BPS_NINE (0x3 << 28)
  23. #define ISC_PFG_CFG0_BPS_TEN (0x2 << 28)
  24. #define ISC_PFG_CFG0_BPS_ELEVEN (0x1 << 28)
  25. #define ISC_PFG_CFG0_BPS_TWELVE (0x0 << 28)
  26. #define ISC_PFE_CFG0_BPS_MASK GENMASK(30, 28)
  27. /* ISC Clock Enable Register */
  28. #define ISC_CLKEN 0x00000018
  29. /* ISC Clock Disable Register */
  30. #define ISC_CLKDIS 0x0000001c
  31. /* ISC Clock Status Register */
  32. #define ISC_CLKSR 0x00000020
  33. #define ISC_CLK(n) BIT(n)
  34. /* ISC Clock Configuration Register */
  35. #define ISC_CLKCFG 0x00000024
  36. #define ISC_CLKCFG_DIV_SHIFT(n) ((n)*16)
  37. #define ISC_CLKCFG_DIV_MASK(n) GENMASK(((n)*16 + 7), (n)*16)
  38. #define ISC_CLKCFG_SEL_SHIFT(n) ((n)*16 + 8)
  39. #define ISC_CLKCFG_SEL_MASK(n) GENMASK(((n)*17 + 8), ((n)*16 + 8))
  40. /* ISC Interrupt Enable Register */
  41. #define ISC_INTEN 0x00000028
  42. /* ISC Interrupt Disable Register */
  43. #define ISC_INTDIS 0x0000002c
  44. /* ISC Interrupt Mask Register */
  45. #define ISC_INTMASK 0x00000030
  46. /* ISC Interrupt Status Register */
  47. #define ISC_INTSR 0x00000034
  48. #define ISC_INT_DDONE BIT(8)
  49. /* ISC White Balance Control Register */
  50. #define ISC_WB_CTRL 0x00000058
  51. /* ISC White Balance Configuration Register */
  52. #define ISC_WB_CFG 0x0000005c
  53. /* ISC Color Filter Array Control Register */
  54. #define ISC_CFA_CTRL 0x00000070
  55. /* ISC Color Filter Array Configuration Register */
  56. #define ISC_CFA_CFG 0x00000074
  57. #define ISC_BAY_CFG_GRGR 0x0
  58. #define ISC_BAY_CFG_RGRG 0x1
  59. #define ISC_BAY_CFG_GBGB 0x2
  60. #define ISC_BAY_CFG_BGBG 0x3
  61. #define ISC_BAY_CFG_MASK GENMASK(1, 0)
  62. /* ISC Color Correction Control Register */
  63. #define ISC_CC_CTRL 0x00000078
  64. /* ISC Gamma Correction Control Register */
  65. #define ISC_GAM_CTRL 0x00000094
  66. /* Color Space Conversion Control Register */
  67. #define ISC_CSC_CTRL 0x00000398
  68. /* Contrast And Brightness Control Register */
  69. #define ISC_CBC_CTRL 0x000003b4
  70. /* Subsampling 4:4:4 to 4:2:2 Control Register */
  71. #define ISC_SUB422_CTRL 0x000003c4
  72. /* Subsampling 4:2:2 to 4:2:0 Control Register */
  73. #define ISC_SUB420_CTRL 0x000003cc
  74. /* Rounding, Limiting and Packing Configuration Register */
  75. #define ISC_RLP_CFG 0x000003d0
  76. #define ISC_RLP_CFG_MODE_DAT8 0x0
  77. #define ISC_RLP_CFG_MODE_DAT9 0x1
  78. #define ISC_RLP_CFG_MODE_DAT10 0x2
  79. #define ISC_RLP_CFG_MODE_DAT11 0x3
  80. #define ISC_RLP_CFG_MODE_DAT12 0x4
  81. #define ISC_RLP_CFG_MODE_DATY8 0x5
  82. #define ISC_RLP_CFG_MODE_DATY10 0x6
  83. #define ISC_RLP_CFG_MODE_ARGB444 0x7
  84. #define ISC_RLP_CFG_MODE_ARGB555 0x8
  85. #define ISC_RLP_CFG_MODE_RGB565 0x9
  86. #define ISC_RLP_CFG_MODE_ARGB32 0xa
  87. #define ISC_RLP_CFG_MODE_YYCC 0xb
  88. #define ISC_RLP_CFG_MODE_YYCC_LIMITED 0xc
  89. #define ISC_RLP_CFG_MODE_MASK GENMASK(3, 0)
  90. /* DMA Configuration Register */
  91. #define ISC_DCFG 0x000003e0
  92. #define ISC_DCFG_IMODE_PACKED8 0x0
  93. #define ISC_DCFG_IMODE_PACKED16 0x1
  94. #define ISC_DCFG_IMODE_PACKED32 0x2
  95. #define ISC_DCFG_IMODE_YC422SP 0x3
  96. #define ISC_DCFG_IMODE_YC422P 0x4
  97. #define ISC_DCFG_IMODE_YC420SP 0x5
  98. #define ISC_DCFG_IMODE_YC420P 0x6
  99. #define ISC_DCFG_IMODE_MASK GENMASK(2, 0)
  100. #define ISC_DCFG_YMBSIZE_SINGLE (0x0 << 4)
  101. #define ISC_DCFG_YMBSIZE_BEATS4 (0x1 << 4)
  102. #define ISC_DCFG_YMBSIZE_BEATS8 (0x2 << 4)
  103. #define ISC_DCFG_YMBSIZE_BEATS16 (0x3 << 4)
  104. #define ISC_DCFG_YMBSIZE_MASK GENMASK(5, 4)
  105. #define ISC_DCFG_CMBSIZE_SINGLE (0x0 << 8)
  106. #define ISC_DCFG_CMBSIZE_BEATS4 (0x1 << 8)
  107. #define ISC_DCFG_CMBSIZE_BEATS8 (0x2 << 8)
  108. #define ISC_DCFG_CMBSIZE_BEATS16 (0x3 << 8)
  109. #define ISC_DCFG_CMBSIZE_MASK GENMASK(9, 8)
  110. /* DMA Control Register */
  111. #define ISC_DCTRL 0x000003e4
  112. #define ISC_DCTRL_DVIEW_PACKED (0x0 << 1)
  113. #define ISC_DCTRL_DVIEW_SEMIPLANAR (0x1 << 1)
  114. #define ISC_DCTRL_DVIEW_PLANAR (0x2 << 1)
  115. #define ISC_DCTRL_DVIEW_MASK GENMASK(2, 1)
  116. #define ISC_DCTRL_IE_IS (0x0 << 4)
  117. /* DMA Descriptor Address Register */
  118. #define ISC_DNDA 0x000003e8
  119. /* DMA Address 0 Register */
  120. #define ISC_DAD0 0x000003ec
  121. /* DMA Stride 0 Register */
  122. #define ISC_DST0 0x000003f0
  123. #endif