Commit graph

54 commits

Author SHA1 Message Date
Peter (YM)
1259b94bb9 Revert "thermal: Chargign PID target 39 degC"
This reverts commit 581fd1071cfb8b042401ac17bc4ae3462c26f540.
Bug: 376365052
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:90b07f352053f92fe13c5f2e944a12dac98e9d8b)
Merged-In: Ida0fff6742a241018afe7ae80064f3b373feaaf0
Change-Id: Ida0fff6742a241018afe7ae80064f3b373feaaf0
2024-12-23 03:34:10 -08:00
Peter (YM)
67b83f49ef thermal: Chargign PID target 39 degC
Bug: 376365052
Test: TBD
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:581fd1071cfb8b042401ac17bc4ae3462c26f540)
Merged-In: I9bafc69298c24f7a61c56ceaba12c852bb1d0979
Change-Id: I9bafc69298c24f7a61c56ceaba12c852bb1d0979
2024-11-12 11:47:38 +00:00
Peter (YM)
6a6ef32b42 thermal: Override severity when CPU throttling
1. When CPU max frequency throttled to cdev ceiling of CPU-MID, will
   override the severity to SEVERE
2. Create VSKIN-DISPLAY to bind with display thermal throttle

Bug: 373750888
Test: Test with emul_temp
Flag: EXEMPT tuning changes
Signed-off-by: Peter (YM) <peterym@google.com>
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:b309c4ef4375f39d07acd2ae499b368fb7fc9d9b)
Merged-In: I602c93ed5e825c1405a3f9f98cafe87e251a8038
Change-Id: I602c93ed5e825c1405a3f9f98cafe87e251a8038
2024-11-10 09:09:06 +00:00
Peter (YM)
c99e7da7d4 Set the fcc cdev_ceiling to 1A before disable charge
Flag: EXEMPT tuning changes
Bug: 373720257
Test: verified by emul_temp
Signed-off-by: Peter (YM) <peterym@google.com>
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:d37530d22bf28286a40a241fbdb6656a7e582833)
Merged-In: Ie1a407aaac090365bf96bcc2c9180a626af7399c
Change-Id: Ie1a407aaac090365bf96bcc2c9180a626af7399c
2024-11-01 13:17:41 +00:00
Peter (YM)
44e0d4821c thermal: update odpm model for DVT
Test: Build on device and boot to home
Bug: 366375997
Flag: EXEMPT config update
Signed-off-by: Peter (YM) <peterym@google.com>
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:735b0afac07c67d96b1f76049079163475c08786)
Merged-In: I3378f90f40aee20e3c15257120f22a6d5cff23d8
Change-Id: I3378f90f40aee20e3c15257120f22a6d5cff23d8
2024-10-24 11:44:06 +00:00
sashwinbalaji
b33a59cd3e thermal: Add odpm based VSkin Model
- Add vskin model using:
	- thermistor temperature
	- last 5 min average power of rails
- Add residency monitoring for:
	- vskin-odpm-model - vskin-legacy.
	- align thresholds for vskin-model - vskin-legacy with other
	  devices.
	- vskin-model
	- vskin-odpm-model

Bug: 366375997
Test: Push config and verify lshal
Flag: EXEMPT config update
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:8f6b18a05086c1f9d00dc917aa09d05496baac2b)
Merged-In: I7f3cdbc009a608497de33cfcdc0e86005c2e842a
Change-Id: I7f3cdbc009a608497de33cfcdc0e86005c2e842a
2024-10-24 11:43:34 +00:00
Peter (YM)
ac43ed54bc thermal: enable uclamp_max based thermal throttle
Bug: 349035550
Test:
- No stablilty issue under emul_temp from 25 ~ 52: b/349035550#comment3
- Perf CUJ test: b/335539352#comment48
- Thermal CUJ test: b/353432888#comment9
- Thermal Benchmark test: b/338314678#comment11

