diff options
author | Minghao Zhang <minghao@codeaurora.org> | 2020-12-28 10:16:45 +0800 |
---|---|---|
committer | Minghao Zhang <minghao@codeaurora.org> | 2020-12-28 10:16:45 +0800 |
commit | 2658fa6df7570f65a50111b2b6eda6f93020c212 (patch) | |
tree | baaed53ad4de09da70bdf891bc2c028b57badb14 /thermalConfig.cpp | |
parent | a3a020beb51fa5b365abbf2ede2fb66735f682a2 (diff) |
thermal-hal: Add thermal HAL 2.0 support for bengal and variants
Add thermal HAL 2.0 support for bengal and variants.
Change-Id: I7e1cd2489b7ee53a0830495531cf0525356a2b53
Diffstat (limited to 'thermalConfig.cpp')
-rw-r--r-- | thermalConfig.cpp | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/thermalConfig.cpp b/thermalConfig.cpp index 3ab97b1..bb0d32f 100644 --- a/thermalConfig.cpp +++ b/thermalConfig.cpp @@ -42,6 +42,75 @@ namespace V2_0 { namespace implementation { constexpr std::string_view socIDPath("/sys/devices/soc0/soc_id"); + std::vector<std::string> cpu_sensors_bengal = + { + "cpuss-2-usr", + "cpuss-2-usr", + "cpuss-2-usr", + "cpuss-2-usr", + "cpu-1-0-usr", + "cpu-1-1-usr", + "cpu-1-2-usr", + "cpu-1-3-usr", + }; + + std::vector<struct target_therm_cfg> sensor_cfg_bengal = + { + { + TemperatureType::CPU, + cpu_sensors_bengal, + "", + 95000, + 115000, + 95000, + true, + }, + { + TemperatureType::GPU, + { "gpu-usr" }, + "GPU", + 95000, + 115000, + 95000, + true, + }, + { + TemperatureType::SKIN, + { "xo-therm-usr" }, + "skin", + 40000, + 95000, + 40000, + true, + }, + { + TemperatureType::BCL_VOLTAGE, + { "pmi632-vbat-lvl0" }, + "vbat", + 3000, + 2800, + 3000, + false, + }, + { + TemperatureType::BCL_CURRENT, + { "pmi632-ibat-lvl0" }, + "ibat", + 4000, + 4200, + 4000, + true, + }, + { + TemperatureType::BCL_PERCENTAGE, + { "soc" }, + "soc", + 10, + 2, + 10, + false, + }, + }; std::vector<std::string> cpu_sensors_trinket = { @@ -581,6 +650,12 @@ namespace implementation { const std::unordered_map<int, std::vector<struct target_therm_cfg>> msm_soc_map = { + {417, sensor_cfg_bengal}, // bengal + {420, sensor_cfg_bengal}, + {444, sensor_cfg_bengal}, + {445, sensor_cfg_bengal}, + {469, sensor_cfg_bengal}, + {470, sensor_cfg_bengal}, {394, sensor_cfg_trinket}, {467, sensor_cfg_trinket}, {468, sensor_cfg_trinket}, |