From fcf460a0e9584c696fa5bc3ac9395d6f980414e6 Mon Sep 17 00:00:00 2001 From: TeYuan Wang Date: Wed, 3 Jan 2024 13:56:06 -0800 Subject: [PATCH] thermal: update USBC throttling policy Bug: 317281453 Test: verified by emul_temp Change-Id: Idc2e31e32bd7b278fa7a64d8e6de123c14bfa15a --- thermal/thermal_info_config_caiman.json | 35 +++++++++++++++++++ thermal/thermal_info_config_caiman_proto.json | 35 +++++++++++++++++++ .../thermal_info_config_charge_caiman.json | 20 +++++++++++ .../thermal_info_config_charge_komodo.json | 20 +++++++++++ thermal/thermal_info_config_charge_tokay.json | 20 +++++++++++ thermal/thermal_info_config_komodo.json | 35 +++++++++++++++++++ thermal/thermal_info_config_komodo_proto.json | 35 +++++++++++++++++++ thermal/thermal_info_config_tokay.json | 35 +++++++++++++++++++ thermal/thermal_info_config_tokay_proto.json | 35 +++++++++++++++++++ 9 files changed, 270 insertions(+) diff --git a/thermal/thermal_info_config_caiman.json b/thermal/thermal_info_config_caiman.json index bb56b09b..f9fc5513 100644 --- a/thermal/thermal_info_config_caiman.json +++ b/thermal/thermal_info_config_caiman.json @@ -808,6 +808,41 @@ } ] }, + { + "Name": "VIRTUAL-USB-THROTTLING", + "Type": "UNKNOWN", + "VirtualSensor": true, + "Formula": "WEIGHTED_AVG", + "TriggerSensor": "usb_pwr_therm", + "Combination": ["usb_pwr_therm"], + "Coefficient": [1.0], + "HotThreshold": ["NaN", "NaN", "NaN", "NaN", 55.0, "NaN", "NaN"], + "HotHysteresis": [0.0, 0.0, 0.0, 0.0, 1.9, 0.0, 0.0], + "BindedCdevInfo": [ + { + "CdevRequest": "usbc-port", + "LimitInfo": [0, 0, 0, 0, 1, 1, 1] + } + ], + "Multiplier": 0.001, + "PollingDelay": 300000, + "PassiveDelay": 7000 + }, + { + "Name": "VIRTUAL-USB-UI", + "Type": "USB_PORT", + "VirtualSensor": true, + "Formula": "WEIGHTED_AVG", + "TriggerSensor": "usb_pwr_therm", + "Combination": ["usb_pwr_therm"], + "Coefficient": [1.0], + "HotThreshold": ["NaN", "NaN", "NaN", "NaN", "NaN", 57.0, "NaN"], + "HotHysteresis": [0.0, 0.0, 0.0, 0.0, 0.0, 1.9, 0.0], + "Multiplier": 0.001, + "PollingDelay": 300000, + "PassiveDelay": 7000, + "SendCallback": true + }, { "Name":"LITTLE", "Type":"CPU", diff --git a/thermal/thermal_info_config_caiman_proto.json b/thermal/thermal_info_config_caiman_proto.json index 35b426f8..b4263df1 100644 --- a/thermal/thermal_info_config_caiman_proto.json +++ b/thermal/thermal_info_config_caiman_proto.json @@ -800,6 +800,41 @@ } ] }, + { + "Name": "VIRTUAL-USB-THROTTLING", + "Type": "UNKNOWN", + "VirtualSensor": true, + "Formula": "WEIGHTED_AVG", + "TriggerSensor": "usb_pwr_therm", + "Combination": ["usb_pwr_therm"], + "Coefficient": [1.0], + "HotThreshold": ["NaN", "NaN", "NaN", "NaN", 55.0, "NaN", "NaN"], + "HotHysteresis": [0.0, 0.0, 0.0, 0.0, 1.9, 0.0, 0.0], + "BindedCdevInfo": [ + { + "CdevRequest": "usbc-port", + "LimitInfo": [0, 0, 0, 0, 1, 1, 1] + } + ], + "Multiplier": 0.001, + "PollingDelay": 300000, + "PassiveDelay": 7000 + }, + { + "Name": "VIRTUAL-USB-UI", + "Type": "USB_PORT", + "VirtualSensor": true, + "Formula": "WEIGHTED_AVG", + "TriggerSensor": "usb_pwr_therm", + "Combination": ["usb_pwr_therm"], + "Coefficient": [1.0], + "HotThreshold": ["NaN", "NaN", "NaN", "NaN", "NaN", 57.0, "NaN"], + "HotHysteresis": [0.0, 0.0, 0.0, 0.0, 0.0, 1.9, 0.0], + "Multiplier": 0.001, + "PollingDelay": 300000, + "PassiveDelay": 7000, + "SendCallback": true + }, { "Name":"LITTLE", "Type":"CPU", diff --git a/thermal/thermal_info_config_charge_caiman.json b/thermal/thermal_info_config_charge_caiman.json index 54cb5a53..7f9cce36 100644 --- a/thermal/thermal_info_config_charge_caiman.json +++ b/thermal/thermal_info_config_charge_caiman.json @@ -171,6 +171,26 @@ "LimitInfo": [0, 0, 1, 1, 1, 26, 26] } ] + }, + { + "Name": "VIRTUAL-USB-THROTTLING", + "Type": "UNKNOWN", + "VirtualSensor": true, + "Formula": "WEIGHTED_AVG", + "TriggerSensor": "usb_pwr_therm", + "Combination": ["usb_pwr_therm"], + "Coefficient": [1.0], + "HotThreshold": ["NaN", "NaN", "NaN", "NaN", 55.0, "NaN", "NaN"], + "HotHysteresis": [0.0, 0.0, 0.0, 0.0, 1.9, 0.0, 0.0], + "BindedCdevInfo": [ + { + "CdevRequest": "usbc-port", + "LimitInfo": [0, 0, 0, 0, 1, 1, 1] + } + ], + "Multiplier": 0.001, + "PollingDelay": 300000, + "PassiveDelay": 7000 } ], "CoolingDevices":[ diff --git a/thermal/thermal_info_config_charge_komodo.json b/thermal/thermal_info_config_charge_komodo.json index 6384ac03..08e55b4c 100644 --- a/thermal/thermal_info_config_charge_komodo.json +++ b/thermal/thermal_info_config_charge_komodo.json @@ -217,6 +217,26 @@ "LimitInfo": [0, 0, 1, 1, 1, 26, 26] } ] + }, + { + "Name": "VIRTUAL-USB-THROTTLING", + "Type": "UNKNOWN", + "VirtualSensor": true, + "Formula": "WEIGHTED_AVG", + "TriggerSensor": "usb_pwr_therm", + "Combination": ["usb_pwr_therm"], + "Coefficient": [1.0], + "HotThreshold": ["NaN", "NaN", "NaN", "NaN", 55.0, "NaN", "NaN"], + "HotHysteresis": [0.0, 0.0, 0.0, 0.0, 1.9, 0.0, 0.0], + "BindedCdevInfo": [ + { + "CdevRequest": "usbc-port", + "LimitInfo": [0, 0, 0, 0, 1, 1, 1] + } + ], + "Multiplier": 0.001, + "PollingDelay": 300000, + "PassiveDelay": 7000 } ], "CoolingDevices":[ diff --git a/thermal/thermal_info_config_charge_tokay.json b/thermal/thermal_info_config_charge_tokay.json index b8d9127e..09a44705 100644 --- a/thermal/thermal_info_config_charge_tokay.json +++ b/thermal/thermal_info_config_charge_tokay.json @@ -204,6 +204,26 @@ "LimitInfo": [0, 0, 1, 1, 1, 26, 26] } ] + }, + { + "Name": "VIRTUAL-USB-THROTTLING", + "Type": "UNKNOWN", + "VirtualSensor": true, + "Formula": "WEIGHTED_AVG", + "TriggerSensor": "usb_pwr_therm", + "Combination": ["usb_pwr_therm"], + "Coefficient": [1.0], + "HotThreshold": ["NaN", "NaN", "NaN", "NaN", 55.0, "NaN", "NaN"], + "HotHysteresis": [0.0, 0.0, 0.0, 0.0, 1.9, 0.0, 0.0], + "BindedCdevInfo": [ + { + "CdevRequest": "usbc-port", + "LimitInfo": [0, 0, 0, 0, 1, 1, 1] + } + ], + "Multiplier": 0.001, + "PollingDelay": 300000, + "PassiveDelay": 7000 } ], "CoolingDevices":[ diff --git a/thermal/thermal_info_config_komodo.json b/thermal/thermal_info_config_komodo.json index b337229f..0f6544ea 100644 --- a/thermal/thermal_info_config_komodo.json +++ b/thermal/thermal_info_config_komodo.json @@ -910,6 +910,41 @@ } ] }, + { + "Name": "VIRTUAL-USB-THROTTLING", + "Type": "UNKNOWN", + "VirtualSensor": true, + "Formula": "WEIGHTED_AVG", + "TriggerSensor": "usb_pwr_therm", + "Combination": ["usb_pwr_therm"], + "Coefficient": [1.0], + "HotThreshold": ["NaN", "NaN", "NaN", "NaN", 55.0, "NaN", "NaN"], + "HotHysteresis": [0.0, 0.0, 0.0, 0.0, 1.9, 0.0, 0.0], + "BindedCdevInfo": [ + { + "CdevRequest": "usbc-port", + "LimitInfo": [0, 0, 0, 0, 1, 1, 1] + } + ], + "Multiplier": 0.001, + "PollingDelay": 300000, + "PassiveDelay": 7000 + }, + { + "Name": "VIRTUAL-USB-UI", + "Type": "USB_PORT", + "VirtualSensor": true, + "Formula": "WEIGHTED_AVG", + "TriggerSensor": "usb_pwr_therm", + "Combination": ["usb_pwr_therm"], + "Coefficient": [1.0], + "HotThreshold": ["NaN", "NaN", "NaN", "NaN", "NaN", 57.0, "NaN"], + "HotHysteresis": [0.0, 0.0, 0.0, 0.0, 0.0, 1.9, 0.0], + "Multiplier": 0.001, + "PollingDelay": 300000, + "PassiveDelay": 7000, + "SendCallback": true + }, { "Name":"LITTLE", "Type":"CPU", diff --git a/thermal/thermal_info_config_komodo_proto.json b/thermal/thermal_info_config_komodo_proto.json index e6be4d59..afd4829b 100644 --- a/thermal/thermal_info_config_komodo_proto.json +++ b/thermal/thermal_info_config_komodo_proto.json @@ -900,6 +900,41 @@ } ] }, + { + "Name": "VIRTUAL-USB-THROTTLING", + "Type": "UNKNOWN", + "VirtualSensor": true, + "Formula": "WEIGHTED_AVG", + "TriggerSensor": "usb_pwr_therm", + "Combination": ["usb_pwr_therm"], + "Coefficient": [1.0], + "HotThreshold": ["NaN", "NaN", "NaN", "NaN", 55.0, "NaN", "NaN"], + "HotHysteresis": [0.0, 0.0, 0.0, 0.0, 1.9, 0.0, 0.0], + "BindedCdevInfo": [ + { + "CdevRequest": "usbc-port", + "LimitInfo": [0, 0, 0, 0, 1, 1, 1] + } + ], + "Multiplier": 0.001, + "PollingDelay": 300000, + "PassiveDelay": 7000 + }, + { + "Name": "VIRTUAL-USB-UI", + "Type": "USB_PORT", + "VirtualSensor": true, + "Formula": "WEIGHTED_AVG", + "TriggerSensor": "usb_pwr_therm", + "Combination": ["usb_pwr_therm"], + "Coefficient": [1.0], + "HotThreshold": ["NaN", "NaN", "NaN", "NaN", "NaN", 57.0, "NaN"], + "HotHysteresis": [0.0, 0.0, 0.0, 0.0, 0.0, 1.9, 0.0], + "Multiplier": 0.001, + "PollingDelay": 300000, + "PassiveDelay": 7000, + "SendCallback": true + }, { "Name":"LITTLE", "Type":"CPU", diff --git a/thermal/thermal_info_config_tokay.json b/thermal/thermal_info_config_tokay.json index 8f7491a8..1f053cb1 100644 --- a/thermal/thermal_info_config_tokay.json +++ b/thermal/thermal_info_config_tokay.json @@ -831,6 +831,41 @@ } ] }, + { + "Name": "VIRTUAL-USB-THROTTLING", + "Type": "UNKNOWN", + "VirtualSensor": true, + "Formula": "WEIGHTED_AVG", + "TriggerSensor": "usb_pwr_therm", + "Combination": ["usb_pwr_therm"], + "Coefficient": [1.0], + "HotThreshold": ["NaN", "NaN", "NaN", "NaN", 55.0, "NaN", "NaN"], + "HotHysteresis": [0.0, 0.0, 0.0, 0.0, 1.9, 0.0, 0.0], + "BindedCdevInfo": [ + { + "CdevRequest": "usbc-port", + "LimitInfo": [0, 0, 0, 0, 1, 1, 1] + } + ], + "Multiplier": 0.001, + "PollingDelay": 300000, + "PassiveDelay": 7000 + }, + { + "Name": "VIRTUAL-USB-UI", + "Type": "USB_PORT", + "VirtualSensor": true, + "Formula": "WEIGHTED_AVG", + "TriggerSensor": "usb_pwr_therm", + "Combination": ["usb_pwr_therm"], + "Coefficient": [1.0], + "HotThreshold": ["NaN", "NaN", "NaN", "NaN", "NaN", 57.0, "NaN"], + "HotHysteresis": [0.0, 0.0, 0.0, 0.0, 0.0, 1.9, 0.0], + "Multiplier": 0.001, + "PollingDelay": 300000, + "PassiveDelay": 7000, + "SendCallback": true + }, { "Name":"LITTLE", "Type":"CPU", diff --git a/thermal/thermal_info_config_tokay_proto.json b/thermal/thermal_info_config_tokay_proto.json index 0013a582..55addf74 100644 --- a/thermal/thermal_info_config_tokay_proto.json +++ b/thermal/thermal_info_config_tokay_proto.json @@ -821,6 +821,41 @@ } ] }, + { + "Name": "VIRTUAL-USB-THROTTLING", + "Type": "UNKNOWN", + "VirtualSensor": true, + "Formula": "WEIGHTED_AVG", + "TriggerSensor": "usb_pwr_therm", + "Combination": ["usb_pwr_therm"], + "Coefficient": [1.0], + "HotThreshold": ["NaN", "NaN", "NaN", "NaN", 55.0, "NaN", "NaN"], + "HotHysteresis": [0.0, 0.0, 0.0, 0.0, 1.9, 0.0, 0.0], + "BindedCdevInfo": [ + { + "CdevRequest": "usbc-port", + "LimitInfo": [0, 0, 0, 0, 1, 1, 1] + } + ], + "Multiplier": 0.001, + "PollingDelay": 300000, + "PassiveDelay": 7000 + }, + { + "Name": "VIRTUAL-USB-UI", + "Type": "USB_PORT", + "VirtualSensor": true, + "Formula": "WEIGHTED_AVG", + "TriggerSensor": "usb_pwr_therm", + "Combination": ["usb_pwr_therm"], + "Coefficient": [1.0], + "HotThreshold": ["NaN", "NaN", "NaN", "NaN", "NaN", 57.0, "NaN"], + "HotHysteresis": [0.0, 0.0, 0.0, 0.0, 0.0, 1.9, 0.0], + "Multiplier": 0.001, + "PollingDelay": 300000, + "PassiveDelay": 7000, + "SendCallback": true + }, { "Name":"LITTLE", "Type":"CPU",