bm_csi_ioctl.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. /*
  2. * Copyright (C) 2021 Alibaba Group Holding Limited
  3. * Author: liuyitong <yitong.lyt@alibaba-inc.com>
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License version 2 as
  7. * published by the Free Software Foundation.
  8. */
  9. #ifndef _BM_CSI_IOCTL_H_
  10. #define _BM_CSI_IOCTL_H_
  11. #include <linux/ioctl.h>
  12. enum {
  13. BMCSI_IOC_S_RESET = 0x100,
  14. BMCSI_IOC_S_POWER,
  15. BMCSI_IOC_G_POWER,
  16. BMCSI_IOC_S_CLOCK,
  17. BMCSI_IOC_G_CLOCK,
  18. BMCSI_IOC_S_STREAM,
  19. BMCSI_IOC_G_STREAM,
  20. BMCSI_IOC_S_FMT,
  21. BMCSI_IOC_G_FMT,
  22. BMCSI_IOC_S_VC_SELECT,
  23. BMCSI_IOC_G_VC_SELECT,
  24. BMCSI_IOC_IPI_START,
  25. BMCSI_IOC_IPI_STOP,
  26. BMCSI_IOC_S_LANE_CFG,
  27. BMCSI_IOC_S_HSA_CFG,
  28. BMCSI_IOC_S_HBP_CFG,
  29. BMCSI_IOC_S_HSD_CFG,
  30. BMCSI_IOC_WRITE_REG,
  31. BMCSI_IOC_READ_REG,
  32. BMCSI_IOC_READ_ARRAY,
  33. BMCSI_IOC_SET_PIXCLK,
  34. BMCSI_IOC_GET_PIXCLK,
  35. BMCSI_IOC_GET_ERROR,
  36. BMCSI_IOC_MAX,
  37. };
  38. struct bm_csi_reg_t {
  39. unsigned int offset;
  40. unsigned int value;
  41. };
  42. struct bm_csi_reg_arry_t {
  43. unsigned int start_addr;
  44. unsigned int words;
  45. unsigned int *buf;
  46. };
  47. struct csi_vc_select_context {
  48. unsigned int ipi_idx;
  49. unsigned int vc_ch;
  50. };
  51. struct dw_csi_err_mask {
  52. unsigned int src;
  53. unsigned int ipi1_phy_fatal_mask;
  54. unsigned int ipi2_phy_fatal_mask;
  55. unsigned int ipi3_phy_fatal_mask;
  56. unsigned int pkt_fatal;
  57. unsigned int frame_fatal;
  58. unsigned int phy;
  59. unsigned int line;
  60. unsigned int ipi;
  61. unsigned int ipi2;
  62. unsigned int ipi3;
  63. unsigned int bndry_frame_fatal;
  64. unsigned int seq_frame_fatal;
  65. unsigned int crc_frame_fatal;
  66. unsigned int pld_crc_fatal;
  67. unsigned int data_id;
  68. unsigned int ecc_corrected;
  69. };
  70. #endif /* _BM_CSI_IOCTL_H_*/