ProjectConfig.h 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231
  1. /**
  2. * @file ProjectConfig.h
  3. * @brief Header file of Project.
  4. *
  5. * @verbatim
  6. * ==============================================================================
  7. * ##### How to use #####
  8. * ==============================================================================
  9. *
  10. *
  11. @ endverbatim
  12. *
  13. * @author HiView SoC Software Team
  14. * @version 1.0.0
  15. * @date 2022-08-26
  16. */
  17. #ifndef __DEVICE_HI_VIEW_HT7315_EVB_PROJECT_H__
  18. #define __DEVICE_HI_VIEW_HT7315_EVB_PROJECT_H__
  19. #define HV_CONFIG_ON 1
  20. #define HV_CONFIG_OFF 0
  21. /*************************************************
  22. Platform definiton
  23. *************************************************/
  24. #define HV_PROJECT_CONFIG_MANUFACT_OUI 0x24DD1B
  25. #define HV_PROJECT_CONFIG_DEV_STRING0 0x00
  26. #define HV_PROJECT_CONFIG_DEV_STRING1 0x00000000
  27. #define HV_PROJECT_CONFIG_DEV_STRING2 0x00
  28. #define HV_PROJECT_CONFIG_HW_MAJOR_REV 0x00
  29. #define HV_PROJECT_CONFIG_HW_MINOR_REV 0x00
  30. #define HV_PROJECT_CONFIG_FW_MAJOR_REV 0x00
  31. #define HV_PROJECT_CONFIG_FW_MINOR_REV 0x00
  32. #define HV_PROJECT_CONFIG_GUID0 0x00000000
  33. #define HV_PROJECT_CONFIG_GUID1 0x00000000
  34. #define HV_PROJECT_CONFIG_GUID2 0x00000000
  35. #define HV_PROJECT_CONFIG_GUID3 0x00000000
  36. /*************************************************
  37. Product function definiton
  38. *************************************************/
  39. #define HV_PROJECT_CONFIG_DARK_STABILIZER HV_CONFIG_ON
  40. #define HV_PROJECT_CONFIG_MPRT HV_CONFIG_ON
  41. #define HV_PROJECT_CONFIG_FREESYNC HV_CONFIG_ON
  42. #define HV_PROJECT_CONFIG_ADAPTIVESYNC HV_CONFIG_ON
  43. #define HV_PROJECT_CONFIG_GSYNC HV_CONFIG_ON
  44. #define HV_PROJECT_CONFIG_LDR HV_CONFIG_ON
  45. #define HV_PROJECT_CONFIG_DCR HV_CONFIG_ON
  46. #define HV_PROJECT_CONFIG_EYESHIELD HV_CONFIG_ON
  47. #define HV_PROJECT_CONFIG_CROSSHAIR HV_CONFIG_ON
  48. #define HV_PROJECT_CONFIG_REFRESH_RATE HV_CONFIG_ON
  49. #define HV_PROJECT_CONFIG_HDR HV_CONFIG_ON
  50. #define HV_PROJECT_CONFIG_CUSTOM_KEY HV_CONFIG_ON
  51. #define HV_PROJECT_CONFIG_LIGHT_EFFECT HV_CONFIG_ON
  52. #define HV_PROJECT_CONFIG_VARIABLEBACKLIGHT HV_CONFIG_ON
  53. #define HV_PROJECT_CONFIG_CM HV_CONFIG_ON
  54. #define HV_PROJECT_CONFIG_AUDIO_SETTING HV_CONFIG_ON
  55. #define HV_PROJECT_CONFIG_MAIN_MONTAGE HV_CONFIG_OFF
  56. #ifdef CONFIG_USER_DOUBLE_CHANNEL_ON
  57. #define HV_PROJECT_CONFIG_MAGNIFY HV_CONFIG_ON
  58. #define HV_PROJECT_CONFIG_PXP HV_CONFIG_ON
  59. #else
  60. #define HV_PROJECT_CONFIG_MAGNIFY HV_CONFIG_OFF
  61. #define HV_PROJECT_CONFIG_PXP HV_CONFIG_OFF
  62. #endif
  63. /*************************************************
  64. INPUTPORT Option
  65. *************************************************/
  66. #define HV_PROJECT_CONFIG_HDCP_KEY_ONROM HV_CONFIG_OFF /* 1: HDCP Key saved in ROM */
  67. #define HV_PROJECT_CONFIG_HDCP_KEY_CLEAR_TEXT HV_CONFIG_OFF /* 0: cipher Text(����); 1: clear Text(����) */
  68. #define HV_PROJECT_CONFIG_EDID_EXTER_EEPROM HV_CONFIG_OFF /* 1: USE Extern EEPROM to save EDID */
  69. #define HV_PROJECT_CONFIG_EDID_UP_FCTWEEK HV_CONFIG_ON /* 1: Update the Factory Week */
  70. #define HV_PROJECT_CONFIG_EDID_UP_FCTYEAR HV_CONFIG_ON /* 1: EDID Update the Factory Year */
  71. #define HV_PROJECT_CONFIG_EDID_UP_SN_VENDOR HV_CONFIG_OFF /* 1: EDID Update the Factory SN on Vendor Info */
  72. #define HV_PROJECT_CONFIG_EDID_UP_DESC_SN HV_CONFIG_OFF /* 1: EDID Update the Factory SN on Desc Info */
  73. #define HV_PROJECT_CONFIG_ESEGMENT HV_CONFIG_ON /* 1: Support E-Segment */
  74. #define HV_PROJECT_CONFIG_ESEGMENT_PM51 HV_CONFIG_OFF /* 1: Support E-Segment on 51 */
  75. #define HV_PROJECT_CONFIG_FRL HV_CONFIG_ON /* 1: Support HDMI FRL */
  76. #define HV_PROJECT_CONFIG_CTS HV_CONFIG_OFF /* 1: CTS specific handle */
  77. #define HV_PROJECT_CONFIG_DEFAULT_EDID HV_CONFIG_ON /* 1: Default EDID exist*/
  78. /*************************************************
  79. DPU Option
  80. *************************************************/
  81. /*是否允许SUB通道和辅助通道公用相同的port*/
  82. #define HV_PROJECT_CONFIG_CHANNEL_USE_SAME_PORT 0
  83. /*是否开启完整LocalDimming*/
  84. #define HV_PROJECT_CONFIG_FULL_LOCALDIMMING HV_CONFIG_OFF
  85. /*是否开启LocalDimming 2D PixelGain*/
  86. #define HV_PROJECT_CONFIG_LDC_2D_PIXELGAIN HV_CONFIG_OFF
  87. /* 开启ldc需要配置kspi通道 */
  88. #if (HV_PROJECT_CONFIG_FULL_LOCALDIMMING == HV_CONFIG_ON)
  89. #define HV_PROJECT_CONFIG_KSPI_CHANNEL_NUM 0x1
  90. #endif
  91. /*是否使用bin文件进行PQ初始化*/
  92. #define HV_PROJECT_CONFIG_PQ_INITBYBIN HV_CONFIG_ON
  93. /*PQ模块调试工具是否读写数据库,默认关闭,调试PQ打开*/
  94. #define HV_PROJECT_CONFIG_PQ_DATABASEWREN HV_CONFIG_ON
  95. /* PQ模块关闭HDR是否切换EDID*/
  96. #define HV_PROJECT_CONFIG_PQ_HDR_CHANGEEDID HV_CONFIG_OFF
  97. /*搜索端口的间隔时间,单位ms*/
  98. #define HV_PROJECT_CONFIG_PERIOD_SEARCH_CHECK_SROUCE_TIMER 100
  99. #define HV_PROJECT_CONFIG_CURRENT_PORT_SEARCHE_TIMES 90 /*当前通道搜索次数,一次HV_PROJECT_CONFIG_PERIOD_SEARCH_CHECK_SROUCE_TIMER毫秒*/
  100. #define HV_PROJECT_CONFIG_EACH_PORT_DISCONNECT_SEARCHE_TIMES 20 /*通道未插线搜索次数,一次HV_PROJECT_CONFIG_PERIOD_SEARCH_CHECK_SROUCE_TIMER毫秒*/
  101. #if (HV_PROJECT_CONFIG_CTS == HV_CONFIG_OFF)
  102. #define HV_PROJECT_CONFIG_NO_SIGNAL_CHECK_TIMES 10 /*无信号时进入待机前的检测信号的次数,每1秒检测一次*/
  103. #define HV_PROJECT_CONFIG_EACH_PORT_SERARCH_MAX_TIMES 30 /*提示无信号前,每个插线通道搜索的次数,每100ms搜索一次*/
  104. #else
  105. #define HV_PROJECT_CONFIG_NO_SIGNAL_CHECK_TIMES 200
  106. #define HV_PROJECT_CONFIG_EACH_PORT_SERARCH_MAX_TIMES 100
  107. #endif
  108. /*工厂模式下,加速进入老化模式*/
  109. #define HV_PROJECT_CONFIG_BURN_IN_EACH_PORT_SEARCH_TIMES 10
  110. #define HV_PROJECT_CONFIG_MAX_SEARCH_TIMERS_BURN_IN (HV_PROJECT_CONFIG_BURN_IN_EACH_PORT_SEARCH_TIMES * (HV_BOARD_CONFIG_MAX_HDMI_PORT_NUM + HV_BOARD_CONFIG_MAX_DP_PORT_NUM))
  111. /*unit millisecond*/
  112. /*total nosignal keep time = NO_SIGNAL_DURATION_TIMES * NO_SIGNAL_CHECK_TIMER_LENGTH */
  113. #define HV_PROJECT_CONFIG_NO_SIGNAL_CHECK_TIMER_LENGTH 1000
  114. #define HV_PROJECT_CONFIG_DPU_OVER_SCAN_SIDE_SIZE 0UL /*side image (250 is 2.5% of each side size) over screen, 0: off*/
  115. #define HV_PROJECT_CONFIG_DPU_BRIGHT_FRAME HV_CONFIG_OFF
  116. #define HV_PROJECT_CONFIG_AUTO_POWER_OFF HV_CONFIG_OFF
  117. #define HV_PROJECT_CONFIG_MAGNIFY_SAMPLING_FLOW_POS HV_CONFIG_ON /*放大镜取样位置是否跟随放大镜显示位置(放大放大镜正下方画面)*/
  118. #define HV_PROJECT_CONFIG_PIP_POS_PRECISE_ADJ HV_CONFIG_OFF /*PIP sub 位置是否开启精确调节,开启后h v位置可以步进调节*/
  119. #define HV_PROJECT_CONFIG_CHANNEL_SEAMLESS_SWITCH HV_CONFIG_OFF /*双通道冻结一帧切换*/
  120. #define HV_PROJECT_CONFIG_OVER_PANEL_CLOCK_EN HV_CONFIG_OFF
  121. #define HV_PROJECT_CONFIG_OVER_PANEL_CLOCK_UP 2000 /*over panel pixel clock KHz*/
  122. #define HV_PROJECT_CONFIG_OVER_PANEL_CLOCK_DOWN 2000 /*reduce panel pixel clock KHz*/
  123. /*************************************************
  124. PM51 Option
  125. *************************************************/
  126. #define HV_PROJECT_CONFIG_PM51_UART_PRINT_ENABLE HV_CONFIG_ON
  127. #define HV_PROJECT_CONFIG_PM51_TYPEC0_ENABLE HV_CONFIG_ON
  128. /*************************************************
  129. DPMS Option
  130. *************************************************/
  131. #define HV_PROJECT_CONFIG_DPMS_HDMI0_CABLE_ENABLE HV_CONFIG_ON
  132. #define HV_PROJECT_CONFIG_DPMS_HDMI1_CABLE_ENABLE HV_CONFIG_ON
  133. #define HV_PROJECT_CONFIG_DPMS_DP0_CABLE_ENABLE HV_CONFIG_OFF
  134. #define HV_PROJECT_CONFIG_DPMS_DP1_CABLE_ENABLE HV_CONFIG_ON
  135. #define HV_PROJECT_CONFIG_DPMS_DP0_AUX_ENABLE HV_CONFIG_OFF
  136. #define HV_PROJECT_CONFIG_DPMS_DP1_AUX_ENABLE HV_CONFIG_ON
  137. #define HV_PROJECT_CONFIG_DPMS_DP0_GPIO_ENABLE HV_CONFIG_OFF
  138. #define HV_PROJECT_CONFIG_DPMS_DP1_GPIO_ENABLE HV_CONFIG_ON
  139. #define HV_PROJECT_CONFIG_HDMI0_DDC_WAKEUP_ENABLE HV_CONFIG_OFF
  140. #define HV_PROJECT_CONFIG_HDMI1_DDC_WAKEUP_ENABLE HV_CONFIG_OFF
  141. #define HV_PROJECT_CONFIG_CABLE_WAKEUP_DOUBLE_ENABLE HV_CONFIG_OFF
  142. /*************************************************
  143. Audio Option
  144. *************************************************/
  145. #define HV_PROJECT_CONFIG_VOLUME_CONSISTENT 1
  146. #define HV_PROJECT_CONFIG_DIGITAL_MAX_VOLUME 256
  147. /*************************************************
  148. Panel Option
  149. *************************************************/
  150. #define HV_PROJECT_CONFIG_EDP_TX_TRAINING_TYPE HV_EDP_TX_FULL_LINK_TRAINING
  151. #define HV_PROJECT_CONFIG_EDP_TX_ASSR_EN HV_CONFIG_OFF
  152. #define HV_PROJECT_CONFIG_EDP_TX_AUX0_PORT EDP_AUX_PROT_INDEX0
  153. #define HV_PROJECT_CONFIG_EDP_TX_AUX1_PORT EDP_AUX_PROT_INDEX1
  154. #define HV_PROJECT_CONFIG_EDP_TX_HPD0_PORT EDP_HPD_PROT_INDEX0
  155. #define HV_PROJECT_CONFIG_EDP_TX_HPD1_PORT EDP_HPD_PROT_INDEX1
  156. #define HV_PROJECT_CONFIG_EDP_TX_HPD_IRQ_EN HV_CONFIG_OFF
  157. /*************************************************
  158. MPRT(PWM) Option
  159. *************************************************/
  160. /* 通过原理图查看pinshare,选择合适的port输出波形 */
  161. #define HV_PROJECT_CONFIG_MPRT_HIGHT_PORT 1 //GPIO11/PWM1/PIN92控制
  162. #define HV_PROJECT_CONFIG_MPRT_HIGHT_POL 0
  163. #define HV_PROJECT_CONFIG_BACKLIGHT_ENABLE 1 //背光开
  164. #define HV_PROJECT_CONFIG_BACKLIGHT_DISABLE 0 //背光关
  165. /* 输出固定高频PWM所需的固定参数,根据要设置的频率查表得到此值 */
  166. #define HV_PROJECT_CONFIG_MPRT_HIGHT_FREQ_PWM_TOTAL 4304
  167. #define HV_PROJECT_CONFIG_MPRT_HIGHT_FREQ_PWM_MULT 0
  168. #define HV_PROJECT_CONFIG_MPRT_HIGHT_FREQ_PWM_DUTY 90
  169. /* 通过原理图查看pinshare,选择合适的port输出波形 */
  170. #define HV_PROJECT_CONFIG_MPRT_PORT 2
  171. #define HV_PROJECT_CONFIG_MPRT_POL 0
  172. /* 输出固定MPRT的PWM所需的固定参数 */
  173. #define HV_PROJECT_CONFIG_MPRT_MODE 0
  174. #define HV_PROJECT_CONFIG_MPRT_STA_VALUE 690 //普通MPRT模式下的拉高起始行,根据实际效果调节
  175. #define HV_PROJECT_CONFIG_MPRT_VALUE 1440
  176. #define HV_PROJECT_CONFIG_MPRT_VS_CLEAR 1 // VRR下MPRT开时,VS_CLEAR也要开,保证在帧结尾波形被拉低
  177. #define HV_PROJECT_CONFIG_MPRT_VRR_STA_VALUE 19660 //65535的占比,起始行占htotal的比例,会根据上一帧自动计算,这里只设比例即可
  178. #define HV_PROJECT_CONFIG_MPRT_VRR_VALUE 1440 // VRR下MPRT开时,VALUE按h total算,要保障拉行数足够大在帧结尾保持高电平
  179. /* 设置供LDC使用的vsync接口,需要PWM的一个通道 */
  180. #define HV_PROJECT_CONFIG_MPRT_LDCVSYNC_PORT 4
  181. /*************************************************
  182. Factory Option
  183. *************************************************/
  184. /* Factory Min*/
  185. #define HV_PROJECT_CONFIG_FACTORY_PANEL_TIME_COUNT_PERIOD 30
  186. /* Device Info Define*/
  187. #define HV_PROJECT_CONFIG_FACTORY_MONITOR_MODE "HIVIEW 27G5F"
  188. #define HV_PROJECT_CONFIG_FACTORY_SCALER_MODE "HT7315"
  189. #define HV_PROJECT_CONFIG_FACTORY_FW_VERSION "000"
  190. #define HV_PROJECT_CONFIG_FACTORY_FW_CHANGE_DATE "20241209"
  191. #define HV_PROJECT_CONFIG_FACTORY_PANEL_TYPE "PANEL_EDP_QHD"
  192. #define HV_PROJECT_CONFIG_FACTORY_PANEL_SIZE "27.0"
  193. /* 8Bytes Max */
  194. #define HV_PROJECT_CONFIG_HDMI_SCDC_DEVICE_STR "HiView"
  195. /*Color Filter Define */
  196. #define HV_PROJECT_CONFIG_COLOR_FILTER HV_CONFIG_ON
  197. /*PQ Ambilight Define */
  198. #define HV_PROJECT_CONFIG_AMBILIGHT HV_CONFIG_ON
  199. /*PQ Ambient Light Define */
  200. #define HV_PROJECT_CONFIG_AMBIENT_LIGHT HV_CONFIG_OFF
  201. #define HV_PROJECT_CONFIG_PLATFORM HV_CONFIG_ON
  202. /*OTA Partition Define */
  203. #define HV_PROJECT_CONFIG_DUAL_PARTITION HV_CONFIG_ON
  204. #endif