hv_pm51_Setting.h 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. /*
  2. * @file hv_pm51_Setting.h
  3. * @brief compile setting.
  4. *
  5. * @verbatim
  6. * ==============================================================================
  7. * ##### How to use #####
  8. * ==============================================================================
  9. * (+) Use ()
  10. *
  11. * @endverbatim
  12. * @author HiView SoC Software Team
  13. * @version 1.0.0
  14. * @date 2023-03-01
  15. */
  16. #ifndef __HV_PM51_SETTING_H__
  17. #define __HV_PM51_SETTING_H__
  18. #include "BoardConfig.h"
  19. #include "ProjectConfig.h"
  20. #include "TypecConfig.h"
  21. #include "Keyboard.h"
  22. #include "KeyboardConfig.h"
  23. /******************* software version setting *********************/
  24. /* MAIN_VER 2: add pinshare config. */
  25. #define PM51_SW_MAIN_VER 2
  26. /*
  27. SUB_VER 1: add pinshare config.
  28. SUB_VER 2: add ddc wakeup config, add cable plugout wakeup config.
  29. SUB_VER 3: add ddc wakeup ack, add data clear for read edid cmd.
  30. SUB_VER 4: add ir.
  31. SUB_VER 5: add boot second part.
  32. SUB_VER 6: modify keypad for optimize data size.
  33. SUB_VER 7: add led diff bright.
  34. SUB_VER 8: sync: close led when on; separate dp hpd gpio.
  35. SUB_VER 9: sync: add ddc delay.
  36. SUB_VER a: add adc key fake dc.
  37. SUB_VER b: chang cpu/axi/apb clk.
  38. SUB_VER c: pull rxphy pwm h for fakedc with hdmi.
  39. SUB_VER d: modify for combokey.
  40. SUB_VER e: resolve reboot problem when ddc off quickly.
  41. SUB_VER f: del power early for standby wakup.
  42. SUB_VER 10: add autopoweroff when standby
  43. SUB_VER 11: add for ir wakeup in fakedc
  44. SUB_VER 12: change keypad at will.
  45. SUB_VER 13: del adc interrupt times for keys.
  46. SUB_VER 14: resolve ddc wakeup warn.
  47. SUB_VER 15: diff ac/dc + menu.
  48. SUB_VER 16: add power multy with second poweroff.
  49. SUB_VER 17: change pmu flag to mips for second standby.
  50. SUB_VER 18: change multy key not poweroff with adc power
  51. SUB_VER 19: add adc key retry
  52. SUB_VER 20: change ac flag for fake dc.
  53. */
  54. #define PM51_SW_SUB_VER 0x19
  55. /******************** function setting ***************************/
  56. #define SILLICON_CLK_OSC 0
  57. #define POWER_ON_CHECK_ENABLE 1
  58. #define BOOTUP_MIPS_ENABLE 1
  59. #define BOOTUP_MIPS_RETRY 1
  60. #define WATCHDOG_ENABLE 0
  61. #define MIPS_HEART_MONITOR 0
  62. #define TIMER_ENABLE 1
  63. #define MI2C_ENABLE 1
  64. #define GPIO_ENABLE 1
  65. #define ADC_ENABLE 1
  66. #define IR_ENABLE 0
  67. #define ADC_KEY_ENABLE 1
  68. #define GPIO_KEY_ENABLE 0
  69. #if ADC_ENABLE && ADC_KEY_ENABLE
  70. #define ADC_KEY_WAKEUP_ENABLE 1
  71. #endif
  72. #if IR_ENABLE
  73. #define IR_WAKEUP_ENABLE 1
  74. #endif
  75. #if HV_TYPEC_CONFIG_PM51_SSPWD_EN
  76. #define TYPEC_SSPWD_ENABLE 1 /* For samsung phone waterdrop */
  77. #else
  78. #define TYPEC_SSPWD_ENABLE 0
  79. #endif
  80. #if HV_PROJECT_CONFIG_PM51_UART_PRINT_ENABLE
  81. #define UART_PRINT_ENABLE 1
  82. #else
  83. #define UART_PRINT_ENABLE 0
  84. #endif
  85. /******************* DPMS setting *******************************/
  86. #if HV_PROJECT_CONFIG_DPMS_DP0_CABLE_ENABLE
  87. #define DPMS_DP0_CABLE_ENABLE 1
  88. #else
  89. #define DPMS_DP0_CABLE_ENABLE 0
  90. #endif
  91. #if HV_PROJECT_CONFIG_DPMS_DP1_CABLE_ENABLE
  92. #define DPMS_DP1_CABLE_ENABLE 1
  93. #else
  94. #define DPMS_DP1_CABLE_ENABLE 0
  95. #endif
  96. #if HV_PROJECT_CONFIG_DPMS_DP0_AUX_ENABLE
  97. #define DPMS_DP0_AUX_ENABLE 1
  98. #else
  99. #define DPMS_DP0_AUX_ENABLE 0
  100. #endif
  101. #if HV_PROJECT_CONFIG_DPMS_DP1_AUX_ENABLE
  102. #define DPMS_DP1_AUX_ENABLE 1
  103. #else
  104. #define DPMS_DP1_AUX_ENABLE 0
  105. #endif
  106. #if HV_PROJECT_CONFIG_DPMS_HDMI0_CABLE_ENABLE
  107. #define DPMS_HDMI0_CABLE_ENABLE 1
  108. #else
  109. #define DPMS_HDMI0_CABLE_ENABLE 0
  110. #endif
  111. #if HV_PROJECT_CONFIG_DPMS_HDMI1_CABLE_ENABLE
  112. #define DPMS_HDMI1_CABLE_ENABLE 1
  113. #else
  114. #define DPMS_HDMI1_CABLE_ENABLE 0
  115. #endif
  116. #if HV_PROJECT_CONFIG_PM51_TYPEC0_ENABLE
  117. #define DPMS_TYPEC0_ENABLE 1
  118. #else
  119. #define DPMS_TYPEC0_ENABLE 0
  120. #endif
  121. #if HV_PROJECT_CONFIG_DPMS_DP0_GPIO_ENABLE
  122. #define DPMS_DP0_GPIO_ENABLE 1
  123. #else
  124. #define DPMS_DP0_GPIO_ENABLE 0
  125. #endif
  126. #if HV_PROJECT_CONFIG_DPMS_DP1_GPIO_ENABLE
  127. #define DPMS_DP1_GPIO_ENABLE 1
  128. #else
  129. #define DPMS_DP1_GPIO_ENABLE 0
  130. #endif
  131. #if HV_PROJECT_CONFIG_CABLE_WAKEUP_DOUBLE_ENABLE
  132. #define CABLE_WAKEUP_DOUBLE 1
  133. #else
  134. #define CABLE_WAKEUP_DOUBLE 0
  135. #endif
  136. #if (PM51_CONFIG_POWER_KEY_MODE & POWER_KEY_MODE_ADC)
  137. #define PM51_CONFIG_FAKE_DC 1
  138. #else
  139. #define PM51_CONFIG_FAKE_DC 0
  140. #endif
  141. #define DPMS_HDMI0_TMDS_ENABLE 1
  142. #define DPMS_HDMI1_TMDS_ENABLE 1
  143. #define DPMS_HDMI0_CEC_ENABLE 1
  144. #define DPMS_HDMI1_CEC_ENABLE 1
  145. #define DPMS_TYPEC_USE_DRP 1
  146. #define DPMS_TYPEC1_ENABLE 0
  147. #define DPMS_DP0_GPIO_USE_GP3 1
  148. #define DPMS_DP1_GPIO_USE_GP2 1
  149. #define DPMS_FIX_MODE_ENABLE 1
  150. /******************* Debug setting *******************************/
  151. #define PM51_DEBUG_DUMMY_REGS 1
  152. #endif