Flag: EXEMPT config update
Signed-off-by: Peter (YM) <peterym@google.com>
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:3a0764f50257fb34ee144dc89979009cf51bab9c)
Merged-In: Idb3b17095a639a18fe86c2585e230aa81bff07c8
Change-Id: Idb3b17095a639a18fe86c2585e230aa81bff07c8
2024-10-10 07:01:08 +00:00
Peter (YM)
57dbf78f76 thermal: remove vskin-gpu
With the I windup optimization in ag/28577472, VSKIN-SOC itself can
control GPU thermal well. We can remove VSKIN-GPU without hurting the
GPU thermal benchmark metric.

Bug: 370755690
Test: Run manhattan offscreen
Flag: EXEMPT config update
Signed-off-by: Peter (YM) <peterym@google.com>
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:5af3c764d938473d6b9fd4a5345419cc9fe5d555)
Merged-In: I6817f7337269942e37d81cf8dddad920a9a33663
Change-Id: I6817f7337269942e37d81cf8dddad920a9a33663
2024-10-09 02:10:54 +00:00
Peter (YM)
d2bbf03b1a thermal: update vskin correlation to v4
Based on solar loading and dvt data to prepare new model

Test: Build and boot to home.
Bug: 333834428
Flag: EXEMPT config update
Signed-off-by: Peter (YM) <peterym@google.com>
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:9f3c0ecfbabb0781a29178189c0389ca8c71fb9e)
Merged-In: Ice562d0fa16a6b258e09463672fb303180199005
Change-Id: Ice562d0fa16a6b258e09463672fb303180199005
2024-10-02 11:29:04 +00:00
Treehugger Robot
9466cedccb Merge "thermal: update charging thermal throttling" into main 2024-09-19 03:09:26 +00:00
Peter (YM)
4605069564 thermal: update VSKIN-CHARGE v2
This version is based on the CHARGING HOTSPOT in following cases

- Idle charging
- Charging + workload (Modem RFFE / WiFi / CPU / Display )
- Non charging case (correlate charging hotspot)

Bug: 362394314
Test: Build and Boot to home
Flag: EXEMPT config update
Change-Id: I5594cfaefa70b633a2344e9b3460007055f2db2f
Signed-off-by: Peter (YM) <peterym@google.com>
2024-09-12 02:50:05 +00:00
David Chao
1d94dcc054 thermal: update charging thermal throttling
Increasing MaxReleaseStep/MaxThrottleStep to prevent temperature
overshoos.
Based on HW WLC team's comment:
- During thermal throttling, the charging current should be reduced in steps no larger than 100mA per step.
- When the thermal issue is resolved, the charging current should be increased in steps no larger than 50mA per step.

Flag: EXEMPT tuning changes
Bug: 353587870
Test: boot to home and thermal throttling worked properly.
Change-Id: I402588dbe4d23382bc9ef6c01095a4235d5f6142
2024-09-06 06:12:18 +00:00
Peter (YM)
880d94f6d8 thermal: align the metric threshold with other device
Bug: 362411361
Test: Flash and boot to home
Flag: EXEMPT config update
Change-Id: Ib1b7353e637d050e8b6a01b9d383d7470d239905
Signed-off-by: Peter (YM) <peterym@google.com>
2024-08-27 07:19:43 +00:00
Peter (YM)
25d0a7d471 Merge "thermal: add stats to detect extreme SOC condition" into main 2024-08-20 05:10:03 +00:00
Peter (YM)
0f375a3795 Merge "thermal: lower thermal shutdown threshold" into main 2024-08-20 01:44:09 +00:00
TeYuan Wang
40d65b0226 thermal: add stats to detect extreme SOC condition
Bug: 359112918
Flag: EXEMPT NDK
Test: adb shell dumpsys android.hardware.thermal.IThermal/default
Change-Id: Icb26bb6f8ca3d614090cbab570a9b48761e9b184
2024-08-15 05:57:03 +00:00
Peter (YM)
d0a87d4497 Merge "thermal: Add VSkin-Speaker Model" into main 2024-08-15 03:46:47 +00:00
Peter (YM)
5f08ca5945 thermal: lower thermal shutdown threshold
Move the threshold back to 55 degC

