summaryrefslogtreecommitdiff
path: root/meta-ampere
diff options
context:
space:
mode:
authorHieu Huynh <hieuh@os.amperecomputing.com>2023-12-22 12:33:45 +0300
committerHieu Huynh <hieuh@os.amperecomputing.com>2023-12-23 03:10:05 +0300
commit8496e57ba3fe4f929626f34449b9240517a37d9a (patch)
tree1598920e304792aef6b0f6e30c7a4cba36893c01 /meta-ampere
parent7cb07e893369a22f32db2987af9fce42828ba0cd (diff)
downloadopenbmc-8496e57ba3fe4f929626f34449b9240517a37d9a.tar.xz
meta-ampere: mtjade: support FAN fault check
Support FAN fault check via by enabling phosphor-led-manager's monitor-operational-status with appropriate phosphor-inventory-manager associations configuration. Tested: 1. Get Led group list $ busctl tree xyz.openbmc_project.LED.GroupManager `- /xyz `- /xyz/openbmc_project `- /xyz/openbmc_project/led `- /xyz/openbmc_project/led/groups |- /xyz/openbmc_project/led/groups/fan_fault 2. Change the fan pwm, then stop the fan control service and verify that fault led is on 3. Start the fan control service and verify that fault led is off Signed-off-by: Hieu Huynh <hieuh@os.amperecomputing.com> Change-Id: If473ebfe288d80515217e7e5fb9dc6244dcb8ed3
Diffstat (limited to 'meta-ampere')
-rw-r--r--meta-ampere/meta-common/recipes-phosphor/leds/phosphor-led-manager_%.bbappend1
-rw-r--r--meta-ampere/meta-jade/recipes-phosphor/inventory/phosphor-inventory-manager/associations.json230
-rw-r--r--meta-ampere/meta-jade/recipes-phosphor/inventory/phosphor-inventory-manager_%.bbappend10
-rw-r--r--meta-ampere/meta-jade/recipes-phosphor/leds/phosphor-led-manager/led-group-config.json11
4 files changed, 252 insertions, 0 deletions
diff --git a/meta-ampere/meta-common/recipes-phosphor/leds/phosphor-led-manager_%.bbappend b/meta-ampere/meta-common/recipes-phosphor/leds/phosphor-led-manager_%.bbappend
new file mode 100644
index 0000000000..9c240d1064
--- /dev/null
+++ b/meta-ampere/meta-common/recipes-phosphor/leds/phosphor-led-manager_%.bbappend
@@ -0,0 +1 @@
+PACKAGECONFIG:append = " monitor-operational-status"
diff --git a/meta-ampere/meta-jade/recipes-phosphor/inventory/phosphor-inventory-manager/associations.json b/meta-ampere/meta-jade/recipes-phosphor/inventory/phosphor-inventory-manager/associations.json
new file mode 100644
index 0000000000..5f9e57a551
--- /dev/null
+++ b/meta-ampere/meta-jade/recipes-phosphor/inventory/phosphor-inventory-manager/associations.json
@@ -0,0 +1,230 @@
+[
+ {
+ "path": "system/chassis/Mt_Jade/FAN3",
+ "endpoints":
+ [
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "sensors"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/sensors/fan_tach/FAN3_1",
+ "/xyz/openbmc_project/sensors/fan_tach/FAN3_2"
+ ]
+ },
+ {
+ "types":
+ {
+ "rType": "cooled_by",
+ "fType": "cooling"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
+ },
+ {
+ "types": {
+ "rType": "fault_identified_by",
+ "fType": "fault_identifying"
+ },
+ "paths": [
+ "/xyz/openbmc_project/led/groups/fan_fault"
+ ]
+ }
+ ]
+ },
+ {
+ "path": "system/chassis/Mt_Jade/FAN4",
+ "endpoints":
+ [
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "sensors"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/sensors/fan_tach/FAN4_1",
+ "/xyz/openbmc_project/sensors/fan_tach/FAN4_2"
+ ]
+ },
+ {
+ "types":
+ {
+ "rType": "cooled_by",
+ "fType": "cooling"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
+ },
+ {
+ "types": {
+ "rType": "fault_identified_by",
+ "fType": "fault_identifying"
+ },
+ "paths": [
+ "/xyz/openbmc_project/led/groups/fan_fault"
+ ]
+ }
+ ]
+ },
+ {
+ "path": "system/chassis/Mt_Jade/FAN5",
+ "endpoints":
+ [
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "sensors"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/sensors/fan_tach/FAN5_1",
+ "/xyz/openbmc_project/sensors/fan_tach/FAN5_2"
+ ]
+ },
+ {
+ "types":
+ {
+ "rType": "cooled_by",
+ "fType": "cooling"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
+ },
+ {
+ "types": {
+ "rType": "fault_identified_by",
+ "fType": "fault_identifying"
+ },
+ "paths": [
+ "/xyz/openbmc_project/led/groups/fan_fault"
+ ]
+ }
+ ]
+ },
+ {
+ "path": "system/chassis/Mt_Jade/FAN6",
+ "endpoints":
+ [
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "sensors"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/sensors/fan_tach/FAN6_1",
+ "/xyz/openbmc_project/sensors/fan_tach/FAN6_2"
+ ]
+ },
+ {
+ "types":
+ {
+ "rType": "cooled_by",
+ "fType": "cooling"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
+ },
+ {
+ "types": {
+ "rType": "fault_identified_by",
+ "fType": "fault_identifying"
+ },
+ "paths": [
+ "/xyz/openbmc_project/led/groups/fan_fault"
+ ]
+ }
+ ]
+ },
+ {
+ "path": "system/chassis/Mt_Jade/FAN7",
+ "endpoints":
+ [
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "sensors"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/sensors/fan_tach/FAN7_1",
+ "/xyz/openbmc_project/sensors/fan_tach/FAN7_2"
+ ]
+ },
+ {
+ "types":
+ {
+ "rType": "cooled_by",
+ "fType": "cooling"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
+ },
+ {
+ "types": {
+ "rType": "fault_identified_by",
+ "fType": "fault_identifying"
+ },
+ "paths": [
+ "/xyz/openbmc_project/led/groups/fan_fault"
+ ]
+ }
+ ]
+ },
+ {
+ "path": "system/chassis/Mt_Jade/FAN8",
+ "endpoints":
+ [
+ {
+ "types":
+ {
+ "rType": "inventory",
+ "fType": "sensors"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/sensors/fan_tach/FAN8_1",
+ "/xyz/openbmc_project/sensors/fan_tach/FAN8_2"
+ ]
+ },
+ {
+ "types":
+ {
+ "rType": "cooled_by",
+ "fType": "cooling"
+ },
+ "paths":
+ [
+ "/xyz/openbmc_project/inventory/system/chassis"
+ ]
+ },
+ {
+ "types": {
+ "rType": "fault_identified_by",
+ "fType": "fault_identifying"
+ },
+ "paths": [
+ "/xyz/openbmc_project/led/groups/fan_fault"
+ ]
+ }
+ ]
+ }
+] \ No newline at end of file
diff --git a/meta-ampere/meta-jade/recipes-phosphor/inventory/phosphor-inventory-manager_%.bbappend b/meta-ampere/meta-jade/recipes-phosphor/inventory/phosphor-inventory-manager_%.bbappend
new file mode 100644
index 0000000000..768c66758f
--- /dev/null
+++ b/meta-ampere/meta-jade/recipes-phosphor/inventory/phosphor-inventory-manager_%.bbappend
@@ -0,0 +1,10 @@
+DEPENDS:append = " inventory-cleanup"
+
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+PACKAGECONFIG:append = " associations"
+SRC_URI:append = " file://associations.json"
+
+do_install:append() {
+ install -d ${D}${base_datadir}
+ install -m 0755 ${WORKDIR}/associations.json ${D}${base_datadir}
+}
diff --git a/meta-ampere/meta-jade/recipes-phosphor/leds/phosphor-led-manager/led-group-config.json b/meta-ampere/meta-jade/recipes-phosphor/leds/phosphor-led-manager/led-group-config.json
index 0bc0adceea..bec2a99b6c 100644
--- a/meta-ampere/meta-jade/recipes-phosphor/leds/phosphor-led-manager/led-group-config.json
+++ b/meta-ampere/meta-jade/recipes-phosphor/leds/phosphor-led-manager/led-group-config.json
@@ -31,6 +31,17 @@
"Period": 1000
}
]
+ },
+ {
+ "group": "fan_fault",
+ "members": [
+ {
+ "Name": "fault",
+ "Action": "On",
+ "DutyOn": 50,
+ "Period": 1000
+ }
+ ]
}
]
}