diff options
author | George Liu <liuxiwei@ieisystem.com> | 2024-02-05 12:14:32 +0300 |
---|---|---|
committer | George Liu <liuxiwei@ieisystem.com> | 2024-02-06 09:31:41 +0300 |
commit | 550477d9b1d8cbd434a679d06011486cafea0297 (patch) | |
tree | 2e2efa55af1cd97e062f46bd33ded6bffa316a2c /meta-ieisystems | |
parent | 862f5a07c4bb41e496ebfb8b26f2b39c2f9e05cc (diff) | |
download | openbmc-550477d9b1d8cbd434a679d06011486cafea0297.tar.xz |
meta-ieisystems: fp5280g3: add phosphor-virtual-sensor
Signed-off-by: George Liu <liuxiwei@ieisystem.com>
Change-Id: I6878afb1f2dc2e332cbb5de4a611d6322adbc15c
Diffstat (limited to 'meta-ieisystems')
3 files changed, 165 insertions, 0 deletions
diff --git a/meta-ieisystems/meta-fp5280g3/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bbappend b/meta-ieisystems/meta-fp5280g3/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bbappend index 2807675c34..4c5e8e6b82 100644 --- a/meta-ieisystems/meta-fp5280g3/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bbappend +++ b/meta-ieisystems/meta-fp5280g3/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bbappend @@ -10,6 +10,7 @@ RDEPENDS:${PN}-extras:append = " \ srvcfg-manager \ biosconfig-manager \ phosphor-host-postd \ + phosphor-virtual-sensor \ libmctp \ pldm \ tzdata-core \ diff --git a/meta-ieisystems/meta-fp5280g3/recipes-phosphor/sensors/phosphor-virtual-sensor/virtual_sensor_config.json b/meta-ieisystems/meta-fp5280g3/recipes-phosphor/sensors/phosphor-virtual-sensor/virtual_sensor_config.json new file mode 100644 index 0000000000..e790c639ad --- /dev/null +++ b/meta-ieisystems/meta-fp5280g3/recipes-phosphor/sensors/phosphor-virtual-sensor/virtual_sensor_config.json @@ -0,0 +1,157 @@ +[ + { + "Desc": { + "Config": "D-Bus", + "Type": "Maximum" + } + }, + { + "Desc": { + "Name": "total_power", + "SensorType": "power" + }, + "Associations": [ + [ + "chassis", + "all_sensors", + "/xyz/openbmc_project/inventory/system/chassis" + ] + ], + "Params": { + "DbusParam": [ + { + "ParamName": "P1", + "Desc": { + "Name": "PSU0_PIN", + "SensorType": "power" + } + }, + { + "ParamName": "P2", + "Desc": { + "Name": "PSU1_PIN", + "SensorType": "power" + } + } + ] + }, + "Expression": "(P1 > 0 ? P1:0) + (P2 > 0 ? P2:0)" + }, + { + "Desc": { + "Name": "CPU0_Power", + "SensorType": "power" + }, + "Associations": [ + [ + "chassis", + "all_sensors", + "/xyz/openbmc_project/inventory/system/chassis" + ] + ], + "Params": { + "DbusParam": [ + { + "ParamName": "P1", + "Desc": { + "Name": "p0_power", + "SensorType": "power" + } + }, + { + "ParamName": "P2", + "Desc": { + "Name": "p0_cache_power", + "SensorType": "power" + } + } + ] + }, + "Expression": "(P1 > 0 ? P1:0) + (P2 > 0 ? P2:0)" + }, + { + "Desc": { + "Name": "CPU1_Power", + "SensorType": "power" + }, + "Associations": [ + [ + "chassis", + "all_sensors", + "/xyz/openbmc_project/inventory/system/chassis" + ] + ], + "Params": { + "DbusParam": [ + { + "ParamName": "P1", + "Desc": { + "Name": "p1_power", + "SensorType": "power" + } + }, + { + "ParamName": "P2", + "Desc": { + "Name": "p1_cache_power", + "SensorType": "power" + } + } + ] + }, + "Expression": "(P1 > 0 ? P1:0) + (P2 > 0 ? P2:0)" + }, + { + "Desc": { + "Name": "Altitude", + "SensorType": "altitude" + }, + "Threshold": { + "WarningHigh": 3050 + }, + "Params": { + "ConstParam": [ + { + "ParamName": "P1", + "Value": 227.933 + } + ] + }, + "Expression": "P1" + }, + { + "Desc": { + "Name": "Ambient Virtual Temp", + "SensorType": "temperature" + }, + "Threshold": { + "WarningHigh": 45, + "HardShutdownHigh": 58, + "SoftShutdownHigh": 53 + }, + "Params": { + "ConstParam": [ + { + "ParamName": "P1", + "Value": 16 + } + ] + }, + "Expression": "P1" + }, + { + "Desc": { + "Name": "Fan Rated Speed", + "SensorType": "fan_tach" + }, + "Params": { + "ConstParam": [ + { + "ParamName": "P1", + "Value": 24000 + } + ] + }, + "Expression": "P1" + } +] diff --git a/meta-ieisystems/meta-fp5280g3/recipes-phosphor/sensors/phosphor-virtual-sensor_%.bbappend b/meta-ieisystems/meta-fp5280g3/recipes-phosphor/sensors/phosphor-virtual-sensor_%.bbappend new file mode 100644 index 0000000000..9bfbdcb934 --- /dev/null +++ b/meta-ieisystems/meta-fp5280g3/recipes-phosphor/sensors/phosphor-virtual-sensor_%.bbappend @@ -0,0 +1,7 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" + +SRC_URI:append = " file://virtual_sensor_config.json" + +do_install:append() { + install -m 0644 ${WORKDIR}/virtual_sensor_config.json ${D}${datadir}/phosphor-virtual-sensor/ +} |