Bug: 350877108
Flag: EXEMPT NDK
Test: Flash on device, check shutdown with emul_temp
Change-Id: Ifec87dda2e74f5108ea3b19d049ca463066f854b
Signed-off-by: Peter (YM) <peterym@google.com>
2024-08-14 04:53:16 +00:00
Peter (YM)
fa03ddccea thermal: Add VSkin-Speaker Model
- Add linear regression model for VSkin-Speaker
- Setup abnormality monitoring:
	- 0 <= VSkin-Speaker <= 55
- Residency for Vskin-Speaker Model

Bug: 342046516
Test: Local build and verify lshal
Flag: EXEMPT NDK
Change-Id: I611daee70359414203eeb0cd074d207a27dd3cf9
Signed-off-by: Peter (YM) <peterym@google.com>
2024-08-14 00:26:39 +00:00
Peter (YM)
b620612cc4 thermal: fix the threshold of monitor sensor
Bug: 350877108
Test: Build and boot to home
Flag: EXEMPT (bug 337358613)
Change-Id: I68b1a36023873d21474c7de9e1cfc680bfbe9a58
Signed-off-by: Peter (YM) <peterym@google.com>
2024-08-05 05:43:39 +00:00
Peter (YM)
ae099efef6 thermal: monitor >7 degC gap between model and legacy
Allow thermalHAL to report sensor reading trace when vskin model and
legacy shows big gap

Bug: 333834000
Test: Build and boot to home
Flag: EXEMPT (bug 337358613)
Change-Id: Ie45bf02083be9a2fc8f46a2a40d779a1323c08f4
Signed-off-by: Peter (YM) <peterym@google.com>
2024-08-01 04:55:50 +00:00
David Chao
d45178e258 thermal: update wlc charging thermal throttling
Aligned with previous project to active fan for wireless charging by
enabling dc_icl cdev earlier.

Flag: EXEMPT tuning changes
Bug: 333833667
Test: boot to home and thermal throttling worked properly.
Change-Id: Icbf6114ea6b6a8a20e1d4656ce9c9e9f9aa69d3c
2024-07-30 03:32:46 +00:00
Peter (YM)
8a95f6c471 thermal: enable model based vskin calculation
- Use VT_MODEL to do thermal throttle
- Clamp VT_MODEL prediction based on training set max_surface
- Use VT_MODEL_LEGACY_DIFF to decide on switch
- Enable smooth transition with weights

Bug: 354939290
Test: Build and boot to home, verify vskin-legacy can trigger shutdown b/354939290#comment3
Flag: EXEMPT (bug 337358613)
Change-Id: I8c2a071b8f34c4ab055adfd9d2363f2158775c99
Signed-off-by: Peter (YM) <peterym@google.com>
2024-07-25 04:31:23 +00:00
Treehugger Robot
fdca21c8fc Merge "thermal: reading the thermistor temperature from upstream sysfs" into main 2024-07-16 06:13:54 +00:00
Peter (YM)
125fb04184 thermal: monitor more sensor for backup shutdown
Enable the monitor for QUIET_THERM,SOC_THERM,RFPA_THERM,NORTH_THERM to
get more information for deciding backup shutdown thermistor

