exynos_dp_lowlevel.h 4.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /* SPDX-License-Identifier: GPL-2.0+ */
  2. /*
  3. * Copyright (C) 2012 Samsung Electronics
  4. *
  5. * Author: Donghwa Lee <dh09.lee@samsung.com>
  6. */
  7. #ifndef _EXYNOS_EDP_LOWLEVEL_H
  8. #define _EXYNOS_EDP_LOWLEVEL_H
  9. void exynos_dp_enable_video_bist(struct exynos_dp *dp_regs,
  10. unsigned int enable);
  11. void exynos_dp_enable_video_mute(struct exynos_dp *dp_regs,
  12. unsigned int enable);
  13. void exynos_dp_reset(struct exynos_dp *dp_regs);
  14. void exynos_dp_enable_sw_func(struct exynos_dp *dp_regs, unsigned int enable);
  15. unsigned int exynos_dp_set_analog_power_down(struct exynos_dp *dp_regs,
  16. unsigned int block, u32 enable);
  17. unsigned int exynos_dp_get_pll_lock_status(struct exynos_dp *dp_regs);
  18. int exynos_dp_init_analog_func(struct exynos_dp *dp_regs);
  19. void exynos_dp_init_hpd(struct exynos_dp *dp_regs);
  20. void exynos_dp_init_aux(struct exynos_dp *dp_regs);
  21. void exynos_dp_config_interrupt(struct exynos_dp *dp_regs);
  22. unsigned int exynos_dp_get_plug_in_status(struct exynos_dp *dp_regs);
  23. unsigned int exynos_dp_detect_hpd(struct exynos_dp *dp_regs);
  24. unsigned int exynos_dp_start_aux_transaction(struct exynos_dp *dp_regs);
  25. unsigned int exynos_dp_write_byte_to_dpcd(struct exynos_dp *dp_regs,
  26. unsigned int reg_addr,
  27. unsigned char data);
  28. unsigned int exynos_dp_read_byte_from_dpcd(struct exynos_dp *dp_regs,
  29. unsigned int reg_addr,
  30. unsigned char *data);
  31. unsigned int exynos_dp_write_bytes_to_dpcd(struct exynos_dp *dp_regs,
  32. unsigned int reg_addr,
  33. unsigned int count,
  34. unsigned char data[]);
  35. unsigned int exynos_dp_read_bytes_from_dpcd(struct exynos_dp *dp_regs,
  36. unsigned int reg_addr,
  37. unsigned int count,
  38. unsigned char data[]);
  39. int exynos_dp_select_i2c_device(struct exynos_dp *dp_regs,
  40. unsigned int device_addr,
  41. unsigned int reg_addr);
  42. int exynos_dp_read_byte_from_i2c(struct exynos_dp *dp_regs,
  43. unsigned int device_addr,
  44. unsigned int reg_addr, unsigned int *data);
  45. int exynos_dp_read_bytes_from_i2c(struct exynos_dp *dp_regs,
  46. unsigned int device_addr,
  47. unsigned int reg_addr, unsigned int count,
  48. unsigned char edid[]);
  49. void exynos_dp_reset_macro(struct exynos_dp *dp_regs);
  50. void exynos_dp_set_link_bandwidth(struct exynos_dp *dp_regs,
  51. unsigned char bwtype);
  52. unsigned char exynos_dp_get_link_bandwidth(struct exynos_dp *dp_regs);
  53. void exynos_dp_set_lane_count(struct exynos_dp *dp_regs, unsigned char count);
  54. unsigned int exynos_dp_get_lane_count(struct exynos_dp *dp_regs);
  55. unsigned char exynos_dp_get_lanex_pre_emphasis(struct exynos_dp *dp_regs,
  56. unsigned char lanecnt);
  57. void exynos_dp_set_lane_pre_emphasis(struct exynos_dp *dp_regs,
  58. unsigned int level, unsigned char lanecnt);
  59. void exynos_dp_set_lanex_pre_emphasis(struct exynos_dp *dp_regs,
  60. unsigned char request_val,
  61. unsigned char lanecnt);
  62. void exynos_dp_set_training_pattern(struct exynos_dp *dp_regs,
  63. unsigned int pattern);
  64. void exynos_dp_enable_enhanced_mode(struct exynos_dp *dp_regs,
  65. unsigned char enable);
  66. void exynos_dp_enable_scrambling(struct exynos_dp *dp_regs,
  67. unsigned int enable);
  68. int exynos_dp_init_video(struct exynos_dp *dp_regs);
  69. void exynos_dp_config_video_slave_mode(struct exynos_dp *dp_regs,
  70. struct edp_video_info *video_info);
  71. void exynos_dp_set_video_color_format(struct exynos_dp *dp_regs,
  72. struct edp_video_info *video_info);
  73. int exynos_dp_config_video_bist(struct exynos_dp *dp_regs,
  74. struct exynos_dp_priv *priv);
  75. unsigned int exynos_dp_is_slave_video_stream_clock_on(
  76. struct exynos_dp *dp_regs);
  77. void exynos_dp_set_video_cr_mn(struct exynos_dp *dp_regs, unsigned int type,
  78. unsigned int m_value, unsigned int n_value);
  79. void exynos_dp_set_video_timing_mode(struct exynos_dp *dp_regs,
  80. unsigned int type);
  81. void exynos_dp_enable_video_master(struct exynos_dp *dp_regs,
  82. unsigned int enable);
  83. void exynos_dp_start_video(struct exynos_dp *dp_regs);
  84. unsigned int exynos_dp_is_video_stream_on(struct exynos_dp *dp_regs);
  85. #endif /* _EXYNOS_DP_LOWLEVEL_H */