Support temp sensor on MCU which is available from I2C
Chassis MCU exposes register to report temperature for the peripheral board.
The MCU access is configurable as below:
{
"Bus": $bus,
"Address": "0xAA",
"Reg": "0xBB",
"Class": "MCUTemp",
"Name": "MCU Temp",
"Thresholds": [
xxx
]
"Type": "MCUTempSensor"
}
Tested:
The below interface was found under temperature sensor namespace:
└─/xyz/openbmc_project/sensors/temperature/MCU_Temp
Run ipmitool sensor and check below from list:
MCU Temp | 30.175 | degrees C | cr | na | 0.000 | 5.000 | 110.000 | 115.000 | na
Change-Id: I8d54455ccc39ea4f60a5b4aee5c68be092d39a72
Signed-off-by: Yuan Li <yuan.li@linux.intel.com>
diff --git a/service_files/xyz.openbmc_project.mcutempsensor.service b/service_files/xyz.openbmc_project.mcutempsensor.service
new file mode 100644
index 0000000..33a98f2
--- /dev/null
+++ b/service_files/xyz.openbmc_project.mcutempsensor.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=MCU Temp Sensor
+StopWhenUnneeded=false
+
+[Service]
+Restart=always
+RestartSec=5
+ExecStart=/usr/bin/mcutempsensor
+
+[Install]
+WantedBy=multi-user.target
+