diff options
author | Minghao Zhang <minghao@codeaurora.org> | 2021-04-12 18:29:50 +0800 |
---|---|---|
committer | chrisl7 <wandersonrodriguesf1@gmail.com> | 2023-02-25 16:40:00 -0800 |
commit | 33dea78c986e2c49203b82f0ff9b248d85b10692 (patch) | |
tree | bf015e2d4b983a6cc0776a5e5553fa1a0f582a39 | |
parent | aad9e2b1aa807da92468ad0d37359d9e2a8da525 (diff) |
thermal-hal: Add thermal HAL 2.0 support for sdm439 and variants
Add thermal HAL 2.0 support for sdm439 and variants.
Change-Id: Ia089986645ddfe4500a90a653c8ba2f6452e3c2a
Signed-off-by: chrisl7 <wandersonrodriguesf1@gmail.com>
-rw-r--r-- | thermalConfig.cpp | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/thermalConfig.cpp b/thermalConfig.cpp index a2244ca..56810a2 100644 --- a/thermalConfig.cpp +++ b/thermalConfig.cpp @@ -46,6 +46,76 @@ namespace V2_0 { namespace implementation { constexpr std::string_view socIDPath("/sys/devices/soc0/soc_id"); + std::vector<std::string> cpu_sensors_439 = + { + "apc1-cpu0-usr", + "apc1-cpu1-usr", + "apc1-cpu2-usr", + "apc1-cpu3-usr", + "cpuss0-usr", + "cpuss0-usr", + "cpuss0-usr", + "cpuss0-usr", + }; + + std::vector<struct target_therm_cfg> sensor_cfg_439 = + { + { + TemperatureType::CPU, + cpu_sensors_439, + "", + 95000, + 115000, + 95000, + true, + }, + { + TemperatureType::GPU, + { "gpu-usr" }, + "GPU", + 95000, + 115000, + 95000, + true, + }, + { + TemperatureType::SKIN, + { "quiet-therm-adc" }, + "skin", + 40000, + 95000, + 40000, + true, + }, + { + TemperatureType::BCL_VOLTAGE, + { "vbat_adc" }, + "vbat", + 3200, + 3000, + 3200, + false, + }, + { + TemperatureType::BCL_CURRENT, + { "ibat-high" }, + "ibat", + 4200, + 4400, + 4200, + true, + }, + { + TemperatureType::BCL_PERCENTAGE, + { "soc" }, + "soc", + 10, + 2, + 10, + false, + }, + }; + std::vector<std::string> cpu_sensors_bengal = { "cpuss-2-usr", @@ -1044,6 +1114,12 @@ namespace implementation { const std::unordered_map<int, std::vector<struct target_therm_cfg>> msm_soc_map = { + {353, sensor_cfg_439}, + {354, sensor_cfg_439}, + {363, sensor_cfg_439}, + {364, sensor_cfg_439}, + {416, sensor_cfg_439}, + {437, sensor_cfg_439}, {417, sensor_cfg_bengal}, // bengal {420, sensor_cfg_bengal}, {444, sensor_cfg_bengal}, |