Commit graph

100 commits

Author SHA1 Message Date
TeYuan Wang
293906adff thermal: reading the thermistor temperature from upstream sysfs for proto
Bug: 326252555
Test: adb shell dumpsys thermalservice
Change-Id: I13dc61d5d4df64b3a9858dc062a3eee52d0dee94
2024-02-29 02:12:11 +00:00
TeYuan Wang
f2a7aba99e thermal: reading the thermistor temperature from upstream sysfs
tz_temp callback will invoke thermal_zone_device_update and return the cached temp from thermal core. However, during device resume, the cached temp may be reset to INVALID number before being returned.
So, change the reading path to upstream temp_show which will return the temperature from thermistor driver directly.

Bug: 326252555
Test: adb shell dumpsys thermalservice
Change-Id: I82cf81d940585c4827256804bc9c9397f4b54ccf
2024-02-28 07:30:38 +00:00
Sayanna Chandula
879af0e284 thermal: update vt model with 3 prev samples
Bug: 326130588
Test: Build and boot on device

Change-Id: If08449d01fc3c70ef68ba2900ab0ea0d6840a9c4
Signed-off-by: Sayanna Chandula <sayanna@google.com>
2024-02-27 15:31:42 +00:00
Jikai Ma
74226a7a32 Merge "thermal: remove ODPM from legacy and patched linear model" into main 2024-02-16 22:47:36 +00:00
Jikai Ma
89813cd1df thermal: remove ODPM from legacy and patched linear model
- remove ODPM from legacy formulas
- remove ODPM from patched linear formulas
- update VIRTUAL-SKIN-CHARGE formulas

Bug: 320714468
Test: build and boot to home

Change-Id: I974476d45d9ace1740f9fec06af9399db5b7cb59
Signed-off-by: Jikai Ma <jikai@google.com>
2024-02-15 16:03:56 -08:00
Sayanna Chandula
0f72b2af9b Merge "thermal: add historic samples for tflite vt prediction" into main 2024-02-15 01:01:44 +00:00
Sayanna Chandula
ba2f333130 thermal: add historic samples for tflite vt prediction
Add historic samples of past 5 iterations
Remove VSYS_PWR_ODPM from VT prediction

Bug: 315169778
Test: Build and boot on device

Change-Id: I70557d67633cbc4bcfbfe8811beff56353c54085
Signed-off-by: Sayanna Chandula <sayanna@google.com>
2024-02-14 08:46:08 -08:00
TeYuan Wang
f28d1f2826 thermal: remove battery from TriggerSensor
Bug: 324178403
Test: no thermal error log when thermalHAL init
Change-Id: Ieb08a0b9312a591861384136572ccf1dddd5bbda
2024-02-07 07:43:00 +00:00
Peter (YM)
79029f6bc5 Merge "thermal: update gpu cdev ceiling" into main 2024-02-06 08:07:51 +00:00
Peter (YM)
8887ea09d1 thermal: update gpu cdev ceiling
Align with new GPU available frequency

Bug: 318313844
Test: Run gpu stress test
Change-Id: Iac169739bc72c047afa2564edb540468f48fd3ea
Signed-off-by: Peter (YM) <peterym@google.com>
2024-02-06 06:36:55 +00:00
Jikai Ma
658d9ff056 thermal: add ODPM to virtual sensor formula
- add to legacy formulas
- add to historic linear formulas

Bug: 320714468
Bug: 315234782
Bug: 307824060

Test: build and boot to home

Change-Id: If395b3281ad180731e93953089c1ca57afdb6b68
Signed-off-by: Jikai Ma <jikai@google.com>
2024-02-05 14:35:41 -08:00
Sayanna Chandula
af4cea32f3 thermal: update vt prediction models with higher odpm average
- Updated vt predictions models with 15 samples average for ODPM rails.
- This reduces VT prediction being very sensitive to power changes
- Remove other ODPM rails from VT prediction except for VSYS_PWR_CAMERA

Bug: 307824060, 322910529
Test: Build and boot on device

Change-Id: Ibb285269d3da86e3d331ea3c7c5a3cd715da0ba2
Signed-off-by: Sayanna Chandula <sayanna@google.com>
2024-01-31 11:37:55 -08:00
Sayanna Chandula
4e1edbd52d thermal: add 500mC offset for km4 vt prediction
- Add 500mC offset to address underprediction
- Fix issue with VIRTUAL-SKIN-LEGACY-SHUTDOWN thresholds

