Commit graph

113 commits

Author SHA1 Message Date
TeYuan Wang
0a476b3b1e thermal: add thermal config for wingboard
Bug: 328118301
Test: boot to home
Change-Id: I8511581cbace269db9bf80a8068e7abb9a885530
2024-04-01 17:45:37 +00:00
sashwinbalaji
9b6048ab03 thermal: Remove deprecated power rails
Remove the below power rails as they're going to be replaced with
different ones for better ODPM coverage.

  - S8S_VDD_G3D_L2
  - L9S_GNSS_CORE

Bug: 331556280
Test: Push config and verify thermal logs
Change-Id: Ic5c6cb7c4ddae258c89cbe3cb50a104f7044e016
2024-04-01 12:47:41 +08:00
Treehugger Robot
4d48b7c9a3 Merge "thermal: update rule to identify non WLC scenarios" into 24D1-dev 2024-03-26 17:34:25 +00:00
Wei Wang
ff342550fe Merge "thermal: use virutal-skin-legacy for proto devices" into 24D1-dev 2024-03-25 18:20:50 +00:00
TeYuan Wang
37b99c032d thermal: update rule to identify non WLC scenarios
Change the rule to identify wireless charge according to the latest
hda definition from bms driver pa/2736243

Bug: 324267311
Test: boot to home
Change-Id: Ice9b38201cbbe868784ac389e799cc24e8f8b7ff
2024-03-22 22:53:22 +00:00
Treehugger Robot
e0d2eae89d Merge "therma: disable LIGHT tier throttling when gaming" into 24D1-dev 2024-03-22 22:25:53 +00:00
TeYuan Wang
cbfd667718 therma: disable LIGHT tier throttling when gaming
We already have the CPU scheduler optimization for game mode to sustain
the power and perf, so remove the CPU thermal policy at lower
temperature to avoid the interfence on CPU scheduler.

Bug: 329697728
Test: run genshin

Change-Id: Ib0d47b3de7b3550a3af4db37ef062f8c5d2ea262
2024-03-22 02:23:43 +00:00
Treehugger Robot
d420e49217 Merge "thermal: update cdev ceiling for LITTLE cores" into 24D1-dev 2024-03-21 21:27:38 +00:00
Sayanna Chandula
615a9b7b2f thermal: use virutal-skin-legacy for proto devices
Latest ML models have been trained for latest HW and are no longer
valid for proto devices. We can use legacy equation prepared for
proto devices and remove any stats upload to avoid polluting stats.

Bug: 320714468
Test: Build and boot on proto devices. Check Virtual Skin output

Change-Id: Ic80934f0df80a423d8ba2cb4d1ac4b45999803fe
Signed-off-by: Sayanna Chandula <sayanna@google.com>
2024-03-20 11:59:08 -07:00
Sayanna Chandula
6f59876ad6 thermal: enable input data validation
Update tflite models with metadata containing input data ranges.
Enable input data validation and backup sesor.
Add offsets based off temperature ranges.

Bug: 319167815
Bug: 328789394
Test: Build and boot on device. Test backup sensor and offsets

Change-Id: Icdc0c1a1fe026613e4a1716747335e60aca4edf9
Signed-off-by: Sayanna Chandula <sayanna@google.com>
2024-03-20 11:49:53 -07:00
Jikai Ma
ca43671583 thermal: update legacy and linear vs formula
- vs formulas generated from EVT 1.1 data

Bug: 320714468
Test: push to device and boot to home

Change-Id: Ife745ac7640ffd284404212706c9bdfdb0500f33
Signed-off-by: Jikai Ma <jikai@google.com>
(cherry picked from commit 859dc39412)
2024-03-20 11:49:46 -07:00
Ramya Subramanian
33e139655f thermal: update cdev ceiling for LITTLE cores
Inefficient OPPs were removed for the LITTLE cores from em table.

This change is to update the cdev ceilings in thermal policy to reflect
the EM changes

Bug: 329876112
Test: Build and boot on device.

Change-Id: I8b9ce12fc22dce0374d2a68a947bd598fd26f936
Signed-off-by: Ramya Subramanian <rsubr@google.com>
2024-03-18 15:50:33 +00:00
TeYuan Wang
ea8c58d2d1 thermal: update WLC charging throttling policy
Bug: 323435751
Test: run the charging test with D250
Change-Id: I028f809f54fdb0c9675c82f34f6aab989b99cb65
2024-02-29 04:59:17 +00:00
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