From fd8041ee5efccf77dacc13b3447e527fc57a53e5 Mon Sep 17 00:00:00 2001 From: George Hung Date: Mon, 20 Jul 2020 21:02:11 +0800 Subject: meta-quanta: gbs: expose more GPIO signals as IPMI SDR 1. monitor more GPIO signals gpio_net_name / gpio_number: ['SATA0_PRSNT_N']=5 ['HSBP_CABLE_PRSNT_BUF_N']=57 ['FAN_BRD_CABLE_PRSNT_BUF']=58 ['HSBP_P12V_STBY_CABLE_PRSNT']=69 ['PE_SLOT0_PRSNT_N']=120 ['PE_SLOT1_PRSNT_N']=121 2. add these GPIO signals to the sensor YAML config (From meta-quanta rev: de864a90b91c72a9d31a36688d744a12926a57b3) Signed-off-by: George Hung Change-Id: Ie39512763757e222ca386349a4c45af135500d65 Signed-off-by: Andrew Geissler --- .../files/detect-sas-cable.service | 12 ------ .../detect-sas-cable/files/detect-sas-cable.sh | 45 -------------------- .../detect-sas-cable/gbs-detect-sas-cable.bb | 25 ----------- .../files/detect-gpio-present.service | 12 ++++++ .../files/detect-gpio-present.sh | 47 +++++++++++++++++++++ .../gbs-detect-gpio-present.bb | 25 +++++++++++ .../gbs-yaml-config/gbs-ipmi-sensors.yaml | 48 ++++++++++++++++++---- .../phosphor-gpio-monitor/obmc/gpio/gpios-0.conf | 6 +++ .../phosphor-gpio-monitor/obmc/gpio/gpios-1.conf | 6 +++ .../phosphor-gpio-monitor/obmc/gpio/gpios-2.conf | 6 +++ .../phosphor-gpio-monitor/obmc/gpio/gpios-3.conf | 6 +++ .../phosphor-gpio-monitor/obmc/gpio/gpios-4.conf | 6 +++ .../phosphor-gpio-monitor/obmc/gpio/gpios-5.conf | 6 +++ .../phosphor-gpio-monitor/obmc/gpio/gpios-6.conf | 6 +++ .../phosphor-gpio-monitor/obmc/gpio/gpios-7.conf | 6 +++ .../phosphor-gpio-monitor/obmc/gpio/gpios-8.conf | 6 +++ .../phosphor-gpio-monitor/obmc/gpio/gpios-9.conf | 6 +++ .../obmc/gpio/slimsas-cable-0.conf | 6 --- .../obmc/gpio/slimsas-cable-1.conf | 6 --- .../obmc/gpio/slimsas-cable-2.conf | 6 --- .../obmc/gpio/slimsas-cable-3.conf | 6 --- .../phosphor-gpio-presence@.service.replace | 6 +-- .../gpio/phosphor-gpio-monitor_%.bbappend | 30 ++++++++------ 23 files changed, 203 insertions(+), 131 deletions(-) delete mode 100644 meta-quanta/meta-gbs/recipes-gbs/detect-sas-cable/files/detect-sas-cable.service delete mode 100644 meta-quanta/meta-gbs/recipes-gbs/detect-sas-cable/files/detect-sas-cable.sh delete mode 100644 meta-quanta/meta-gbs/recipes-gbs/detect-sas-cable/gbs-detect-sas-cable.bb create mode 100644 meta-quanta/meta-gbs/recipes-gbs/gbs-detect-gpio-present/files/detect-gpio-present.service create mode 100644 meta-quanta/meta-gbs/recipes-gbs/gbs-detect-gpio-present/files/detect-gpio-present.sh create mode 100644 meta-quanta/meta-gbs/recipes-gbs/gbs-detect-gpio-present/gbs-detect-gpio-present.bb create mode 100644 meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-0.conf create mode 100644 meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-1.conf create mode 100644 meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-2.conf create mode 100644 meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-3.conf create mode 100644 meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-4.conf create mode 100644 meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-5.conf create mode 100644 meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-6.conf create mode 100644 meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-7.conf create mode 100644 meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-8.conf create mode 100644 meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-9.conf delete mode 100644 meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/slimsas-cable-0.conf delete mode 100644 meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/slimsas-cable-1.conf delete mode 100644 meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/slimsas-cable-2.conf delete mode 100644 meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/slimsas-cable-3.conf (limited to 'meta-quanta/meta-gbs') diff --git a/meta-quanta/meta-gbs/recipes-gbs/detect-sas-cable/files/detect-sas-cable.service b/meta-quanta/meta-gbs/recipes-gbs/detect-sas-cable/files/detect-sas-cable.service deleted file mode 100644 index 6575f4fb7..000000000 --- a/meta-quanta/meta-gbs/recipes-gbs/detect-sas-cable/files/detect-sas-cable.service +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description=Detect SAS Cable Manager -Wants=phosphor-gpio-presence@.service -After=phosphor-gpio-presence@.service - -[Service] -ExecStart=/usr/bin/detect-sas-cable.sh -StandardOutput=syslog -Type=simple - -[Install] -WantedBy=multi-user.target diff --git a/meta-quanta/meta-gbs/recipes-gbs/detect-sas-cable/files/detect-sas-cable.sh b/meta-quanta/meta-gbs/recipes-gbs/detect-sas-cable/files/detect-sas-cable.sh deleted file mode 100644 index ed02c9023..000000000 --- a/meta-quanta/meta-gbs/recipes-gbs/detect-sas-cable/files/detect-sas-cable.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash - -SERVICE_NAME="xyz.openbmc_project.Inventory.Manager" -SAS_CABLE_OBJPATH=("/xyz/openbmc_project/inventory/system/chassis/cable/ss_cab0_prsnt" -"/xyz/openbmc_project/inventory/system/chassis/cable/ss_cab1_prsnt" -"/xyz/openbmc_project/inventory/system/chassis/cable/ss_cab2_prsnt" -"/xyz/openbmc_project/inventory/system/chassis/cable/ss_cab3_prsnt") -INTERFACE_NAME="xyz.openbmc_project.Inventory.Item" - -IPMI_LOG_SERVICE="xyz.openbmc_project.Logging.IPMI" -IPMI_LOG_OBJPATH="/xyz/openbmc_project/Logging/IPMI" -IPMI_LOG_INTERFACE="xyz.openbmc_project.Logging.IPMI" -IPMI_LOG_FUNCT="IpmiSelAdd" -IPMI_LOG_PARA_FORMAT="ssaybq" #5 parameters, s : string, s : string, ay : byte array, b : boolean, y : UINT16 -LOG_ERR="Cable_error(Incorrect_interconnection)" -LOG_EVENT_DATA="3 0x01 0xff 0xfe" -LOG_ASSERT_FLAG="true" -LOG_DEASSERT_FLAG="false" -LOG_GENID_FLAG="0x0020" -cable_state=("true" "true" "true" "true") - -mapper wait ${SAS_CABLE_OBJPATH[0]} -mapper wait ${SAS_CABLE_OBJPATH[1]} -mapper wait ${SAS_CABLE_OBJPATH[2]} -mapper wait ${SAS_CABLE_OBJPATH[3]} - -while true; do - for i in {0..3}; - do - boot_status="$(busctl get-property $SERVICE_NAME ${SAS_CABLE_OBJPATH[$i]} $INTERFACE_NAME Present | awk '{print $2}')" - - if [ $boot_status == "false" ] && [ ${cable_state[$i]} == "true" ];then - echo "Update cable $(($i+1)) state." - cable_state[$i]="false" - busctl call $IPMI_LOG_SERVICE $IPMI_LOG_OBJPATH $IPMI_LOG_INTERFACE $IPMI_LOG_FUNCT $IPMI_LOG_PARA_FORMAT $LOG_ERR ${SAS_CABLE_OBJPATH[$i]} $LOG_EVENT_DATA $LOG_ASSERT_FLAG $LOG_GENID_FLAG - elif [ $boot_status == "true" ] && [ ${cable_state[$i]} != "true" ];then - echo "Update cable $(($i+1)) state." - cable_state[$i]="true" - busctl call $IPMI_LOG_SERVICE $IPMI_LOG_OBJPATH $IPMI_LOG_INTERFACE $IPMI_LOG_FUNCT $IPMI_LOG_PARA_FORMAT $LOG_ERR ${SAS_CABLE_OBJPATH[$i]} $LOG_EVENT_DATA $LOG_DEASSERT_FLAG $LOG_GENID_FLAG - fi - done - sleep 1 -done - -exit 0 diff --git a/meta-quanta/meta-gbs/recipes-gbs/detect-sas-cable/gbs-detect-sas-cable.bb b/meta-quanta/meta-gbs/recipes-gbs/detect-sas-cable/gbs-detect-sas-cable.bb deleted file mode 100644 index 74785ef63..000000000 --- a/meta-quanta/meta-gbs/recipes-gbs/detect-sas-cable/gbs-detect-sas-cable.bb +++ /dev/null @@ -1,25 +0,0 @@ -SUMMARY = "OpenBMC Quanta Detect SAS Cable Service" -DESCRIPTION = "OpenBMC Quanta Detect SAS Cable Daemon." -PR = "r1" -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" - -inherit systemd - -DEPENDS += "systemd" -RDEPENDS_${PN} += "bash" - -SRC_URI = " file://detect-sas-cable.sh \ - file://detect-sas-cable.service \ - " - -do_install() { - install -d ${D}${bindir} - install -m 0755 ${WORKDIR}/detect-sas-cable.sh ${D}${bindir}/ - - install -d ${D}${systemd_system_unitdir} - install -m 0644 ${WORKDIR}/detect-sas-cable.service ${D}${systemd_system_unitdir} -} - -SYSTEMD_PACKAGES = "${PN}" -SYSTEMD_SERVICE_${PN} = "detect-sas-cable.service" diff --git a/meta-quanta/meta-gbs/recipes-gbs/gbs-detect-gpio-present/files/detect-gpio-present.service b/meta-quanta/meta-gbs/recipes-gbs/gbs-detect-gpio-present/files/detect-gpio-present.service new file mode 100644 index 000000000..9731ee388 --- /dev/null +++ b/meta-quanta/meta-gbs/recipes-gbs/gbs-detect-gpio-present/files/detect-gpio-present.service @@ -0,0 +1,12 @@ +[Unit] +Description=Detect GPIO Present Manager +After=phosphor-gpio-presence@.service +Requires=phosphor-gpio-presence@.service + +[Service] +ExecStart=/usr/bin/detect-gpio-present.sh +StandardOutput=syslog +Type=simple + +[Install] +WantedBy=multi-user.target 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 new file mode 100644 index 000000000..66f52f067 --- /dev/null +++ b/meta-quanta/meta-gbs/recipes-gbs/gbs-detect-gpio-present/files/detect-gpio-present.sh @@ -0,0 +1,47 @@ +#!/bin/bash + +SERVICE_NAME="xyz.openbmc_project.Inventory.Manager" +PRESENT_OBJPATH=("/xyz/openbmc_project/inventory/system/chassis/gpios/ss_cab0_prsnt" +"/xyz/openbmc_project/inventory/system/chassis/gpios/ss_cab1_prsnt" +"/xyz/openbmc_project/inventory/system/chassis/gpios/ss_cab2_prsnt" +"/xyz/openbmc_project/inventory/system/chassis/gpios/ss_cab3_prsnt" +"/xyz/openbmc_project/inventory/system/chassis/gpios/hsbp_cab_prsnt" +"/xyz/openbmc_project/inventory/system/chassis/gpios/fanbd_cab_prsnt" +"/xyz/openbmc_project/inventory/system/chassis/gpios/bp12v_cab_prsnt" +"/xyz/openbmc_project/inventory/system/chassis/gpios/sata0_prsnt" +"/xyz/openbmc_project/inventory/system/chassis/gpios/pe_slot0_prsnt" +"/xyz/openbmc_project/inventory/system/chassis/gpios/pe_slot1_prsnt") +INTERFACE_NAME="xyz.openbmc_project.Inventory.Item" + +IPMI_LOG_SERVICE="xyz.openbmc_project.Logging.IPMI" +IPMI_LOG_OBJPATH="/xyz/openbmc_project/Logging/IPMI" +IPMI_LOG_INTERFACE="xyz.openbmc_project.Logging.IPMI" +IPMI_LOG_FUNCT="IpmiSelAdd" +IPMI_LOG_PARA_FORMAT="ssaybq" #5 parameters, s : string, s : string, ay : byte array, b : boolean, y : UINT16 +LOG_ERR="Configuration Error(Incorrect_interconnection)" +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") + +while true; do + for i in ${!PRESENT_OBJPATH[@]} + do + mapper wait ${PRESENT_OBJPATH[$i]} + boot_status="$(busctl get-property $SERVICE_NAME ${PRESENT_OBJPATH[$i]} $INTERFACE_NAME Present | awk '{print $2}')" + + if [ $boot_status == "false" ] && [ ${present_state[$i]} == "true" ];then + echo "Update cable $(($i+1)) state." + present_state[$i]="false" + busctl call $IPMI_LOG_SERVICE $IPMI_LOG_OBJPATH $IPMI_LOG_INTERFACE $IPMI_LOG_FUNCT $IPMI_LOG_PARA_FORMAT $LOG_ERR ${PRESENT_OBJPATH[$i]} $LOG_EVENT_DATA $LOG_ASSERT_FLAG $LOG_GENID_FLAG + elif [ $boot_status == "true" ] && [ ${present_state[$i]} == "false" ];then + echo "Update cable $(($i+1)) state." + present_state[$i]="true" + busctl call $IPMI_LOG_SERVICE $IPMI_LOG_OBJPATH $IPMI_LOG_INTERFACE $IPMI_LOG_FUNCT $IPMI_LOG_PARA_FORMAT $LOG_ERR ${PRESENT_OBJPATH[$i]} $LOG_EVENT_DATA $LOG_DEASSERT_FLAG $LOG_GENID_FLAG + fi + done + sleep 1 +done + +exit 0 diff --git a/meta-quanta/meta-gbs/recipes-gbs/gbs-detect-gpio-present/gbs-detect-gpio-present.bb b/meta-quanta/meta-gbs/recipes-gbs/gbs-detect-gpio-present/gbs-detect-gpio-present.bb new file mode 100644 index 000000000..3e1a6d8ac --- /dev/null +++ b/meta-quanta/meta-gbs/recipes-gbs/gbs-detect-gpio-present/gbs-detect-gpio-present.bb @@ -0,0 +1,25 @@ +SUMMARY = "OpenBMC Quanta Detect Present Service" +DESCRIPTION = "OpenBMC Quanta Detect Present Daemon." +PR = "r1" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10" + +inherit systemd + +DEPENDS += "systemd" +RDEPENDS_${PN} += "bash" + +SRC_URI = " file://detect-gpio-present.sh \ + file://detect-gpio-present.service \ + " + +do_install() { + install -d ${D}${bindir} + install -m 0755 ${WORKDIR}/detect-gpio-present.sh ${D}${bindir}/ + + install -d ${D}${systemd_system_unitdir} + install -m 0644 ${WORKDIR}/detect-gpio-present.service ${D}${systemd_system_unitdir} +} + +SYSTEMD_PACKAGES = "${PN}" +SYSTEMD_SERVICE_${PN} = "detect-gpio-present.service" 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 26a785fbe..6747280fd 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 @@ -1082,8 +1082,8 @@ type: string assert: xyz.openbmc_project.Memory.MemoryECC.ECCStatus.LogFull -#SlimSAS Cable0~3 connection -0xF1: &slimsas +#GPIO present connection +0xF1: &gpio_prsnt entityID: 0x1F entityInstance: 0 interfaces: @@ -1097,7 +1097,7 @@ assert: false type: bool mutability: Mutability::Write|Mutability::Read - path: /xyz/openbmc_project/inventory/system/chassis/cable/ss_cab0_prsnt + path: /xyz/openbmc_project/inventory/system/chassis/gpios/ss_cab0_prsnt readingType: assertion sensorNamePattern: nameLeaf sensorReadingType: 0x6f @@ -1105,16 +1105,46 @@ serviceInterface: org.freedesktop.DBus.Properties 0xF2: - <<: *slimsas + <<: *gpio_prsnt entityInstance: 1 - path: /xyz/openbmc_project/inventory/system/chassis/cable/ss_cab1_prsnt + path: /xyz/openbmc_project/inventory/system/chassis/gpios/ss_cab1_prsnt 0xF3: - <<: *slimsas + <<: *gpio_prsnt entityInstance: 2 - path: /xyz/openbmc_project/inventory/system/chassis/cable/ss_cab2_prsnt + path: /xyz/openbmc_project/inventory/system/chassis/gpios/ss_cab2_prsnt 0xF4: - <<: *slimsas + <<: *gpio_prsnt entityInstance: 3 - path: /xyz/openbmc_project/inventory/system/chassis/cable/ss_cab3_prsnt + path: /xyz/openbmc_project/inventory/system/chassis/gpios/ss_cab3_prsnt + +0xF5: + <<: *gpio_prsnt + entityInstance: 4 + path: /xyz/openbmc_project/inventory/system/chassis/gpios/sata0_prsnt + +0xF6: + <<: *gpio_prsnt + entityInstance: 5 + path: /xyz/openbmc_project/inventory/system/chassis/gpios/hsbp_cab_prsnt + +0xF7: + <<: *gpio_prsnt + entityInstance: 6 + path: /xyz/openbmc_project/inventory/system/chassis/gpios/fanbd_cab_prsnt + +0xF8: + <<: *gpio_prsnt + entityInstance: 7 + path: /xyz/openbmc_project/inventory/system/chassis/gpios/bp12v_cab_prsnt + +0xF9: + <<: *gpio_prsnt + entityInstance: 8 + path: /xyz/openbmc_project/inventory/system/chassis/gpios/pe_slot0_prsnt + +0xFA: + <<: *gpio_prsnt + entityInstance: 9 + path: /xyz/openbmc_project/inventory/system/chassis/gpios/pe_slot1_prsnt diff --git a/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-0.conf b/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-0.conf new file mode 100644 index 000000000..e6dfdac67 --- /dev/null +++ b/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-0.conf @@ -0,0 +1,6 @@ +#The gpio 70 is a real gpio, which is used to +#store the sas cable 0 present signal +INVENTORY=/system/chassis/gpios/ss_cab0_prsnt +DEVPATH=/dev/input/event0 +KEY=70 +NAME=ss_cab0_prsnt diff --git a/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-1.conf b/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-1.conf new file mode 100644 index 000000000..2f3e5f5bc --- /dev/null +++ b/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-1.conf @@ -0,0 +1,6 @@ +#The gpio 71 is a real gpio, which is used to +#store the sas cable 1 present signal +INVENTORY=/system/chassis/gpios/ss_cab1_prsnt +DEVPATH=/dev/input/event0 +KEY=71 +NAME=ss_cab1_prsnt diff --git a/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-2.conf b/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-2.conf new file mode 100644 index 000000000..719311d5f --- /dev/null +++ b/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-2.conf @@ -0,0 +1,6 @@ +#The gpio 72 is a real gpio, which is used to +#store the sas cable 2 present signal +INVENTORY=/system/chassis/gpios/ss_cab2_prsnt +DEVPATH=/dev/input/event0 +KEY=72 +NAME=ss_cab2_prsnt diff --git a/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-3.conf b/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-3.conf new file mode 100644 index 000000000..2e1a82836 --- /dev/null +++ b/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-3.conf @@ -0,0 +1,6 @@ +#The gpio 73 is a real gpio, which is used to +#store the sas cable 3 present signal +INVENTORY=/system/chassis/gpios/ss_cab3_prsnt +DEVPATH=/dev/input/event0 +KEY=73 +NAME=ss_cab3_prsnt diff --git a/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-4.conf b/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-4.conf new file mode 100644 index 000000000..ecd074791 --- /dev/null +++ b/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-4.conf @@ -0,0 +1,6 @@ +#The gpio 57 is a real gpio, which is used to +#store the HSBP cable present signal +INVENTORY=/system/chassis/gpios/hsbp_cab_prsnt +DEVPATH=/dev/input/event0 +KEY=57 +NAME=hsbp_cab_prsnt diff --git a/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-5.conf b/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-5.conf new file mode 100644 index 000000000..2838872f8 --- /dev/null +++ b/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-5.conf @@ -0,0 +1,6 @@ +#The gpio 58 is a real gpio, which is used to +#store the fan board cable present signal +INVENTORY=/system/chassis/gpios/fanbd_cab_prsnt +DEVPATH=/dev/input/event0 +KEY=58 +NAME=fanbd_cab_prsnt diff --git a/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-6.conf b/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-6.conf new file mode 100644 index 000000000..ca3fbd4b1 --- /dev/null +++ b/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-6.conf @@ -0,0 +1,6 @@ +#The gpio 69 is a real gpio, which is used to +#store the HSBP 12V standby cable present signal +INVENTORY=/system/chassis/gpios/bp12v_cab_prsnt +DEVPATH=/dev/input/event0 +KEY=69 +NAME=bp12v_cab_prsnt diff --git a/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-7.conf b/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-7.conf new file mode 100644 index 000000000..0a0aed7c7 --- /dev/null +++ b/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-7.conf @@ -0,0 +1,6 @@ +#The gpio 5 is a real gpio, which is used to +#store the SATA0 present signal +INVENTORY=/system/chassis/gpios/sata0_prsnt +DEVPATH=/dev/input/event0 +KEY=5 +NAME=sata0_prsnt diff --git a/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-8.conf b/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-8.conf new file mode 100644 index 000000000..342aaf0a9 --- /dev/null +++ b/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-8.conf @@ -0,0 +1,6 @@ +#The gpio 120 is a real gpio, which is used to +#store the PE0 present signal +INVENTORY=/system/chassis/gpios/pe_slot0_prsnt +DEVPATH=/dev/input/event0 +KEY=120 +NAME=pe_slot0_prsnt diff --git a/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-9.conf b/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-9.conf new file mode 100644 index 000000000..10d3a2ee7 --- /dev/null +++ b/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-9.conf @@ -0,0 +1,6 @@ +#The gpio 121 is a real gpio, which is used to +#store the PE1 present signal +INVENTORY=/system/chassis/gpios/pe_slot1_prsnt +DEVPATH=/dev/input/event0 +KEY=121 +NAME=pe_slot1_prsnt diff --git a/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/slimsas-cable-0.conf b/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/slimsas-cable-0.conf deleted file mode 100644 index e26c8f50e..000000000 --- a/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/slimsas-cable-0.conf +++ /dev/null @@ -1,6 +0,0 @@ -#The gpio 70 is a real gpio, which is used to -#store the sas cable 0 present signal -INVENTORY=/system/chassis/cable/ss_cab0_prsnt -DEVPATH=/dev/input/event0 -KEY=70 -NAME=ss_cab0_prsnt diff --git a/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/slimsas-cable-1.conf b/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/slimsas-cable-1.conf deleted file mode 100644 index e6a18ee6c..000000000 --- a/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/slimsas-cable-1.conf +++ /dev/null @@ -1,6 +0,0 @@ -#The gpio 71 is a real gpio, which is used to -#store the sas cable 1 present signal -INVENTORY=/system/chassis/cable/ss_cab1_prsnt -DEVPATH=/dev/input/event0 -KEY=71 -NAME=ss_cab1_prsnt diff --git a/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/slimsas-cable-2.conf b/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/slimsas-cable-2.conf deleted file mode 100644 index 490f97f49..000000000 --- a/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/slimsas-cable-2.conf +++ /dev/null @@ -1,6 +0,0 @@ -#The gpio 72 is a real gpio, which is used to -#store the sas cable 2 present signal -INVENTORY=/system/chassis/cable/ss_cab2_prsnt -DEVPATH=/dev/input/event0 -KEY=72 -NAME=ss_cab2_prsnt diff --git a/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/slimsas-cable-3.conf b/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/slimsas-cable-3.conf deleted file mode 100644 index f3579ab97..000000000 --- a/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/slimsas-cable-3.conf +++ /dev/null @@ -1,6 +0,0 @@ -#The gpio 73 is a real gpio, which is used to -#store the sas cable 3 present signal -INVENTORY=/system/chassis/cable/ss_cab3_prsnt -DEVPATH=/dev/input/event0 -KEY=73 -NAME=ss_cab3_prsnt diff --git a/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/phosphor-gpio-presence@.service.replace b/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/phosphor-gpio-presence@.service.replace index 3ab99702f..fe782d60e 100644 --- a/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/phosphor-gpio-presence@.service.replace +++ b/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/phosphor-gpio-presence@.service.replace @@ -2,12 +2,10 @@ Description=Phosphor GPIO %I Presence Wants=mapper-wait@-xyz-openbmc_project-inventory.service After=mapper-wait@-xyz-openbmc_project-inventory.service -ConditionPathExists=/etc/default/obmc/gpio/slimsas-cable-%i.conf -StartLimitBurst=10 +ConditionPathExists=/etc/default/obmc/gpio/gpios-%i.conf [Service] -Restart=on-failure -EnvironmentFile=/etc/default/obmc/gpio/slimsas-cable-%i.conf +EnvironmentFile=/etc/default/obmc/gpio/gpios-%i.conf ExecStart=/usr/bin/phosphor-gpio-presence --path=${DEVPATH} --inventory=${INVENTORY} --key=${KEY} --name=${NAME} --drivers=${DRIVERS} --extra-ifaces=${EXTRA_IFACES} [Install] 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 50974f7ee..d45636609 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 @@ -4,21 +4,27 @@ FILESEXTRAPATHS_prepend_gbs := "${THISDIR}/${PN}:" SRC_URI_append_gbs = " file://phosphor-gpio-presence@.service.replace" -TMPL_SLIMSASCABLE = "phosphor-gpio-presence@.service" -INSTFMT_SLIMSASCABLE = "phosphor-gpio-presence@{0}.service" -SLIMSASCABLE_TGT = "multi-user.target" -FMT_SLIMSASCABLE = "../${TMPL_SLIMSASCABLE}:${SLIMSASCABLE_TGT}.requires/${INSTFMT_SLIMSASCABLE}" -SYSTEMD_ENVIRONMENT_FILE_${PN}_append_gbs +="obmc/gpio/slimsas-cable-0.conf" -SYSTEMD_ENVIRONMENT_FILE_${PN}_append_gbs +="obmc/gpio/slimsas-cable-1.conf" -SYSTEMD_ENVIRONMENT_FILE_${PN}_append_gbs +="obmc/gpio/slimsas-cable-2.conf" -SYSTEMD_ENVIRONMENT_FILE_${PN}_append_gbs +="obmc/gpio/slimsas-cable-3.conf" -GBS_OBMC_SLIMSAS_CABLE_INSTANCES = "0 1 2 3" +TMPL_PRESENT = "phosphor-gpio-presence@.service" +INSTFMT_PRESENT = "phosphor-gpio-presence@{0}.service" +PRESENT_TGT = "multi-user.target" +FMT_PRESENT = "../${TMPL_PRESENT}:${PRESENT_TGT}.requires/${INSTFMT_PRESENT}" +SYSTEMD_ENVIRONMENT_FILE_${PN}_append_gbs +="obmc/gpio/gpios-0.conf" +SYSTEMD_ENVIRONMENT_FILE_${PN}_append_gbs +="obmc/gpio/gpios-1.conf" +SYSTEMD_ENVIRONMENT_FILE_${PN}_append_gbs +="obmc/gpio/gpios-2.conf" +SYSTEMD_ENVIRONMENT_FILE_${PN}_append_gbs +="obmc/gpio/gpios-3.conf" +SYSTEMD_ENVIRONMENT_FILE_${PN}_append_gbs +="obmc/gpio/gpios-4.conf" +SYSTEMD_ENVIRONMENT_FILE_${PN}_append_gbs +="obmc/gpio/gpios-5.conf" +SYSTEMD_ENVIRONMENT_FILE_${PN}_append_gbs +="obmc/gpio/gpios-6.conf" +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" +GBS_OBMC_PRESENT_INSTANCES = "0 1 2 3 4 5 6 7 8 9" -SYSTEMD_LINK_${PN}-presence_append_gbs = " ${@compose_list(d, 'FMT_SLIMSASCABLE', 'GBS_OBMC_SLIMSAS_CABLE_INSTANCES')}" +SYSTEMD_LINK_${PN}-presence_append_gbs = " ${@compose_list(d, 'FMT_PRESENT', 'GBS_OBMC_PRESENT_INSTANCES')}" -GBS_SLIMSASCABLE_ENV_FMT = "obmc/gpio/slimsas-cable-{0}.conf" +GBS_PRESENT_ENV_FMT = "obmc/gpio/gpios-{0}.conf" -SYSTEMD_ENVIRONMENT_FILE_${PN}-presence_gbs = " ${@compose_list(d, 'GBS_SLIMSASCABLE_ENV_FMT', 'GBS_OBMC_SLIMSAS_CABLE_INSTANCES')}" +SYSTEMD_ENVIRONMENT_FILE_${PN}-presence_gbs = " ${@compose_list(d, 'GBS_PRESENT_ENV_FMT', 'GBS_OBMC_PRESENT_INSTANCES')}" do_install_append_gbs() { install -d ${D}${systemd_system_unitdir} -- cgit v1.2.3