Bug: 321108353
Test: Build and boot on device

Change-Id: I778e4949308af484ec8ca7a9dfaf27d13c429209
Signed-off-by: Sayanna Chandula <sayanna@google.com>
2024-01-25 15:15:42 -08:00
Jikai Ma
d1ed787a37 thermal: patched linear model virtual sensor
Bug: 315234782
Test: Build and boot on device
Change-Id: I86806579efe479aafd4a34855e8a0f80176ef1cf
Signed-off-by: Jikai Ma <jikai@google.com>
2024-01-25 18:50:47 +00:00
Sayanna Chandula
2842a579c0 thermal: enable thermal throttling based on virtual-skin-model
- Switch to VIRTUAL-SKIN-MODEL from VIRTUAL-SKIN-LEGACY
- Add a backup shutdown based on VIRTUAL-SKIN-LEGACY
- Remove unnecessary polling delays from few sensors

Bug: 321108353
Test: Build and boot on device

Change-Id: I8b8909ded87ba2b76d5712c474120dbe5ab13c2c
Signed-off-by: Sayanna Chandula <sayanna@google.com>
2024-01-24 11:18:22 -08:00
Sayanna Chandula
1a93070bd9 Merge "thermal: update vt models with odpm features" into main 2024-01-24 18:28:41 +00:00
Sayanna Chandula
1aa294872c Merge "thermal: Add vskin-model stats monitoring config" into main 2024-01-24 18:28:22 +00:00
Ramya Subramanian
52b4354c2b Merge "Revert^2 "thermal: Update cdev ceiling to match latest EM table"" into main 2024-01-24 16:22:14 +00:00
Sayanna Chandula
9b07c28910 thermal: update vt models with odpm features
Bug: 307824060
Test: Build and boot on device

Change-Id: Ide175d4945ac64e32d33e0c57e486f2691631b78
Signed-off-by: Sayanna Chandula <sayanna@google.com>
2024-01-23 18:00:01 -08:00
sashwinbalaji
37a10af4f0 thermal: Add vskin-model stats monitoring config
Update thermal config as:
- Rename VIRTUAL-SKIN to VIRTUAL-SKIN-LEGACY
In order to differentiate different vt models, we need to define
legacy equation as a sepearate sensor and use it as a reference
for virtual-skin. Later when we want to switch to other models,
we could simply replace the combination for virtual-skin sensor
- Record Stats for
	- VIRTUAL-SKIN-MODEL
	- VIRTUAL-SKIN-MODEL - VIRTUAL-SKIN
  		- At intervals of 500 mdeg (-4500 to 4500)
		- At intervals of 1000 mdef (-13000 to 12000 exlucding
		  -4000 to 4000)
	- Abnormality Monitoring
		- VIRTUAL-SKIN-MODEL [0-55 deg]
		- VIRTUAL-SKIN-MODEL-LEGACY-DIFF [-12000 - 12000 mdeg]

Bug: 320347462
Test: Push config and verify logcat and lshal
Change-Id: I397c8a07cf01abd5d8a7dedf290829a19e21ae87
2024-01-23 17:59:40 -08:00
Ramya Subramanian
23a61319f4 Revert^2 "thermal: Update cdev ceiling to match latest EM table"
This reverts commit 5536e28fd2.

Reason for revert: tested on EVT1.1 TK and KM

Change-Id: Ifc3a5dce761ff86f9ac33597e88ccd77768e142a
2024-01-22 21:26:18 +00:00
Jikai Ma
305646c5f6 thermal: update virtual sensor formula for EVT devices
Bug: 320714468
Test: boot to home
Change-Id: I14b945a520df0466ee6f024983283543e2b363fe
Signed-off-by: Jikai Ma <jikai@google.com>
2024-01-22 10:38:00 -08:00
samou
8e7dc247a7 thermal: remove brownout event
The battery_mitigation takes over the brownout event
and informs subsystems to do mitigation.

Bug: 319285945
Change-Id: I58e0a9e0469575096f34243e73c1e32474eea006
Signed-off-by: samou <samou@google.com>
2024-01-11 14:02:56 +00:00
Ramya Subramanian
5536e28fd2 Revert "thermal: Update cdev ceiling to match latest EM table"
This reverts commit 520b88f848.

Reason for revert: KM4 DVFS v2 tables are not merged to ToT yet. Need to keep this open until thats merged

