diff options
author | Lei YU <mine260309@gmail.com> | 2017-12-04 05:41:13 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-01-17 03:58:45 +0300 |
commit | 3efb3bcbc81ce85ec1dff62aae14319b988d863b (patch) | |
tree | 25f0b53cbd2ba4567f3027b0840f83a1d9117164 | |
parent | 669b0bebd79f2266f85cd4278cfce9f90867fb75 (diff) | |
download | openbmc-3efb3bcbc81ce85ec1dff62aae14319b988d863b.tar.xz |
meta-zaius: Add PCIE E2B present sensor
The GPIO E7 is used to check if PCIE E2B is connected with a riser card.
Add a sensor for this card and provide IPMI response for the sensor.
Change-Id: Ie63a633c0c4eb5a88039a0087c2fd471e38f87af
Signed-off-by: Lei YU <mine260309@gmail.com>
5 files changed, 44 insertions, 1 deletions
diff --git a/meta-openbmc-machines/meta-openpower/meta-ingrasys/meta-zaius/recipes-phosphor/gpio/phosphor-gpio-monitor.bbappend b/meta-openbmc-machines/meta-openpower/meta-ingrasys/meta-zaius/recipes-phosphor/gpio/phosphor-gpio-monitor.bbappend new file mode 100644 index 000000000..801b34683 --- /dev/null +++ b/meta-openbmc-machines/meta-openpower/meta-ingrasys/meta-zaius/recipes-phosphor/gpio/phosphor-gpio-monitor.bbappend @@ -0,0 +1,11 @@ +FILESEXTRAPATHS_append_zaius := "${THISDIR}/${PN}:" + +PCIE_CARD_E2B_INSTANCE = "pcie-card-e2b" + +TMPL = "phosphor-gpio-presence@.service" +INSTFMT = "phosphor-gpio-presence@{0}.service" +TGT = "${SYSTEMD_DEFAULT_TARGET}" +FMT = "../${TMPL}:${TGT}.requires/${INSTFMT}" + +SYSTEMD_LINK_${PN}-presence_append_zaius += "${@compose_list(d, 'FMT', 'PCIE_CARD_E2B_INSTANCE')}" +SYSTEMD_ENVIRONMENT_FILE_${PN}-presence_append_zaius += "obmc/gpio/phosphor-pcie-card-e2b.conf" diff --git a/meta-openbmc-machines/meta-openpower/meta-ingrasys/meta-zaius/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/phosphor-pcie-card-e2b.conf b/meta-openbmc-machines/meta-openpower/meta-ingrasys/meta-zaius/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/phosphor-pcie-card-e2b.conf new file mode 100644 index 000000000..cfc541406 --- /dev/null +++ b/meta-openbmc-machines/meta-openpower/meta-ingrasys/meta-zaius/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/phosphor-pcie-card-e2b.conf @@ -0,0 +1,4 @@ +INVENTORY=/system/chassis/pcie_card_e2b +DEVPATH=/dev/input/by-path/platform-gpio-keys-event +KEY=39 +NAME=pcie_card_e2b diff --git a/meta-openbmc-machines/meta-openpower/meta-ingrasys/meta-zaius/recipes-phosphor/gpio/phosphor-gpio-monitor/phosphor-gpio-presence@.service b/meta-openbmc-machines/meta-openpower/meta-ingrasys/meta-zaius/recipes-phosphor/gpio/phosphor-gpio-monitor/phosphor-gpio-presence@.service new file mode 100644 index 000000000..0f8396c7b --- /dev/null +++ b/meta-openbmc-machines/meta-openpower/meta-ingrasys/meta-zaius/recipes-phosphor/gpio/phosphor-gpio-monitor/phosphor-gpio-presence@.service @@ -0,0 +1,13 @@ +[Unit] +Description=Phosphor GPIO %I Presence +Wants=mapper-wait@-xyz-openbmc_project-inventory.service +After=mapper-wait@-xyz-openbmc_project-inventory.service +ConditionPathExists={envfiledir}/obmc/gpio/phosphor-pcie-card-e2b.conf + +[Service] +EnvironmentFile={envfiledir}/obmc/gpio/phosphor-pcie-card-e2b.conf +ExecStart=/usr/bin/env phosphor-gpio-presence --path=${{DEVPATH}} --inventory=${{INVENTORY}} --key=${{KEY}} --name=${{NAME}} +SyslogIdentifier=phosphor-gpio-presence + +[Install] +RequiredBy={SYSTEMD_DEFAULT_TARGET} diff --git a/meta-openbmc-machines/meta-openpower/meta-ingrasys/meta-zaius/recipes-phosphor/ipmi/phosphor-ipmi-sensor-inventory%/config.yaml b/meta-openbmc-machines/meta-openpower/meta-ingrasys/meta-zaius/recipes-phosphor/ipmi/phosphor-ipmi-sensor-inventory%/config.yaml index 66ec993b2..a318f53b9 100755 --- a/meta-openbmc-machines/meta-openpower/meta-ingrasys/meta-zaius/recipes-phosphor/ipmi/phosphor-ipmi-sensor-inventory%/config.yaml +++ b/meta-openbmc-machines/meta-openpower/meta-ingrasys/meta-zaius/recipes-phosphor/ipmi/phosphor-ipmi-sensor-inventory%/config.yaml @@ -154,3 +154,17 @@ assert: true deassert: false type: bool +0xFC: + sensorType: 0xCD + path: /system/chassis/pcie_e2b_present + sensorReadingType: 0x03 + serviceInterface: xyz.openbmc_project.Inventory.Manager + readingType: assertion + interfaces: + xyz.openbmc_project.Inventory.Item: + Present: + Offsets: + 0x01: + assert: true + deassert: false + type: bool diff --git a/meta-openbmc-machines/meta-openpower/meta-ingrasys/meta-zaius/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bbappend b/meta-openbmc-machines/meta-openpower/meta-ingrasys/meta-zaius/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bbappend index 8b22432fc..f80bdb6cf 100644 --- a/meta-openbmc-machines/meta-openpower/meta-ingrasys/meta-zaius/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bbappend +++ b/meta-openbmc-machines/meta-openpower/meta-ingrasys/meta-zaius/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bbappend @@ -1,2 +1,3 @@ # Support OCC pass through and general occ control -RDEPENDS_${PN}-inventory_append_zaius = " openpower-occ-control" +# Support for GPIO presence service +RDEPENDS_${PN}-inventory_append_zaius = " openpower-occ-control virtual/obmc-gpio-presence" |