From ab4b15955b07f1172b68ee634797b4192a06fa3b Mon Sep 17 00:00:00 2001 From: Sayanna Chandula Date: Mon, 14 Feb 2022 22:17:46 +0000 Subject: [PATCH] thermal: enable charging throttling Create a virtual rail POWER_FOR_CHARGING_THROTTLING and bind fcc/dc_icl/wlc_fcc cooling devices with virtual-skin-charge sensor. Bug: 204523879 Test: build and boot on device. Check charging throttling Change-Id: Iffd71c5bb6b8545bb95468b3321bcf57c0b02913 Signed-off-by: Sayanna Chandula --- thermal_info_config_cheetah.json | 58 +++++++++++++++++++++++++++++++- thermal_info_config_panther.json | 58 +++++++++++++++++++++++++++++++- 2 files changed, 114 insertions(+), 2 deletions(-) diff --git a/thermal_info_config_cheetah.json b/thermal_info_config_cheetah.json index 1f83e59..55eef2d 100644 --- a/thermal_info_config_cheetah.json +++ b/thermal_info_config_cheetah.json @@ -354,7 +354,30 @@ "BindedCdevInfo": [ { "CdevRequest": "fcc", - "LimitInfo": [0, 0, 0, 0, 0, 0, 0] + "LimitInfo": [0, 2, 3, 3, 4, 4, 4], + "BindedPowerRail": "POWER_FOR_CHARGING_THROTTLING", + "PowerThreshold": [500, 500, 500, 500, 500, 0, 0], + "CdevFloorWithPowerLink": [0, 0, 2, 2, 3 ,4 ,4], + "ReleaseLogic": "RELEASE_TO_FLOOR", + "ThrottlingWithPowerLink":true + }, + { + "CdevRequest": "dc_icl", + "LimitInfo": [0, 1, 2, 3, 4, 4, 4], + "BindedPowerRail": "POWER_FOR_CHARGING_THROTTLING", + "PowerThreshold": [500, 500, 500, 500, 500, 0, 0], + "CdevFloorWithPowerLink": [0, 1, 2, 3, 3, 4, 4], + "ReleaseLogic": "RELEASE_TO_FLOOR", + "ThrottlingWithPowerLink":true + }, + { + "CdevRequest": "wlc_fcc", + "LimitInfo": [0, 3, 3, 4, 5, 5, 5], + "BindedPowerRail": "POWER_FOR_CHARGING_THROTTLING", + "PowerThreshold": [500, 500, 500, 500, 500, 0, 0], + "CdevFloorWithPowerLink": [0, 1, 2, 3, 4, 5, 5], + "ReleaseLogic": "RELEASE_TO_FLOOR", + "ThrottlingWithPowerLink":true } ] }, @@ -945,6 +968,14 @@ "Name":"fcc", "Type":"BATTERY" }, + { + "Name":"dc_icl", + "Type":"BATTERY" + }, + { + "Name":"wlc_fcc", + "Type":"BATTERY" + }, { "Name":"tpu_cooling", "Type":"NPU", @@ -984,6 +1015,31 @@ "Name":"S2S_VDD_G3D", "PowerSampleDelay":14000, "PowerSampleCount":5 + }, + { + "Name":"POWER_FOR_CHARGING_THROTTLING", + "VirtualRails":true, + "Formula":"WEIGHTED_AVG", + "Combination":[ + "VSYS_PWR_MODEM", + "S2M_VDD_CPUCL2", + "S3M_VDD_CPUCL1", + "S4M_VDD_CPUCL0", + "S5M_VDD_INT", + "S1M_VDD_MIF", + "S2S_VDD_G3D" + ], + "Coefficient":[ + "1.0", + "1.0", + "1.0", + "1.0", + "1.0", + "1.0", + "1.0" + ], + "PowerSampleDelay":14000, + "PowerSampleCount":5 } ] } diff --git a/thermal_info_config_panther.json b/thermal_info_config_panther.json index d6de4b9..82612ee 100644 --- a/thermal_info_config_panther.json +++ b/thermal_info_config_panther.json @@ -382,7 +382,30 @@ "BindedCdevInfo": [ { "CdevRequest": "fcc", - "LimitInfo": [0, 0, 0, 0, 0, 0, 0] + "LimitInfo": [0, 2, 3, 3, 4, 4, 4], + "BindedPowerRail": "POWER_FOR_CHARGING_THROTTLING", + "PowerThreshold": [500, 500, 500, 500, 0, 0, 0], + "CdevFloorWithPowerLink": [0, 0, 2, 2, 4 ,4 ,4], + "ReleaseLogic": "RELEASE_TO_FLOOR", + "ThrottlingWithPowerLink":true + }, + { + "CdevRequest": "dc_icl", + "LimitInfo": [0, 1, 2, 3, 4, 4, 4], + "BindedPowerRail": "POWER_FOR_CHARGING_THROTTLING", + "PowerThreshold": [500, 500, 500, 500, 0, 0, 0], + "CdevFloorWithPowerLink": [0, 1, 2, 3, 4, 4, 4], + "ReleaseLogic": "RELEASE_TO_FLOOR", + "ThrottlingWithPowerLink":true + }, + { + "CdevRequest": "wlc_fcc", + "LimitInfo": [0, 2, 2, 4, 5, 5, 5], + "BindedPowerRail": "POWER_FOR_CHARGING_THROTTLING", + "PowerThreshold": [500, 500, 500, 500, 0, 0, 0], + "CdevFloorWithPowerLink": [0, 1, 1, 2, 5, 5, 5], + "ReleaseLogic": "RELEASE_TO_FLOOR", + "ThrottlingWithPowerLink":true } ] }, @@ -973,6 +996,14 @@ "Name":"fcc", "Type":"BATTERY" }, + { + "Name":"dc_icl", + "Type":"BATTERY" + }, + { + "Name":"wlc_fcc", + "Type":"BATTERY" + }, { "Name":"tpu_cooling", "Type":"NPU", @@ -1012,6 +1043,31 @@ "Name":"S2S_VDD_G3D", "PowerSampleDelay":14000, "PowerSampleCount":5 + }, + { + "Name":"POWER_FOR_CHARGING_THROTTLING", + "VirtualRails":true, + "Formula":"WEIGHTED_AVG", + "Combination":[ + "VSYS_PWR_MODEM", + "S2M_VDD_CPUCL2", + "S3M_VDD_CPUCL1", + "S4M_VDD_CPUCL0", + "S5M_VDD_INT", + "S1M_VDD_MIF", + "S2S_VDD_G3D" + ], + "Coefficient":[ + "1.0", + "1.0", + "1.0", + "1.0", + "1.0", + "1.0", + "1.0" + ], + "PowerSampleDelay":14000, + "PowerSampleCount":5 } ] }