summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Spinler <spinler@us.ibm.com>2017-06-06 09:40:45 -0500
committerPatrick Williams <patrick@stwcx.xyz>2017-06-14 07:39:59 +0000
commit6304341c661d1f3b307015d4c097083daefa69a3 (patch)
treeac38370e2762cbbe5fc2360ebb4b8d0ff2fc83c9
parent20a9336fb649da817086eb00c194965bbb105287 (diff)
downloadtalos-openbmc-6304341c661d1f3b307015d4c097083daefa69a3.tar.gz
talos-openbmc-6304341c661d1f3b307015d4c097083daefa69a3.zip
Install witherspoon-reset-fan-watchdog service
This is a witherspoon only service that will reset the fan watchdog circuit on a poweron, which would bring the fans out of watchdog control if they previously were. The watchdog is reset by toggling a GPIO that feeds a latch that drives the watchdog signal to the fan controller. The GPIO parameters are obtained from an environment file. The witherspoon-fan-watchdog.bb recipe will have other watchdog related services added to it in the future. Resolves openbmc/openbmc#1687 Change-Id: I103ccf6cb69f8a98fc352fa2fa05e45ecbf2cd23 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
-rw-r--r--meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog.bb15
-rw-r--r--meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/obmc/witherspoon-fan-watchdog/witherspoon-reset-fan-watchdog.conf4
-rw-r--r--meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/witherspoon-reset-fan-watchdog.service11
-rw-r--r--meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bbappend1
4 files changed, 31 insertions, 0 deletions
diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog.bb b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog.bb
new file mode 100644
index 000000000..cebeefda6
--- /dev/null
+++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog.bb
@@ -0,0 +1,15 @@
+SUMMARY = "Witherspoon fan watchdog services"
+PR = "r1"
+
+inherit obmc-phosphor-license
+inherit obmc-phosphor-systemd
+
+RDEPENDS_${PN} += "phosphor-gpio-monitor"
+
+RESET_SERVICE = "witherspoon-reset-fan-watchdog.service"
+TGTFMT = "obmc-chassis-poweron@0.target"
+RESET_FMT = "../${RESET_SERVICE}:${TGTFMT}.requires/${RESET_SERVICE}"
+
+SYSTEMD_SERVICE_${PN} += "${RESET_SERVICE}"
+SYSTEMD_LINK_${PN} += "${RESET_FMT}"
+SYSTEMD_ENVIRONMENT_FILE_${PN} += "obmc/witherspoon-fan-watchdog/witherspoon-reset-fan-watchdog.conf"
diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/obmc/witherspoon-fan-watchdog/witherspoon-reset-fan-watchdog.conf b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/obmc/witherspoon-fan-watchdog/witherspoon-reset-fan-watchdog.conf
new file mode 100644
index 000000000..b4e5ce74e
--- /dev/null
+++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/obmc/witherspoon-fan-watchdog/witherspoon-reset-fan-watchdog.conf
@@ -0,0 +1,4 @@
+GPIO_PATH=/dev/gpiochip0
+GPIO=109
+DELAY=1
+ACTION=low_high
diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/witherspoon-reset-fan-watchdog.service b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/witherspoon-reset-fan-watchdog.service
new file mode 100644
index 000000000..8ac3dd115
--- /dev/null
+++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/fans/witherspoon-fan-watchdog/witherspoon-reset-fan-watchdog.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Witherspoon Fan Watchdog Reset
+Wants=phosphor-fan-control-init@0.service
+Before=phosphor-fan-control-init@0.service
+Conflicts=obmc-chassis-poweroff@0.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+EnvironmentFile={envfiledir}/obmc/witherspoon-fan-watchdog/witherspoon-reset-fan-watchdog.conf
+ExecStart={sbindir}/phosphor-gpio-util -p ${{GPIO_PATH}} -g ${{GPIO}} -a ${{ACTION}} -d ${{DELAY}}
diff --git a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bbappend b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bbappend
index af3933ba7..db27edc74 100644
--- a/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bbappend
+++ b/meta-openbmc-machines/meta-openpower/meta-ibm/meta-witherspoon/recipes-phosphor/packagegroups/packagegroup-obmc-apps.bbappend
@@ -1 +1,2 @@
RDEPENDS_${PN}-inventory += "openpower-fru-vpd openpower-occ-control phosphor-cooling-type"
+RDEPENDS_${PN}-fan-control += "witherspoon-fan-watchdog"
OpenPOWER on IntegriCloud