From 65cba58afbc6629abc76153f791d59375a748fe2 Mon Sep 17 00:00:00 2001 From: George Hung Date: Thu, 29 Jul 2021 18:35:22 +0800 Subject: meta-quanta: gbs: expose pwrgd_p12v_all_slots as an IPMI sensor - monitor pwrgd_p12v_all_slots GPIO signal - add pwrgd_p12v_all_slots as IPMI sensor with pwrgd_p12v_slots sensor name Signed-off-by: George Hung Change-Id: I70ce89ad2a065cdc9ee59ace73085fea7036da0d --- .../files/detect-gpio-present.sh | 5 +++-- .../gbs-yaml-config/gbs-ipmi-inventory-sensors.yaml | 5 +++++ .../gbs-yaml-config/gbs-ipmi-sensors.yaml | 21 +++++++++++++++++++++ .../phosphor-gpio-monitor/obmc/gpio/gpios-11.conf | 6 ++++++ .../gpio/phosphor-gpio-monitor_%.bbappend | 3 ++- 5 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-11.conf (limited to 'meta-quanta/meta-gbs') diff --git a/meta-quanta/meta-gbs/recipes-gbs/gbs-detect-gpio-present/files/detect-gpio-present.sh b/meta-quanta/meta-gbs/recipes-gbs/gbs-detect-gpio-present/files/detect-gpio-present.sh index dd5852a70..cb652a2a8 100644 --- a/meta-quanta/meta-gbs/recipes-gbs/gbs-detect-gpio-present/files/detect-gpio-present.sh +++ b/meta-quanta/meta-gbs/recipes-gbs/gbs-detect-gpio-present/files/detect-gpio-present.sh @@ -11,7 +11,8 @@ PRESENT_OBJPATH=("/xyz/openbmc_project/inventory/system/chassis/cable/ss_cab0_pr "/xyz/openbmc_project/inventory/system/chassis/entity/sata0_prsnt" "/xyz/openbmc_project/inventory/system/chassis/entity/pe_slot0_prsnt" "/xyz/openbmc_project/inventory/system/chassis/entity/pe_slot1_prsnt" -"/xyz/openbmc_project/inventory/system/chassis/entity/fans_efuse_pg") +"/xyz/openbmc_project/inventory/system/chassis/entity/fans_efuse_pg" +"/xyz/openbmc_project/inventory/system/chassis/entity/pwrgd_p12v_slots") INTERFACE_NAME="xyz.openbmc_project.Inventory.Item" IPMI_LOG_SERVICE="xyz.openbmc_project.Logging.IPMI" @@ -24,7 +25,7 @@ LOG_EVENT_DATA="3 0x01 0xff 0xfe" LOG_ASSERT_FLAG="true" LOG_DEASSERT_FLAG="false" LOG_GENID_FLAG="0x0020" -present_state=("true" "true" "true" "true" "true" "true" "true" "true" "true" "true" "true") +present_state=("true" "true" "true" "true" "true" "true" "true" "true" "true" "true" "true" "true") for i in ${!PRESENT_OBJPATH[@]} do diff --git a/meta-quanta/meta-gbs/recipes-phosphor/configuration/gbs-yaml-config/gbs-ipmi-inventory-sensors.yaml b/meta-quanta/meta-gbs/recipes-phosphor/configuration/gbs-yaml-config/gbs-ipmi-inventory-sensors.yaml index 76eaa4e51..3cf240ca0 100644 --- a/meta-quanta/meta-gbs/recipes-phosphor/configuration/gbs-yaml-config/gbs-ipmi-inventory-sensors.yaml +++ b/meta-quanta/meta-gbs/recipes-phosphor/configuration/gbs-yaml-config/gbs-ipmi-inventory-sensors.yaml @@ -433,6 +433,11 @@ sensorID: 0xFC sensorType: 0x25 offset: 0x01 +/xyz/openbmc_project/inventory/system/chassis/entity/pwrgd_p12v_slots: + eventReadingType: 0x6f + sensorID: 0xFD + sensorType: 0x25 + offset: 0x01 # map non-IPMI-SEL to the system event sensor as "Undetermined system hardware failure." /xyz/openbmc_project/inventory/system: eventReadingType: 0x6f diff --git a/meta-quanta/meta-gbs/recipes-phosphor/configuration/gbs-yaml-config/gbs-ipmi-sensors.yaml b/meta-quanta/meta-gbs/recipes-phosphor/configuration/gbs-yaml-config/gbs-ipmi-sensors.yaml index 043136b5e..b8ad0761d 100644 --- a/meta-quanta/meta-gbs/recipes-phosphor/configuration/gbs-yaml-config/gbs-ipmi-sensors.yaml +++ b/meta-quanta/meta-gbs/recipes-phosphor/configuration/gbs-yaml-config/gbs-ipmi-sensors.yaml @@ -1279,3 +1279,24 @@ sensorReadingType: 0x6f sensorType: 0x25 serviceInterface: org.freedesktop.DBus.Properties + +0xFD: + entityID: 0x13 + entityInstance: 0 + interfaces: + xyz.openbmc_project.Inventory.Item: + Present: + Offsets: + 0x00: + assert: true + type: bool + 0x01: + assert: false + type: bool + mutability: Mutability::Write|Mutability::Read + path: /xyz/openbmc_project/inventory/system/chassis/entity/pwrgd_p12v_slots + readingType: assertion + sensorNamePattern: nameLeaf + sensorReadingType: 0x6f + sensorType: 0x25 + serviceInterface: org.freedesktop.DBus.Properties diff --git a/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-11.conf b/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-11.conf new file mode 100644 index 000000000..398356e8b --- /dev/null +++ b/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-11.conf @@ -0,0 +1,6 @@ +#The gpio 88 is a real gpio, which is used to +#store the PWRGD_P12V_ALL_SLOTS signal +INVENTORY=/system/chassis/entity/pwrgd_p12v_slots +DEVPATH=/dev/input/event0 +KEY=88 +NAME=pwrgd_p12v_slots \ No newline at end of file diff --git a/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor_%.bbappend b/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor_%.bbappend index 4b9a84100..f4ac6066d 100644 --- a/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor_%.bbappend +++ b/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor_%.bbappend @@ -19,7 +19,8 @@ SYSTEMD_ENVIRONMENT_FILE_${PN}_append_gbs +="obmc/gpio/gpios-7.conf" SYSTEMD_ENVIRONMENT_FILE_${PN}_append_gbs +="obmc/gpio/gpios-8.conf" SYSTEMD_ENVIRONMENT_FILE_${PN}_append_gbs +="obmc/gpio/gpios-9.conf" SYSTEMD_ENVIRONMENT_FILE_${PN}_append_gbs +="obmc/gpio/gpios-10.conf" -GBS_OBMC_PRESENT_INSTANCES = "0 1 2 3 4 5 6 7 8 9 10" +SYSTEMD_ENVIRONMENT_FILE_${PN}_append_gbs +="obmc/gpio/gpios-11.conf" +GBS_OBMC_PRESENT_INSTANCES = "0 1 2 3 4 5 6 7 8 9 10 11" SYSTEMD_LINK_${PN}-presence_append_gbs = " ${@compose_list(d, 'FMT_PRESENT', 'GBS_OBMC_PRESENT_INSTANCES')}" -- cgit v1.2.3