summaryrefslogtreecommitdiff
path: root/meta-ibm
diff options
context:
space:
mode:
authorMatt Spinler <spinler@us.ibm.com>2023-08-01 21:25:14 +0300
committerAndrew Geissler <geissonator@yahoo.com>2023-08-03 20:57:22 +0300
commit3416889460750753874464c253d4b5813a3056ae (patch)
tree733eac5a54db173832434f10542b836621557b8e /meta-ibm
parent2ca66a74ee4874e121ac398fe83759df73e48065 (diff)
downloadopenbmc-3416889460750753874464c253d4b5813a3056ae.tar.xz
meta-ibm: Use gpioset in reset-fan-watchdog
The reset-fan-watchdog service needs to toggle a GPIO in order to unlock the fan watchdog circuit so fans can be controlled after the watchdog has expired and locked them at high speed. This gets called on every power on to bring the fans under control again in case the watchdog had expired on the previous boot. This was done previously using a custom application which used libgpiod under the covers, which was written before gpioset was around. Now that gpioset is available, just use it instead to toggle the GPIO so there's less custom code we have to worry about maintaining. The actual minimum timing requirement of the toggle is around 5ns, so the 1us being used by all the config files meets that. Tested: Expired the watchdog by stopping the fan-watchdog service, then powered off and back on and made sure the fans can still be controlled. Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: Ibd36ff17e83b57d521364f0092dfa1f5abf34856
Diffstat (limited to 'meta-ibm')
-rw-r--r--meta-ibm/recipes-phosphor/fans/fan-watchdog/p10bmc/obmc/fan-watchdog/reset-fan-watchdog.conf1
-rw-r--r--meta-ibm/recipes-phosphor/fans/fan-watchdog/reset-fan-watchdog.service3
-rw-r--r--meta-ibm/recipes-phosphor/fans/fan-watchdog/swift/obmc/fan-watchdog/reset-fan-watchdog.conf1
-rw-r--r--meta-ibm/recipes-phosphor/fans/fan-watchdog/witherspoon-tacoma/obmc/fan-watchdog/reset-fan-watchdog.conf1
-rw-r--r--meta-ibm/recipes-phosphor/fans/fan-watchdog/witherspoon/obmc/fan-watchdog/reset-fan-watchdog.conf1
5 files changed, 2 insertions, 5 deletions
diff --git a/meta-ibm/recipes-phosphor/fans/fan-watchdog/p10bmc/obmc/fan-watchdog/reset-fan-watchdog.conf b/meta-ibm/recipes-phosphor/fans/fan-watchdog/p10bmc/obmc/fan-watchdog/reset-fan-watchdog.conf
index 98cb60288d..f77fe0194b 100644
--- a/meta-ibm/recipes-phosphor/fans/fan-watchdog/p10bmc/obmc/fan-watchdog/reset-fan-watchdog.conf
+++ b/meta-ibm/recipes-phosphor/fans/fan-watchdog/p10bmc/obmc/fan-watchdog/reset-fan-watchdog.conf
@@ -1,4 +1,3 @@
GPIO_PATH=/dev/gpiochip0
GPIO=114
DELAY=1
-ACTION=low_high
diff --git a/meta-ibm/recipes-phosphor/fans/fan-watchdog/reset-fan-watchdog.service b/meta-ibm/recipes-phosphor/fans/fan-watchdog/reset-fan-watchdog.service
index 8c8aefebf4..6a2937a7af 100644
--- a/meta-ibm/recipes-phosphor/fans/fan-watchdog/reset-fan-watchdog.service
+++ b/meta-ibm/recipes-phosphor/fans/fan-watchdog/reset-fan-watchdog.service
@@ -8,4 +8,5 @@ Conflicts=obmc-chassis-poweroff@0.target
Type=oneshot
RemainAfterExit=yes
EnvironmentFile={envfiledir}/obmc/fan-watchdog/reset-fan-watchdog.conf
-ExecStart=/usr/bin/phosphor-gpio-util -p ${{GPIO_PATH}} -g ${{GPIO}} -a ${{ACTION}} -d ${{DELAY}}
+ExecStart=/usr/bin/gpioset --mode=time -u ${{DELAY}} ${{GPIO_PATH}} ${{GPIO}}=0
+ExecStart=/usr/bin/gpioset --mode=time -u ${{DELAY}} ${{GPIO_PATH}} ${{GPIO}}=1
diff --git a/meta-ibm/recipes-phosphor/fans/fan-watchdog/swift/obmc/fan-watchdog/reset-fan-watchdog.conf b/meta-ibm/recipes-phosphor/fans/fan-watchdog/swift/obmc/fan-watchdog/reset-fan-watchdog.conf
index b4e5ce74eb..04855114ec 100644
--- a/meta-ibm/recipes-phosphor/fans/fan-watchdog/swift/obmc/fan-watchdog/reset-fan-watchdog.conf
+++ b/meta-ibm/recipes-phosphor/fans/fan-watchdog/swift/obmc/fan-watchdog/reset-fan-watchdog.conf
@@ -1,4 +1,3 @@
GPIO_PATH=/dev/gpiochip0
GPIO=109
DELAY=1
-ACTION=low_high
diff --git a/meta-ibm/recipes-phosphor/fans/fan-watchdog/witherspoon-tacoma/obmc/fan-watchdog/reset-fan-watchdog.conf b/meta-ibm/recipes-phosphor/fans/fan-watchdog/witherspoon-tacoma/obmc/fan-watchdog/reset-fan-watchdog.conf
index 98cb60288d..f77fe0194b 100644
--- a/meta-ibm/recipes-phosphor/fans/fan-watchdog/witherspoon-tacoma/obmc/fan-watchdog/reset-fan-watchdog.conf
+++ b/meta-ibm/recipes-phosphor/fans/fan-watchdog/witherspoon-tacoma/obmc/fan-watchdog/reset-fan-watchdog.conf
@@ -1,4 +1,3 @@
GPIO_PATH=/dev/gpiochip0
GPIO=114
DELAY=1
-ACTION=low_high
diff --git a/meta-ibm/recipes-phosphor/fans/fan-watchdog/witherspoon/obmc/fan-watchdog/reset-fan-watchdog.conf b/meta-ibm/recipes-phosphor/fans/fan-watchdog/witherspoon/obmc/fan-watchdog/reset-fan-watchdog.conf
index b4e5ce74eb..04855114ec 100644
--- a/meta-ibm/recipes-phosphor/fans/fan-watchdog/witherspoon/obmc/fan-watchdog/reset-fan-watchdog.conf
+++ b/meta-ibm/recipes-phosphor/fans/fan-watchdog/witherspoon/obmc/fan-watchdog/reset-fan-watchdog.conf
@@ -1,4 +1,3 @@
GPIO_PATH=/dev/gpiochip0
GPIO=109
DELAY=1
-ACTION=low_high