//ifdef OPLUS_FEATURE_CHG_BASIC

#include "oplus_chg_8550.h"
#include <dt-bindings/phy/qcom,usb3-4nm-qmp-combo.h>

&soc {
	oplus,adsp-voocphy {
		compatible = "oplus,adsp-voocphy";
	};
};

&pm8550b_eusb2_repeater {
	qcom,param-override-seq = <0x00 0x50 0x0C 0x51 0x06 0x53 0x04 0x54
			0x02 0x55 0x00 0x56 0x06 0x57>;
	qcom,param-override-seq-host = <0x03 0x50 0x05 0x51 0x07 0x53 0x07 0x54
			0x01 0x55 0x00 0x56 0x05 0x57>;
};

&regulator_ocp_notifier {
	periph-1cb-supply = <0>;
	periph-1cc-supply = <0>;
	periph-1cd-supply = <0>;
	periph-4c1-supply = <0>;
	periph-4c3-supply = <0>;
};

&pm8550b_haptics {
	qcom,vmax-mv = <1720>;
	qcom,cl-vmax-mv = <1720>;
	qcom,lra-period-us = <7692>;
	qcom,fifo-vmax-mv = <8300>;
	qcom,old-steady-vmax-mv = <8300>;
	qcom,brake-mode = <BRAKE_OPEN_LOOP>;
	qcom,cal-data-restore;
	qcom,fifo-empty-threshold = <480>;
	qcom,vibrator-type = <9999>;//luxun
};

