Commit | Line | Data |
---|---|---|
6fa3eb70 S |
1 | #ifndef _CUST_BAT_H_ |
2 | #define _CUST_BAT_H_ | |
3 | ||
4 | /* stop charging while in talking mode */ | |
5 | #define STOP_CHARGING_IN_TAKLING | |
6 | #define TALKING_RECHARGE_VOLTAGE 3800 | |
7 | #define TALKING_SYNC_TIME 60 | |
8 | ||
9 | /* Battery Temperature Protection */ | |
10 | #define MTK_TEMPERATURE_RECHARGE_SUPPORT | |
11 | #define MAX_CHARGE_TEMPERATURE 50 | |
12 | #define MAX_CHARGE_TEMPERATURE_MINUS_X_DEGREE 47 | |
13 | #define MIN_CHARGE_TEMPERATURE 0 | |
14 | #define MIN_CHARGE_TEMPERATURE_PLUS_X_DEGREE 6 | |
15 | #define ERR_CHARGE_TEMPERATURE 0xFF | |
16 | ||
17 | /* Linear Charging Threshold */ | |
18 | #define V_PRE2CC_THRES 3400 //mV | |
19 | #define V_CC2TOPOFF_THRES 4050 | |
20 | #define RECHARGING_VOLTAGE 4110 | |
21 | #define CHARGING_FULL_CURRENT 150 //mA | |
22 | ||
23 | /* Charging Current Setting */ | |
24 | //#define CONFIG_USB_IF | |
25 | #define USB_CHARGER_CURRENT_SUSPEND 0 // def CONFIG_USB_IF | |
26 | #define USB_CHARGER_CURRENT_UNCONFIGURED CHARGE_CURRENT_70_00_MA // 70mA | |
27 | #define USB_CHARGER_CURRENT_CONFIGURED CHARGE_CURRENT_500_00_MA // 500mA | |
28 | ||
29 | #define USB_CHARGER_CURRENT CHARGE_CURRENT_500_00_MA //500mA | |
30 | #define AC_CHARGER_CURRENT CHARGE_CURRENT_800_00_MA | |
31 | #define NON_STD_AC_CHARGER_CURRENT CHARGE_CURRENT_500_00_MA | |
32 | #define CHARGING_HOST_CHARGER_CURRENT CHARGE_CURRENT_650_00_MA | |
33 | #define APPLE_0_5A_CHARGER_CURRENT CHARGE_CURRENT_500_00_MA | |
34 | #define APPLE_1_0A_CHARGER_CURRENT CHARGE_CURRENT_650_00_MA | |
35 | #define APPLE_2_1A_CHARGER_CURRENT CHARGE_CURRENT_800_00_MA | |
36 | ||
37 | ||
38 | /* Precise Tunning */ | |
39 | #define BATTERY_AVERAGE_DATA_NUMBER 3 | |
40 | #define BATTERY_AVERAGE_SIZE 30 | |
41 | ||
42 | /* charger error check */ | |
43 | //#define BAT_LOW_TEMP_PROTECT_ENABLE // stop charging if temp < MIN_CHARGE_TEMPERATURE | |
44 | #define V_CHARGER_ENABLE 0 // 1:ON , 0:OFF | |
45 | #define V_CHARGER_MAX 6500 // 6.5 V | |
46 | #define V_CHARGER_MIN 4400 // 4.4 V | |
47 | ||
48 | /* Tracking TIME */ | |
49 | #define ONEHUNDRED_PERCENT_TRACKING_TIME 10 // 10 second | |
50 | #define NPERCENT_TRACKING_TIME 20 // 20 second | |
51 | #define SYNC_TO_REAL_TRACKING_TIME 60 // 60 second | |
52 | #define V_0PERCENT_TRACKING 3400 //3400mV | |
53 | ||
54 | /* Battery Notify */ | |
55 | #define BATTERY_NOTIFY_CASE_0001_VCHARGER | |
56 | #define BATTERY_NOTIFY_CASE_0002_VBATTEMP | |
57 | //#define BATTERY_NOTIFY_CASE_0003_ICHARGING | |
58 | //#define BATTERY_NOTIFY_CASE_0004_VBAT | |
59 | //#define BATTERY_NOTIFY_CASE_0005_TOTAL_CHARGINGTIME | |
60 | ||
61 | /* JEITA parameter */ | |
62 | //#define MTK_JEITA_STANDARD_SUPPORT | |
63 | #define CUST_SOC_JEITA_SYNC_TIME 30 | |
64 | #define JEITA_RECHARGE_VOLTAGE 4110 // for linear charging | |
65 | #define JEITA_TEMP_ABOVE_POS_60_CV_VOLTAGE BATTERY_VOLT_04_100000_V | |
66 | #define JEITA_TEMP_POS_45_TO_POS_60_CV_VOLTAGE BATTERY_VOLT_04_100000_V | |
67 | #define JEITA_TEMP_POS_10_TO_POS_45_CV_VOLTAGE BATTERY_VOLT_04_200000_V | |
68 | #define JEITA_TEMP_POS_0_TO_POS_10_CV_VOLTAGE BATTERY_VOLT_04_100000_V | |
69 | #define JEITA_TEMP_NEG_10_TO_POS_0_CV_VOLTAGE BATTERY_VOLT_03_900000_V | |
70 | #define JEITA_TEMP_BELOW_NEG_10_CV_VOLTAGE BATTERY_VOLT_03_900000_V | |
71 | ||
72 | /* For JEITA Linear Charging only */ | |
73 | #define JEITA_NEG_10_TO_POS_0_FULL_CURRENT 120 //mA | |
74 | #define JEITA_TEMP_POS_45_TO_POS_60_RECHARGE_VOLTAGE 4000 | |
75 | #define JEITA_TEMP_POS_10_TO_POS_45_RECHARGE_VOLTAGE 4100 | |
76 | #define JEITA_TEMP_POS_0_TO_POS_10_RECHARGE_VOLTAGE 4000 | |
77 | #define JEITA_TEMP_NEG_10_TO_POS_0_RECHARGE_VOLTAGE 3800 | |
78 | #define JEITA_TEMP_POS_45_TO_POS_60_CC2TOPOFF_THRESHOLD 4050 | |
79 | #define JEITA_TEMP_POS_10_TO_POS_45_CC2TOPOFF_THRESHOLD 4050 | |
80 | #define JEITA_TEMP_POS_0_TO_POS_10_CC2TOPOFF_THRESHOLD 4050 | |
81 | #define JEITA_TEMP_NEG_10_TO_POS_0_CC2TOPOFF_THRESHOLD 3850 | |
82 | ||
83 | ||
84 | #ifdef CONFIG_MTK_FAN5405_SUPPORT | |
85 | #define FAN5405_BUSNUM 1 | |
86 | #endif | |
87 | ||
88 | #ifdef CONFIG_MTK_BQ24158_SUPPORT | |
89 | #define BQ24158_BUSNUM 1 | |
90 | #endif | |
91 | ||
92 | #ifdef CONFIG_MTK_BQ24296_SUPPORT | |
93 | #define BQ24296_BUSNUM 1 | |
94 | #endif | |
95 | ||
96 | #ifdef CONFIG_MTK_BQ24297_SUPPORT | |
97 | #define BQ24297_BUSNUM 1 | |
98 | #endif | |
99 | ||
100 | /* High battery support */ | |
101 | //#define HIGH_BATTERY_VOLTAGE_SUPPORT | |
102 | ||
103 | /* Disable Battery check for HQA */ | |
104 | #ifdef MTK_DISABLE_POWER_ON_OFF_VOLTAGE_LIMITATION | |
105 | #define CONFIG_DIS_CHECK_BATTERY | |
106 | #endif | |
107 | ||
108 | ||
109 | //#define MTK_WIRELESS_CHARGER_SUPPORT 1 | |
110 | ||
111 | /* Pump Express support (fast charging) */ | |
112 | #ifdef CONFIG_MTK_PUMP_EXPRESS_SUPPORT | |
113 | #define TA_START_VCHR_TUNUNG_VOLTAGE 3400 | |
114 | #define TA_CHARGING_CURRENT CHARGE_CURRENT_1500_00_MA | |
115 | #undef V_CHARGER_MAX | |
116 | #ifdef TA_9V_SUPPORT | |
117 | #define V_CHARGER_MAX 9500 // 9.5 V | |
118 | #else | |
119 | #define V_CHARGER_MAX 6000 // 6.0 V | |
120 | #endif | |
121 | #endif | |
122 | ||
123 | #endif /* _CUST_BAT_H_ */ |