thermal: add charging throttling policy

- Align thermal charge config with older devices
- Add hardlimit for fcc

Bug: 254020998
Test: tested locally by verifying lshal and logs
Change-Id: I96460871a2fa9ad714f9a3e2e722a0ab62fa4ba6
This commit is contained in:
sashwinbalaji 2022-12-05 19:58:28 +08:00 committed by S Ashwin Balaji
parent d9e676ad01
commit 4c6b6d02aa
2 changed files with 75 additions and 1 deletions

View file

@ -4,6 +4,68 @@
"Name":"battery",
"Type":"BATTERY",
"Multiplier":0.001
},
{
"Name":"neutral_therm",
"Type":"UNKNOWN",
"TempPath":"/dev/thermal/tz-by-name/neutral_therm/tz_temp",
"Multiplier":0.001
},
{
"Name":"quiet_therm",
"Type":"UNKNOWN",
"HotThreshold":["NAN", "35.0", "NAN", "NAN", "NAN", "NAN", "NAN"],
"TempPath":"/dev/thermal/tz-by-name/quiet_therm/tz_temp",
"Multiplier":0.001
},
{
"Name":"charger_skin_therm",
"Type":"UNKNOWN",
"TempPath":"/dev/thermal/tz-by-name/charger_skin_therm/tz_temp",
"Multiplier":0.001
},
{
"Name":"disp_therm",
"Type":"UNKNOWN",
"TempPath":"/dev/thermal/tz-by-name/disp_therm/tz_temp",
"Multiplier":0.001
},
{
"Name":"usb_pwr_therm",
"Type":"UNKNOWN",
"TempPath":"/dev/thermal/tz-by-name/usb_pwr_therm/tz_temp",
"Multiplier":0.001
},
{
"Name":"usb_pwr_therm2",
"Type":"UNKNOWN",
"TempPath":"/dev/thermal/tz-by-name/usb_pwr_therm2/tz_temp",
"Multiplier":0.001
},
{
"Name":"VIRTUAL-BACK-CHARGER",
"Type":"UNKNOWN",
"Hidden":true,
"VirtualSensor":true,
"Formula":"WEIGHTED_AVG",
"Combination":["neutral_therm", "quiet_therm", "charger_skin_therm", "disp_therm"],
"Coefficient":["-0.148", "0.666", "0.256", "-0.079"],
"HotThreshold":["NAN", "39.0", "43.0", "45.0", "47.0", "51.0", "55.0"],
"HotHysteresis":[0.0, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9],
"Offset":7137,
"Multiplier":0.001,
"BindedCdevInfo": [
{
"CdevRequest": "fcc",
"LimitInfo": [0, 1, 2, 3, 4, 5, 5]
}
]
}
],
"CoolingDevices":[
{
"Name":"fcc",
"Type":"BATTERY"
}
]
}

View file

@ -83,8 +83,16 @@
"Formula":"WEIGHTED_AVG",
"Combination":["neutral_therm", "quiet_therm", "charger_skin_therm", "disp_therm"],
"Coefficient":["-0.148", "0.666", "0.256", "-0.079"],
"HotThreshold":["NAN", "39.0", "43.0", "45.0", "47.0", "51.0", "55.0"],
"HotHysteresis":[0.0, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9],
"Offset":7137,
"Multiplier":0.001
"Multiplier":0.001,
"BindedCdevInfo": [
{
"CdevRequest": "fcc",
"LimitInfo": [0, 1, 2, 3, 4, 5, 5]
}
]
},
{
"Name":"VIRTUAL-SKIN",
@ -579,6 +587,10 @@
"Name":"tpu_cooling",
"Type":"NPU",
"WritePath":"/dev/thermal/cdev-by-name/tpu_cooling/user_vote"
},
{
"Name":"fcc",
"Type":"BATTERY"
}
],
"PowerRails":[