&usb_qmp_dp_phy {
	pinctrl-names = "default";
	pinctrl-0 = <&usb3phy_portselect_default>;
	status = "disabled";

	qcom,qmp-phy-init-seq =
		/* <reg_offset, value> */
		<USB3_DP_QSERDES_COM_SSC_STEP_SIZE1_MODE1 0xC0
		USB3_DP_QSERDES_COM_SSC_STEP_SIZE2_MODE1 0x01
		USB3_DP_QSERDES_COM_CP_CTRL_MODE1 0x02
		0x220c 0x3F
		0x260c 0x3F
		USB3_DP_QSERDES_COM_PLL_RCTRL_MODE1 0x16
		USB3_DP_QSERDES_COM_PLL_CCTRL_MODE1 0x36
		USB3_DP_QSERDES_COM_CORECLK_DIV_MODE1 0x04
		USB3_DP_QSERDES_COM_LOCK_CMP1_MODE1 0x16
		USB3_DP_QSERDES_COM_LOCK_CMP2_MODE1 0x41
		USB3_DP_QSERDES_COM_DEC_START_MODE1 0x41
		USB3_DP_QSERDES_COM_DEC_START_MSB_MODE1 0x00
		USB3_DP_QSERDES_COM_DIV_FRAC_START1_MODE1 0x55
		USB3_DP_QSERDES_COM_DIV_FRAC_START2_MODE1 0x75
		USB3_DP_QSERDES_COM_DIV_FRAC_START3_MODE1 0x01
		USB3_DP_QSERDES_COM_HSCLK_SEL_1 0x01
		USB3_DP_QSERDES_COM_VCO_TUNE1_MODE1 0x25
		USB3_DP_QSERDES_COM_VCO_TUNE2_MODE1 0x02
		USB3_DP_QSERDES_COM_BIN_VCOCAL_CMP_CODE1_MODE1 0x5C
		USB3_DP_QSERDES_COM_BIN_VCOCAL_CMP_CODE2_MODE1 0x0F
		USB3_DP_QSERDES_COM_BIN_VCOCAL_CMP_CODE1_MODE0 0x5C
		USB3_DP_QSERDES_COM_BIN_VCOCAL_CMP_CODE2_MODE0 0x0F
		USB3_DP_QSERDES_COM_SSC_STEP_SIZE1_MODE0 0xC0
		USB3_DP_QSERDES_COM_SSC_STEP_SIZE2_MODE0 0x01
		USB3_DP_QSERDES_COM_CP_CTRL_MODE0 0x02
		USB3_DP_QSERDES_COM_PLL_RCTRL_MODE0 0x16
		USB3_DP_QSERDES_COM_PLL_CCTRL_MODE0 0x36
		USB3_DP_QSERDES_COM_LOCK_CMP1_MODE0 0x08
		USB3_DP_QSERDES_COM_LOCK_CMP2_MODE0 0x1A
		USB3_DP_QSERDES_COM_DEC_START_MODE0 0x41
		USB3_DP_QSERDES_COM_DEC_START_MSB_MODE0 0x00
		USB3_DP_QSERDES_COM_DIV_FRAC_START1_MODE0 0x55
		USB3_DP_QSERDES_COM_DIV_FRAC_START2_MODE0 0x75
		USB3_DP_QSERDES_COM_DIV_FRAC_START3_MODE0 0x01
		USB3_DP_QSERDES_COM_VCO_TUNE1_MODE0 0x25
		USB3_DP_QSERDES_COM_VCO_TUNE2_MODE0 0x02
		USB3_DP_QSERDES_COM_BG_TIMER 0x0A
		USB3_DP_QSERDES_COM_SSC_EN_CENTER 0x01
		USB3_DP_QSERDES_COM_SSC_PER1 0x62
		USB3_DP_QSERDES_COM_SSC_PER2 0x02
		USB3_DP_QSERDES_COM_SYSCLK_BUF_ENABLE 0x0C
		USB3_DP_QSERDES_COM_SYSCLK_EN_SEL 0x1A
		USB3_DP_QSERDES_COM_LOCK_CMP_CFG 0x14
		USB3_DP_QSERDES_COM_VCO_TUNE_MAP 0x04
		USB3_DP_QSERDES_COM_CORE_CLK_EN 0x20
		USB3_DP_QSERDES_COM_CMN_CONFIG_1 0x16
		USB3_DP_QSERDES_COM_AUTO_GAIN_ADJ_CTRL_1 0xB6
		USB3_DP_QSERDES_COM_AUTO_GAIN_ADJ_CTRL_2 0x4B
		USB3_DP_QSERDES_COM_AUTO_GAIN_ADJ_CTRL_3 0x37
		USB3_DP_QSERDES_COM_ADDITIONAL_MISC 0x0C
		USB3_DP_QSERDES_TXA_RES_CODE_LANE_TX 0x00
		USB3_DP_QSERDES_TXA_RES_CODE_LANE_RX 0x00
		USB3_DP_QSERDES_TXA_RES_CODE_LANE_OFFSET_TX 0x1F
		USB3_DP_QSERDES_TXA_RES_CODE_LANE_OFFSET_RX 0x09
		USB3_DP_QSERDES_TXA_LANE_MODE_1 0xF5
		USB3_DP_QSERDES_TXA_LANE_MODE_3 0x3F
		USB3_DP_QSERDES_TXA_LANE_MODE_4 0x3F
		USB3_DP_QSERDES_TXA_LANE_MODE_5 0x5F
		USB3_DP_QSERDES_TXA_RCV_DETECT_LVL_2 0x12
		USB3_DP_QSERDES_TXA_PI_QEC_CTRL 0x21
		USB3_DP_QSERDES_RXA_UCDR_FO_GAIN 0x0A
		USB3_DP_QSERDES_RXA_UCDR_SO_GAIN 0x06
		USB3_DP_QSERDES_RXA_UCDR_FASTLOCK_FO_GAIN 0x2F
		USB3_DP_QSERDES_RXA_UCDR_SO_SATURATION_AND_ENABLE 0x7F
		USB3_DP_QSERDES_RXA_UCDR_FASTLOCK_COUNT_LOW 0xFF
		USB3_DP_QSERDES_RXA_UCDR_FASTLOCK_COUNT_HIGH 0x0F
		USB3_DP_QSERDES_RXA_UCDR_PI_CONTROLS 0x99
		USB3_DP_QSERDES_RXA_UCDR_SB2_THRESH1 0x08
		USB3_DP_QSERDES_RXA_UCDR_SB2_THRESH2 0x08
		USB3_DP_QSERDES_RXA_UCDR_SB2_GAIN1 0x00
		USB3_DP_QSERDES_RXA_UCDR_SB2_GAIN2 0x0A
		USB3_DP_QSERDES_RXA_AUX_DATA_TCOARSE_TFINE 0xA0
		USB3_DP_QSERDES_RXA_VGA_CAL_CNTRL1 0x54
		USB3_DP_QSERDES_RXA_VGA_CAL_CNTRL2 0x0F
		USB3_DP_QSERDES_RXA_GM_CAL 0x13
		USB3_DP_QSERDES_RXA_RX_EQU_ADAPTOR_CNTRL2 0x0F
		USB3_DP_QSERDES_RXA_RX_EQU_ADAPTOR_CNTRL3 0x4A
		USB3_DP_QSERDES_RXA_RX_EQU_ADAPTOR_CNTRL4 0x0A
		USB3_DP_QSERDES_RXA_RX_IDAC_TSETTLE_LOW 0x07
		USB3_DP_QSERDES_RXA_RX_IDAC_TSETTLE_HIGH 0x00
		USB3_DP_QSERDES_RXA_RX_EQ_OFFSET_ADAPTOR_CNTRL1 0x47
		USB3_DP_QSERDES_RXA_SIGDET_CNTRL 0x04
		USB3_DP_QSERDES_RXA_SIGDET_DEGLITCH_CNTRL 0x0E
		USB3_DP_QSERDES_RXA_RX_MODE_00_LOW 0x3F
		USB3_DP_QSERDES_RXA_RX_MODE_00_HIGH 0xBF
		USB3_DP_QSERDES_RXA_RX_MODE_00_HIGH2 0xFF
		USB3_DP_QSERDES_RXA_RX_MODE_00_HIGH3 0xDF
		USB3_DP_QSERDES_RXA_RX_MODE_00_HIGH4 0xED
		USB3_DP_QSERDES_RXA_RX_MODE_01_LOW 0xDC
		USB3_DP_QSERDES_RXA_RX_MODE_01_HIGH 0x5C
		USB3_DP_QSERDES_RXA_RX_MODE_01_HIGH2 0x9C
		USB3_DP_QSERDES_RXA_RX_MODE_01_HIGH3 0x1D
		USB3_DP_QSERDES_RXA_RX_MODE_01_HIGH4 0x09
		USB3_DP_QSERDES_RXA_DFE_EN_TIMER 0x04
		USB3_DP_QSERDES_RXA_DFE_CTLE_POST_CAL_OFFSET 0x38
		USB3_DP_QSERDES_RXA_DCC_CTRL1 0x0C
		USB3_DP_QSERDES_RXA_VTH_CODE 0x10
		USB3_DP_QSERDES_RXA_SIGDET_CAL_CTRL1 0x14
		USB3_DP_QSERDES_RXA_SIGDET_CAL_TRIM 0x08
		USB3_DP_QSERDES_TXB_RES_CODE_LANE_TX 0x00
		USB3_DP_QSERDES_TXB_RES_CODE_LANE_RX 0x00
		USB3_DP_QSERDES_TXB_RES_CODE_LANE_OFFSET_TX 0x1F
		USB3_DP_QSERDES_TXB_RES_CODE_LANE_OFFSET_RX 0x09
		USB3_DP_QSERDES_TXB_LANE_MODE_1 0xF5
		USB3_DP_QSERDES_TXB_LANE_MODE_3 0x3F
		USB3_DP_QSERDES_TXB_LANE_MODE_4 0x3F
		USB3_DP_QSERDES_TXB_LANE_MODE_5 0x5F
		USB3_DP_QSERDES_TXB_RCV_DETECT_LVL_2 0x12
		USB3_DP_QSERDES_TXB_PI_QEC_CTRL 0x05
		USB3_DP_QSERDES_RXB_UCDR_FO_GAIN 0x0A
		USB3_DP_QSERDES_RXB_UCDR_SO_GAIN 0x06
		USB3_DP_QSERDES_RXB_UCDR_FASTLOCK_FO_GAIN 0x2F
		USB3_DP_QSERDES_RXB_UCDR_SO_SATURATION_AND_ENABLE 0x7F
		USB3_DP_QSERDES_RXB_UCDR_FASTLOCK_COUNT_LOW 0xFF
		USB3_DP_QSERDES_RXB_UCDR_FASTLOCK_COUNT_HIGH 0x0F
		USB3_DP_QSERDES_RXB_UCDR_PI_CONTROLS 0x99
		USB3_DP_QSERDES_RXB_UCDR_SB2_THRESH1 0x08
		USB3_DP_QSERDES_RXB_UCDR_SB2_THRESH2 0x08
		USB3_DP_QSERDES_RXB_UCDR_SB2_GAIN1 0x00
		USB3_DP_QSERDES_RXB_UCDR_SB2_GAIN2 0x0A
		USB3_DP_QSERDES_RXB_AUX_DATA_TCOARSE_TFINE 0xA0
		USB3_DP_QSERDES_RXB_VGA_CAL_CNTRL1 0x54
		USB3_DP_QSERDES_RXB_VGA_CAL_CNTRL2 0x0F
		USB3_DP_QSERDES_RXB_GM_CAL 0x13
		USB3_DP_QSERDES_RXB_RX_EQU_ADAPTOR_CNTRL2 0x0F
		USB3_DP_QSERDES_RXB_RX_EQU_ADAPTOR_CNTRL3 0x4A
		USB3_DP_QSERDES_RXB_RX_EQU_ADAPTOR_CNTRL4 0x0A
		USB3_DP_QSERDES_RXB_RX_IDAC_TSETTLE_LOW 0x07
		USB3_DP_QSERDES_RXB_RX_IDAC_TSETTLE_HIGH 0x00
		USB3_DP_QSERDES_RXB_RX_EQ_OFFSET_ADAPTOR_CNTRL1 0x47
		USB3_DP_QSERDES_RXB_SIGDET_CNTRL 0x04
		USB3_DP_QSERDES_RXB_SIGDET_DEGLITCH_CNTRL 0x0E
		USB3_DP_QSERDES_RXB_RX_MODE_00_LOW 0xBF
		USB3_DP_QSERDES_RXB_RX_MODE_00_HIGH 0xBF
		USB3_DP_QSERDES_RXB_RX_MODE_00_HIGH2 0xBF
		USB3_DP_QSERDES_RXB_RX_MODE_00_HIGH3 0xDF
		USB3_DP_QSERDES_RXB_RX_MODE_00_HIGH4 0xFD
		USB3_DP_QSERDES_RXB_RX_MODE_01_LOW 0xDC
		USB3_DP_QSERDES_RXB_RX_MODE_01_HIGH 0x5C
		USB3_DP_QSERDES_RXB_RX_MODE_01_HIGH2 0x9C
		USB3_DP_QSERDES_RXB_RX_MODE_01_HIGH3 0x1D
		USB3_DP_QSERDES_RXB_RX_MODE_01_HIGH4 0x09
		USB3_DP_QSERDES_RXB_DFE_EN_TIMER 0x04
		USB3_DP_QSERDES_RXB_DFE_CTLE_POST_CAL_OFFSET 0x38
		USB3_DP_QSERDES_RXB_DCC_CTRL1 0x0C
		USB3_DP_QSERDES_RXB_VTH_CODE 0x10
		USB3_DP_QSERDES_RXB_SIGDET_CAL_CTRL1 0x14
		USB3_DP_QSERDES_RXB_SIGDET_CAL_TRIM 0x08
		USB3_DP_PCS_LOCK_DETECT_CONFIG1 0xC4
		USB3_DP_PCS_LOCK_DETECT_CONFIG2 0x89
		USB3_DP_PCS_LOCK_DETECT_CONFIG3 0x20
		USB3_DP_PCS_LOCK_DETECT_CONFIG6 0x13
		USB3_DP_PCS_REFGEN_REQ_CONFIG1 0x21
		USB3_DP_PCS_RX_SIGDET_LVL 0x99
		USB3_DP_PCS_RCVR_DTCT_DLY_P1U2_L 0xE7
		USB3_DP_PCS_RCVR_DTCT_DLY_P1U2_H 0x03
		USB3_DP_PCS_CDR_RESET_TIME 0x0A
		USB3_DP_PCS_ALIGN_DETECT_CONFIG1 0x88
		USB3_DP_PCS_ALIGN_DETECT_CONFIG2 0x13
		USB3_DP_PCS_PCS_TX_RX_CONFIG 0x0C
		USB3_DP_PCS_EQ_CONFIG1 0x4B
		USB3_DP_PCS_EQ_CONFIG5 0x10
		USB3_DP_PCS_USB3_POWER_STATE_CONFIG1 0x68
		USB3_DP_PCS_USB3_LFPS_DET_HIGH_COUNT_VAL 0xF8
		USB3_DP_PCS_USB3_RXEQTRAINING_DFE_TIME_S2 0x07
		USB3_DP_PCS_USB3_RCVR_DTCT_DLY_U3_L 0x40
		USB3_DP_PCS_USB3_RCVR_DTCT_DLY_U3_H 0x00>;
};

