From c2010f1a9b5872d3ec7b6bf3fe52730d659bd968 Mon Sep 17 00:00:00 2001 From: "Peter (YM)" Date: Tue, 11 Jul 2023 06:14:29 +0000 Subject: [PATCH] thermal: support usb overheat protection Base on EVT 1.0 test result to support the USB thermal protection 1. When usb_therm > 46 degC start monitor 2. When usb_therm - charger_therm >= 10 degC, change usbc-port to 1 3. When usb_therm - charger_therm >= 13 degC, trigger VIRTUAL-USB-UI polling 4. When usb_therm - charger_therm <= 7 degC, change usbc_prot to 0 Create thermal config for proto to prevent wrong usb throttle on proto device Bug: 278035350 Test: push the test script into device and run thermal_recorder to record the behavior. Detail is in the bug Change-Id: I326dc22083efc1bd1af9a47451bf927e26006b85 Signed-off-by: Peter (YM) --- conf/init.akita.rc | 7 + device-akita.mk | 4 +- thermal_info_config_akita.json | 15 +- thermal_info_config_charge_akita.json | 6 +- thermal_info_config_charge_proto.json | 278 ++++++++++++ thermal_info_config_proto.json | 583 ++++++++++++++++++++++++++ 6 files changed, 885 insertions(+), 8 deletions(-) create mode 100644 thermal_info_config_charge_proto.json create mode 100644 thermal_info_config_proto.json diff --git a/conf/init.akita.rc b/conf/init.akita.rc index 8762ba6..13c0dc3 100644 --- a/conf/init.akita.rc +++ b/conf/init.akita.rc @@ -33,6 +33,13 @@ on post-fs-data # Speaker amp permission chmod 644 /mnt/vendor/persist/audio/speaker.cal +# Thermal +on property:ro.boot.hardware.revision=PROTO1.0 + setprop vendor.thermal.config "thermal_info_config_proto.json" + +on property:ro.boot.hardware.revision=PROTO1.1 + setprop vendor.thermal.config "thermal_info_config_proto.json" + # Bluetooth on post-fs-data chown bluetooth system /proc/bluetooth/timesync diff --git a/device-akita.mk b/device-akita.mk index b6ad722..01f554c 100644 --- a/device-akita.mk +++ b/device-akita.mk @@ -97,7 +97,9 @@ PRODUCT_COPY_FILES += \ # Thermal Config PRODUCT_COPY_FILES += \ device/google/akita/thermal_info_config_akita.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config.json \ - device/google/akita/thermal_info_config_charge_akita.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config_charge.json + device/google/akita/thermal_info_config_charge_akita.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config_charge.json \ + device/google/akita/thermal_info_config_proto.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config_proto.json \ + device/google/akita/thermal_info_config_charge_proto.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config_charge_proto.json # Power HAL config PRODUCT_COPY_FILES += \ diff --git a/thermal_info_config_akita.json b/thermal_info_config_akita.json index 68c8e4c..54b9a3f 100644 --- a/thermal_info_config_akita.json +++ b/thermal_info_config_akita.json @@ -20,7 +20,7 @@ { "Name":"usb_conn_therm", "Type":"UNKNOWN", - "HotThreshold":["NAN", 40.0, "NAN", "NAN", "NAN", "NAN", "NAN"], + "HotThreshold":["NAN", 46.0, "NAN", "NAN", "NAN", "NAN", "NAN"], "TempPath":"/dev/thermal/tz-by-name/usb_conn_therm/tz_temp", "Multiplier":0.001, "PollingDelay":60000, @@ -408,6 +408,7 @@ "Formula":"WEIGHTED_AVG", "Combination":["usb_conn_therm", "charger_therm"], "Coefficient":[1.0, -1.0], + "HotThreshold":["NAN", "7.0", "NAN", "NAN", "NAN", "NAN", "NAN"], "Multiplier":0.001, "PollingDelay":0, "PassiveDelay":7000 @@ -420,12 +421,12 @@ "Formula":"COUNT_THRESHOLD", "TriggerSensor": "usb_conn_therm", "Combination":["usb_conn_therm", "USB-MINUS-CHARGER"], - "Coefficient":[40000, 10000], + "Coefficient":[46000, 10000], "HotThreshold":["NAN", "NAN", "NAN", "NAN", "2.0", "NAN", "NAN"], "BindedCdevInfo": [ { "CdevRequest": "usbc-port", - "LimitInfo": [0, 0, 0, 0, 0, 0, 0] + "LimitInfo": [0, 0, 0, 0, 1, 1, 1] } ], "VrThreshold":"NAN", @@ -441,8 +442,14 @@ "Formula":"COUNT_THRESHOLD", "TriggerSensor": "usb_conn_therm", "Combination":["usb_conn_therm", "USB-MINUS-CHARGER"], - "Coefficient":[40000, 13000], + "Coefficient":[46000, 13000], "HotThreshold":["NAN", "NAN", "NAN", "NAN", "NAN", "2.0", "NAN"], + "BindedCdevInfo": [ + { + "CdevRequest": "usbc-port", + "LimitInfo": [0, 0, 0, 0, 1, 1, 1] + } + ], "VrThreshold":"NAN", "Multiplier":1, "SendCallback":true, diff --git a/thermal_info_config_charge_akita.json b/thermal_info_config_charge_akita.json index e4f7c37..52ed2e3 100644 --- a/thermal_info_config_charge_akita.json +++ b/thermal_info_config_charge_akita.json @@ -20,7 +20,7 @@ { "Name":"usb_conn_therm", "Type":"UNKNOWN", - "HotThreshold":["NAN", 40.0, "NAN", "NAN", "NAN", "NAN", "NAN"], + "HotThreshold":["NAN", 46.0, "NAN", "NAN", "NAN", "NAN", "NAN"], "TempPath":"/dev/thermal/tz-by-name/usb_conn_therm/tz_temp", "Multiplier":0.001, "PollingDelay":60000, @@ -215,12 +215,12 @@ "Formula":"COUNT_THRESHOLD", "TriggerSensor": "usb_conn_therm", "Combination":["usb_conn_therm", "USB-MINUS-CHARGER"], - "Coefficient":[40000, 10000], + "Coefficient":[46000, 10000], "HotThreshold":["NAN", "NAN", "NAN", "NAN", "2.0", "NAN", "NAN"], "BindedCdevInfo": [ { "CdevRequest": "usbc-port", - "LimitInfo": [0, 0, 0, 0, 0, 0, 0] + "LimitInfo": [0, 0, 0, 0, 1, 1, 1] } ], "VrThreshold":"NAN", diff --git a/thermal_info_config_charge_proto.json b/thermal_info_config_charge_proto.json new file mode 100644 index 0000000..e4f7c37 --- /dev/null +++ b/thermal_info_config_charge_proto.json @@ -0,0 +1,278 @@ +{ + "Sensors":[ + { + "Name":"battery", + "Type":"BATTERY", + "Multiplier":0.001 + }, + { + "Name":"modem_therm", + "Type":"UNKNOWN", + "TempPath":"/dev/thermal/tz-by-name/modem_therm/tz_temp", + "Multiplier":0.001 + }, + { + "Name":"gnss_tcxo_therm", + "Type":"UNKNOWN", + "TempPath":"/dev/thermal/tz-by-name/gnss_tcxo_therm/tz_temp", + "Multiplier":0.001 + }, + { + "Name":"usb_conn_therm", + "Type":"UNKNOWN", + "HotThreshold":["NAN", 40.0, "NAN", "NAN", "NAN", "NAN", "NAN"], + "TempPath":"/dev/thermal/tz-by-name/usb_conn_therm/tz_temp", + "Multiplier":0.001, + "PollingDelay":60000, + "PassiveDelay":7000 + }, + { + "Name":"rffe_therm", + "Type":"UNKNOWN", + "TempPath":"/dev/thermal/tz-by-name/rffe_therm/tz_temp", + "Multiplier":0.001 + }, + { + "Name":"soc_therm", + "Type":"UNKNOWN", + "HotThreshold":["NAN", 29.9, "NAN", "NAN", "NAN", "NAN", "NAN"], + "HotHysteresis":[0.0, 0.9, 0.0, 0.0, 0.0, 0.0, 0.0], + "TempPath":"/dev/thermal/tz-by-name/soc_therm/tz_temp", + "Multiplier":0.001, + "PollingDelay":60000, + "PassiveDelay":7000 + }, + { + "Name":"charger_therm", + "Type":"UNKNOWN", + "TempPath":"/dev/thermal/tz-by-name/charger_therm/tz_temp", + "Multiplier":0.001 + }, + { + "Name":"display_therm", + "Type":"UNKNOWN", + "TempPath":"/dev/thermal/tz-by-name/display_therm/tz_temp", + "Multiplier":0.001 + }, + { + "Name":"quiet_therm", + "Type":"UNKNOWN", + "TempPath":"/dev/thermal/tz-by-name/quiet_therm/tz_temp", + "Multiplier":0.001 + }, + { + "Name":"VIRTUAL-MODEM-QUT-SOC-CHARGER-USB-RFFE-GNSS-1", + "Type":"UNKNOWN", + "Hidden":true, + "VirtualSensor":true, + "Formula":"WEIGHTED_AVG", + "Combination":["modem_therm", "quiet_therm", "soc_therm", "charger_therm", "usb_conn_therm", "rffe_therm", "gnss_tcxo_therm"], + "Coefficient":[0.05, 0.05, 0.7, 0.05, 0.05, 0.05, 0.05], + "Offset":-1500, + "Multiplier":0.001 + }, + { + "Name":"VIRTUAL-QUT-CHARGER-USB-RFFE-2", + "Type":"UNKNOWN", + "Hidden":true, + "VirtualSensor":true, + "Formula":"WEIGHTED_AVG", + "Combination":["quiet_therm", "charger_therm", "usb_conn_therm", "rffe_therm"], + "Coefficient":[0.15, 0.15, 0.15, 0.55], + "Offset":-1000, + "Multiplier":0.001 + }, + { + "Name":"VIRTUAL-QUT-CHARGER-USB-GNSS-3", + "Type":"UNKNOWN", + "Hidden":true, + "VirtualSensor":true, + "Formula":"WEIGHTED_AVG", + "Combination":["quiet_therm", "charger_therm", "usb_conn_therm", "gnss_tcxo_therm"], + "Coefficient":[0.166, 0.45, 0.217, 0.167], + "Offset":-1950, + "Multiplier":0.001 + }, + { + "Name":"VIRTUAL-MODEM-QUT-SOC-CHARGER-USB-RFFE-GNSS-4", + "Type":"UNKNOWN", + "Hidden":true, + "VirtualSensor":true, + "Formula":"WEIGHTED_AVG", + "Combination":["modem_therm", "quiet_therm", "soc_therm", "charger_therm", "usb_conn_therm", "rffe_therm", "gnss_tcxo_therm"], + "Coefficient":[-0.05, -0.05, 1.3, -0.05, -0.05, -0.05, -0.05], + "Offset":-1950, + "Multiplier":0.001 + }, + { + "Name":"VIRTUAL-SKIN-CHARGE", + "Type":"UNKNOWN", + "Hidden":true, + "VirtualSensor":true, + "TriggerSensor":"soc_therm", + "Formula":"MAXIMUM", + "Combination":["VIRTUAL-MODEM-QUT-SOC-CHARGER-USB-RFFE-GNSS-1", "VIRTUAL-QUT-CHARGER-USB-RFFE-2", "VIRTUAL-QUT-CHARGER-USB-GNSS-3", "VIRTUAL-MODEM-QUT-SOC-CHARGER-USB-RFFE-GNSS-4"], + "Coefficient":[1.0, 1.0, 1.0, 1.0], + "HotThreshold":["NAN", 35.0, 39.0, 43.0, 45.0, 47.0, 55.0], + "HotHysteresis":[0.0, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9], + "Multiplier":0.001, + "PollingDelay":300000, + "PassiveDelay":7000, + "PIDInfo": { + "K_Po":["NAN", "NAN", 700, "NAN", "NAN", "NAN", "NAN"], + "K_Pu":["NAN", "NAN", 700, "NAN", "NAN", "NAN", "NAN"], + "K_I":["NAN", "NAN", 5, "NAN", "NAN", "NAN", "NAN"], + "K_D":["NAN", "NAN", 0, "NAN", "NAN", "NAN", "NAN"], + "I_Max":["NAN", "NAN", 800, "NAN", "NAN", "NAN", "NAN"], + "S_Power":["NAN", "NAN", 1200, "NAN", "NAN", "NAN", "NAN"], + "MinAllocPower":["NAN", "NAN", 300, "NAN", "NAN", "NAN", "NAN"], + "MaxAllocPower":["NAN", "NAN", 6000, "NAN", "NAN", "NAN", "NAN"], + "I_Cutoff":["NAN", "NAN", 2, "NAN", "NAN", "NAN", "NAN"] + }, + "ExcludedPowerInfo": [ + { + "PowerRail": "PARTIAL_SYSTEM_POWER", + "PowerWeight": [0.5, 0.5, 0.8, 1.0, 1.0, 1.0, 1.0] + } + ], + "BindedCdevInfo": [ + { + "CdevRequest": "fcc", + "CdevWeightForPID": [1, 1, 1, 1, 1, 1, 1], + "MaxReleaseStep": 1, + "MaxThrottleStep": 1, + "CdevCeiling": [0, 11, 11, 11, 12, 12, 12], + "LimitInfo": [0, 0, 0, 0, 0, 12, 12] + } + ] + }, + { + "Name":"VIRTUAL-SKIN-CHARGE-WLC", + "Type":"UNKNOWN", + "Hidden":true, + "VirtualSensor":true, + "TriggerSensor":"soc_therm", + "Formula":"WEIGHTED_AVG", + "Combination":["charger_therm", "rffe_therm", "display_therm"], + "Coefficient":[0.51, 0.25, 0.24], + "HotThreshold":["NAN", 35.0, 39.0, 43.0, 45.0, 47.0, 55.0], + "HotHysteresis":[0.0, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9], + "Multiplier":0.001, + "PollingDelay":300000, + "PassiveDelay":7000, + "PIDInfo": { + "K_Po":["NAN", "NAN", 800, "NAN", "NAN", "NAN", "NAN"], + "K_Pu":["NAN", "NAN", 800, "NAN", "NAN", "NAN", "NAN"], + "K_I":["NAN", "NAN", 5, "NAN", "NAN", "NAN", "NAN"], + "K_D":["NAN", "NAN", 0, "NAN", "NAN", "NAN", "NAN"], + "I_Max":["NAN", "NAN", 800, "NAN", "NAN", "NAN", "NAN"], + "S_Power":["NAN", "NAN", 2000, "NAN", "NAN", "NAN", "NAN"], + "MinAllocPower":["NAN", "NAN", 300, "NAN", "NAN", "NAN", "NAN"], + "MaxAllocPower":["NAN", "NAN", 6000, "NAN", "NAN", "NAN", "NAN"], + "I_Cutoff":["NAN", "NAN", 2, "NAN", "NAN", "NAN", "NAN"] + }, + "ExcludedPowerInfo": [ + { + "PowerRail": "PARTIAL_SYSTEM_POWER", + "PowerWeight": [0.5, 0.5, 0.8, 1.0, 1.0, 1.0, 1.0] + } + ], + "BindedCdevInfo": [ + { + "CdevRequest": "dc_icl", + "CdevWeightForPID": [1, 1, 1, 1, 1, 1, 1], + "MaxReleaseStep": 1, + "MaxThrottleStep": 1, + "CdevCeiling": [0, 5, 8, 11, 12, 12, 12], + "LimitInfo": [0, 0, 0, 0, 0, 12, 12] + } + ] + }, + { + "Name":"USB-MINUS-CHARGER", + "Type":"UNKNOWN", + "VirtualSensor":true, + "TriggerSensor": "usb_conn_therm", + "Formula":"WEIGHTED_AVG", + "Combination":["usb_conn_therm", "charger_therm"], + "Coefficient":[1.0, -1.0], + "HotThreshold":["NAN", "7.0", "NAN", "NAN", "NAN", "NAN", "NAN"], + "BindedCdevInfo": [ + { + "CdevRequest": "usbc-port", + "LimitInfo": [0, 0, 0, 0, 0, 0, 0] + } + ], + "Multiplier":0.001, + "PollingDelay":0, + "PassiveDelay":7000 + }, + { + "Name":"VIRTUAL-USB-THROTTLING", + "Type":"USB_PORT", + "Version":"0.1", + "VirtualSensor":true, + "Formula":"COUNT_THRESHOLD", + "TriggerSensor": "usb_conn_therm", + "Combination":["usb_conn_therm", "USB-MINUS-CHARGER"], + "Coefficient":[40000, 10000], + "HotThreshold":["NAN", "NAN", "NAN", "NAN", "2.0", "NAN", "NAN"], + "BindedCdevInfo": [ + { + "CdevRequest": "usbc-port", + "LimitInfo": [0, 0, 0, 0, 0, 0, 0] + } + ], + "VrThreshold":"NAN", + "Multiplier":1, + "PollingDelay":60000, + "PassiveDelay":7000 + } + ], + "CoolingDevices":[ + { + "Name":"fcc", + "Type":"BATTERY" + }, + { + "Name":"dc_icl", + "Type":"BATTERY" + }, + { + "Name":"usbc-port", + "Type":"BATTERY" + } + ], + "PowerRails":[ + { + "Name":"S2M_VDD_CPUCL2", + "PowerSampleDelay":7000, + "PowerSampleCount":1 + + }, + { + "Name":"S3M_VDD_CPUCL1", + "PowerSampleDelay":7000, + "PowerSampleCount":1 + }, + { + "Name":"S4M_VDD_CPUCL0", + "PowerSampleDelay":7000, + "PowerSampleCount":1 + }, + { + "Name":"S2S_VDD_G3D", + "PowerSampleDelay":7000, + "PowerSampleCount":1 + }, + { + "Name":"PARTIAL_SYSTEM_POWER", + "VirtualRails":true, + "Formula":"WEIGHTED_AVG", + "Combination":["S1S_VDD_CAM", "S2S_VDD_G3D", "S4S_VDD2H_MEM", "S5S_VDDQ_MEM", "S8S_VDD_G3D_L2", "S9S_VDD_AOC", "L2S_PLL_MIPI_UFS", "L9S_GNSS_CORE", "L21S_VDD2L_MEM", "VSYS_PWR_DISPLAY", "VSYS_PWR_WLAN_BT", "S1M_VDD_MIF", "S2M_VDD_CPUCL2", "S3M_VDD_CPUCL1", "S4M_VDD_CPUCL0", "S5M_VDD_INT", "S6M_LLDO1", "S7M_VDD_TPU", "S8M_LLDO2", "L22M_DISP", "VSYS_PWR_MODEM", "VSYS_PWR_RFFE"], + "Coefficient":[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], + "PowerSampleDelay":7000, + "PowerSampleCount":5 + } + ] +} diff --git a/thermal_info_config_proto.json b/thermal_info_config_proto.json new file mode 100644 index 0000000..68c8e4c --- /dev/null +++ b/thermal_info_config_proto.json @@ -0,0 +1,583 @@ +{ + "Sensors":[ + { + "Name":"battery", + "Type":"BATTERY", + "Multiplier":0.001 + }, + { + "Name":"modem_therm", + "Type":"UNKNOWN", + "TempPath":"/dev/thermal/tz-by-name/modem_therm/tz_temp", + "Multiplier":0.001 + }, + { + "Name":"gnss_tcxo_therm", + "Type":"UNKNOWN", + "TempPath":"/dev/thermal/tz-by-name/gnss_tcxo_therm/tz_temp", + "Multiplier":0.001 + }, + { + "Name":"usb_conn_therm", + "Type":"UNKNOWN", + "HotThreshold":["NAN", 40.0, "NAN", "NAN", "NAN", "NAN", "NAN"], + "TempPath":"/dev/thermal/tz-by-name/usb_conn_therm/tz_temp", + "Multiplier":0.001, + "PollingDelay":60000, + "PassiveDelay":7000 + }, + { + "Name":"rffe_therm", + "Type":"UNKNOWN", + "TempPath":"/dev/thermal/tz-by-name/rffe_therm/tz_temp", + "Multiplier":0.001 + }, + { + "Name":"soc_therm", + "Type":"UNKNOWN", + "HotThreshold":["NAN", 27.9, "NAN", "NAN", "NAN", "NAN", "NAN"], + "HotHysteresis":[0.0, 0.9, 0.0, 0.0, 0.0, 0.0, 0.0], + "TempPath":"/dev/thermal/tz-by-name/soc_therm/tz_temp", + "Multiplier":0.001, + "PollingDelay":60000, + "PassiveDelay":7000 + }, + { + "Name":"charger_therm", + "Type":"UNKNOWN", + "TempPath":"/dev/thermal/tz-by-name/charger_therm/tz_temp", + "Multiplier":0.001 + }, + { + "Name":"display_therm", + "Type":"UNKNOWN", + "TempPath":"/dev/thermal/tz-by-name/display_therm/tz_temp", + "Multiplier":0.001 + }, + { + "Name":"quiet_therm", + "Type":"UNKNOWN", + "TempPath":"/dev/thermal/tz-by-name/quiet_therm/tz_temp", + "Multiplier":0.001 + }, + { + "Name":"VIRTUAL-MODEM-QUT-SOC-CHARGER-USB-RFFE-GNSS-1", + "Type":"UNKNOWN", + "Hidden":true, + "VirtualSensor":true, + "Formula":"WEIGHTED_AVG", + "Combination":["modem_therm", "quiet_therm", "soc_therm", "charger_therm", "usb_conn_therm", "rffe_therm", "gnss_tcxo_therm"], + "Coefficient":[0.05, 0.05, 0.7, 0.05, 0.05, 0.05, 0.05], + "Offset":-1500, + "Multiplier":0.001 + }, + { + "Name":"VIRTUAL-QUT-CHARGER-USB-RFFE-2", + "Type":"UNKNOWN", + "Hidden":true, + "VirtualSensor":true, + "Formula":"WEIGHTED_AVG", + "Combination":["quiet_therm", "charger_therm", "usb_conn_therm", "rffe_therm"], + "Coefficient":[0.15, 0.15, 0.15, 0.55], + "Offset":-1000, + "Multiplier":0.001 + }, + { + "Name":"VIRTUAL-QUT-CHARGER-USB-GNSS-3", + "Type":"UNKNOWN", + "Hidden":true, + "VirtualSensor":true, + "Formula":"WEIGHTED_AVG", + "Combination":["quiet_therm", "charger_therm", "usb_conn_therm", "gnss_tcxo_therm"], + "Coefficient":[0.166, 0.45, 0.217, 0.167], + "Offset":-1950, + "Multiplier":0.001 + }, + { + "Name":"VIRTUAL-MODEM-QUT-SOC-CHARGER-USB-RFFE-GNSS-4", + "Type":"UNKNOWN", + "Hidden":true, + "VirtualSensor":true, + "Formula":"WEIGHTED_AVG", + "Combination":["modem_therm", "quiet_therm", "soc_therm", "charger_therm", "usb_conn_therm", "rffe_therm", "gnss_tcxo_therm"], + "Coefficient":[-0.05, -0.05, 1.3, -0.05, -0.05, -0.05, -0.05], + "Offset":-1950, + "Multiplier":0.001 + }, + { + "Name":"VIRTUAL-SKIN", + "Type":"SKIN", + "Version":"0.7", + "VirtualSensor":true, + "TriggerSensor":"soc_therm", + "Formula":"MAXIMUM", + "Combination":["VIRTUAL-MODEM-QUT-SOC-CHARGER-USB-RFFE-GNSS-1", "VIRTUAL-QUT-CHARGER-USB-RFFE-2", "VIRTUAL-QUT-CHARGER-USB-GNSS-3", "VIRTUAL-MODEM-QUT-SOC-CHARGER-USB-RFFE-GNSS-4"], + "Coefficient":[1.0, 1.0, 1.0, 1.0], + "HotThreshold":["NAN", 39.0, 43.0, 45.0, 47.0, 52.0, 125.0], + "HotHysteresis":[0.0, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9], + "Multiplier":0.001, + "SendCallback":true, + "PollingDelay":300000, + "PassiveDelay":7000, + "BindedCdevInfo": [ + { + "CdevRequest": "tpu_cooling", + "LimitInfo": [0, 2, 3, 4, 5, 5, 5] + }, + { + "CdevRequest": "gxp-cooling", + "LimitInfo": [0, 0, 0, 0, 0, 99, 99] + } + ] + }, + { + "Name":"VIRTUAL-SKIN-HINT", + "Type":"UNKNOWN", + "VirtualSensor":true, + "TriggerSensor":"soc_therm", + "Formula":"MAXIMUM", + "Combination":["VIRTUAL-SKIN"], + "Coefficient":[1.0], + "HotThreshold":["NAN", 37.0, 43.0, 45.0, 47.0, 52.0, 55.0], + "HotHysteresis":[0.0, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9], + "Multiplier":0.001, + "SendPowerHint":true, + "PollingDelay":300000, + "PassiveDelay":7000 + }, + { + "Name":"VIRTUAL-SKIN-CPU", + "Type":"UNKNOWN", + "Hidden":true, + "VirtualSensor":true, + "TriggerSensor":"soc_therm", + "Formula":"MAXIMUM", + "Combination":["VIRTUAL-SKIN"], + "Coefficient":[1.0], + "HotThreshold":["NAN", 37.0, 39.0, 41.0, 47.0, 52.0, 55.0], + "HotHysteresis":[0.0, 0.9, 0.9, 0.9, 1.9, 1.9, 1.9], + "Multiplier":0.001, + "PollingDelay":300000, + "PassiveDelay":7000, + "PIDInfo": { + "K_Po":["NAN", "NAN", "NAN", 400, "NAN", "NAN", "NAN"], + "K_Pu":["NAN", "NAN", "NAN", 400, "NAN", "NAN", "NAN"], + "K_I":["NAN", "NAN", "NAN", 5, "NAN", "NAN", "NAN"], + "K_D":["NAN", "NAN", "NAN", 0, "NAN", "NAN", "NAN"], + "I_Max":["NAN", "NAN", "NAN", 300, "NAN", "NAN", "NAN"], + "S_Power":["NAN", "NAN", "NAN", 800, "NAN", "NAN", "NAN"], + "MinAllocPower":["NAN", "NAN", "NAN", 800, "NAN", "NAN", "NAN"], + "MaxAllocPower":["NAN", "NAN", "NAN", 10000, "NAN", "NAN", "NAN"], + "I_Cutoff":["NAN", "NAN", "NAN", 2, "NAN", "NAN", "NAN"] + }, + "ExcludedPowerInfo": [ + { + "PowerRail": "VSYS_PWR_MODEM", + "PowerWeight": [0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3] + } + ], + "BindedCdevInfo": [ + { + "CdevRequest": "thermal-cpufreq-0", + "CdevWeightForPID": [1, 1, 1, 1, 1, 1, 1], + "MaxReleaseStep": 1, + "MaxThrottleStep": 1, + "BindedPowerRail": "S4M_VDD_CPUCL0", + "CdevCeiling": [0, 12, 12, 12, 12, 14, 14], + "LimitInfo": [0, 0, 0, 0, 12, 14, 14] + }, + { + "CdevRequest": "thermal-cpufreq-1", + "CdevWeightForPID": [1, 1, 1, 1, 1, 1, 1], + "MaxReleaseStep": 1, + "MaxThrottleStep": 1, + "BindedPowerRail": "S3M_VDD_CPUCL1", + "CdevCeiling": [0, 14, 14, 14, 14, 16, 16], + "LimitInfo": [0, 0, 0, 0, 14, 16, 16] + }, + { + "CdevRequest": "thermal-cpufreq-2", + "CdevWeightForPID": [1, 1, 1, 1, 1, 1, 1], + "MaxReleaseStep": 1, + "MaxThrottleStep": 1, + "BindedPowerRail": "S2M_VDD_CPUCL2", + "CdevCeiling": [0, 14, 14, 14, 14, 16, 16], + "LimitInfo": [0, 0, 0, 0, 14, 16, 16] + } + ] + }, + { + "Name":"VIRTUAL-SKIN-CPU-GPU", + "Type":"UNKNOWN", + "Hidden":true, + "VirtualSensor":true, + "TriggerSensor":"soc_therm", + "Formula":"MAXIMUM", + "Combination":["VIRTUAL-SKIN"], + "Coefficient":[1.0], + "HotThreshold":["NAN", 37.0, 43.0, 45.0, 47, 52.0, 55.0], + "HotHysteresis":[0.0, 1.9, 1.9, 1.9, 1.4, 1.9, 1.9], + "Multiplier":0.001, + "PollingDelay":300000, + "PassiveDelay":7000, + "PIDInfo": { + "K_Po":["NAN", "NAN", "NAN", 300, "NAN", "NAN", "NAN"], + "K_Pu":["NAN", "NAN", "NAN", 300, "NAN", "NAN", "NAN"], + "K_I":["NAN", "NAN", "NAN", 5, "NAN", "NAN", "NAN"], + "K_D":["NAN", "NAN", "NAN", 0, "NAN", "NAN", "NAN"], + "I_Max":["NAN", "NAN", "NAN", 2600, "NAN", "NAN", "NAN"], + "S_Power":["NAN", "NAN", "NAN", 800, "NAN", "NAN", "NAN"], + "MinAllocPower":["NAN", "NAN", "NAN", 0, "NAN", "NAN", "NAN"], + "MaxAllocPower":["NAN", "NAN", "NAN", 3900, "NAN", "NAN", "NAN"], + "I_Cutoff":["NAN", "NAN", "NAN", 8, "NAN", "NAN", "NAN"] + }, + "BindedCdevInfo": [ + { + "CdevRequest": "thermal-cpufreq-0", + "CdevWeightForPID": [1, 1, 1, 1, 1, 1, 1], + "MaxReleaseStep": 1, + "MaxThrottleStep": 1, + "BindedPowerRail": "S4M_VDD_CPUCL0", + "CdevCeiling": [0, 12, 12, 12, 12, 14, 14], + "LimitInfo": [0, 0, 0, 0, 12, 14, 14] + }, + { + "CdevRequest": "thermal-cpufreq-1", + "CdevWeightForPID": [1, 1, 1, 1, 1, 1, 1], + "MaxReleaseStep": 1, + "MaxThrottleStep": 1, + "BindedPowerRail": "S3M_VDD_CPUCL1", + "CdevCeiling": [0, 14, 14, 14, 14, 16, 16], + "LimitInfo": [0, 0, 0, 0, 14, 16, 16] + }, + { + "CdevRequest": "thermal-cpufreq-2", + "CdevWeightForPID": [1, 1, 1, 1, 1, 1, 1], + "MaxReleaseStep": 1, + "MaxThrottleStep": 1, + "BindedPowerRail": "S2M_VDD_CPUCL2", + "CdevCeiling": [0, 14, 14, 14, 14, 16, 16], + "LimitInfo": [0, 0, 0, 0, 14, 16, 16] + }, + { + "CdevRequest": "thermal-gpufreq-0", + "CdevWeightForPID": [1, 1, 1, 1, 1, 1, 1], + "MaxReleaseStep": 1, + "MaxThrottleStep": 1, + "BindedPowerRail": "S2S_VDD_G3D", + "CdevCeiling": [0, 9, 9, 9, 9, 11, 11], + "LimitInfo": [0, 0, 0, 0, 9, 11, 11] + } + ] + }, + { + "Name":"VIRTUAL-SKIN-GPU", + "Type":"UNKNOWN", + "Hidden":true, + "VirtualSensor":true, + "TriggerSensor":"soc_therm", + "Formula":"MAXIMUM", + "Combination":["VIRTUAL-SKIN"], + "Coefficient":[1.0], + "HotThreshold":["NAN", 43.0, 45.0, 46.5, 52.0, "NAN", "NAN"], + "HotHysteresis":[0.0, 1.9, 1.9, 1.4, 1.9, 0.0, 0.0], + "Multiplier":0.001, + "PollingDelay":300000, + "PassiveDelay":7000, + "PIDInfo": { + "K_Po":["NAN", "NAN", 700, "NAN", "NAN", "NAN", "NAN"], + "K_Pu":["NAN", "NAN", 700, "NAN", "NAN", "NAN", "NAN"], + "K_I":["NAN", "NAN", 5, "NAN", "NAN", "NAN", "NAN"], + "K_D":["NAN", "NAN", 0, "NAN", "NAN", "NAN", "NAN"], + "I_Max":["NAN", "NAN", 1723, "NAN", "NAN", "NAN", "NAN"], + "S_Power":["NAN", "NAN", 473, "NAN", "NAN", "NAN", "NAN"], + "MinAllocPower":["NAN", "NAN", 0, "NAN", "NAN", "NAN", "NAN"], + "MaxAllocPower":["NAN", "NAN", 2500, "NAN", "NAN", "NAN", "NAN"], + "I_Cutoff":["NAN", "NAN", 4, "NAN", "NAN", "NAN", "NAN"] + }, + "BindedCdevInfo": [ + { + "CdevRequest": "thermal-gpufreq-0", + "CdevWeightForPID": [1, 1, 1, 1, 1, 1, 1], + "CdevCeiling": [0, 9, 9, 9, 11, 11, 11] + } + ] + }, + { + "Name":"VIRTUAL-SKIN-CHARGE", + "Type":"UNKNOWN", + "VirtualSensor":true, + "TriggerSensor":"soc_therm", + "Formula":"MAXIMUM", + "Combination":["VIRTUAL-SKIN"], + "Coefficient":[1.0], + "HotThreshold":["NAN", 35.0, 39.0, 43.0, 45.0, 47.0, 55.0], + "HotHysteresis":[0.0, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9], + "Multiplier":0.001, + "PollingDelay":300000, + "PassiveDelay":7000, + "PIDInfo": { + "K_Po":["NAN", "NAN", 700, "NAN", "NAN", "NAN", "NAN"], + "K_Pu":["NAN", "NAN", 700, "NAN", "NAN", "NAN", "NAN"], + "K_I":["NAN", "NAN", 5, "NAN", "NAN", "NAN", "NAN"], + "K_D":["NAN", "NAN", 0, "NAN", "NAN", "NAN", "NAN"], + "I_Max":["NAN", "NAN", 800, "NAN", "NAN", "NAN", "NAN"], + "S_Power":["NAN", "NAN", 1200, "NAN", "NAN", "NAN", "NAN"], + "MinAllocPower":["NAN", "NAN", 300, "NAN", "NAN", "NAN", "NAN"], + "MaxAllocPower":["NAN", "NAN", 6000, "NAN", "NAN", "NAN", "NAN"], + "I_Cutoff":["NAN", "NAN", 2, "NAN", "NAN", "NAN", "NAN"] + }, + "ExcludedPowerInfo": [ + { + "PowerRail": "PARTIAL_SYSTEM_POWER", + "PowerWeight": [0.5, 0.5, 0.8, 1.0, 1.0, 1.0, 1.0] + } + ], + "BindedCdevInfo": [ + { + "CdevRequest": "fcc", + "CdevWeightForPID": [1, 1, 1, 1, 1, 1, 1], + "MaxReleaseStep": 1, + "MaxThrottleStep": 1, + "CdevCeiling": [0, 11, 11, 11, 12, 12, 12], + "LimitInfo": [0, 0, 0, 0, 0, 12, 12] + } + ] + }, + { + "Name":"VIRTUAL-SKIN-CHARGE-WLC", + "Type":"UNKNOWN", + "VirtualSensor":true, + "TriggerSensor":"soc_therm", + "Formula":"WEIGHTED_AVG", + "Combination":["charger_therm", "rffe_therm", "display_therm"], + "Coefficient":[0.51, 0.25, 0.24], + "HotThreshold":["NAN", 35.0, 39.0, 43.0, 45.0, 47.0, 55.0], + "HotHysteresis":[0.0, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9], + "Multiplier":0.001, + "PollingDelay":300000, + "PassiveDelay":7000, + "PIDInfo": { + "K_Po":["NAN", "NAN", 800, "NAN", "NAN", "NAN", "NAN"], + "K_Pu":["NAN", "NAN", 800, "NAN", "NAN", "NAN", "NAN"], + "K_I":["NAN", "NAN", 5, "NAN", "NAN", "NAN", "NAN"], + "K_D":["NAN", "NAN", 0, "NAN", "NAN", "NAN", "NAN"], + "I_Max":["NAN", "NAN", 800, "NAN", "NAN", "NAN", "NAN"], + "S_Power":["NAN", "NAN", 2000, "NAN", "NAN", "NAN", "NAN"], + "MinAllocPower":["NAN", "NAN", 300, "NAN", "NAN", "NAN", "NAN"], + "MaxAllocPower":["NAN", "NAN", 6000, "NAN", "NAN", "NAN", "NAN"], + "I_Cutoff":["NAN", "NAN", 2, "NAN", "NAN", "NAN", "NAN"] + }, + "ExcludedPowerInfo": [ + { + "PowerRail": "PARTIAL_SYSTEM_POWER", + "PowerWeight": [0.5, 0.5, 0.8, 1.0, 1.0, 1.0, 1.0] + } + ], + "BindedCdevInfo": [ + { + "CdevRequest": "dc_icl", + "CdevWeightForPID": [1, 1, 1, 1, 1, 1, 1], + "MaxReleaseStep": 1, + "MaxThrottleStep": 1, + "CdevCeiling": [0, 5, 8, 11, 12, 12, 12], + "LimitInfo": [0, 0, 0, 0, 0, 12, 12] + } + ] + }, + { + "Name":"cellular-emergency", + "Type":"POWER_AMPLIFIER", + "VirtualSensor":true, + "TriggerSensor":"soc_therm", + "Formula":"MAXIMUM", + "Combination":["VIRTUAL-SKIN"], + "Coefficient":[1.0], + "HotThreshold":["NAN", "NAN", "NAN", "NAN", "NAN", 54.0, "NAN"], + "HotHysteresis":[0.0, 0.0, 0.0, 0.0, 0.0, 1.9, 0.0], + "Multiplier":0.001, + "SendCallback":true, + "PollingDelay":300000, + "PassiveDelay":7000 + }, + { + "Name":"USB-MINUS-CHARGER", + "Type":"UNKNOWN", + "VirtualSensor":true, + "TriggerSensor": "usb_conn_therm", + "Formula":"WEIGHTED_AVG", + "Combination":["usb_conn_therm", "charger_therm"], + "Coefficient":[1.0, -1.0], + "Multiplier":0.001, + "PollingDelay":0, + "PassiveDelay":7000 + }, + { + "Name":"VIRTUAL-USB-THROTTLING", + "Type":"USB_PORT", + "Version":"0.1", + "VirtualSensor":true, + "Formula":"COUNT_THRESHOLD", + "TriggerSensor": "usb_conn_therm", + "Combination":["usb_conn_therm", "USB-MINUS-CHARGER"], + "Coefficient":[40000, 10000], + "HotThreshold":["NAN", "NAN", "NAN", "NAN", "2.0", "NAN", "NAN"], + "BindedCdevInfo": [ + { + "CdevRequest": "usbc-port", + "LimitInfo": [0, 0, 0, 0, 0, 0, 0] + } + ], + "VrThreshold":"NAN", + "Multiplier":1, + "PollingDelay":60000, + "PassiveDelay":7000 + }, + { + "Name":"VIRTUAL-USB-UI", + "Type":"USB_PORT", + "Version":"0.1", + "VirtualSensor":true, + "Formula":"COUNT_THRESHOLD", + "TriggerSensor": "usb_conn_therm", + "Combination":["usb_conn_therm", "USB-MINUS-CHARGER"], + "Coefficient":[40000, 13000], + "HotThreshold":["NAN", "NAN", "NAN", "NAN", "NAN", "2.0", "NAN"], + "VrThreshold":"NAN", + "Multiplier":1, + "SendCallback":true, + "PollingDelay":60000, + "PassiveDelay":7000 + }, + { + "Name":"LITTLE", + "Type":"CPU", + "Multiplier":0.001 + }, + { + "Name":"MID", + "Type":"CPU", + "Multiplier":0.001 + }, + { + "Name":"BIG", + "Type":"CPU", + "Multiplier":0.001 + }, + { + "Name":"G3D", + "Type":"GPU", + "Multiplier":0.001 + }, + { + "Name":"TPU", + "Type":"NPU", + "Multiplier":0.001 + } + ], + "CoolingDevices":[ + { + "Name":"thermal-cpufreq-0", + "Type":"CPU", + "WritePath":"/dev/thermal/cdev-by-name/thermal-cpufreq-0/user_vote" + }, + { + "Name":"thermal-cpufreq-1", + "Type":"CPU", + "WritePath":"/dev/thermal/cdev-by-name/thermal-cpufreq-1/user_vote" + }, + { + "Name":"thermal-cpufreq-2", + "Type":"CPU", + "WritePath":"/dev/thermal/cdev-by-name/thermal-cpufreq-2/user_vote" + }, + { + "Name":"thermal-gpufreq-0", + "Type":"GPU", + "WritePath":"/dev/thermal/cdev-by-name/thermal-gpufreq-0/user_vote" + }, + { + "Name":"fcc", + "Type":"BATTERY" + }, + { + "Name":"dc_icl", + "Type":"BATTERY" + }, + { + "Name":"usbc-port", + "Type":"BATTERY" + }, + { + "Name":"tpu_cooling", + "Type":"NPU", + "WritePath":"/dev/thermal/cdev-by-name/tpu_cooling/user_vote" + }, + { + "Name":"gxp-cooling", + "Type":"NPU", + "WritePath":"/dev/thermal/cdev-by-name/gxp-cooling/user_vote" + } + ], + "PowerRails":[ + { + "Name":"VSYS_PWR_MODEM", + "PowerSampleDelay":7000, + "PowerSampleCount":1 + }, + { + "Name":"S2M_VDD_CPUCL2", + "PowerSampleDelay":7000, + "PowerSampleCount":1 + + }, + { + "Name":"S3M_VDD_CPUCL1", + "PowerSampleDelay":7000, + "PowerSampleCount":1 + }, + { + "Name":"S4M_VDD_CPUCL0", + "PowerSampleDelay":7000, + "PowerSampleCount":1 + }, + { + "Name":"S2S_VDD_G3D", + "PowerSampleDelay":7000, + "PowerSampleCount":1 + }, + { + "Name":"PARTIAL_SYSTEM_POWER", + "VirtualRails":true, + "Formula":"WEIGHTED_AVG", + "Combination":["S1S_VDD_CAM", "S2S_VDD_G3D", "S4S_VDD2H_MEM", "S5S_VDDQ_MEM", "S8S_VDD_G3D_L2", "S9S_VDD_AOC", "L2S_PLL_MIPI_UFS", "L9S_GNSS_CORE", "L21S_VDD2L_MEM", "VSYS_PWR_DISPLAY", "VSYS_PWR_WLAN_BT", "S1M_VDD_MIF", "S2M_VDD_CPUCL2", "S3M_VDD_CPUCL1", "S4M_VDD_CPUCL0", "S5M_VDD_INT", "S6M_LLDO1", "S7M_VDD_TPU", "S8M_LLDO2", "L22M_DISP", "VSYS_PWR_MODEM", "VSYS_PWR_RFFE"], + "Coefficient":[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], + "PowerSampleDelay":7000, + "PowerSampleCount":5 + } + ], + "Stats": { + "Sensors": { + "RecordWithDefaultThreshold": ["VIRTUAL-SKIN", "VIRTUAL-SKIN-CHARGE-WLC"], + "RecordWithThreshold": [ + { + "Name": "VIRTUAL-SKIN", + "Thresholds": [31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51] + }, + { + "Name": "VIRTUAL-SKIN-CHARGE-WLC", + "Thresholds": [31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51] + }, + { + "Name": "VIRTUAL-USB-THROTTLING", + "Thresholds": [2.0] + } + ] + }, + "CoolingDevices": { + "RecordVotePerSensor": { + "DefaultThresholdEnableAll": true + } + } + } +}