[HTC One S] pavel.bosco:
this code which is common for HTC, makes me wonder that is the meaning of cmd arg "androidboot.dq"

static int __init check_dq_setup(char *str)
{
if (!strcmp(str, "PASS")) {
pr_info("[BATT] overwrite HV battery config\n");
pm8921_chg_pdata.max_voltage = 4340;
pm8921_chg_pdata.cool_bat_voltage = 4340;
pm8921_bms_pdata.max_voltage_uv = 4340 * 1000;
} else {
pr_info("[BATT] use default battery config\n");
pm8921_chg_pdata.max_voltage = 4200;
pm8921_chg_pdata.cool_bat_voltage = 4200;
pm8921_bms_pdata.max_voltage_uv = 4200 * 1000;
}
return 1;
}
__setup("androidboot.dq=", check_dq_setup);

this is from board-ville-pmic.c

I'm thinking it's always FAIL for s-off devices. (androidboot.dq dq = disqualified??) so code will always reset to default

and I believe it influences maximum charge voltage, which, I guess reflects on ability for modern batteries to be charged to full capacity

will try to charge battery with this code commented out.

upd: after a try the new messages show up in dmesg:

[ 112.105203] [BATT][CHG] adjust_vdd_max_for_fastchg: rconn_mohm=10, reg_loop=0x0, vbat_uv=4119677, ichg_ma=-354, vbat_terminal_mv=4116, delta_mv=224, ichg_regulation_thr_ua=-375000, target_vdd_max=4340, ichg_threshold_ua=-1200000
[ 112.105997] [BATT][CHG] adjust_vdd_max_for_fastchg: adjusting vdd_max_mv to 4360 from 4360 to make vbat_batt_termial_uv = 4116137 to 4340

and this is how my batt_attr_text looks like for this moment (battery charging)

