ProjectConfig.h 14 KB

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