pxa_camera.h 4.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. /* Camera Interface */
  2. #define CICR0 __REG(0x50000000)
  3. #define CICR1 __REG(0x50000004)
  4. #define CICR2 __REG(0x50000008)
  5. #define CICR3 __REG(0x5000000C)
  6. #define CICR4 __REG(0x50000010)
  7. #define CISR __REG(0x50000014)
  8. #define CIFR __REG(0x50000018)
  9. #define CITOR __REG(0x5000001C)
  10. #define CIBR0 __REG(0x50000028)
  11. #define CIBR1 __REG(0x50000030)
  12. #define CIBR2 __REG(0x50000038)
  13. #define CICR0_DMAEN (1 << 31) /* DMA request enable */
  14. #define CICR0_PAR_EN (1 << 30) /* Parity enable */
  15. #define CICR0_SL_CAP_EN (1 << 29) /* Capture enable for slave mode */
  16. #define CICR0_ENB (1 << 28) /* Camera interface enable */
  17. #define CICR0_DIS (1 << 27) /* Camera interface disable */
  18. #define CICR0_SIM (0x7 << 24) /* Sensor interface mode mask */
  19. #define CICR0_TOM (1 << 9) /* Time-out mask */
  20. #define CICR0_RDAVM (1 << 8) /* Receive-data-available mask */
  21. #define CICR0_FEM (1 << 7) /* FIFO-empty mask */
  22. #define CICR0_EOLM (1 << 6) /* End-of-line mask */
  23. #define CICR0_PERRM (1 << 5) /* Parity-error mask */
  24. #define CICR0_QDM (1 << 4) /* Quick-disable mask */
  25. #define CICR0_CDM (1 << 3) /* Disable-done mask */
  26. #define CICR0_SOFM (1 << 2) /* Start-of-frame mask */
  27. #define CICR0_EOFM (1 << 1) /* End-of-frame mask */
  28. #define CICR0_FOM (1 << 0) /* FIFO-overrun mask */
  29. #define CICR1_TBIT (1 << 31) /* Transparency bit */
  30. #define CICR1_RGBT_CONV (0x3 << 29) /* RGBT conversion mask */
  31. #define CICR1_PPL (0x7ff << 15) /* Pixels per line mask */
  32. #define CICR1_RGB_CONV (0x7 << 12) /* RGB conversion mask */
  33. #define CICR1_RGB_F (1 << 11) /* RGB format */
  34. #define CICR1_YCBCR_F (1 << 10) /* YCbCr format */
  35. #define CICR1_RGB_BPP (0x7 << 7) /* RGB bis per pixel mask */
  36. #define CICR1_RAW_BPP (0x3 << 5) /* Raw bis per pixel mask */
  37. #define CICR1_COLOR_SP (0x3 << 3) /* Color space mask */
  38. #define CICR1_DW (0x7 << 0) /* Data width mask */
  39. #define CICR2_BLW (0xff << 24) /* Beginning-of-line pixel clock
  40. wait count mask */
  41. #define CICR2_ELW (0xff << 16) /* End-of-line pixel clock
  42. wait count mask */
  43. #define CICR2_HSW (0x3f << 10) /* Horizontal sync pulse width mask */
  44. #define CICR2_BFPW (0x3f << 3) /* Beginning-of-frame pixel clock
  45. wait count mask */
  46. #define CICR2_FSW (0x7 << 0) /* Frame stabilization
  47. wait count mask */
  48. #define CICR3_BFW (0xff << 24) /* Beginning-of-frame line clock
  49. wait count mask */
  50. #define CICR3_EFW (0xff << 16) /* End-of-frame line clock
  51. wait count mask */
  52. #define CICR3_VSW (0x3f << 10) /* Vertical sync pulse width mask */
  53. #define CICR3_BFPW (0x3f << 3) /* Beginning-of-frame pixel clock
  54. wait count mask */
  55. #define CICR3_LPF (0x7ff << 0) /* Lines per frame mask */
  56. #define CICR4_MCLK_DLY (0x3 << 24) /* MCLK Data Capture Delay mask */
  57. #define CICR4_PCLK_EN (1 << 23) /* Pixel clock enable */
  58. #define CICR4_PCP (1 << 22) /* Pixel clock polarity */
  59. #define CICR4_HSP (1 << 21) /* Horizontal sync polarity */
  60. #define CICR4_VSP (1 << 20) /* Vertical sync polarity */
  61. #define CICR4_MCLK_EN (1 << 19) /* MCLK enable */
  62. #define CICR4_FR_RATE (0x7 << 8) /* Frame rate mask */
  63. #define CICR4_DIV (0xff << 0) /* Clock divisor mask */
  64. #define CISR_FTO (1 << 15) /* FIFO time-out */
  65. #define CISR_RDAV_2 (1 << 14) /* Channel 2 receive data available */
  66. #define CISR_RDAV_1 (1 << 13) /* Channel 1 receive data available */
  67. #define CISR_RDAV_0 (1 << 12) /* Channel 0 receive data available */
  68. #define CISR_FEMPTY_2 (1 << 11) /* Channel 2 FIFO empty */
  69. #define CISR_FEMPTY_1 (1 << 10) /* Channel 1 FIFO empty */
  70. #define CISR_FEMPTY_0 (1 << 9) /* Channel 0 FIFO empty */
  71. #define CISR_EOL (1 << 8) /* End of line */
  72. #define CISR_PAR_ERR (1 << 7) /* Parity error */
  73. #define CISR_CQD (1 << 6) /* Camera interface quick disable */
  74. #define CISR_CDD (1 << 5) /* Camera interface disable done */
  75. #define CISR_SOF (1 << 4) /* Start of frame */
  76. #define CISR_EOF (1 << 3) /* End of frame */
  77. #define CISR_IFO_2 (1 << 2) /* FIFO overrun for Channel 2 */
  78. #define CISR_IFO_1 (1 << 1) /* FIFO overrun for Channel 1 */
  79. #define CISR_IFO_0 (1 << 0) /* FIFO overrun for Channel 0 */
  80. #define CIFR_FLVL2 (0x7f << 23) /* FIFO 2 level mask */
  81. #define CIFR_FLVL1 (0x7f << 16) /* FIFO 1 level mask */
  82. #define CIFR_FLVL0 (0xff << 8) /* FIFO 0 level mask */
  83. #define CIFR_THL_0 (0x3 << 4) /* Threshold Level for Channel 0 FIFO */
  84. #define CIFR_RESET_F (1 << 3) /* Reset input FIFOs */
  85. #define CIFR_FEN2 (1 << 2) /* FIFO enable for channel 2 */
  86. #define CIFR_FEN1 (1 << 1) /* FIFO enable for channel 1 */
  87. #define CIFR_FEN0 (1 << 0) /* FIFO enable for channel 0 */