diff options
author | Minghao Zhang <minghao@codeaurora.org> | 2020-09-23 23:28:34 +0800 |
---|---|---|
committer | Minghao Zhang <minghao@codeaurora.org> | 2020-09-23 23:28:34 +0800 |
commit | ae04ce3c15411e4034d3b6dd85f5a56686b196fb (patch) | |
tree | 2c8bb5140d83598c517ad7ab4bd4e564ae139f90 | |
parent | 50998c815ffdcd4f80a91c6223843caf00663a97 (diff) |
thermal-hal: Add thermal HAL 2.0 support for sm7150, sm6125 and variants
Add thermal HAL 2.0 support for sm7150, sm6125 and variants,
including trinket iot and sdmmagpie.
Change-Id: I48475e0c6dc8489baa6b7b60fc1b65b15319b246
-rw-r--r-- | thermalConfig.cpp | 134 |
1 files changed, 134 insertions, 0 deletions
diff --git a/thermalConfig.cpp b/thermalConfig.cpp index 76cc1c5..9a0a995 100644 --- a/thermalConfig.cpp +++ b/thermalConfig.cpp @@ -42,6 +42,77 @@ namespace V2_0 { namespace implementation { constexpr std::string_view socIDPath("/sys/devices/soc0/soc_id"); + + std::vector<std::string> cpu_sensors_trinket = + { + "cpuss-0-usr", + "cpuss-0-usr", + "cpuss-0-usr", + "cpuss-0-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_trinket = + { + { + TemperatureType::CPU, + cpu_sensors_trinket, + "", + 95000, + 115000, + 95000, + true, + }, + { + TemperatureType::GPU, + { "gpu-usr" }, + "GPU", + 95000, + 115000, + 95000, + true, + }, + { + TemperatureType::SKIN, + { "xo-therm-adc" }, + "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_lito = { "cpu-0-0-usr", @@ -112,6 +183,64 @@ namespace implementation { }, }; + std::vector<struct target_therm_cfg> sensor_cfg_sdmmagpie = + { + { + TemperatureType::CPU, + cpu_sensors_lito, + "", + 95000, + 115000, + 95000, + true, + }, + { + TemperatureType::GPU, + { "gpuss-0-usr" }, + "GPU", + 95000, + 115000, + 95000, + true, + }, + { + TemperatureType::SKIN, + { "xo-therm-adc" }, + "skin", + 40000, + 95000, + 40000, + true, + }, + { + TemperatureType::BCL_VOLTAGE, + { "pm6150-vbat-lvl0" }, + "vbat", + 3000, + 2800, + 3000, + false, + }, + { + TemperatureType::BCL_CURRENT, + { "pm6150-ibat-lvl0" }, + "ibat", + 5500, + 6000, + 5500, + true, + }, + { + TemperatureType::BCL_PERCENTAGE, + { "soc" }, + "soc", + 10, + 2, + 10, + false, + }, + }; + std::vector<struct target_therm_cfg> sensor_cfg_holi = { { @@ -386,9 +515,14 @@ namespace implementation { const std::unordered_map<int, std::vector<struct target_therm_cfg>> msm_soc_map = { + {394, sensor_cfg_trinket}, + {467, sensor_cfg_trinket}, + {468, sensor_cfg_trinket}, {400, sensor_cfg_lito}, // lito {440, sensor_cfg_lito}, {407, sensor_cfg_lito}, // atoll + {365, sensor_cfg_sdmmagpie}, + {366, sensor_cfg_sdmmagpie}, {434, sensor_cfg_lito}, // lagoon {476, sensor_cfg_lito}, // orchid {356, kona_common}, // kona |