Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9afd868f authored by jessicatseng's avatar jessicatseng Committed by jessicatseng(45616)
Browse files

[PRJ8901-336]Play mp3 and charge all night, but phone can't charge fully

1.rerun AICL per 45 sec.
2.reduce charging current 2A to 1.5A at 40 ~ 45 degree,
  1A to 500mA at 45 ~ 60 degree
3.recharge voltage changes from 4.05V to 3.9V

(cherry picked from commit a99d42adf301c2c8aed94748ed4968e513ac61cd)

Change-Id: I3c8cde87dbecb8aaf8eb7298612e8fad826323db
parent 96f87118
Loading
Loading
Loading
Loading
+7 −3
Original line number Diff line number Diff line
@@ -33,14 +33,18 @@ qcom,batterydata_fuji_3000mah {
		"Fuji_3000mAH_FG_averaged_MasterSlave_Jan22th2019";
	qcom,qg-batt-profile-ver = <100>;

//<2019/08/19-JessicaTseng, Modify FCC is 1500mA at 40 ~ 45 degree, 500mA at 45 ~ 60 degree.
//<--[FairPhone][Charging][JasonHsing] Fix SW jeita is not correct 20190716 BEGIN --
	qcom,jeita-fcc-ranges = <0   150   600000
				 151 450  2000000
				 451 600  1000000>;
				 151 400  2000000
				 401 450  1500000
				 451 600  500000>;
	qcom,jeita-fv-ranges =  <0   150  4400000
				 151 450  4400000
				 151 400  4400000
				 401 450  4400000
				 451 600  4100000>;
//-->[FairPhone][Charging][JasonHsing] Fix SW jeita is not correct 20190716 END --
//>2019/08/19-JessicaTseng

//-->[FairPhone][Charging][JasonHsing] Add battery parameter for battery spec for charging 20181228 END --
//<--[FairPhone][Charging][JasonHsing] Setting jeita cold/cool/warm/hot threshold for charging 20190115 BEGIN --
+9 −0
Original line number Diff line number Diff line
@@ -2314,6 +2314,15 @@ static int smb5_init_hw(struct smb5 *chip)
		}
	}

//<2019/08/19-JessicaTseng, Enable AICL rerun periodically
	/* AICL PERIODIC RERUN ENABLE*/
	rc = smblib_write(chg, USBIN_AICL_OPTIONS_CFG_REG, 0xD4);
	if (rc < 0) {
			dev_err(chg->dev, "Couldn't config RERUN AICL ENABLE rc=%d\n", rc);
			return rc;
	}
//>2019/08/19-JessicaTseng

	/* enable the charging path */
	rc = vote(chg->chg_disable_votable, DEFAULT_VOTER, false, 0);
	if (rc < 0) {
+4 −2
Original line number Diff line number Diff line
@@ -502,10 +502,12 @@ static int handle_step_chg_config(struct step_chg_info *chip)
	return (STEP_CHG_HYSTERISIS_DELAY_US - elapsed_us + 1000);
}

#define JEITA_SUSPEND_HYST_UV		50000
//<2019/08/19-JessicaTseng, Modify recharging voltage from 4.05V to 3.9V at battery temperature over 45 degree
#define JEITA_SUSPEND_HYST_UV		200000//50000
//<--[FairPhone][Charging][JasonHsing] Setting jeita fv re-charge voltage for warm temp BEGIN --
#define JEITA_RECHG_HYST_UV		100000
#define JEITA_RECHG_HYST_UV		200000//100000
//-->[FairPhone][Charging][JasonHsing] Setting jeita fv re-charge voltage for warm temp END --
//>2019/08/19-JessicaTseng

static int handle_jeita(struct step_chg_info *chip)
{