Change-Id: Id3848230a675ef7a684f7f40a9b7083492dfab58
2024-01-10 17:33:47 +00:00
Ramya Subramanian
520b88f848 thermal: Update cdev ceiling to match latest EM table
Bug: 318313844
Test: Tested on EVT1.0(A0) TK4 and Tskin controlled to 45C with MH offscreen, all 3 devices booted home

Change-Id: I3e10a1cd9c4493c9bb5f6a08a64e68b04713c41a
Signed-off-by: Ramya Subramanian <rsubr@google.com>
2024-01-10 16:35:18 +00:00
TeYuan Wang
fcf460a0e9 thermal: update USBC throttling policy
Bug: 317281453
Test: verified by emul_temp
Change-Id: Idc2e31e32bd7b278fa7a64d8e6de123c14bfa15a
2024-01-03 14:50:32 -08:00
Sayanna Chandula
d4032aaaa3 thermal: enable virtual-skin-model
Bug: 298225131
Test: Build and boot on device

Change-Id: Iaff3795474b66ff7345a9c5236e6dff4da69de01
Signed-off-by: Sayanna Chandula <sayanna@google.com>
2023-12-12 15:01:32 -08:00
Sayanna Chandula
d79fbc7c99 thermal: set cellular emergency at 54C
Bug: 296476775
Test: Build and boot on device

Change-Id: I3787ec4c52774a78d8c01c42200a789c51a139b4
Signed-off-by: Sayanna Chandula <sayanna@google.com>
2023-12-12 14:54:42 -08:00
Jikai Ma
07c00e9082 thermal: update virtual sensor formula for EVT devices
migrate from proto devices
fix power rail error in the previous update

Bug: 296476775
Bug: 315251968
Test: boot to home

Change-Id: Ie8ebfb23253f3b7c8fa2c9e723f5dd3220f55509
Signed-off-by: jikai@google.com
2023-12-12 10:56:14 -08:00
Zheng Pan
fe891066c7 Revert "thermal: update virtual skin sensor formula"
This reverts commit 1f4dc21fdb.

Reason for revert: b/315251968

Change-Id: I7b9fbcc15c433ebbf0cd299ff38bc0c0e5d13133
2023-12-07 06:52:10 +00:00
Jikai Ma
1f4dc21fdb thermal: update virtual skin sensor formula
align with proto devices

Bug: 296476775
Test: boot to home

Sign-off-by: jikai@google.com
Change-Id: I983338dc505292ba08bf6e96ae233fd82864ec49
2023-12-05 14:54:30 -08:00
TeYuan Wang
2a261b735d Correct the powerhint and thermal config
Bug: 312487312
Test: Komodo EVT1.0, and Caiman P1.0 can boot to home
Change-Id: Ia72c16840fa97ea1cd3c08523253b4fcde2d3ab8
2023-11-21 20:18:21 +00:00
Ramya Subramanian
16ae08548a thermal: optimize thermal policy for camera mode
Bug: 310748549
Test: sideloaded the cofig files and device rebooted to home

Change-Id: Ib2af1fd19099b58fd6ba23bde10ea59767b67e05
Signed-off-by: Ramya Subramanian <rsubr@google.com>
2023-11-18 23:38:20 +00:00
Jikai Ma
b14b8d7586 thermal: update virtual skin sensor formula
formulas updated with P1.1 test data

Bug: 296476775
Test: boot to home

Sign-off-by: jikai@google.com
Change-Id: I88febd4792f9c32c6fcbd3d27490cdac80f00311
2023-11-07 19:18:29 +00:00
George Lee
9eb6262153 Merge "thermal: Remove soc tzone to enable thermal HAL" into main 2023-10-27 23:47:13 +00:00
George Lee
1ad39b7701 thermal: Remove soc tzone to enable thermal HAL
Removing soc tzone in json in response to non BCL loaded configuration.

Bug: 308153421
Test: Flash and boot to home
Change-Id: I4a7d247eeccf0457b5f380b7dd73058342a7f8d6
Signed-off-by: George Lee <geolee@google.com>
2023-10-27 15:29:53 -07:00
Sayanna Chandula
ba13723c2f Merge "thermal: set polling delay for virtual skin speaker" into main 2023-10-27 17:31:17 +00:00
George Lee
ddb582a6e5 thermal: Update BCL policies per Sapwood conf
Sapwood configuration updates.

Bug: 308002414
Test: Flash and boot
Change-Id: I170fe1a11f8595399757f9dd5068533ef5a5da0c
Signed-off-by: George Lee <geolee@google.com>
2023-10-26 15:57:51 -07:00
Sayanna Chandula
6243474aec thermal: set polling delay for virtual skin speaker
Bug: 304828870
Test: Build and boot on device

