diff --git a/device-comet.mk b/device-comet.mk index abf457a..048cc2c 100644 --- a/device-comet.mk +++ b/device-comet.mk @@ -93,7 +93,8 @@ PRODUCT_COPY_FILES += \ # Thermal Config PRODUCT_COPY_FILES += \ - device/google/comet/thermal_info_config_comet.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config.json + device/google/comet/thermal_info_config_comet.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config.json \ + device/google/comet/thermal_info_config_charge_comet.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config_charge.json # Power HAL config PRODUCT_COPY_FILES += \ diff --git a/thermal_info_config_charge_comet.json b/thermal_info_config_charge_comet.json new file mode 100644 index 0000000..1fb655d --- /dev/null +++ b/thermal_info_config_charge_comet.json @@ -0,0 +1,216 @@ +{ + "Sensors": [ + { + "Name": "soc_therm", + "Type": "UNKNOWN", + "TempPath": "/dev/thermal/tz-by-name/soc_therm/tz_temp", + "Multiplier": 0.001 + }, + { + "Name": "rffe_therm", + "Type": "UNKNOWN", + "TempPath": "/dev/thermal/tz-by-name/rffe_therm/tz_temp", + "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", 46.0, "NaN", "NaN", "NaN", "NaN", "NaN"], + "TempPath": "/dev/thermal/tz-by-name/usb_conn_therm/tz_temp", + "Multiplier": 0.001, + "PollingDelay": 300000, + "PassiveDelay": 7000 + }, + { + "Name": "charger_therm", + "Type": "UNKNOWN", + "HotThreshold": ["NaN", 34.89, "NaN", "NaN", "NaN", "NaN", "NaN"], + "TempPath": "/dev/thermal/tz-by-name/charger_therm/tz_temp", + "Multiplier": 0.001, + "PollingDelay": 300000, + "PassiveDelay": 7000 + }, + { + "Name": "inner_brightness", + "Type": "UNKNOWN", + "Multiplier": 1 + }, + { + "Name": "OPEN_WEIGHT", + "Type": "UNKNOWN", + "Hidden": true, + "VirtualSensor": true, + "Formula": "COUNT_THRESHOLD", + "StepRatio": 0.2, + "Combination": ["inner_brightness"], + "Coefficient": [1.0], + "Multiplier": 1, + "PassiveDelay": 7000 + }, + { + "Name": "CLOSE_WEIGHT", + "Type": "UNKNOWN", + "Hidden": true, + "VirtualSensor": true, + "Formula": "WEIGHTED_AVG", + "Combination": ["1", "OPEN_WEIGHT"], + "CombinationType": ["CONSTANT", "SENSOR"], + "Coefficient": [1.0, -1.0], + "Multiplier": 1 + }, + { + "Name": "VIRTUAL-SKIN-CHARGE-OPEN", + "Type": "UNKNOWN", + "Hidden": true, + "VirtualSensor": true, + "Formula": "WEIGHTED_AVG", + "Combination": [ + "soc_therm", + "rffe_therm", + "modem_therm", + "gnss_tcxo_therm" + ], + "Coefficient": [0.119, 0.103, 0.481, 0.288], + "Offset": -203, + "Multiplier": 0.001 + }, + { + "Name": "VIRTUAL-SKIN-CHARGE-CLOSE", + "Type": "UNKNOWN", + "Hidden": true, + "VirtualSensor": true, + "Formula": "WEIGHTED_AVG", + "Combination": ["soc_therm", "rffe_therm", "modem_therm"], + "Coefficient": [0.223, 0.175, 0.493], + "Offset": 2631, + "Multiplier": 0.001 + }, + { + "Name": "VIRTUAL-SKIN-CHARGE", + "Type": "UNKNOWN", + "Version": "0.1", + "VirtualSensor": true, + "TriggerSensor": "charger_therm", + "Formula": "WEIGHTED_AVG", + "Combination": ["VIRTUAL-SKIN-CHARGE-OPEN", "VIRTUAL-SKIN-CHARGE-CLOSE"], + "Coefficient": ["OPEN_WEIGHT", "CLOSE_WEIGHT"], + "CoefficientType": ["SENSOR", "SENSOR"], + "HotThreshold": ["NaN", 34.0, 38.0, 41.0, 45.0, 47.0, 55.0], + "HotHysteresis": [0.0, 1.9, 3.9, 2.9, 3.9, 1.9, 1.9], + "Multiplier": 0.001, + "PollingDelay": 300000, + "PassiveDelay": 7000, + "PIDInfo": { + "K_Po": ["NaN", "NaN", 119, "NaN", "NaN", "NaN", "NaN"], + "K_Pu": ["NaN", "NaN", 119, "NaN", "NaN", "NaN", "NaN"], + "K_I": ["NaN", "NaN", 25, "NaN", "NaN", "NaN", "NaN"], + "K_D": ["NaN", "NaN", 0, "NaN", "NaN", "NaN", "NaN"], + "I_Max": ["NaN", "NaN", 1302, "NaN", "NaN", "NaN", "NaN"], + "S_Power": ["NaN", "NaN", 2527, "NaN", "NaN", "NaN", "NaN"], + "MinAllocPower": ["NaN", "NaN", 0, "NaN", "NaN", "NaN", "NaN"], + "MaxAllocPower": ["NaN", "NaN", 6219, "NaN", "NaN", "NaN", "NaN"], + "I_Cutoff": ["NaN", "NaN", 6, "NaN", "NaN", "NaN", "NaN"], + "I_Default": 1302 + }, + "ExcludedPowerInfo": [ + { + "PowerRail": "PARTIAL_SYSTEM_POWER", + "PowerWeight": [0.12, 0.12, 0.06, 0.06, 0.24, 0.24, 0.24] + } + ], + "BindedCdevInfo": [ + { + "CdevRequest": "chg_mdis", + "CdevWeightForPID": [1, 1, 1, 1, 1, 1, 1], + "MaxReleaseStep": 1, + "MaxThrottleStep": 1, + "CdevCeiling": [0, 25, 25, 25, 26, 26, 26], + "LimitInfo": [0, 0, 1, 1, 1, 26, 26] + } + ] + }, + { + "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 + }, + { + "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": [46000, 7000], + "HotThreshold": ["NaN", "NaN", "NaN", "NaN", "2.0", "NaN", "NaN"], + "BindedCdevInfo": [ + { + "CdevRequest": "usbc-port", + "LimitInfo": [0, 0, 0, 0, 1, 1, 1] + } + ], + "Multiplier": 1, + "PollingDelay": 300000, + "PassiveDelay": 7000 + } + ], + "CoolingDevices": [ + { + "Name": "chg_mdis", + "Type": "BATTERY" + }, + { + "Name": "usbc-port", + "Type": "BATTERY" + } + ], + "PowerRails": [ + { + "Name": "PARTIAL_SYSTEM_POWER", + "VirtualRails": true, + "Formula": "WEIGHTED_AVG", + "Combination": [ + "S1S_VDD_CAM", + "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", + "S5M_VDD_INT", + "S6M_LLDO1", + "S7M_VDD_TPU", + "S8M_LLDO2", + "VSYS_PWR_MODEM" + ], + "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 + ], + "PowerSampleDelay": 7000, + "PowerSampleCount": 5 + } + ] +} diff --git a/thermal_info_config_comet.json b/thermal_info_config_comet.json index 65d1dda..cc9b664 100644 --- a/thermal_info_config_comet.json +++ b/thermal_info_config_comet.json @@ -593,6 +593,49 @@ "PassiveDelay": 7000, "SendCallback": true }, + { + "Name": "VIRTUAL-SKIN-CHARGE", + "Type": "UNKNOWN", + "Version": "0.1", + "VirtualSensor": true, + "TriggerSensor": "charger_therm", + "Formula": "MAXIMUM", + "Combination": ["VIRTUAL-SKIN"], + "Coefficient": [1.0], + "HotThreshold": ["NAN", 34.0, 38.0, 41.0, 45.0, 47.0, 55.0], + "HotHysteresis": [0.0, 1.9, 3.9, 2.9, 3.9, 1.9, 1.9], + "Multiplier": 0.001, + "PollingDelay": 300000, + "PassiveDelay": 7000, + "PIDInfo": { + "K_Po": ["NAN", "NAN", 119, "NAN", "NAN", "NAN", "NAN"], + "K_Pu": ["NAN", "NAN", 119, "NAN", "NAN", "NAN", "NAN"], + "K_I": ["NAN", "NAN", 25, "NAN", "NAN", "NAN", "NAN"], + "K_D": ["NAN", "NAN", 0, "NAN", "NAN", "NAN", "NAN"], + "I_Max": ["NAN", "NAN", 1302, "NAN", "NAN", "NAN", "NAN"], + "S_Power": ["NAN", "NAN", 2527, "NAN", "NAN", "NAN", "NAN"], + "MinAllocPower": ["NAN", "NAN", 0, "NAN", "NAN", "NAN", "NAN"], + "MaxAllocPower": ["NAN", "NAN", 6219, "NAN", "NAN", "NAN", "NAN"], + "I_Cutoff": ["NAN", "NAN", 6, "NAN", "NAN", "NAN", "NAN"], + "I_Default": 1302 + }, + "ExcludedPowerInfo": [ + { + "PowerRail": "PARTIAL_SYSTEM_POWER", + "PowerWeight": [0.12, 0.12, 0.06, 0.06, 0.24, 0.24, 0.24] + } + ], + "BindedCdevInfo": [ + { + "CdevRequest": "chg_mdis", + "CdevWeightForPID": [1, 1, 1, 1, 1, 1, 1], + "MaxReleaseStep": 1, + "MaxThrottleStep": 1, + "CdevCeiling": [0, 25, 25, 25, 26, 26, 26], + "LimitInfo": [0, 0, 1, 1, 1, 26, 26] + } + ] + }, { "Name": "USB-MINUS-CHARGER", "Type": "UNKNOWN", @@ -732,6 +775,39 @@ "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", + "VSYS_PWR_MODEM" + ], + "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 + ], + "PowerSampleDelay": 7000, + "PowerSampleCount": 5 } ], "Stats": {