Bug: 350877108
Test: Build and boot to home, verify with emul_temp (b/350877108#comment5)
Flag: EXEMPT (bug 337358613)
Change-Id: I1631311d2847a872b8afc12e2e702b801bf76a77
Signed-off-by: Peter (YM) <peterym@google.com>
2024-07-12 02:08:58 +00:00
Peter (YM)
c1a6e0447e thermal: reading the thermistor temperature from upstream sysfs
- Workaround to avoid wrong sensor value reading for thermalHAL
- align thermal trigger temp for off mode charging config

Bug: 351248307
Test: Build and boot to home
Flag: EXEMPT (bug 337358613)
Change-Id: Ic83bb09287d4203eb816987e6abf4579b37b002b
Signed-off-by: Peter (YM) <peterym@google.com>
2024-07-09 03:12:12 +00:00
Treehugger Robot
adb687fe6a Merge "thermal: update charging thermal throttling" into main 2024-06-26 09:42:33 +00:00
Peter (YM)
1dd20df4df thermal: use stats-updator to trigger virtual sensor and remove unused virtual sensor
- Use stats-updator to ensure all the virutal sensor we want to monitor
can be trigger at the same time.

- Remove the un-used virtual sensor

- Update the name of VSKIN-SKIN-UNDER-52 to avoid confusion

Bug: 333834000
Test: Build on device and boot to home, b/333834000#comment8
Flag: EXEMPT (bug 337358613)
Change-Id: I9fc4df066b17417cee412d776a118ea1935fbc34
Signed-off-by: Peter (YM) <peterym@google.com>
2024-06-20 02:34:33 +00:00
David Chao
e625085871 thermal: update charging thermal throttling
Align charging thermal throttling parameters with leading project.

Bug: 333833667
Test: boot to home and thermal throttling worked as expected.
Change-Id: If8cfb1738c0dd921d52bdeb243dabdf3c190a9a4
2024-06-17 11:36:31 +00:00
Treehugger Robot
bd74564d02 Merge "thermal: enable quiet_therm mointor for backup shutdown" into main 2024-06-13 08:53:23 +00:00
Peter (YM)
a09374e841 Merge "thermal: add btmspkr_therm as trigger sensor" into main 2024-06-12 08:34:10 +00:00
Peter (YM)
e2f2401f32 thermal: add btmspkr_therm as trigger sensor
Align with latest Pixel setup.
Fix the issue that sensor trip temp not updated.

Bug: 346562574
Test: Build and boot to home, confirm the sensor trip temp is updated
Change-Id: I588e65e72158a0b9006f949688e0fa18e4f6d2b4
Signed-off-by: Peter (YM) <peterym@google.com>
2024-06-12 05:06:07 +00:00
Peter (YM)
61a7a29145 thermal: update vskin correlation to v2
- Model: based on evt 1.0 50 case and Proto 1.1 150 case
- Legacy: based on evt 1.0 50 case, also update the trigger temp based on legacy report (b/333834000#6)

Bug: 333834000
Test: Build and boot to home
Change-Id: Ibe4988ec2e9944a81c7a64a0315727a6c942e2e0
Signed-off-by: Peter (YM) <peterym@google.com>
2024-06-12 03:36:02 +00:00
Peter (YM)
671b3cf727 thermal: enable quiet_therm mointor for backup shutdown
- increase shutdown threshold to 60 to better monitor the thermal under
  high vskin
- Monitor vskin_legay - quiet_therm and vskin_model - quiet_them when vskin is higher than 52
- Monitor quiet_therm when it's over candidate shutdown threshold (55 degC)

Bug: 333485619
Test: Flash and boot to home
Change-Id: Id2ca58d427d342d353d7083e4771ac47caa074ec
Signed-off-by: Peter (YM) <peterym@google.com>
2024-06-12 03:06:19 +00:00
Peter (YM)
b1cec3fd6d thermal: align wth cellular-emergency threshold
The threshold was increased in early stage, since we have a better vskin
eqaution now, we can align the threshold value to other pixel device.

Bug: 346484703
Test: build and boot to home
Change-Id: Ie191e816e2a0a2be405c7c71ece38b7d2fb71d8e
Signed-off-by: Peter (YM) <peterym@google.com>
2024-06-11 08:21:29 +00:00
Peter (YM)
8f730bc927 thermal: usb thermal throttle in off charging mode
Fix the issue that device not trigger usb throttle in off mode charging.

Bug: 344445952
Test: Build and flash on device, verify with uart.
Change-Id: Ic6d453b1cab4614f8f6b42a9b6f5fe521a98101d
Signed-off-by: Peter (YM) <peterym@google.com>
2024-06-03 06:57:07 +00:00
samou
bd9bbb5288 thermal: tegu: Remove BCL related thermal zone
Bug: 342504477
Change-Id: I8da3a8b1ae6fee59b8e03fddc5f2bdca2c080a8b
Signed-off-by: samou <samou@google.com>
2024-05-24 08:03:35 +00:00
Peter (YM)
1ef4072ac6 thermal: init WLC themral throttle
- Init vskin-wlc v1
- init wlc thermal throttle with last generation algorithm

Bug: 341236825
Test: Build and boot to home
Change-Id: Iac66f0a13d94bf1e94744f7954775f0a91cbde0b
Signed-off-by: Peter (YM) <peterym@google.com>
2024-05-20 23:28:42 +00:00
Peter (YM)
36ca057ab7 thermal: Align PARTIAL_SYSTEM_POWER rails
Test: Build and verify offmode charge no thermalhal crash
Bug: 332417716
Change-Id: I7735336ed5282457af8f134c065c01f8022813c8
Signed-off-by: Peter (YM) <peterym@google.com>
2024-05-09 03:40:48 +00:00
Peter (YM)
605307f729 thermal: update thermal config
Algin with latest device setting

1. Update cdevceiling and hardlimit with frequency
2. Update TPU thermal throttle policy
3. Release thermal throttle in camera and game mode

Bug: 317750833
Test: Build and flash on device
Change-Id: If51183f72822febb3b3cf0cac33d03b33a4fb270
Signed-off-by: Peter (YM) <peterym@google.com>
2024-05-09 03:38:32 +00:00
Peter (YM)
eed13b648c Merge "thermal: usb thermal protection" into main 2024-05-03 05:24:53 +00:00
Peter (YM)
fd239ef939 thermal: usb thermal protection
Based on HW proposal in b/335112894#comment21

Bug: 335112894
Test: b/335112894#comment21, verifiy by HW test
Change-Id: Id1f9e1595433c55d59539c947f8e8a5da285dfa9
Signed-off-by: Peter (YM) <peterym@google.com>
2024-05-03 01:53:37 +00:00
sashwinbalaji
b564103698 thermal: Update thermistor_name.txt from tflite model
With ag/27095449, we'll always parse thermistor_name config and the
current tflite model thermistor_name is not in json format.
This will lead to thermal hal crash. Fix it by setting the file content
to empty json object {}

Bug: 337961368
Test: Locally update and ensure no thermal hal crash
Change-Id: Ib171509a9cdf89d7982adcc0fa3c9c700b49b55b
2024-04-30 19:52:13 +08:00
Peter (YM)
f60d0384fc thermal: enable thermal throttle with legacy vskin v1
Provide legacy v1 based on Proto1.1 thermal test result

Bug: 330247219
Test: Run thermal benchmark test
Change-Id: I74e1b58a045c34670694c1edbe8338827c2776fa
Signed-off-by: Peter (YM) <peterym@google.com>
2024-04-17 11:13:26 +00:00
Peter (YM)
65bc4ef474 Merge "thermal: Add VSKIN-MODEL" into main 2024-04-16 02:39:06 +00:00
Peter (YM)
398ff36592 thermal: enable wired charging throttle
- Enable VSKIN-CHARGE based on idle charging case
- Enable Wired charging throttle with previous generation product's policy

Bug: 333663839
Test: Build and boot to home
Change-Id: I8b6f4a8d41afbd2f739f73d56c8e49fca406704b
Signed-off-by: Peter (YM) <peterym@google.com>
2024-04-12 07:20:55 +00:00
Peter (YM)
0a40d744ba thermal: Add VSKIN-MODEL
- Enable vskin-model but not apply thermal throttle
- Capture model abnormal value when it's outside -20 and 60 degC

Bug: 330247219
Test: Build and boot to home
Change-Id: Ibfa26713129b0e22305ca4ed147b9cebd05858b6
Signed-off-by: Peter (YM) <peterym@google.com>
2024-04-12 01:18:16 +00:00
sashwinbalaji
66c6afa1e2 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: I5a04e715bf49a6c4ee502eb82ca18795cff3eb9a
2024-04-01 12:48:54 +08:00
Peter (YM)
48a04811af thermal: remove chg_mdis
Bug: 328019873
Test: Device boot to home
Change-Id: I130099fa565a0c7f9c75d3acbd77e987e596a0f8
Signed-off-by: Peter (YM) <peterym@google.com>
2024-03-05 02:41:53 +00:00
Peter (YM)
2bb3daf080 Merge "thermal: remove redundant config" into main 2024-02-21 06:29:23 +00:00