Skip to content

Commit

Permalink
hw-mgmt: thermal: Add "conectx8" and BF3 "core_temp" TC sensors support
Browse files Browse the repository at this point in the history
Added TC "conectx8" and BF3 "core_temp" sensors support

Signed-off-by: Oleksandr Shamray <[email protected]>
  • Loading branch information
sholeksandr committed Aug 14, 2023
1 parent 92ce74c commit 51f3718
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions usr/usr/bin/hw_management_thermal_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,10 @@ class CONST(object):
"pwm_min": 30, "pwm_max": 100, "val_min": "!80000", "val_max": "!110000", "poll_time": 60,
"input_suffix": "_input"
},
r'ctx_amb\d*': {"type": "thermal_sensor",
"pwm_min": 30, "pwm_max": 100, "val_min": "!70000", "val_max": "!105000", "poll_time": 3,
"input_suffix": "_input"
}
}


Expand Down Expand Up @@ -2076,7 +2080,8 @@ class ThermalManagement(hw_managemet_file_op):
r'sodimm\d+':"add_sodimm_sensor",
r'sensor_amb':"add_amb_sensor",
r'drivetemp':"add_drivetemp_sensor",
r'ibc\d*':"add_ibc_sensor"
r'ibc\d*':"add_ibc_sensor",
r'ctx_amb\d*':"add_connectx_sensor"
}

def __init__(self, cmd_arg, tc_logger):
Expand Down Expand Up @@ -2696,8 +2701,10 @@ def add_cpu_sensor(self, *_):
self._sensor_add_config("thermal_sensor", "cpu_pack", {"base_file_name": "thermal/cpu_pack"})
elif self.check_file("thermal/cpu_core1"):
self._sensor_add_config("thermal_sensor", "cpu_core1", {"base_file_name": "thermal/cpu_core1"})
elif self.check_file("thermal/core_temp"):
self._sensor_add_config("thermal_sensor", "cpu_pack", {"base_file_name": "thermal/core_temp"})
else:
self._sensor_add_config("thermal_sensor", "cpu_pack", {"base_file_name": "thermal/cpu_pack"})
self._sensor_add_config("thermal_sensor", "cpu_pack", {"base_file_name": "thermal/cpu_core_sensor"})

# ----------------------------------------------------------------------
def add_voltmon_sensor(self, name):
Expand Down Expand Up @@ -2735,6 +2742,10 @@ def add_ibc_sensor(self, name):
sensor_name = "{}".format(name)
self._sensor_add_config("thermal_sensor", sensor_name, {"base_file_name": in_file})

# ----------------------------------------------------------------------
def add_connectx_sensor(self, name):
self._sensor_add_config("thermal_sensor", name, {"base_file_name": "thermal/{}".format(name)})

# ----------------------------------------------------------------------
def add_sensors(self):
"""
Expand Down

0 comments on commit 51f3718

Please sign in to comment.