&soc {
	oplus,track-charge {
		compatible = "oplus,track-charge";
		track,fast_chg_break_t_thd = <1400>;
		track,general_chg_break_t_thd = <300>;
		track,voocphy_type = <1>;
		track,wired_max_power = <100000>;
		track,wired_fast_chg_scheme = <0>;
	};
	usb_nop_phy: usb_nop_phy {
		compatible = "usb-nop-xceiv";
	};
};

&usb0 {
/delete-property/ extcon;
	dwc3@a600000 {
		usb-phy = <&eusb2_phy0>, <&usb_nop_phy>;
		maximum-speed = "high-speed";
		dr_mode = "otg";
	};
};

&battery_charger {
	//for oplus chg framework:
	oplus,chg_ops = "plat-pmic";
	qcom,smart_charging_screenoff;
	qcom,smart_chg_bcc_support;
	qcom,voocphy_support = <1>;
	qcom,input_current_charger_ma = <2000>;
	qcom,pd_input_current_charger_ma = <2000>;
	qcom,qc_input_current_charger_ma = <2000>;

	qcom,input_current_usb_ma = <500>;

	qcom,input_current_cdp_ma = <1500>;
	qcom,input_current_led_ma = <1200>;
	qcom,input_current_led_ma_high = <1200>;
	qcom,input_current_led_ma_warm = <1500>;
	qcom,input_current_led_ma_normal = <2000>;
	qcom,led_warm_bat_decidegc = <350>;
	qcom,led_high_bat_decidegc = <370>;

	qcom,input_current_camera_ma = <1200>;

	qcom,input_current_vooc_led_ma_high = <2200>;
	qcom,input_current_vooc_led_ma_warm = <3200>;
	qcom,input_current_vooc_led_ma_normal = <3600>;
	qcom,input_current_vooc_ma_normal = <3600>;
	qcom,vooc_temp_bat_normal_decidegc = <350>;
	qcom,input_current_vooc_ma_warm = <3200>;
	qcom,vooc_temp_bat_warm_decidegc = <370>;
	qcom,input_current_vooc_ma_high = <2200>;
	qcom,vooc_temp_bat_hot_decidegc = <440>;

	qcom,charger_current_vooc_ma_normal = <1800>;

	qcom,chg_ctrl_by_calling;
	qcom,input_current_calling_ma = <1500>;

	//qcom,input_current_led_ma_overtemp = <900>;
	qcom,iterm_ma = <132>;
	qcom,recharge-mv = <100>;
	qcom,batt_capacity_mah = <5000>;/*typical capacity*/
	//qcom,batt_capacity_mah = <4400>; /*rated capacity*/
	qcom,removed_bat_decidegc = <390>;  /*<-39C*/
	qcom,cold_bat_decidegc = <100>;  /*-10C~0C*/
	qcom,temp_cold_vfloat_mv = <4460>;
	qcom,temp_cold_fastchg_current_ma = <610>;

	qcom,little_cold_bat_decidegc = <0>;	/*0C~5C*/
	qcom,temp_little_cold_vfloat_mv = <4460>;
	qcom,temp_little_cold_fastchg_current_ma_high = <1100>;
	qcom,temp_little_cold_fastchg_current_ma_low = <1100>;
	qcom,temp_little_cold_fastchg_current_ma = <1100>;
	qcom,pd_temp_little_cold_fastchg_current_ma_high = <2000>;
	qcom,pd_temp_little_cold_fastchg_current_ma_low = <1600>;
	qcom,qc_temp_little_cold_fastchg_current_ma_high = <2000>;
	qcom,qc_temp_little_cold_fastchg_current_ma_low = <1600>;

	qcom,cool_bat_decidegc = <50>;	/*5C~12C*/
	qcom,temp_cool_vfloat_mv = <4460>;
	qcom,temp_cool_fastchg_current_ma_high = <1100>;
	qcom,temp_cool_fastchg_current_ma_low = <1100>;
	qcom,pd_temp_cool_fastchg_current_ma_high = <2000>;
	qcom,pd_temp_cool_fastchg_current_ma_low = <2000>;
	qcom,qc_temp_cool_fastchg_current_ma_high = <2000>;
	qcom,qc_temp_cool_fastchg_current_ma_low = <2000>;

	qcom,little_cool_bat_decidegc = <120>;	/*12C~16C*/
	qcom,temp_little_cool_vfloat_mv = <4460>;
	qcom,temp_little_cool_fastchg_current_ma = <1100>;
	qcom,pd_temp_little_cool_fastchg_current_ma = <2000>;
	qcom,qc_temp_little_cool_fastchg_current_ma = <2000>;

	qcom,normal_bat_decidegc = <160>;	/*16C~44C*/
	qcom,temp_normal_fastchg_current_ma = <1100>;
	qcom,temp_normal_vfloat_mv = <4460>;
	qcom,pd_temp_normal_fastchg_current_ma = <2000>;
	qcom,qc_temp_normal_fastchg_current_ma = <2000>;

	qcom,warm_bat_decidegc = <450>;		/*45C~53C*/ /*8pin Bat Vooc project need add 3 degree C*/
	qcom,temp_warm_vfloat_mv = <4130>;
	qcom,temp_warm_fastchg_current_ma = <1100>;
	qcom,pd_temp_warm_fastchg_current_ma = <1200>;
	qcom,qc_temp_warm_fastchg_current_ma = <1200>;
	qcom,temp_warm_fastchg_current_ma_led_on = <500>;

	qcom,hot_bat_decidegc = <530>;

	qcom,non_standard_vfloat_mv = <3980>;
	qcom,non_standard_fastchg_current_ma = <500>;

	qcom,cold_vfloat_sw_limit = <4415>;
	qcom,little_cold_vfloat_sw_limit = <4415>;
	qcom,cool_vfloat_sw_limit = <4415>;
	qcom,little_cool_vfloat_sw_limit = <4415>;
	qcom,normal_vfloat_sw_limit = <4415>;
	qcom,warm_vfloat_sw_limit = <4080>;
	qcom,non_standard_vfloat_sw_limit = <3930>;

	qcom,max_chg_time_sec = <72000>;
	qcom,charger_hv_thr = <11000>;
	qcom,charger_recv_thr = <10500>;
	qcom,vbatt_hv_thr = <4600>;
	qcom,vfloat_step_mv = <10>;
	qcom,non_standard_vfloat_over_sw_limit = <3990>;
	qcom,cold_vfloat_over_sw_limit = <4465>;
	qcom,little_cold_vfloat_over_sw_limit = <4465>;
	qcom,cool_vfloat_over_sw_limit = <4465>;
	qcom,little_cool_vfloat_over_sw_limit = <4465>;
	qcom,normal_vfloat_over_sw_limit = <4465>;
	qcom,warm_vfloat_over_sw_limit = <4140>;

	qcom,smart_chg_soh_support;
	oplus,aging_ffc_version = <1>;

	oplus,smooth_switch_v2;
	oplus,reserve_chg_soc = <3>;
	oplus,reserve_dis_soc = <3>;


	qcom,support_usbtemp_protect_v2;
	qcom,usbtemp_batt_temp_low = <50>;
	qcom,usbtemp_batt_temp_high = <50>;
	qcom,usbtemp_ntc_temp_low = <57>;
	qcom,usbtemp_ntc_temp_high = <69>;
	qcom,usbtemp_temp_gap_low_with_batt_temp = <7>;
	qcom,usbtemp_temp_gap_high_with_batt_temp = <12>;
	qcom,usbtemp_temp_gap_low_without_batt_temp = <12>;
	qcom,usbtemp_temp_gap_high_without_batt_temp = <24>;
	qcom.usbtemp_rise_fast_temp_low = <3>;
	qcom.usbtemp_rise_fast_temp_high = <3>;
	qcom.usbtemp_rise_fast_temp_count_low = <30>;
	qcom.usbtemp_rise_fast_temp_count_high = <20>;

	qcom,usbtemp_cool_down_ntc_low = <54>;
	qcom,usbtemp_cool_down_ntc_high = <65>;
	qcom,usbtemp_cool_down_gap_low = <12>;
	qcom,usbtemp_cool_down_gap_high = <20>;
	qcom,usbtemp_cool_down_recover_ntc_low = <48>;
	qcom,usbtemp_cool_down_recover_ntc_high = <60>;
	qcom,usbtemp_cool_down_recover_gap_low = <6>;
	qcom,usbtemp_cool_down_recover_gap_high = <15>;

	qcom,vbatt_power_off = <3300>;
	qcom,vbatt_soc_1 = <3310>;
	qcom,vooc_project = <8>;
	qcom,vbatt_num = <2>;
	qcom,ffc_support;
	qcom,dual_ffc;
	recharge_after_full;
	qcom,wireless_support;
	//qcom,wpc_no_chargerpump;

	qcom,normal_vterm_hw_inc = <18>;
	qcom,non_normal_vterm_hw_inc = <18>;

	qcom,ff1_normal_fastchg_ma = <550>;
	qcom,ff1_warm_fastchg_ma = <550>;
	qcom,ffc2_normal_fastchg_ma = <350>;/*12C~35c*/
	qcom,ffc2_temp_warm_decidegc = <350>;
	qcom,ffc2_warm_fastchg_ma = <400>;/*35C~40c*/
	qcom,ffc2_temp_high_decidegc = <400>;
	qcom,ffc2_temp_low_decidegc = <120>;
	qcom,ffc2_exit_step_ma = <150>;
	qcom,ff1_exit_step_ma = <150>;
	qcom,ff1_warm_exit_step_ma = <150>;
	qcom,ffc2_warm_exit_step_ma = <150>;

	qcom,ffc_normal_vfloat_sw_limit = <4480>;
	qcom,ffc2_normal_vfloat_sw_limit = <4465>;
	qcom,ffc2_warm_vfloat_sw_limit = <4465>;
	qcom,ffc_temp_normal_vfloat_mv = <4500>;
	qcom,ffc1_temp_normal_vfloat_mv = <4500>;
	qcom,ffc2_temp_normal_vfloat_mv = <4500>;
	qcom,ffc_normal_vfloat_over_sw_limit = <4500>;
	qcom,ffc1_normal_vfloat_over_sw_limit = <4500>;
	qcom,ffc2_normal_vfloat_over_sw_limit = <4500>;
	full-pre-ffc-mv = <4455>;
	full_pre_ffc_judge;

	qcom,default_iterm_ma = <132>;
	qcom,default_temp_normal_fastchg_current_ma = <1100>;
	qcom,default_normal_vfloat_sw_limit = <4415>;
	qcom,default_temp_normal_vfloat_mv = <4460>;
	qcom,default_normal_vfloat_over_sw_limit = <4465>;

	qcom,default_temp_little_cool_fastchg_current_ma = <1100>;
	qcom,default_little_cool_vfloat_sw_limit = <4415>;
	qcom,default_temp_little_cool_vfloat_mv = <4460>;
	qcom,default_little_cool_vfloat_over_sw_limit = <4465>;

	///qcom,offset_temp = <30>;
	//for control:
	//qcom,suspend_after_full;
	qcom,check_batt_full_by_sw;
	qcom,external_gauge;
	qcom,chg_ctrl_by_lcd;
	qcom,chg_ctrl_by_vooc;
	qcom,chg_ctrl_by_camera;
	qcom,sw_vfloat_over_protect_enable;
	qcom,usbtemp_batttemp_gap = <12>;
	qcom,fg_info_package_read_support;
	oplus,quick_mode_gain_support;

	//for PD9V or QC9V
	//qcom,vbatt_pdqc_to_5v_thr = <4100>;
	qcom,vbatt_pdqc_to_9v_thr = <5000>;/*always 9v*/

	qcom,vooc_show_ui_soc_decimal;
	qcom,ui_soc_decimal_speedmin = <20>;//2A
	qcom,otg_scheme = <0>;//0:cid 1:ccdetect_gpio 2:switch
	qcom,otg_boost_src = <0>;//0:OTG_BOOST_SOURCE_PMIC 1:OTG_BOOST_SOURCE_EXTERNAL
	//qcom,soft_aicl_in_adsp_support;

	qcom,dischg-gpio = <&pm8550vs_d_gpios 5 0x00>;

	qcom,vooc-max-input-volt-support = <11000>;     // 11V
	qcom,vooc-max-input-current-support = <9100>;   // 9.1A
	pinctrl-names = "dischg_enable", "dischg_disable",
					"usbtemp_l_gpio_default", "usbtemp_r_gpio_default",
					"subboard_temp_gpio_default";
	pinctrl-0 = <&dischg_enable>;
	pinctrl-1 = <&dischg_disable>;
	pinctrl-2 = <&usbtemp_l_gpio_default>;
	pinctrl-3 = <&usbtemp_r_gpio_default>;
	pinctrl-4 = <&subboard_temp_gpio_default>;
	vooc_charge_strategy_30w {
		strategy_1 {
			capacity_range = <0 75>;
			temp_range = <120 160>;
			input_current = <4000 4450 0
					3000 4470 0
					2000 4480 0>;
			};
		strategy_2 {
			capacity_range = <0 75>;
			temp_range = <160 410>;
			input_current = <6000 4200 900
					5000 4200 0
					4500 4450 0
					4000 4450 0
					3000 4470 0
					2000 4480 0>;
		};
		strategy_3 {
			capacity_range = <0 75>;
			temp_range = <410 420>;
			input_current = <4000 4470 0
					2000 4480 0>;
		};
		strategy_4 {
			capacity_range = <0 75>;
			temp_range = <420 425>;
			input_current = <4000 4480 0>;
		};
		strategy_5 {
			capacity_range = <0 75>;
			temp_range = <425 435>;
			input_current = <3000 4480 0>;
		};
	};

	vooc_charge_strategy_65w {
		strategy_1 {
			capacity_range = <0 50>;
			temp_range = <120 160>;
			input_current = <6000 4200 0
					4000 4454 0
					2000 4494 0
					1500 4500 0>;
		};
		strategy_2 {
			capacity_range = <0 50>;
			temp_range = <160 370>;
			input_current = <6500 4200 0
					6000 4250 300
					5500 4300 400
					4500 4454 780
					3500 4454 0
					2000 4494 0
					1500 4500 0>;
		};
		strategy_3 {
			capacity_range = <0 90>;
			temp_range = <370 430>;
			input_current = <6500 4200 0
					6000 4250 300
					5500 4300 400
					4500 4454 780
					3500 4454 0
					2000 4494 0
					1600 4500 0>;
		};
	};

	pps_charge_strategy {
		strategy_soc_0_to_50 {
			strategy_temp_0_to_50 =		<10000 4180 2000 0 0
							 10000 4180 1500 0 0
							 10000 4180 1400 0 0
							 10000 4430 1000 1 0>;
			strategy_temp_50_to_120 =	<10000 4180 2400 0 0
							 10000 4420 2000 0 0
							 10000 4420 1500 0 0
							 10000 4430 1000 1 0>;
			strategy_temp_120_to_160 = 	<10000 4420 3000 0 0
							 10000 4420 2500 0 0
							 10000 4420 2000 0 0
							 10000 4420 1500 0 0
							 10000 4430 1000 1 0>;
			strategy_temp_160_to_430 =	<10000 4420 3000 0 0
							 10000 4420 2500 0 0
							 10000 4420 2000 0 0
							 10000 4420 1500 0 0
							 10000 4430 1000 1 0>;
		};

		strategy_soc_50_to_75 {
			strategy_temp_0_to_50 =		<10000 4430 1000 1 0>;
			strategy_temp_50_to_120 =	<10000 4420 1500 0 0
							 10000 4430 1000 1 0>;
			strategy_temp_120_to_160 =	<10000 4420 3000 0 0
							 10000 4420 2500 0 0
							 10000 4420 2000 0 0
							 10000 4420 1500 0 0
							 10000 4430 1000 1 0>;
			strategy_temp_160_to_430 =	<10000 4420 3000 0 0
							 10000 4420 2500 0 0
							 10000 4420 2000 0 0
							 10000 4420 1500 0 0
							 10000 4430 1000 1 0>;
		};

		strategy_soc_75_to_85 {
			strategy_temp_0_to_50 = 	<10000 4430 1000 1 0>;
			strategy_temp_50_to_120 =	<10000 4430 1000 1 0>;
			strategy_temp_120_to_160 =	<10000 4420 2000 0 0
							 10000 4420 1500 0 0
							 10000 4430 1000 1 0>;
			strategy_temp_160_to_430 =	<10000 4420 2000 0 0
							 10000 4420 1500 0 0
							 10000 4430 1000 1 0>;
		};

		strategy_soc_85_to_90 {
			strategy_temp_0_to_50 = 	<10000 4430 1000 1 0>;
			strategy_temp_50_to_120 =	<10000 4430 1000 1 0>;
			strategy_temp_120_to_160 =	<10000 4430 1000 1 0>;
			strategy_temp_160_to_430 =	<10000 4430 1000 1 0>;
		};
	};
};

