From 7c1757103d0748c604fd1b36c80568249b3bc0a4 Mon Sep 17 00:00:00 2001 From: congying Date: Thu, 17 Nov 2022 18:29:04 +0800 Subject: thermal-hal: Add fan cdev type in thermal-hal support for Kalama HHG Add fan cdev type in thermal-hal support for Kalama HHG. Change-Id: Ie65c43f79b7899b2b7b2e77cb074dbd67f6bd872 Signed-off-by: congying --- thermalCommon.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/thermalCommon.cpp b/thermalCommon.cpp index 02c14e1..3f0c997 100644 --- a/thermalCommon.cpp +++ b/thermalCommon.cpp @@ -107,6 +107,7 @@ static std::unordered_map cdev_map = { {"cdsp", cdevType::NPU}, {"cdsp_hw", cdevType::NPU}, {"battery", cdevType::BATTERY}, + {"fan-max31760", cdevType::FAN}, }; ThermalCommon::ThermalCommon() -- cgit v1.2.3 From b7044dedd98b8eaf7e9d223a905597e4324b0bdf Mon Sep 17 00:00:00 2001 From: Manaf Meethalavalappu Pallikunhi Date: Fri, 6 Jan 2023 19:51:33 +0530 Subject: thermal-hal: update cpu, vbat and socd sensor configurations for khaje Update proper tsens mapping for silver cores for khaje. Also update BCL sensors like vbat and socd sensor configurations as well. Change-Id: I2855b3461922f3969fa30d34f71d81f0384163d6 --- thermalConfig.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/thermalConfig.cpp b/thermalConfig.cpp index a2244ca..790ec03 100644 --- a/thermalConfig.cpp +++ b/thermalConfig.cpp @@ -118,8 +118,9 @@ namespace implementation { std::vector cpu_sensors_khaje = { - "cpuss-0", - "cpuss-1", + "cpuss-2", + "cpuss-2", + "cpuss-2", "cpuss-2", "cpu-1-0", "cpu-1-1", @@ -158,7 +159,7 @@ namespace implementation { }, { TemperatureType::BCL_VOLTAGE, - { "pm7250b-vbat-lvl0" }, + { "vbat" }, "vbat", 3000, 2800, @@ -176,12 +177,12 @@ namespace implementation { }, { TemperatureType::BCL_PERCENTAGE, - { "soc" }, - "soc", - 10, - 2, - 10, - false, + { "socd" }, + "socd", + 90, + 99, + 90, + true, }, }; -- cgit v1.2.3 From e0b62d87c939d87adeba472db5f47fdfb176c51f Mon Sep 17 00:00:00 2001 From: Bhasker Reddy Komatireddy Date: Tue, 10 Jan 2023 14:52:42 +0530 Subject: thermal-hal: Add thermal HAL 2.0 support for KALAMA QCS, QCM Add thermal HAL 2.0 support for KALAMA QCS and QCM. Change-Id: I9386f963d8a4ba740ca8bf71bcde3c9ad85e71f9 --- thermalConfig.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/thermalConfig.cpp b/thermalConfig.cpp index a2244ca..6904394 100644 --- a/thermalConfig.cpp +++ b/thermalConfig.cpp @@ -1093,6 +1093,8 @@ namespace implementation { {536, kalama_common}, //Kalamap {600, kalama_common}, //Kalama_sg {601, kalama_common}, //Kalamap_sg + {603, kalama_common}, //Kalama_qcs + {604, kalama_common}, //Kalama_qcm }; const std::unordered_map> @@ -1115,6 +1117,8 @@ namespace implementation { {536, kalama_specific}, //Kalamap {600, kalama_specific}, //Kalama_sg {601, kalama_specific}, //Kalamap_sg + {603, kalama_specific}, //Kalama_qcs + {604, kalama_specific}, //Kalama_qcm }; std::vector add_target_config( -- cgit v1.2.3 From 24956b0e41c06b85af738e4ba7472467e865b1c7 Mon Sep 17 00:00:00 2001 From: Priyansh Jain Date: Fri, 13 Jan 2023 16:56:48 +0530 Subject: thermal-hal: Add tsens,bcl configuration for kona Add support for kona target for tsens,bcl. Change-Id: I819b911d73e05cb4dbc88c912a4c7836c8dc0393 Signed-off-by: Priyansh Jain --- thermalConfig.cpp | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/thermalConfig.cpp b/thermalConfig.cpp index a2244ca..1bf3dd4 100644 --- a/thermalConfig.cpp +++ b/thermalConfig.cpp @@ -434,14 +434,14 @@ namespace implementation { std::vector cpu_sensors_kona = { - "cpu-0-0-usr", - "cpu-0-1-usr", - "cpu-0-2-usr", - "cpu-0-3-usr", - "cpu-1-0-usr", - "cpu-1-1-usr", - "cpu-1-2-usr", - "cpu-1-3-usr", + "cpu-0-0", + "cpu-0-1", + "cpu-0-2", + "cpu-0-3", + "cpu-1-0", + "cpu-1-1", + "cpu-1-2", + "cpu-1-3", }; std::vector sensor_cfg_msmnile = { @@ -522,7 +522,7 @@ namespace implementation { }, { TemperatureType::GPU, - { "gpuss-0-usr" }, + { "gpuss-0" }, "GPU0", 95000, 115000, @@ -531,7 +531,7 @@ namespace implementation { }, { TemperatureType::GPU, - { "gpuss-1-usr" }, + { "gpuss-1" }, "GPU1", 95000, 115000, @@ -540,7 +540,7 @@ namespace implementation { }, { TemperatureType::SKIN, - { "skin-msm-therm-usr" }, + { "skin-msm-therm" }, "skin", 40000, 95000, @@ -561,7 +561,7 @@ namespace implementation { }, { TemperatureType::BCL_VOLTAGE, - { "pm8150b-vbat-lvl0" }, + { "vbat" }, "vbat", 3200, 3000, @@ -570,16 +570,16 @@ namespace implementation { }, { TemperatureType::BCL_PERCENTAGE, - { "soc" }, - "soc", - 10, - 2, - 10, + { "socd" }, + "socd", + 90, + 99, + 90, false, }, { TemperatureType::NPU, - { "npu-usr" }, + { "npu" }, "npu", 95000, 115000, -- cgit v1.2.3 From cff488aacc477fd94784e9544d807f105f2e85ee Mon Sep 17 00:00:00 2001 From: Gopala Krishna Nuthaki Date: Tue, 14 Mar 2023 13:48:07 +0530 Subject: thermal_hal: Add support to handle CPUs with non-sequential core_ids Some targets support to have only selected cpu cores enabled and in such cases, cpu ids will be in non-sequencial order. Update logic to maintain cpu list with cpu counter instead of cpu_id as list index. Change-Id: If249f1ee0d0e8f5f0a2240c22b4fcfb136be4026 Signed-off-by: Gopala Krishna Nuthaki --- thermalCommon.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/thermalCommon.cpp b/thermalCommon.cpp index 3f0c997..9c9d632 100644 --- a/thermalCommon.cpp +++ b/thermalCommon.cpp @@ -645,10 +645,10 @@ int ThermalCommon::get_cpu_usages(hidl_vec& list) { } fclose(cpu_file); - list[cpu_num].name = std::string("CPU") + std::to_string(cpu_num); - list[cpu_num].active = active; - list[cpu_num].total = total; - list[cpu_num].isOnline = online; + list[cpu].name = std::string("CPU") + std::to_string(cpu_num); + list[cpu].active = active; + list[cpu].total = total; + list[cpu].isOnline = online; cpu++; } fclose(file); -- cgit v1.2.3 From 39ff74035adc9fe28715e7000e7fe48e8e2b5fe4 Mon Sep 17 00:00:00 2001 From: Nitesh Kumar Date: Thu, 9 Mar 2023 13:15:29 +0530 Subject: thermal-hal: Add support for hal specific configuration. Add support for hal configuration to include CPU, GPU, and adc senosors. Change-Id: Id0f7cfa2b0eb9a3dec3aad30042fd8eb8d8baa65 Signed-off-by: Nitesh Kumar --- thermalConfig.cpp | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/thermalConfig.cpp b/thermalConfig.cpp index bc114a8..a1aeee3 100644 --- a/thermalConfig.cpp +++ b/thermalConfig.cpp @@ -256,6 +256,54 @@ namespace implementation { }, }; + std::vector cpu_sensors_monaco = + { + "cpuss-0", + "cpuss-1", + "cpuss-0", + "cpuss-1", + }; + + std::vector sensor_cfg_monaco = + { + { + TemperatureType::CPU, + cpu_sensors_monaco, + "", + 95000, + 115000, + 95000, + true, + }, + { + TemperatureType::GPU, + { "gpu" }, + "gpu", + 95000, + 115000, + 95000, + true, + }, + { + TemperatureType::SKIN, + { "pa-therm0" }, + "skin", + 40000, + 95000, + 40000, + true, + }, + { + TemperatureType::BCL_CURRENT, + { "pm5100-ibat-lvl0" }, + "ibat", + 1100, + 1500, + 1100, + true, + }, + }; + std::vector cpu_sensors_lito = { "cpu-0-0-usr", @@ -1096,6 +1144,8 @@ namespace implementation { {601, kalama_common}, //Kalamap_sg {603, kalama_common}, //Kalama_qcs {604, kalama_common}, //Kalama_qcm + {486, sensor_cfg_monaco}, // monaco + {517, sensor_cfg_monaco}, // monaco }; const std::unordered_map> -- cgit v1.2.3