fimc-is-command.h 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Samsung Exynos4x12 FIMC-IS (Imaging Subsystem) driver
  4. *
  5. * FIMC-IS command set definitions
  6. *
  7. * Copyright (C) 2013 Samsung Electronics Co., Ltd.
  8. *
  9. * Authors: Younghwan Joo <yhwan.joo@samsung.com>
  10. * Sylwester Nawrocki <s.nawrocki@samsung.com>
  11. */
  12. #ifndef FIMC_IS_CMD_H_
  13. #define FIMC_IS_CMD_H_
  14. #define FIMC_IS_COMMAND_VER 110 /* FIMC-IS command set version 1.10 */
  15. /* Enumeration of commands between the FIMC-IS and the host processor. */
  16. /* HOST to FIMC-IS */
  17. #define HIC_PREVIEW_STILL 0x0001
  18. #define HIC_PREVIEW_VIDEO 0x0002
  19. #define HIC_CAPTURE_STILL 0x0003
  20. #define HIC_CAPTURE_VIDEO 0x0004
  21. #define HIC_STREAM_ON 0x0005
  22. #define HIC_STREAM_OFF 0x0006
  23. #define HIC_SET_PARAMETER 0x0007
  24. #define HIC_GET_PARAMETER 0x0008
  25. #define HIC_SET_TUNE 0x0009
  26. #define HIC_GET_STATUS 0x000b
  27. /* Sensor part */
  28. #define HIC_OPEN_SENSOR 0x000c
  29. #define HIC_CLOSE_SENSOR 0x000d
  30. #define HIC_SIMMIAN_INIT 0x000e
  31. #define HIC_SIMMIAN_WRITE 0x000f
  32. #define HIC_SIMMIAN_READ 0x0010
  33. #define HIC_POWER_DOWN 0x0011
  34. #define HIC_GET_SET_FILE_ADDR 0x0012
  35. #define HIC_LOAD_SET_FILE 0x0013
  36. #define HIC_MSG_CONFIG 0x0014
  37. #define HIC_MSG_TEST 0x0015
  38. /* FIMC-IS to HOST */
  39. #define IHC_GET_SENSOR_NUM 0x1000
  40. #define IHC_SET_SHOT_MARK 0x1001
  41. /* parameter1: frame number */
  42. /* parameter2: confidence level (smile 0~100) */
  43. /* parameter3: confidence level (blink 0~100) */
  44. #define IHC_SET_FACE_MARK 0x1002
  45. /* parameter1: coordinate count */
  46. /* parameter2: coordinate buffer address */
  47. #define IHC_FRAME_DONE 0x1003
  48. /* parameter1: frame start number */
  49. /* parameter2: frame count */
  50. #define IHC_AA_DONE 0x1004
  51. #define IHC_NOT_READY 0x1005
  52. #define IH_REPLY_DONE 0x2000
  53. #define IH_REPLY_NOT_DONE 0x2001
  54. enum fimc_is_scenario {
  55. IS_SC_PREVIEW_STILL,
  56. IS_SC_PREVIEW_VIDEO,
  57. IS_SC_CAPTURE_STILL,
  58. IS_SC_CAPTURE_VIDEO,
  59. IS_SC_MAX
  60. };
  61. enum fimc_is_sub_scenario {
  62. IS_SC_SUB_DEFAULT,
  63. IS_SC_SUB_PS_VTCALL,
  64. IS_SC_SUB_CS_VTCALL,
  65. IS_SC_SUB_PV_VTCALL,
  66. IS_SC_SUB_CV_VTCALL,
  67. };
  68. struct is_common_regs {
  69. u32 hicmd;
  70. u32 hic_sensorid;
  71. u32 hic_param[4];
  72. u32 reserved1[4];
  73. u32 ihcmd;
  74. u32 ihc_sensorid;
  75. u32 ihc_param[4];
  76. u32 reserved2[4];
  77. u32 isp_sensor_id;
  78. u32 isp_param[2];
  79. u32 reserved3[1];
  80. u32 scc_sensor_id;
  81. u32 scc_param[2];
  82. u32 reserved4[1];
  83. u32 dnr_sensor_id;
  84. u32 dnr_param[2];
  85. u32 reserved5[1];
  86. u32 scp_sensor_id;
  87. u32 scp_param[2];
  88. u32 reserved6[29];
  89. } __packed;
  90. struct is_mcuctl_reg {
  91. u32 mcuctl;
  92. u32 bboar;
  93. u32 intgr0;
  94. u32 intcr0;
  95. u32 intmr0;
  96. u32 intsr0;
  97. u32 intmsr0;
  98. u32 intgr1;
  99. u32 intcr1;
  100. u32 intmr1;
  101. u32 intsr1;
  102. u32 intmsr1;
  103. u32 intcr2;
  104. u32 intmr2;
  105. u32 intsr2;
  106. u32 intmsr2;
  107. u32 gpoctrl;
  108. u32 cpoenctlr;
  109. u32 gpictlr;
  110. u32 reserved[0xd];
  111. struct is_common_regs common;
  112. } __packed;
  113. #endif /* FIMC_IS_CMD_H_ */