exynos_mipi_dsi_lowlevel.h 4.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Copyright (C) 2012 Samsung Electronics
  4. *
  5. * Author: InKi Dae <inki.dae@samsung.com>
  6. * Author: Donghwa Lee <dh09.lee@samsung.com>
  7. */
  8. #ifndef _EXYNOS_MIPI_DSI_LOWLEVEL_H
  9. #define _EXYNOS_MIPI_DSI_LOWLEVEL_H
  10. void exynos_mipi_dsi_register(struct mipi_dsim_device *dsim);
  11. void exynos_mipi_dsi_func_reset(struct mipi_dsim_device *dsim);
  12. void exynos_mipi_dsi_sw_reset(struct mipi_dsim_device *dsim);
  13. void exynos_mipi_dsi_sw_release(struct mipi_dsim_device *dsim);
  14. void exynos_mipi_dsi_set_interrupt_mask(struct mipi_dsim_device *dsim,
  15. unsigned int mode, unsigned int mask);
  16. void exynos_mipi_dsi_set_data_lane_number(struct mipi_dsim_device *dsim,
  17. unsigned int count);
  18. void exynos_mipi_dsi_init_fifo_pointer(struct mipi_dsim_device *dsim,
  19. unsigned int cfg);
  20. void exynos_mipi_dsi_set_phy_tunning(struct mipi_dsim_device *dsim,
  21. unsigned int value);
  22. void exynos_mipi_dsi_set_phy_tunning(struct mipi_dsim_device *dsim,
  23. unsigned int value);
  24. void exynos_mipi_dsi_set_main_disp_resol(struct mipi_dsim_device *dsim,
  25. unsigned int width_resol, unsigned int height_resol);
  26. void exynos_mipi_dsi_set_main_disp_vporch(struct mipi_dsim_device *dsim,
  27. unsigned int cmd_allow, unsigned int vfront, unsigned int vback);
  28. void exynos_mipi_dsi_set_main_disp_hporch(struct mipi_dsim_device *dsim,
  29. unsigned int front, unsigned int back);
  30. void exynos_mipi_dsi_set_main_disp_sync_area(struct mipi_dsim_device *dsim,
  31. unsigned int vert, unsigned int hori);
  32. void exynos_mipi_dsi_set_sub_disp_resol(struct mipi_dsim_device *dsim,
  33. unsigned int vert, unsigned int hori);
  34. void exynos_mipi_dsi_init_config(struct mipi_dsim_device *dsim);
  35. void exynos_mipi_dsi_display_config(struct mipi_dsim_device *dsim,
  36. struct mipi_dsim_config *dsim_config);
  37. void exynos_mipi_dsi_set_data_lane_number(struct mipi_dsim_device *dsim,
  38. unsigned int count);
  39. void exynos_mipi_dsi_enable_lane(struct mipi_dsim_device *dsim,
  40. unsigned int lane, unsigned int enable);
  41. void exynos_mipi_dsi_enable_afc(struct mipi_dsim_device *dsim,
  42. unsigned int enable, unsigned int afc_code);
  43. void exynos_mipi_dsi_enable_pll_bypass(struct mipi_dsim_device *dsim,
  44. unsigned int enable);
  45. void exynos_mipi_dsi_pll_freq_band(struct mipi_dsim_device *dsim,
  46. unsigned int freq_band);
  47. void exynos_mipi_dsi_pll_freq(struct mipi_dsim_device *dsim,
  48. unsigned int pre_divider, unsigned int main_divider,
  49. unsigned int scaler);
  50. void exynos_mipi_dsi_pll_stable_time(struct mipi_dsim_device *dsim,
  51. unsigned int lock_time);
  52. void exynos_mipi_dsi_enable_pll(struct mipi_dsim_device *dsim,
  53. unsigned int enable);
  54. void exynos_mipi_dsi_set_byte_clock_src(struct mipi_dsim_device *dsim,
  55. unsigned int src);
  56. void exynos_mipi_dsi_enable_byte_clock(struct mipi_dsim_device *dsim,
  57. unsigned int enable);
  58. void exynos_mipi_dsi_set_esc_clk_prs(struct mipi_dsim_device *dsim,
  59. unsigned int enable, unsigned int prs_val);
  60. void exynos_mipi_dsi_enable_esc_clk_on_lane(struct mipi_dsim_device *dsim,
  61. unsigned int lane_sel, unsigned int enable);
  62. void exynos_mipi_dsi_force_dphy_stop_state(struct mipi_dsim_device *dsim,
  63. unsigned int enable);
  64. unsigned int exynos_mipi_dsi_is_lane_state(struct mipi_dsim_device *dsim);
  65. void exynos_mipi_dsi_set_stop_state_counter(struct mipi_dsim_device *dsim,
  66. unsigned int cnt_val);
  67. void exynos_mipi_dsi_set_bta_timeout(struct mipi_dsim_device *dsim,
  68. unsigned int timeout);
  69. void exynos_mipi_dsi_set_lpdr_timeout(struct mipi_dsim_device *dsim,
  70. unsigned int timeout);
  71. void exynos_mipi_dsi_set_lcdc_transfer_mode(struct mipi_dsim_device *dsim,
  72. unsigned int lp);
  73. void exynos_mipi_dsi_set_cpu_transfer_mode(struct mipi_dsim_device *dsim,
  74. unsigned int lp);
  75. void exynos_mipi_dsi_enable_hs_clock(struct mipi_dsim_device *dsim,
  76. unsigned int enable);
  77. void exynos_mipi_dsi_dp_dn_swap(struct mipi_dsim_device *dsim,
  78. unsigned int swap_en);
  79. void exynos_mipi_dsi_hs_zero_ctrl(struct mipi_dsim_device *dsim,
  80. unsigned int hs_zero);
  81. void exynos_mipi_dsi_prep_ctrl(struct mipi_dsim_device *dsim,
  82. unsigned int prep);
  83. void exynos_mipi_dsi_clear_interrupt(struct mipi_dsim_device *dsim);
  84. void exynos_mipi_dsi_clear_all_interrupt(struct mipi_dsim_device *dsim);
  85. unsigned int exynos_mipi_dsi_is_pll_stable(struct mipi_dsim_device *dsim);
  86. unsigned int exynos_mipi_dsi_get_fifo_state(struct mipi_dsim_device *dsim);
  87. unsigned int _exynos_mipi_dsi_get_frame_done_status(struct mipi_dsim_device
  88. *dsim);
  89. void _exynos_mipi_dsi_clear_frame_done(struct mipi_dsim_device *dsim);
  90. void exynos_mipi_dsi_wr_tx_header(struct mipi_dsim_device *dsim,
  91. unsigned int di, const unsigned char data0, const unsigned char data1);
  92. void exynos_mipi_dsi_wr_tx_data(struct mipi_dsim_device *dsim,
  93. unsigned int tx_data);
  94. #endif /* _EXYNOS_MIPI_DSI_LOWLEVEL_H */