&tlmm {
	usb_phy_ps: usb_phy_ps {
		usb3phy_portselect_default: usb3phy_portselect_default {
			mux {
				pins = "gpio11";
				function = "usb_phy";
			};

			config {
				pins = "gpio11";
				bias-pull-down;
				drive-strength = <2>;
			};
		};
	};
};

&pm8550b_gpios {
	usbtemp_l_gpio_default: usbtemp_l_gpio_default {
		pins = "gpio5"; //GPIO 5
		function = "normal"; //normal
		bias-high-impedance; //DISABLE GPIO5 for ADC
		bias-disable;
	};
	usbtemp_r_gpio_default: usbtemp_r_gpio_default {
		pins = "gpio10"; //GPIO 10
		function = "normal"; //normal
		bias-high-impedance; //DISABLE GPIO10 for ADC
		bias-disable;
	};
	subboard_temp_gpio_default: subboard_temp_gpio_default {
		pins = "gpio6"; //GPIO 6
		function = "normal"; //normal
		bias-high-impedance; //DISABLE GPIO6 for ADC
		bias-disable;
	};
};

&pmk8550_vadc {
	usb_temp_adc {
		reg = <PM8550B_ADC5_GEN3_AMUX2_GPIO5_100K_PU>;
		label = "usb_temp_adc";
		qcom,pre-scaling = <1 1>;
		qcom,ratiometric;
		qcom,hw-settle-time = <200>;
		qcom,scale-fn-type = <OPLUS_ADC_SCALE_HW_CALIB_DEFAULT>;
	};
	usb_supplementary_temp_adc {
		reg = <PM8550B_ADC5_GEN3_AMUX_THM6_GPIO10_100K_PU>;
		label = "usb_supplementary_temp_adc";
		qcom,pre-scaling = <1 1>;
		qcom,ratiometric;
		qcom,hw-settle-time = <200>;
		qcom,scale-fn-type = <OPLUS_ADC_SCALE_HW_CALIB_DEFAULT>;
	};
	pm8550b_wls_therm { //for PM8550B_ADC5_GEN3_AMUX_THM6_GPIO10_100K_PU to config to uV
		qcom,adc-tm-type = <0>;
		qcom,scale-fn-type = <OPLUS_ADC_SCALE_HW_CALIB_DEFAULT>;
	};
	subboard_temp_adc {
		reg = <PM8550B_ADC5_GEN3_AMUX3_GPIO6_100K_PU>;
		label = "subboard_temp_adc";
		qcom,pre-scaling = <1 1>;
		qcom,ratiometric;
		qcom,hw-settle-time = <200>;
	};
};

