summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTeYuan Wang <kamewang@google.com>2019-01-17 17:12:20 +0800
committerTeYuan Wang <kamewang@google.com>2019-02-16 09:07:28 +0800
commit1a04bcd6b6e2595c0174601f3a1c004004ab1d09 (patch)
tree7c09d45721a0c2886af48a6e3383773bda909093
parentea2686de059d3834de8822d0bacdd0066bcda54c (diff)
downloadbonito-1a04bcd6b6e2595c0174601f3a1c004004ab1d09.tar.gz
thermal: align pi-dev thermal-engine.conf and update thermal hal config
Bug:123666855 Test: thermal hal shutdown works normally. thermal hal notifythrottling works normally while mb-therm or usbc-therm thermistor across threshold. Change-Id: I1f226e8c72288fa31691adb258a434f023727ea4 Signed-off-by: TeYuan Wang <kamewang@google.com>
-rw-r--r--init.hardware.chamber.rc.userdebug7
-rw-r--r--thermal-engine-bonito.conf49
-rw-r--r--thermal-engine-sargo.conf49
-rw-r--r--thermal_info_config_bonito.json32
-rw-r--r--thermal_info_config_sargo.json32
5 files changed, 104 insertions, 65 deletions
diff --git a/init.hardware.chamber.rc.userdebug b/init.hardware.chamber.rc.userdebug
index 62638505..579f575f 100644
--- a/init.hardware.chamber.rc.userdebug
+++ b/init.hardware.chamber.rc.userdebug
@@ -16,13 +16,14 @@
on property:persist.vendor.disable.thermal.control=1
- write /sys/devices/virtual/thermal/tz-by-name/mb-therm-adc/mode disabled
- write /sys/devices/virtual/thermal/tz-by-name/usbc-therm-adc/mode disabled
+ write /sys/devices/virtual/thermal/tz-by-name/mb-therm-adc/emul_temp 25000
+ write /sys/devices/virtual/thermal/tz-by-name/mb-therm-monitor/emul_temp 25000
+ write /sys/devices/virtual/thermal/tz-by-name/usbc-therm-monitor/emul_temp 25000
write /sys/module/overheat_mitigation/parameters/enable 0
on property:init.svc.vendor.thermal-engine=running && property:persist.vendor.disable.thermal.control=1
stop vendor.thermal-engine
on property:persist.vendor.disable.usb.overheat.mitigation=1
- write /sys/devices/virtual/thermal/tz-by-name/usbc-therm-adc/mode disabled
+ write /sys/devices/virtual/thermal/tz-by-name/usbc-therm-monitor/emul_temp 25000
write /sys/module/overheat_mitigation/parameters/enable 0
diff --git a/thermal-engine-bonito.conf b/thermal-engine-bonito.conf
index 2073b3ee..56ee62e0 100644
--- a/thermal-engine-bonito.conf
+++ b/thermal-engine-bonito.conf
@@ -3,8 +3,8 @@ algo_type ss
sampling 5000
sensor mb-therm-adc
device cpu6
-set_point 44000
-set_point_clr 43000
+set_point 43000
+set_point_clr 42000
device_max_limit 1747200
time_constant 0
@@ -13,8 +13,8 @@ algo_type ss
sampling 5000
sensor mb-therm-adc
device cpu6
-set_point 46000
-set_point_clr 45000
+set_point 45000
+set_point_clr 44000
device_max_limit 1363200
time_constant 0
@@ -22,34 +22,43 @@ time_constant 0
algo_type monitor
sampling 1000
sensor mb-therm-adc
-thresholds 48000 50000 51000 62000
-thresholds_clr 47000 49000 50000 61000
-actions cpu0 cpu0+cpu6 cpu0+cpu6+gpu shutdown
-action_info 1209600 998400+979200 748800+825600+355000000 1
+thresholds 47000 49000 50000 60000
+thresholds_clr 46000 48000 49000 59000
+actions cpu0+cpu6 cpu0+cpu6 cpu0+cpu6 shutdown
+action_info 1209600+1363200 998400+979200 748800+825600 1
-[USB-MONITOR]
+[GPU-SKIN-MONITOR]
algo_type monitor
sampling 1000
-sensor usbc-therm-adc
-thresholds 58000 63000
-thresholds_clr 45000 58000
-actions usb usb
-action_info 1 2
+sensor mb-therm-adc
+thresholds 50000
+thresholds_clr 49000
+actions gpu
+action_info 355000000
[MODEM-MONITOR]
algo_type monitor
sampling 5000
sensor pa-therm0-adc
-thresholds 56000
-thresholds_clr 53000
+thresholds 51000
+thresholds_clr 48000
actions modem+modem_skin
action_info 1+1
+[MODEM-SKIN-MONITOR]
+algo_type monitor
+sampling 1000
+sensor mb-therm-adc
+thresholds 56000
+thresholds_clr 54000
+actions modem+modem_skin
+action_info 3+3
+
[BATTERY-MONITOR]
algo_type monitor
sampling 2000
sensor mb-therm-adc
-thresholds 41000 46000 48000
-thresholds_clr 40000 45000 47000
-actions battery battery battery
-action_info 3 4 5
+thresholds 40000 42500 45000 46000 47000
+thresholds_clr 39000 41500 44000 45000 46000
+actions battery battery battery battery battery
+action_info 1 2 3 4 5
diff --git a/thermal-engine-sargo.conf b/thermal-engine-sargo.conf
index 3813ce72..a6994a4d 100644
--- a/thermal-engine-sargo.conf
+++ b/thermal-engine-sargo.conf
@@ -3,8 +3,8 @@ algo_type ss
sampling 5000
sensor mb-therm-adc
device cpu6
-set_point 42000
-set_point_clr 41000
+set_point 40000
+set_point_clr 39000
device_max_limit 1747200
time_constant 0
@@ -13,8 +13,8 @@ algo_type ss
sampling 5000
sensor mb-therm-adc
device cpu6
-set_point 44000
-set_point_clr 43000
+set_point 42000
+set_point_clr 41000
device_max_limit 1363200
time_constant 0
@@ -22,34 +22,43 @@ time_constant 0
algo_type monitor
sampling 1000
sensor mb-therm-adc
-thresholds 46000 47000 49000 59000
-thresholds_clr 45000 46000 48000 58000
-actions cpu0 cpu0+cpu6 cpu0+cpu6+gpu shutdown
-action_info 1209600 998400+979200 748800+825600+355000000 1
+thresholds 44000 45000 47000 57000
+thresholds_clr 43000 44000 46000 56000
+actions cpu0+cpu6 cpu0+cpu6 cpu0+cpu6 shutdown
+action_info 1209600+1363200 998400+979200 748800+825600 1
-[USB-MONITOR]
+[GPU-SKIN-MONITOR]
algo_type monitor
sampling 1000
-sensor usbc-therm-adc
-thresholds 58000 63000
-thresholds_clr 45000 58000
-actions usb usb
-action_info 1 2
+sensor mb-therm-adc
+thresholds 47000
+thresholds_clr 46000
+actions gpu
+action_info 355000000
[MODEM-MONITOR]
algo_type monitor
sampling 5000
sensor pa-therm0-adc
-thresholds 53000
-thresholds_clr 50000
+thresholds 51000
+thresholds_clr 48000
actions modem+modem_skin
action_info 1+1
+[MODEM-SKIN-MONITOR]
+algo_type monitor
+sampling 1000
+sensor mb-therm-adc
+thresholds 53000
+thresholds_clr 51000
+actions modem+modem_skin
+action_info 3+3
+
[BATTERY-MONITOR]
algo_type monitor
sampling 2000
sensor mb-therm-adc
-thresholds 39000 43000 46000
-thresholds_clr 38000 42000 45000
-actions battery battery battery
-action_info 3 4 5
+thresholds 37500 39500 41500 42500 44500
+thresholds_clr 36500 38500 40500 41500 43500
+actions battery battery battery battery battery
+action_info 1 2 3 4 5
diff --git a/thermal_info_config_bonito.json b/thermal_info_config_bonito.json
index c5ebc65a..3cbf6341 100644
--- a/thermal_info_config_bonito.json
+++ b/thermal_info_config_bonito.json
@@ -166,7 +166,7 @@
"Multiplier":0.001
},
{
- "Name":"usbc-therm-adc",
+ "Name":"usbc-therm-monitor",
"Type":"USB_PORT",
"HotThreshold":[
"NAN",
@@ -174,14 +174,24 @@
"NAN",
"NAN",
"NAN",
- "NAN",
+ "63.0",
"NAN"
],
+ "HotHysteresis":[
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 5.0,
+ 0.0
+ ],
"VrThreshold":"NAN",
- "Multiplier":0.001
+ "Multiplier":0.001,
+ "Monitor":true
},
{
- "Name":"mb-therm-adc",
+ "Name":"mb-therm-monitor",
"Type":"SKIN",
"HotThreshold":[
"NAN",
@@ -190,16 +200,16 @@
48.0,
50.0,
51.0,
- 60.0
+ 58.0
],
"HotHysteresis":[
0.0,
- 1.9,
- 1.9,
- 1.9,
- 1.9,
- 1.9,
- 1.9
+ 0.9,
+ 0.9,
+ 0.9,
+ 0.9,
+ 0.9,
+ 0.9
],
"VrThreshold":53.0,
"Multiplier":0.001,
diff --git a/thermal_info_config_sargo.json b/thermal_info_config_sargo.json
index 2e11440a..fc59cbd8 100644
--- a/thermal_info_config_sargo.json
+++ b/thermal_info_config_sargo.json
@@ -166,7 +166,7 @@
"Multiplier":0.001
},
{
- "Name":"usbc-therm-adc",
+ "Name":"usbc-therm-monitor",
"Type":"USB_PORT",
"HotThreshold":[
"NAN",
@@ -174,14 +174,24 @@
"NAN",
"NAN",
"NAN",
- "NAN",
+ "63.0",
"NAN"
],
+ "HotHysteresis":[
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 0.0,
+ 5.0,
+ 0.0
+ ],
"VrThreshold":"NAN",
- "Multiplier":0.001
+ "Multiplier":0.001,
+ "Monitor":true
},
{
- "Name":"mb-therm-adc",
+ "Name":"mb-therm-monitor",
"Type":"SKIN",
"HotThreshold":[
"NAN",
@@ -190,16 +200,16 @@
46.0,
47.0,
49.0,
- 57.0
+ 55.0
],
"HotHysteresis":[
0.0,
- 1.9,
- 1.9,
- 1.9,
- 1.9,
- 1.9,
- 1.9
+ 0.9,
+ 0.9,
+ 0.9,
+ 0.9,
+ 0.9,
+ 0.9
],
"VrThreshold":51.0,
"Multiplier":0.001,