/*
 * @file hv_pm51_Setting.h
 * @brief compile setting.
 *
 * @verbatim
 * ==============================================================================
 *                        ##### How to use #####
 * ==============================================================================
 * (+) Use ()
 *
 * @endverbatim
 * @author HiView SoC Software Team
 * @version 1.0.0
 * @date 2023-03-01
 */

#ifndef __HV_PM51_SETTING_H__
#define __HV_PM51_SETTING_H__

#include "BoardConfig.h"
#include "ProjectConfig.h"
#include "TypecConfig.h"
#include "Keyboard.h"
#include "KeyboardConfig.h"

/******************* software version setting *********************/
/* MAIN_VER 2: add pinshare config. */
#define PM51_SW_MAIN_VER         2
/*
SUB_VER 1: add pinshare config.
SUB_VER 2: add ddc wakeup config, add cable plugout wakeup config.
SUB_VER 3: add ddc wakeup ack, add data clear for read edid cmd.
SUB_VER 4: add ir.
SUB_VER 5: add boot second part.
SUB_VER 6: modify keypad for optimize data size.
SUB_VER 7: add led diff bright.
SUB_VER 8: sync: close led when on; separate dp hpd gpio.
SUB_VER 9: sync: add ddc delay.
SUB_VER a: add adc key fake dc.
SUB_VER b: chang cpu/axi/apb clk.
SUB_VER c: pull rxphy pwm h for fakedc with hdmi.
SUB_VER d: modify for combokey.
SUB_VER e: resolve reboot problem when ddc off quickly.
SUB_VER f: del power early for standby wakup.
SUB_VER 10: add autopoweroff when standby
SUB_VER 11: add for ir wakeup in fakedc
SUB_VER 12: change keypad at will.
SUB_VER 13: del adc interrupt times for keys.
SUB_VER 14: resolve ddc wakeup warn.
SUB_VER 15: diff ac/dc + menu.
SUB_VER 16: add power multy with second poweroff.
SUB_VER 17: change pmu flag to mips for second standby.
SUB_VER 18: change multy key not poweroff with adc power
SUB_VER 19: add adc key retry
SUB_VER 1A: add mailbox send retry
SUB_VER 20: change ac flag for fake dc.
SUB VER 21: add mailbox send auxN int when using nonstand DP cable
*/
#define PM51_SW_SUB_VER          0x20

/******************** function setting ***************************/
#define SILLICON_CLK_OSC         0
#define POWER_ON_CHECK_ENABLE    1
#define BOOTUP_MIPS_ENABLE       1
#define BOOTUP_MIPS_RETRY        1
#define WATCHDOG_ENABLE          0
#define MIPS_HEART_MONITOR       0
#define TIMER_ENABLE             1
#define MI2C_ENABLE              1
#define GPIO_ENABLE              1
#define ADC_ENABLE               1
#define IR_ENABLE                0
#define ADC_KEY_ENABLE           1
#define GPIO_KEY_ENABLE          0

#if ADC_ENABLE && ADC_KEY_ENABLE
#define ADC_KEY_WAKEUP_ENABLE    1
#endif
#if IR_ENABLE
#define IR_WAKEUP_ENABLE         1
#endif


#if HV_TYPEC_CONFIG_PM51_SSPWD_EN
#define TYPEC_SSPWD_ENABLE       1 /* For samsung phone waterdrop */
#else
#define TYPEC_SSPWD_ENABLE       0
#endif

#if HV_PROJECT_CONFIG_PM51_UART_PRINT_ENABLE
#define UART_PRINT_ENABLE        1
#else
#define UART_PRINT_ENABLE        0
#endif

/******************* DPMS setting *******************************/
#if HV_PROJECT_CONFIG_DPMS_DP0_CABLE_ENABLE
#define DPMS_DP0_CABLE_ENABLE    1
#else
#define DPMS_DP0_CABLE_ENABLE    0
#endif

#if HV_PROJECT_CONFIG_DPMS_DP1_CABLE_ENABLE
#define DPMS_DP1_CABLE_ENABLE    1
#else
#define DPMS_DP1_CABLE_ENABLE    0
#endif

#if HV_PROJECT_CONFIG_DPMS_DP0_AUX_ENABLE
#define DPMS_DP0_AUX_ENABLE      1
#else
#define DPMS_DP0_AUX_ENABLE      0
#endif

#if HV_PROJECT_CONFIG_DPMS_DP1_AUX_ENABLE
#define DPMS_DP1_AUX_ENABLE      1
#else
#define DPMS_DP1_AUX_ENABLE      0
#endif

#if HV_PROJECT_CONFIG_DPMS_HDMI0_CABLE_ENABLE
#define DPMS_HDMI0_CABLE_ENABLE  1
#else
#define DPMS_HDMI0_CABLE_ENABLE  0
#endif

#if HV_PROJECT_CONFIG_DPMS_HDMI1_CABLE_ENABLE
#define DPMS_HDMI1_CABLE_ENABLE  1
#else
#define DPMS_HDMI1_CABLE_ENABLE  0
#endif

#if HV_PROJECT_CONFIG_PM51_TYPEC0_ENABLE
#define DPMS_TYPEC0_ENABLE       1
#else
#define DPMS_TYPEC0_ENABLE       0
#endif

#if HV_PROJECT_CONFIG_DPMS_DP0_GPIO_ENABLE
#define DPMS_DP0_GPIO_ENABLE     1
#else
#define DPMS_DP0_GPIO_ENABLE     0
#endif

#if HV_PROJECT_CONFIG_DPMS_DP1_GPIO_ENABLE
#define DPMS_DP1_GPIO_ENABLE     1
#else
#define DPMS_DP1_GPIO_ENABLE     0
#endif

#if HV_PROJECT_CONFIG_CABLE_WAKEUP_DOUBLE_ENABLE
#define CABLE_WAKEUP_DOUBLE     1
#else
#define CABLE_WAKEUP_DOUBLE     0
#endif

#if (PM51_CONFIG_POWER_KEY_MODE & POWER_KEY_MODE_ADC)
#define PM51_CONFIG_FAKE_DC      1
#else
#define PM51_CONFIG_FAKE_DC      0
#endif

#define DPMS_HDMI0_TMDS_ENABLE   1
#define DPMS_HDMI1_TMDS_ENABLE   1
#define DPMS_HDMI0_CEC_ENABLE    1
#define DPMS_HDMI1_CEC_ENABLE    1
#define DPMS_TYPEC_USE_DRP       1
#define DPMS_TYPEC1_ENABLE       0
#define DPMS_DP0_GPIO            GPIO3
#define DPMS_DP1_GPIO            GPIO2
#define DPMS_FIX_MODE_ENABLE     1

/******************* Debug setting *******************************/
#define PM51_DEBUG_DUMMY_REGS    1

#endif