charging_source: 7;
charging_enabled: 7;
overload: 0;
Percentage(%): 68;
Percentage_raw(%): 68;
htc_extension: 0x1;
SOC(%): 69;
EOC(bool): 0;
OVP(bool): 0;
UVP(bool): 0;
VBAT(uV): 4185735;
IBAT(uA): -341500;
ID_RAW(uV): 302784;
BATT_TEMP(deci-celsius): 300;
is_bat_warm(bool): 0
is_bat_cool(bool): 0
BTM_WARM_IRQ: 0
BTM_COOL_IRQ: 0
BATT_PRESENT(bool): 1;
FCC(uAh): 2800000;
usb_target_ma/usb_aicl_max_ma(mA): 0/0;
BMS_CONTROL: 0x99;
BMS_OUTPUT0: 0xa0;
BMS_OUTPUT1: 0xfd;
BMS_TOLERANCES: 0x03;
BMS_TEST1: 0x11;
OCV_UPDATE_STORAGE: 0xa1;
bms_discharge_soc: 0;
is_ocv_update_start: 0;
ocv_update_stop_active_mask: 0xd;
ocv_update_stop_reason(sw): 0x1(0x0);
OCV_FOR_RBATT_RAW: 0x0;
VBATT_FOR_RBATT_RAW: 0x936f;
VSENSE_FOR_RBATT_RAW: 0x3bf;
LAST_GOOD_OCV_RAW: 0x938b;
CC_RAW: 0xf8f3198f;
ocv_for_rbatt_uv: 0;
vbatt_for_rbatt_uv: 3840758;
vsense_for_rbatt_uv: 5387;
last_good_ocv_uv: 3849073;
last_ocv_raw_uv: 3849073;
rbatt(milliOhms): 277;
rbatt_scalefactor: 111;
soc_rbatt(%): 68;
last_rbatt(%): -22;
voltage_unusable_uv(uV): 3000000;
pc_unusable(%): 0;
rc_pc(%): 50;
scalefactor(): 100;
fcc(uAh): 2800000;
unusable_charge(uAh): 0;
remaining_charge(uAh): 1400000;
cc(uAh): -504924;
chargecycles: 0;
start_percent: 66;
end_percent: -22;
CCADC_ANA_PARAM: 0x1b;
CCADC_DIG_PARAM: 0xa3;
CCADC_RSV: 0x10;
CCADC_DATA0: 0x00;
CCADC_DATA1: 0x00;
CCADC_OFFSET_TRIM1: 0xbc;
CCADC_OFFSET_TRIM0: 0x4c;
CCADC_FULLSCALE_TRIM1: 0xcd;
CCADC_FULLSCALE_TRIM0: 0xad;
FSM: 7;
ATCDONE_IRQ: 0;
ATCFAIL_IRQ: 0;
BATFET_IRQ: 1;
BATTTEMP_COLD_IRQ: 0;
BATTTEMP_HOT_IRQ: 0;
BATT_INSERTED_IRQ: 1;
BATT_REMOVED_IRQ: 0;
BAT_TEMP_OK_IRQ: 1;
CHGDONE_IRQ: 0;
CHGFAIL_IRQ: 0;
CHGHOT_IRQ: 0;
CHGSTATE_IRQ: 0;
CHGWDOG_IRQ: 0;
CHG_GONE_IRQ: 0;
COARSE_DET_LOW_IRQ: 0;
DCIN_OV_IRQ: 1;
DCIN_UV_IRQ: 1;
DCIN_VALID_IRQ: 0;
USBIN_OV_IRQ: 0;
USBIN_UV_IRQ: 0;
USBIN_VALID_IRQ: 1;
FASTCHG_IRQ: 1;
LOOP_CHANGE_IRQ: 0;
TRKLCHG_IRQ: 0;
VBATDET_IRQ: 0;
VBATDET_LOW_IRQ: 1;
VBAT_OV_IRQ: 0;
VCP_IRQ: 0;
VDD_LOOP_IRQ: 1;
VREG_OV_IRQ: 0;
REGULATION_LOOP: 0x08
USBIN(uV): 4918304;
DCIN(uV): 42834;
VPH_PWR(uV): 4193763;
AC_SAFETY_TIMEOUT(bool): 0;
AC_SAFETY_TIMEOUT2(bool): 0;
mitigation_level(int): 0;
eoc_count/by_curr(int): 0/0;
reverse_boost_disabled(bool): 0;
usbin_critical_low_cnt(int): 0;
pwrsrc_under_rating(bool): 0;
CHG_CNTRL: 0x85;
CHG_CNTRL_2: 0x72;
CHG_CNTRL_3: 0x88;
PBL_ACCESS1: 0xa4;
PBL_ACCESS2: 0x6;
SYS_CONFIG_1: 0x3;
SYS_CONFIG_2: 0xd8;
CHG_IBAT_MAX: 0x1a;
CHG_IBAT_SAFE: 0x10;
CHG_VDD_MAX: 0x38;
CHG_VDD_SAFE: 0x30;
last_delta_batt_terminal_mv: 168;
CHG_VBAT_DET: 0x7f;
CHG_VIN_MIN: 0x6;
CHG_VTRICKLE: 0xfa;
CHG_ITRICKLE: 0x8a;
CHG_ITERM: 0x0;
CHG_TCHG_MAX: 0x77;
CHG_TWDOG: 0xa0;
CHG_TEMP_THRESH: 0x94;
CHG_COMP_OVR: 0x0;
CHG_BUCK_CTRL_TEST1: 0x1;
CHG_BUCK_CTRL_TEST2: 0x8d;
CHG_BUCK_CTRL_TEST3: 0x91;
CHG_TEST: 0x68;
USB_OVP_CONTROL: 0x43;
USB_OVP_TEST: 0xa0;
DC_OVP_CONTROL: 0x4c;
DC_OVP_TEST: 0xa0;

fcc is full capacity (software parameter, hardcoded)