hi_mipi.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526
  1. /******************************************************************************
  2. Copyright (C), 2017, Hisilicon Tech. Co., Ltd.
  3. ******************************************************************************
  4. File Name : hi_mipi.h
  5. Version : Initial Draft
  6. Author : Hisilicon multimedia software group
  7. Created : 2017/12/14
  8. Last Modified :
  9. Description :
  10. Function List :
  11. ******************************************************************************/
  12. #ifndef __HI_MIPI__
  13. #define __HI_MIPI__
  14. #include "hi_type.h"
  15. typedef unsigned int MIPI_PHY;
  16. typedef unsigned int SLVS_PHY;
  17. typedef unsigned int COMBO_LINK;
  18. typedef unsigned int combo_dev_t;
  19. typedef unsigned int sns_rst_source_t;
  20. typedef unsigned int sns_clk_source_t;
  21. #define COMBO_MIN_WIDTH 32
  22. #define COMBO_MIN_HEIGHT 32
  23. #define COMBO_MAX_WIDTH 8192
  24. #define COMBO_MAX_HEIGHT 8192
  25. #define MIPI_DEV_NAME "hi_mipi"
  26. #define MIPI_PROC_NAME "hi_mipi"
  27. #define HIMEDIA_DYNAMIC_MINOR 255
  28. #define MIPI_IRQ_NUM 1 /* Hi3559AV100 has 1 MIPI interrupt */
  29. #define SLVS_IRQ_NUM 1 /* Hi3559AV100 has 1 SLVS interrupt */
  30. #define SLVS_REG_BASE_NUM 1 /* Hi3559AV100 has 1 SLVS reg base addr */
  31. #define MIPI_PHY_NUM 4 /* Hi3559AV100 4 MIPI HPY */
  32. #define MIPI_RX_MAX_DEV_NUM 8
  33. #define MIPI_MAX_NAME_LEN 10
  34. #define SLVS_MAX_NAME_LEN 10
  35. #define MAX_LANE_NUM_PER_LINK 2 /* one link has 2 lanes at most */
  36. #define MIPI_LANE_NUM (MAX_LANE_NUM_PER_LINK * 4) /* Hi3559AV100 mipi support max 4 links */
  37. #define WDR_VC_NUM 4
  38. #define SYNC_CODE_NUM 4
  39. #define LVDS_LANE_NUM COMBO_MAX_LANE_NUM /* Hi3559AV100 lvds suppor max 8 links, so has 16 lanes */
  40. #define SLVS_MAX_LINK_NUM 2 /* Hi3559A has 2 links per phy */
  41. #define SLVS_MAX_DEV_NUM 4
  42. #define SLVS_DEV_NUM_START 0
  43. #define SLVS_PHY_NUM 2 /* Hi3559AV100 suppor 2 SLVS HPY */
  44. #define SLVS_LANE_NUM 8
  45. #define COMS_MAX_DEV_NUM 3
  46. #define SNS_MAX_RST_SOURCE_NUM 4 /* Hi3559AV100 has 4 sensor reset source */
  47. #define SNS_MAX_CLK_SOURCE_NUM 4 /* Hi3559AV100 has 4 sensor clock source */
  48. #define COMBO_MAX_LINK_NUM 8 /* Hi3559AV100 has 8 links */
  49. #define COMBO_MAX_LANE_NUM 16
  50. #define COMBO_MAX_DEV_NUM (MIPI_RX_MAX_DEV_NUM + SLVS_MAX_DEV_NUM)
  51. #ifdef HI_MIPI_DEBUG
  52. #define HI_MSG(x...) \
  53. do { \
  54. osal_printk("%s->%d: ", __FUNCTION__, __LINE__); \
  55. osal_printk(x); \
  56. osal_printk("\n"); \
  57. } while (0)
  58. #else
  59. #define HI_MSG(args...) do { } while (0)
  60. #endif
  61. #define HI_ERR(x...) \
  62. do { \
  63. osal_printk("%s(%d): ", __FUNCTION__, __LINE__); \
  64. osal_printk(x); \
  65. osal_printk("\n"); \
  66. } while (0)
  67. #define MIPIRX_CHECK_NULL_PTR(ptr)\
  68. do{\
  69. if(NULL == ptr)\
  70. {\
  71. HI_ERR("NULL point \r\n");\
  72. return HI_FAILURE;\
  73. }\
  74. } while(0)
  75. typedef enum
  76. {
  77. MIPI_VC0_NO_MATCH = 0x1 << 0, /* VC0,frame's start and frame's end do not match */
  78. MIPI_VC1_NO_MATCH = 0x1 << 1, /* VC1,frame's start and frame's end do not match */
  79. MIPI_VC2_NO_MATCH = 0x1 << 2, /* VC2,frame's start and frame's end do not match */
  80. MIPI_VC3_NO_MATCH = 0x1 << 3, /* VC3,frame's start and frame's end do not match */
  81. MIPI_VC0_ORDER_ERR = 0x1 << 8, /* VC0'S frame order error*/
  82. MIPI_VC1_ORDER_ERR = 0x1 << 9, /* VC1'S frame order error*/
  83. MIPI_VC2_ORDER_ERR = 0x1 << 10, /* VC2'S frame order error*/
  84. MIPI_VC3_ORDER_ERR = 0x1 << 11, /* VC3'S frame order error*/
  85. MIPI_VC0_FRAME_CRC = 0x1 << 16, /* in the last frame,VC0'S data has a CRC ERROR at least */
  86. MIPI_VC1_FRAME_CRC = 0x1 << 17, /* in the last frame,VC1'S data has a CRC ERROR at least */
  87. MIPI_VC2_FRAME_CRC = 0x1 << 18, /* in the last frame,VC2'S data has a CRC ERROR at least */
  88. MIPI_VC3_FRAME_CRC = 0x1 << 19, /* in the last frame,VC3'S data has a CRC ERROR at least */
  89. } MIPI_FRAME_INT_ERR;
  90. typedef enum
  91. {
  92. MIPI_VC0_PKT_DATA_CRC = 0x1 << 0, /* VC0'S data CRC error */
  93. MIPI_VC1_PKT_DATA_CRC = 0x1 << 1,
  94. MIPI_VC2_PKT_DATA_CRC = 0x1 << 2,
  95. MIPI_VC3_PKT_DATA_CRC = 0x1 << 3,
  96. MIPI_PKT_HEADER_ERR = 0x1 << 16, /* Header has two error at least ,and ECC error correction is invalid */
  97. } MIPI_PKT_INT1_ERR;
  98. typedef enum
  99. {
  100. MIPI_VC0_PKT_INVALID_DT = 0x1 << 0, /* do not support VC0'S data type */
  101. MIPI_VC1_PKT_INVALID_DT = 0x1 << 1, /* do not support VC1'S data type */
  102. MIPI_VC2_PKT_INVALID_DT = 0x1 << 2, /* do not support VC2'S data type */
  103. MIPI_VC3_PKT_INVALID_DT = 0x1 << 3, /* do not support VC3'S data type */
  104. MIPI_VC0_PKT_HEADER_ECC = 0x1 << 16, /* VC0'S header has errors,and ECC error correction is ok */
  105. MIPI_VC1_PKT_HEADER_ECC = 0x1 << 17,
  106. MIPI_VC2_PKT_HEADER_ECC = 0x1 << 18,
  107. MIPI_VC3_PKT_HEADER_ECC = 0x1 << 19,
  108. } MIPI_PKT_INT2_ERR;
  109. typedef enum
  110. {
  111. MIPI_ESC_D0 = 0x1 << 0, /* data lane 0 escape interrupt state */
  112. MIPI_ESC_D1 = 0x1 << 1, /* data lane 1 escape interrupt state */
  113. MIPI_ESC_D2 = 0x1 << 2, /* data lane 2 escape interrupt state */
  114. MIPI_ESC_D3 = 0x1 << 3, /* data lane 3 escape interrupt state */
  115. MIPI_ESC_CLK = 0x1 << 4, /* clock lane escape interrupt state */
  116. MIPI_TIMEOUT_D0 = 0x1 << 8, /* data lane 0 FSM timeout interrupt state */
  117. MIPI_TIMEOUT_D1 = 0x1 << 9, /* data lane 1 FSM timeout interrupt state */
  118. MIPI_TIMEOUT_D2 = 0x1 << 10, /* data lane 2 FSM timeout interrupt state */
  119. MIPI_TIMEOUT_D3 = 0x1 << 11, /* data lane 3 FSM timeout interrupt state */
  120. MIPI_TIMEOUT_CLK = 0x1 << 8, /* clock lane FSM timeout interrupt state */
  121. } LINK_INT_STAT;
  122. typedef enum
  123. {
  124. CMD_FIFO_WRITE_ERR = 0x1 << 0, /* MIPI_CTRL write command FIFO error */
  125. DATA_FIFO_WRITE_ERR = 0x1 << 1,
  126. CMD_FIFO_READ_ERR = 0x1 << 16,
  127. DATA_FIFO_READ_ERR = 0x1 << 17,
  128. } MIPI_CTRL_INT_ERR;
  129. typedef enum
  130. {
  131. LANE0_SYNC_ERR = 0x1 << 0,
  132. LANE1_SYNC_ERR = 0x1 << 1,
  133. LANE2_SYNC_ERR = 0x1 << 2,
  134. LANE3_SYNC_ERR = 0x1 << 3,
  135. LANE4_SYNC_ERR = 0x1 << 4,
  136. LANE5_SYNC_ERR = 0x1 << 5,
  137. LANE6_SYNC_ERR = 0x1 << 6,
  138. LANE7_SYNC_ERR = 0x1 << 7,
  139. LANE8_SYNC_ERR = 0x1 << 8,
  140. LANE9_SYNC_ERR = 0x1 << 9,
  141. LANE10_SYNC_ERR = 0x1 << 10,
  142. LANE11_SYNC_ERR = 0x1 << 11,
  143. LANE12_SYNC_ERR = 0x1 << 12,
  144. LANE13_SYNC_ERR = 0x1 << 13,
  145. LANE14_SYNC_ERR = 0x1 << 14,
  146. LANE15_SYNC_ERR = 0x1 << 15,
  147. LINK0_WRITE_ERR = 0x1 << 16,
  148. LINK1_WRITE_ERR = 0x1 << 17,
  149. LINK2_WRITE_ERR = 0x1 << 18,
  150. LINK3_WRITE_ERR = 0x1 << 19,
  151. LINK0_READ_ERR = 0x1 << 20,
  152. LINK1_READ_ERR = 0x1 << 21,
  153. LINK2_READ_ERR = 0x1 << 22,
  154. LINK3_READ_ERR = 0x1 << 23,
  155. LVDS_STAT_ERR = 0x1 << 24,
  156. } LVDS_CTRL_INTR_ERR;
  157. typedef enum
  158. {
  159. ALIGN_FIFO_FULL_ERR = 0x1 << 0, /* MIPI ALIGN FIFO full */
  160. ALIGN_LANE0_ERR = 0x1 << 1, /* MIPI ALIGN lane0 err */
  161. ALIGN_LANE1_ERR = 0x1 << 2,
  162. ALIGN_LANE2_ERR = 0x1 << 3,
  163. ALIGN_LANE3_ERR = 0x1 << 4,
  164. ALIGN_LANE4_ERR = 0x1 << 5,
  165. ALIGN_LANE5_ERR = 0x1 << 6,
  166. ALIGN_LANE6_ERR = 0x1 << 7,
  167. ALIGN_LANE7_ERR = 0x1 << 8,
  168. ALIGN_LANE8_ERR = 0x1 << 9,
  169. ALIGN_LANE9_ERR = 0x1 << 10,
  170. ALIGN_LANE10_ERR = 0x1 << 11,
  171. ALIGN_LANE11_ERR = 0x1 << 12,
  172. } ALIGN_CTRL_INT_ERR;
  173. typedef enum
  174. {
  175. SLVS_HD_CRC_ERR = 0x1 << 0, /* header crc err */
  176. SLVS_PLD_CRC_ERR = 0x1 << 1, /* payload crc err */
  177. SLVS_ECC_ERR = 0x1 << 2, /* ECC err */
  178. SLVS_DATA_FIFO_W_ERR = 0x1 << 3, /* data fifo write err */
  179. SLVS_DATA_FIFO_R_ERR = 0x1 << 4, /* data fifo read err */
  180. SLVS_CMD_FIFO_FULL = 0x1 << 5, /* command fifo full */
  181. SLVS_SKEW_ERR = 0x1 << 6, /* skew err */
  182. SLVS_VSYNC_RAW = 0x1 << 7, /* VSYNC cnt */
  183. } SLVS_LINK_INT_STAT;
  184. /* hs mode */
  185. typedef enum
  186. {
  187. LANE_DIVIDE_MODE_0 = 0x0,
  188. LANE_DIVIDE_MODE_1 = 0x1,
  189. LANE_DIVIDE_MODE_2 = 0x2,
  190. LANE_DIVIDE_MODE_3 = 0x3,
  191. LANE_DIVIDE_MODE_4 = 0x4,
  192. LANE_DIVIDE_MODE_5 = 0x5,
  193. LANE_DIVIDE_MODE_6 = 0x6,
  194. LANE_DIVIDE_MODE_7 = 0x7,
  195. LANE_DIVIDE_MODE_8 = 0x8,
  196. LANE_DIVIDE_MODE_9 = 0x9,
  197. LANE_DIVIDE_MODE_A = 0xA,
  198. LANE_DIVIDE_MODE_B = 0xB,
  199. LANE_DIVIDE_MODE_BUTT
  200. } lane_divide_mode_t;
  201. typedef enum
  202. {
  203. WORK_MODE_LVDS = 0x0,
  204. WORK_MODE_MIPI = 0x1,
  205. WORK_MODE_CMOS = 0x2,
  206. WORK_MODE_BT1120 = 0x3,
  207. WORK_MODE_SLVS = 0x4,
  208. WORK_MODE_BUTT
  209. } work_mode_t;
  210. typedef enum
  211. {
  212. INPUT_MODE_MIPI = 0x0, /* mipi */
  213. INPUT_MODE_SUBLVDS = 0x1, /* SUB_LVDS */
  214. INPUT_MODE_LVDS = 0x2, /* LVDS */
  215. INPUT_MODE_HISPI = 0x3, /* HISPI */
  216. INPUT_MODE_SLVS = 0x4, /* SLVS */
  217. INPUT_MODE_CMOS = 0x5, /* CMOS */
  218. INPUT_MODE_BT601 = 0x6, /* BT601 */
  219. INPUT_MODE_BT656 = 0x7, /* BT656 */
  220. INPUT_MODE_BT1120 = 0x8, /* BT1120 */
  221. INPUT_MODE_BYPASS = 0x9, /* MIPI Bypass */
  222. INPUT_MODE_BUTT
  223. } input_mode_t;
  224. typedef enum
  225. {
  226. MIPI_DATA_RATE_X1 = 0, /* output 1 pixel per clock */
  227. MIPI_DATA_RATE_X2 = 1, /* output 2 pixel per clock */
  228. MIPI_DATA_RATE_BUTT
  229. } mipi_data_rate_t;
  230. typedef struct
  231. {
  232. int x;
  233. int y;
  234. unsigned int width;
  235. unsigned int height;
  236. } img_rect_t;
  237. typedef struct
  238. {
  239. unsigned int width;
  240. unsigned int height;
  241. } img_size_t;
  242. typedef enum
  243. {
  244. DATA_TYPE_RAW_8BIT = 0,
  245. DATA_TYPE_RAW_10BIT,
  246. DATA_TYPE_RAW_12BIT,
  247. DATA_TYPE_RAW_14BIT,
  248. DATA_TYPE_RAW_16BIT,
  249. DATA_TYPE_YUV420_8BIT_NORMAL,
  250. DATA_TYPE_YUV420_8BIT_LEGACY,
  251. DATA_TYPE_YUV422_8BIT,
  252. DATA_TYPE_BUTT
  253. } data_type_t;
  254. /* MIPI D_PHY WDR MODE defines */
  255. typedef enum
  256. {
  257. HI_MIPI_WDR_MODE_NONE = 0x0,
  258. HI_MIPI_WDR_MODE_VC = 0x1, /* Virtual Channel */
  259. HI_MIPI_WDR_MODE_DT = 0x2, /* Data Type */
  260. HI_MIPI_WDR_MODE_DOL = 0x3, /* DOL Mode */
  261. HI_MIPI_WDR_MODE_BUTT
  262. } mipi_wdr_mode_t;
  263. typedef enum
  264. {
  265. SLVS_LANE_RATE_LOW = 0, /* 1152Mbps */
  266. SLVS_LANE_RATE_HIGH = 1, /* 2304Mbps */
  267. SLVS_LANE_RATE_BUTT
  268. } slvs_lane_rate_t;
  269. typedef struct
  270. {
  271. data_type_t input_data_type; /* data type: 8/10/12/14/16 bit */
  272. mipi_wdr_mode_t wdr_mode; /* MIPI WDR mode */
  273. short lane_id[MIPI_LANE_NUM]; /* lane_id: -1 - disable */
  274. union
  275. {
  276. short data_type[WDR_VC_NUM]; /* used by the HI_MIPI_WDR_MODE_DT */
  277. };
  278. } mipi_dev_attr_t;
  279. /* LVDS WDR MODE defines */
  280. typedef enum
  281. {
  282. HI_WDR_MODE_NONE = 0x0,
  283. HI_WDR_MODE_2F = 0x1,
  284. HI_WDR_MODE_3F = 0x2,
  285. HI_WDR_MODE_4F = 0x3,
  286. HI_WDR_MODE_DOL_2F = 0x4,
  287. HI_WDR_MODE_DOL_3F = 0x5,
  288. HI_WDR_MODE_DOL_4F = 0x6,
  289. HI_WDR_MODE_BUTT
  290. } wdr_mode_t;
  291. typedef enum
  292. {
  293. LVDS_SYNC_MODE_SOF = 0, /* sensor SOL, EOL, SOF, EOF */
  294. LVDS_SYNC_MODE_SAV, /* SAV, EAV */
  295. LVDS_SYNC_MODE_BUTT
  296. } lvds_sync_mode_t;
  297. typedef enum
  298. {
  299. LVDS_VSYNC_NORMAL = 0x00,
  300. LVDS_VSYNC_SHARE = 0x01,
  301. LVDS_VSYNC_HCONNECT = 0x02,
  302. LVDS_VSYNC_BUTT
  303. } lvds_vsync_type_t;
  304. typedef struct
  305. {
  306. lvds_vsync_type_t sync_type;
  307. //hconnect vsync blanking len, valid when the sync_type is LVDS_VSYNC_HCONNECT
  308. unsigned short hblank1;
  309. unsigned short hblank2;
  310. } lvds_vsync_attr_t;
  311. typedef enum
  312. {
  313. LVDS_FID_NONE = 0x00,
  314. LVDS_FID_IN_SAV = 0x01, /* frame identification id in SAV 4th */
  315. LVDS_FID_IN_DATA = 0x02, /* frame identification id in first data */
  316. LVDS_FID_BUTT
  317. } lvds_fid_type_t;
  318. typedef struct
  319. {
  320. lvds_fid_type_t fid_type;
  321. /* Sony DOL has the Frame Information Line, in DOL H-Connection mode,
  322. should configure this flag as false to disable output the Frame Information Line */
  323. HI_BOOL output_fil;
  324. } lvds_fid_attr_t;
  325. typedef enum
  326. {
  327. LVDS_ENDIAN_LITTLE = 0x0,
  328. LVDS_ENDIAN_BIG = 0x1,
  329. LVDS_ENDIAN_BUTT
  330. } lvds_bit_endian_t;
  331. typedef struct
  332. {
  333. data_type_t input_data_type; /* data type: 8/10/12/14 bit */
  334. wdr_mode_t wdr_mode; /* WDR mode */
  335. lvds_sync_mode_t sync_mode; /* sync mode: SOF, SAV */
  336. lvds_vsync_attr_t vsync_attr; /* normal, share, hconnect */
  337. lvds_fid_attr_t fid_attr; /* frame identification code */
  338. lvds_bit_endian_t data_endian; /* data endian: little/big */
  339. lvds_bit_endian_t sync_code_endian; /* sync code endian: little/big */
  340. short lane_id[LVDS_LANE_NUM]; /* lane_id: -1 - disable */
  341. /* each vc has 4 params, sync_code[i]:
  342. sync_mode is SYNC_MODE_SOF: SOF, EOF, SOL, EOL
  343. sync_mode is SYNC_MODE_SAV: invalid sav, invalid eav, valid sav, valid eav */
  344. unsigned short sync_code[LVDS_LANE_NUM][WDR_VC_NUM][SYNC_CODE_NUM];
  345. } lvds_dev_attr_t;
  346. typedef struct
  347. {
  348. data_type_t input_data_type; /* data type: 8/10/12/14/16 bit */
  349. wdr_mode_t wdr_mode; /* WDR mode */
  350. slvs_lane_rate_t lane_rate;
  351. int sensor_valid_width;
  352. short lane_id[SLVS_LANE_NUM]; /* lane_id: -1 - disable */
  353. } slvs_dev_attr_t;
  354. typedef struct
  355. {
  356. combo_dev_t devno; /* device number */
  357. input_mode_t input_mode; /* input mode: MIPI/LVDS/SUBLVDS/HISPI/DC */
  358. mipi_data_rate_t data_rate;
  359. img_rect_t img_rect; /* MIPI Rx device crop area (corresponding to the oringnal sensor input image size) */
  360. union
  361. {
  362. mipi_dev_attr_t mipi_attr;
  363. lvds_dev_attr_t lvds_attr;
  364. slvs_dev_attr_t slvs_attr;
  365. };
  366. } combo_dev_attr_t;
  367. typedef struct hi_MIPI_RX_DEV_CTX_S
  368. {
  369. char mipi_name[MIPI_MAX_NAME_LEN];
  370. char slvs_name[SLVS_MAX_NAME_LEN];
  371. combo_dev_attr_t dev_attr;
  372. HI_BOOL is_configed;
  373. } MIPI_RX_DEV_CTX_S;
  374. typedef struct hi_MIPI_COMS_DEV_CTX_S
  375. {
  376. combo_dev_attr_t dev_attr;
  377. HI_BOOL is_configed;
  378. } MIPI_COMS_DEV_CTX_S;
  379. /* phy common mode voltage mode, greater than 900mv or less than 900mv */
  380. typedef enum
  381. {
  382. PHY_CMV_GE1200MV = 0x00,
  383. PHY_CMV_LT1200MV = 0x01,
  384. PHY_CMV_BUTT
  385. } phy_cmv_mode_t;
  386. typedef struct
  387. {
  388. combo_dev_t devno;
  389. phy_cmv_mode_t cmv_mode;
  390. } phy_cmv_t;
  391. #define HI_MIPI_IOC_MAGIC 'm'
  392. /* init data lane, input mode, data type */
  393. #define HI_MIPI_SET_DEV_ATTR _IOW(HI_MIPI_IOC_MAGIC, 0x01, combo_dev_attr_t)
  394. /* set phy common mode voltage mode */
  395. #define HI_MIPI_SET_PHY_CMVMODE _IOW(HI_MIPI_IOC_MAGIC, 0x04, phy_cmv_t)
  396. /* reset sensor */
  397. #define HI_MIPI_RESET_SENSOR _IOW(HI_MIPI_IOC_MAGIC, 0x05, sns_rst_source_t)
  398. /* unreset sensor */
  399. #define HI_MIPI_UNRESET_SENSOR _IOW(HI_MIPI_IOC_MAGIC, 0x06, sns_rst_source_t)
  400. /* reset mipi */
  401. #define HI_MIPI_RESET_MIPI _IOW(HI_MIPI_IOC_MAGIC, 0x07, combo_dev_t)
  402. /* unreset mipi */
  403. #define HI_MIPI_UNRESET_MIPI _IOW(HI_MIPI_IOC_MAGIC, 0x08, combo_dev_t)
  404. /* reset slvs */
  405. #define HI_MIPI_RESET_SLVS _IOW(HI_MIPI_IOC_MAGIC, 0x09, combo_dev_t)
  406. /* unreset slvs */
  407. #define HI_MIPI_UNRESET_SLVS _IOW(HI_MIPI_IOC_MAGIC, 0x0a, combo_dev_t)
  408. /* set mipi hs_mode*/
  409. #define HI_MIPI_SET_HS_MODE _IOW(HI_MIPI_IOC_MAGIC, 0x0b, lane_divide_mode_t)
  410. /* enable mipi clock*/
  411. #define HI_MIPI_ENABLE_MIPI_CLOCK _IOW(HI_MIPI_IOC_MAGIC, 0x0c, combo_dev_t)
  412. /* disable mipi clock*/
  413. #define HI_MIPI_DISABLE_MIPI_CLOCK _IOW(HI_MIPI_IOC_MAGIC, 0x0d, combo_dev_t)
  414. /* enable slvs clock*/
  415. #define HI_MIPI_ENABLE_SLVS_CLOCK _IOW(HI_MIPI_IOC_MAGIC, 0x0e, combo_dev_t)
  416. /* disable slvs clock*/
  417. #define HI_MIPI_DISABLE_SLVS_CLOCK _IOW(HI_MIPI_IOC_MAGIC, 0x0f, combo_dev_t)
  418. /* enable sensor clock */
  419. #define HI_MIPI_ENABLE_SENSOR_CLOCK _IOW(HI_MIPI_IOC_MAGIC, 0x10, sns_clk_source_t)
  420. /* disable sensor clock */
  421. #define HI_MIPI_DISABLE_SENSOR_CLOCK _IOW(HI_MIPI_IOC_MAGIC, 0x11, sns_clk_source_t)
  422. #define HI_MIPI_CLEAR _IOW(HI_MIPI_IOC_MAGIC, 0x12, combo_dev_t)
  423. #endif