MTK Android Driver:battery Battery curve
1. configuration file Location:
custom_kernel_battery= BATTERY
Mediatek\custom\\kernel\battery\battery\cust_battery.h
Mediatek\custom\\kernel\battery\battery\custom_fuel_gauge.h
2. General parameters of charging modification:
.. \mediatek\custom\\kernel\battery\battery\cust_battery.h
Charging Current Modification:
#defineUSB_CHARGER_CURRENT cust_cc_550ma//: cust_cc_450ma
#define Ac_charger_current cust_cc_800ma//: cust_cc_650ma
Charging resistor setting (according to the hardware BOM):
#defineR_CURRENT_SENSE 2//0.2 ohm//0.2 ohm
Charging temperature detection setting
#defineBAT_TEMP_PROTECT_ENABLE 1//
#defineBAT_NTC_TSM_1
NTC modified to 10K resistor or 47K resistor (NTC for battery temperature protection negativetemperature coefficient)
#define BAT_NTC_101//#define BAT_NTC_47 0
Other:
#defineV_CHARGER_MIN 4400//modify//4400//4.4 V
#defineV_CHARGER_ENABLE 1//1:on, 0:off//
3. The charging interface displays the changes:
\mediatek\custom\\lk\include\target\cust_display.h//coordinates
\mediatek\platform\mt6577\lk\mt_logo.c//Display
4. Battery capacity, battery curve modification:
Battery Capacity Modification:
Mediatek\custom\\kernel\battery\battery\custom_fuel_gauge.h
#define Q_MAX_POS_50 ((2168* 1316)/1307)
#define Q_MAX_POS_25 2168
#define Q_MAX_POS_0 ((2168 * 1220)/1307)
#define Q_MAX_NEG_10 ((2168 * 1162)/1307)
#define Q_max_pos_50_h_current ((2168 * 1295)/1307)
#define Q_max_pos_25_h_current ((2168 * 1270)/1307)
#define Q_max_pos_0_h_current ((2168 * 1102)/1307)
#define Q_max_neg_10_h_current ((2168 * 599)/1307)
Battery Curve Integration method: (Voltage-Percentage table required by the battery manufacturer)
Mediatek\custom\\kernel\battery\battery\cust_fuel_gauge.h
Battery_profile_strucbattery_profile_t1[] =//T1 0C
Battery_profile_strucbattery_profile_t2[] =//T2 25C
MTK Android Driver:battery Battery curve