Change-Id: I3707c5039223fae0caaf24e59054b1d66c59abd8
Signed-off-by: Sayanna Chandula <sayanna@google.com>
2023-10-26 14:03:36 -07:00
TeYuan Wang
397ab294f9 thermal: update charging thermal target for off-mode charging
Bug: 307972260
Test: adb shell dumpsys android.hardware.thermal.IThermal/default
Change-Id: Ibbb64b8a4ae2c598c05d31ad871e787a8527ba0b
2023-10-26 18:17:00 +00:00
Ramya Subramanian
35bdb22a0a thermal: updated BTS equations
Bug: 297083757
Test: Tested on CM4/KM4, boot to home and with thermal recorder

Change-Id: I489613010ae04851bd713d3d9c74ede15661d191
Signed-off-by: Ramya Subramanian <rsubr@google.com>
2023-10-24 17:54:18 +00:00
Ramya Subramanian
ad537dafcd thermal: virtual skin thresholds updated to match POR values.
gpu cooling device is now available in kernel, enabled in HAL

Bug: 305017362
Test: tested on CM4 and KM4 devices. no access to TK4 or EVT

Change-Id: I06c022eb68a5726802529fe67fd76b189df14d32
Signed-off-by: Ramya Subramanian <rsubr@google.com>
2023-10-23 16:53:04 +00:00
Ramya Subramanian
cddaacbecf Reapply "thermal: separate out proto and EVT config due to differences in rail"
This reverts commit 2741e1dcdb.
Test: Tested on RCPro, CM4/KM4 proto devices
Change-Id: I5dda1c21d215dcfff757b73275f9fc3eac31a19a

Bug: 304936256
Change-Id: I72e6dd09d9443fec8a49fc0c7f7310455946f086
2023-10-18 15:23:10 +00:00
George Lee
6d71ca025c thermal: Remove BCL related thermal zone for RCPro
Bug: 305124691
Test: Confirm thermal HAL loading
Change-Id: I9d29aa6bfdbdc5ad449d4da079d961530b7cb8e4
Signed-off-by: George Lee <geolee@google.com>
2023-10-13 03:56:24 +00:00
George Lee
f5b48812ed thermal: Removal of critical-battery-cell zone
Bug: 301155277
Test: Confirm zone removal
Change-Id: Id25771660f8abd8ce2a683f6885448050b402c11
Signed-off-by: George Lee <geolee@google.com>
2023-10-12 16:16:24 +00:00
Jikai Ma
4dafc1777b thermal: update VSKIN equation for CM4/KM4/TK4 P1
should work with ag/24907329 that allow thermalHAL to config trip of
btmskpr_therm

Bug: 296476775
Test: boot to home

Change-Id: I05e65c3f3ccce9d06640735b23976006cd99495e
2023-10-03 00:18:26 +00:00
Ramya Subramanian
b791ba7cb9 thermal: updated TK4 policy, fixed format errors
Bug: b/300639517
Test: test team verified the updated config on TK4 device and ensure
successful boot to home

Change-Id: I0f72e101d5bcd9048e06b7e4674f5f318b7eec54
Signed-off-by: Ramya Subramanian <rsubr@google.com>
2023-09-19 16:42:53 +00:00
Ramya Subramanian
54fdaf3794 thermal: removed gpu cooling device as it was disabled for RCP bring up
Bug: b/300639517
Test: Tested system booted to home on Caiman with updated config

Change-Id: Ifb2c34ceddea7a4817cf366a700aa2315dc3e723
Signed-off-by: Ramya Subramanian <rsubr@google.com>
2023-09-15 21:51:37 +00:00
Ramya Subramanian
4efb293678 thermal: enabled Thermal HAL and policies on Km4/CM4/TK4
Bug: b/292586445
Test: Tested with burn8 and thermal recorder to ensure policies kicked in

Change-Id: Id4b9a00329153ba2e2f68fb4d8dd8657bbbf4d5e
Signed-off-by: Ramya Subramanian <rsubr@google.com>
2023-09-12 21:22:54 +00:00
Robin Peng
b5194d9b24 Migrate caimito devices into caimito folder from sha 31a6eb4c2ffbc
Bug: 291867277
Change-Id: Ia7d34e6ab34bdd03406391f98c58b04eb77671cd
2023-08-16 10:26:07 +00:00