exynos_mipi_dsi_lowlevel.h 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. /* linux/drivers/video/exynos/exynos_mipi_dsi_lowlevel.h
  2. *
  3. * Header file for Samsung SoC MIPI-DSI lowlevel driver.
  4. *
  5. * Copyright (c) 2012 Samsung Electronics Co., Ltd
  6. *
  7. * InKi Dae <inki.dae@samsung.com>
  8. * Donghwa Lee <dh09.lee@samsung.com>
  9. *
  10. * This program is free software; you can redistribute it and/or modify
  11. * it under the terms of the GNU General Public License version 2 as
  12. * published by the Free Software Foundation.
  13. */
  14. #ifndef _EXYNOS_MIPI_DSI_LOWLEVEL_H
  15. #define _EXYNOS_MIPI_DSI_LOWLEVEL_H
  16. void exynos_mipi_dsi_func_reset(struct mipi_dsim_device *dsim);
  17. void exynos_mipi_dsi_sw_reset(struct mipi_dsim_device *dsim);
  18. void exynos_mipi_dsi_sw_reset_release(struct mipi_dsim_device *dsim);
  19. int exynos_mipi_dsi_get_sw_reset_release(struct mipi_dsim_device *dsim);
  20. void exynos_mipi_dsi_set_interrupt_mask(struct mipi_dsim_device *dsim,
  21. unsigned int mode, unsigned int mask);
  22. void exynos_mipi_dsi_set_data_lane_number(struct mipi_dsim_device *dsim,
  23. unsigned int count);
  24. void exynos_mipi_dsi_init_fifo_pointer(struct mipi_dsim_device *dsim,
  25. unsigned int cfg);
  26. void exynos_mipi_dsi_set_phy_tunning(struct mipi_dsim_device *dsim,
  27. unsigned int value);
  28. void exynos_mipi_dsi_set_phy_tunning(struct mipi_dsim_device *dsim,
  29. unsigned int value);
  30. void exynos_mipi_dsi_set_main_stand_by(struct mipi_dsim_device *dsim,
  31. unsigned int enable);
  32. void exynos_mipi_dsi_set_main_disp_resol(struct mipi_dsim_device *dsim,
  33. unsigned int width_resol, unsigned int height_resol);
  34. void exynos_mipi_dsi_set_main_disp_vporch(struct mipi_dsim_device *dsim,
  35. unsigned int cmd_allow, unsigned int vfront, unsigned int vback);
  36. void exynos_mipi_dsi_set_main_disp_hporch(struct mipi_dsim_device *dsim,
  37. unsigned int front, unsigned int back);
  38. void exynos_mipi_dsi_set_main_disp_sync_area(struct mipi_dsim_device *dsim,
  39. unsigned int vert, unsigned int hori);
  40. void exynos_mipi_dsi_set_sub_disp_resol(struct mipi_dsim_device *dsim,
  41. unsigned int vert, unsigned int hori);
  42. void exynos_mipi_dsi_init_config(struct mipi_dsim_device *dsim);
  43. void exynos_mipi_dsi_display_config(struct mipi_dsim_device *dsim,
  44. struct mipi_dsim_config *dsim_config);
  45. void exynos_mipi_dsi_set_data_lane_number(struct mipi_dsim_device *dsim,
  46. unsigned int count);
  47. void exynos_mipi_dsi_enable_lane(struct mipi_dsim_device *dsim, unsigned int lane,
  48. unsigned int enable);
  49. void exynos_mipi_dsi_enable_afc(struct mipi_dsim_device *dsim, unsigned int enable,
  50. unsigned int afc_code);
  51. void exynos_mipi_dsi_enable_pll_bypass(struct mipi_dsim_device *dsim,
  52. unsigned int enable);
  53. void exynos_mipi_dsi_set_pll_pms(struct mipi_dsim_device *dsim, unsigned int p,
  54. unsigned int m, unsigned int s);
  55. void exynos_mipi_dsi_pll_freq_band(struct mipi_dsim_device *dsim,
  56. unsigned int freq_band);
  57. void exynos_mipi_dsi_pll_freq(struct mipi_dsim_device *dsim,
  58. unsigned int pre_divider, unsigned int main_divider,
  59. unsigned int scaler);
  60. void exynos_mipi_dsi_pll_stable_time(struct mipi_dsim_device *dsim,
  61. unsigned int lock_time);
  62. void exynos_mipi_dsi_enable_pll(struct mipi_dsim_device *dsim,
  63. unsigned int enable);
  64. void exynos_mipi_dsi_set_byte_clock_src(struct mipi_dsim_device *dsim,
  65. unsigned int src);
  66. void exynos_mipi_dsi_enable_byte_clock(struct mipi_dsim_device *dsim,
  67. unsigned int enable);
  68. void exynos_mipi_dsi_set_esc_clk_prs(struct mipi_dsim_device *dsim,
  69. unsigned int enable, unsigned int prs_val);
  70. void exynos_mipi_dsi_enable_esc_clk_on_lane(struct mipi_dsim_device *dsim,
  71. unsigned int lane_sel, unsigned int enable);
  72. void exynos_mipi_dsi_force_dphy_stop_state(struct mipi_dsim_device *dsim,
  73. unsigned int enable);
  74. unsigned int exynos_mipi_dsi_is_lane_state(struct mipi_dsim_device *dsim);
  75. void exynos_mipi_dsi_set_stop_state_counter(struct mipi_dsim_device *dsim,
  76. unsigned int cnt_val);
  77. void exynos_mipi_dsi_set_bta_timeout(struct mipi_dsim_device *dsim,
  78. unsigned int timeout);
  79. void exynos_mipi_dsi_set_lpdr_timeout(struct mipi_dsim_device *dsim,
  80. unsigned int timeout);
  81. void exynos_mipi_dsi_set_lcdc_transfer_mode(struct mipi_dsim_device *dsim,
  82. unsigned int lp);
  83. void exynos_mipi_dsi_set_cpu_transfer_mode(struct mipi_dsim_device *dsim,
  84. unsigned int lp);
  85. void exynos_mipi_dsi_enable_hs_clock(struct mipi_dsim_device *dsim,
  86. unsigned int enable);
  87. void exynos_mipi_dsi_dp_dn_swap(struct mipi_dsim_device *dsim,
  88. unsigned int swap_en);
  89. void exynos_mipi_dsi_hs_zero_ctrl(struct mipi_dsim_device *dsim,
  90. unsigned int hs_zero);
  91. void exynos_mipi_dsi_prep_ctrl(struct mipi_dsim_device *dsim, unsigned int prep);
  92. unsigned int exynos_mipi_dsi_read_interrupt(struct mipi_dsim_device *dsim);
  93. unsigned int exynos_mipi_dsi_read_interrupt_mask(struct mipi_dsim_device *dsim);
  94. void exynos_mipi_dsi_clear_interrupt(struct mipi_dsim_device *dsim,
  95. unsigned int src);
  96. void exynos_mipi_dsi_set_interrupt(struct mipi_dsim_device *dsim,
  97. unsigned int src, unsigned int enable);
  98. unsigned int exynos_mipi_dsi_is_pll_stable(struct mipi_dsim_device *dsim);
  99. unsigned int exynos_mipi_dsi_get_fifo_state(struct mipi_dsim_device *dsim);
  100. unsigned int _exynos_mipi_dsi_get_frame_done_status(struct mipi_dsim_device *dsim);
  101. void _exynos_mipi_dsi_clear_frame_done(struct mipi_dsim_device *dsim);
  102. void exynos_mipi_dsi_wr_tx_header(struct mipi_dsim_device *dsim, unsigned int di,
  103. unsigned int data0, unsigned int data1);
  104. void exynos_mipi_dsi_wr_tx_data(struct mipi_dsim_device *dsim,
  105. unsigned int tx_data);
  106. void exynos_mipi_dsi_rd_tx_header(struct mipi_dsim_device *dsim,
  107. unsigned int data0, unsigned int data1);
  108. unsigned int exynos_mipi_dsi_rd_rx_fifo(struct mipi_dsim_device *dsim);
  109. #endif /* _EXYNOS_MIPI_DSI_LOWLEVEL_H */