&battery_charger {
	io-channels	= <&pmk8550_vadc PM8550B_ADC5_GEN3_AMUX2_GPIO5_100K_PU>,
					<&pmk8550_vadc PM8550B_ADC5_GEN3_AMUX_THM6_GPIO10_100K_PU>,
					<&pmk8550_vadc PM8550B_ADC5_GEN3_AMUX3_GPIO6_100K_PU>;
	io-channel-names = "usb_temp_adc",
						"usb_supplementary_temp_adc",
						"subboard_temp_adc";
};

/*&thermal_zones {
	tof-therm {
		status = "disabled";
	};
};*/

&pm8550vs_d_gpios {
	dischg_enable: dischg_enable {
		pins = "gpio5";
		function = "normal";
		bias-disable;
		power-source = <1>;
		output-high;
		qcom,drive-strength = <3>;
	};
	dischg_disable: dischg_disable {
		pins = "gpio5";
		function = "normal";
		bias-disable;
		power-source = <1>;
		output-low;
		qcom,drive-strength = <3>;
	};
};

//#endif OPLUS_FEATURE_CHG_BASIC


&battery_charger {
	oplus,ic_type = <OPLUS_CHG_IC_BUCK>;
	oplus,ic_index = <0>;
};
//endif OPLUS_FEATURE_CHG_BASIC

&soc {
	feedback_fb: feedback_fb {
		compatible = "oplus,haptic-feedback";
	};
};
