summaryrefslogtreecommitdiff
path: root/meta-ibm/recipes-phosphor/chassis/avsbus-control
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2020-04-22 21:06:02 +0300
committerAndrew Geissler <geissonator@yahoo.com>2020-04-27 19:52:12 +0300
commite161514219e0dc8a957dabbb8529fb9fcac4e115 (patch)
tree5de46006517d690f5793eec41281d60611228ecd /meta-ibm/recipes-phosphor/chassis/avsbus-control
parenta3f54c8b8cbd50bc86efdc52cfb7d348d8c19d21 (diff)
downloadopenbmc-e161514219e0dc8a957dabbb8529fb9fcac4e115.tar.xz
meta-ibm: move all meta-witherspoon metadata
The metadata common to all IBM systems is confusingly split between meta-ibm and meta-witherspoon. Move everything to meta-ibm. The meta-ibm README is re-written to more accurately reflect the scope of the layer. Allow the configuration samples (bblayers.conf.sample, local.conf.sample) to be sourced from either meta-ibm or meta-witherspoon until such a time that any workflows and tooling have had the opportunity to move to meta-ibm. (From meta-ibm rev: 6e05ef2e90b214eaf4e43ee7027bbbb1d8d09442) Change-Id: I3ec890d5300f9649c974ea6b9dca93a2e8a889ab Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Signed-off-by: Andrew Geissler <geissonator@yahoo.com>
Diffstat (limited to 'meta-ibm/recipes-phosphor/chassis/avsbus-control')
-rwxr-xr-xmeta-ibm/recipes-phosphor/chassis/avsbus-control/mihawk/avsbus-disable.sh16
-rw-r--r--meta-ibm/recipes-phosphor/chassis/avsbus-control/mihawk/avsbus-disable@.service16
-rwxr-xr-xmeta-ibm/recipes-phosphor/chassis/avsbus-control/mihawk/avsbus-enable.sh16
-rw-r--r--meta-ibm/recipes-phosphor/chassis/avsbus-control/mihawk/avsbus-enable@.service15
-rw-r--r--meta-ibm/recipes-phosphor/chassis/avsbus-control/swift/avsbus-enable.sh20
-rw-r--r--meta-ibm/recipes-phosphor/chassis/avsbus-control/swift/avsbus-enable@.service15
-rw-r--r--meta-ibm/recipes-phosphor/chassis/avsbus-control/witherspoon/avsbus-disable.sh16
-rw-r--r--meta-ibm/recipes-phosphor/chassis/avsbus-control/witherspoon/avsbus-disable@.service16
-rw-r--r--meta-ibm/recipes-phosphor/chassis/avsbus-control/witherspoon/avsbus-enable.sh22
-rw-r--r--meta-ibm/recipes-phosphor/chassis/avsbus-control/witherspoon/avsbus-enable@.service15
10 files changed, 167 insertions, 0 deletions
diff --git a/meta-ibm/recipes-phosphor/chassis/avsbus-control/mihawk/avsbus-disable.sh b/meta-ibm/recipes-phosphor/chassis/avsbus-control/mihawk/avsbus-disable.sh
new file mode 100755
index 000000000..96f6cf884
--- /dev/null
+++ b/meta-ibm/recipes-phosphor/chassis/avsbus-control/mihawk/avsbus-disable.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+i2cset -y 4 0x70 0x00 0x00 b # VDD 0 - PAGE set
+i2cset -y 4 0x70 0x01 0x80 b # VDD 0
+i2cset -y 4 0x70 0x00 0x01 b # VCS 0 - PAGE set
+i2cset -y 4 0x70 0x01 0x80 b # VCS 0
+i2cset -y 4 0x70 0x00 0x00 b # VCS 0 - PAGE reset
+i2cset -y 4 0x72 0x00 0x00 b # VDN 0 - PAGE set
+i2cset -y 4 0x72 0x01 0x80 b # VDN 0
+i2cset -y 5 0x70 0x00 0x00 b # VDD 1 - PAGE set
+i2cset -y 5 0x70 0x01 0x80 b # VDD 1
+i2cset -y 5 0x70 0x00 0x01 b # VCS 1 - PAGE set
+i2cset -y 5 0x70 0x01 0x80 b # VCS 1
+i2cset -y 5 0x70 0x00 0x00 b # VCS 1 - PAGE reset
+i2cset -y 5 0x72 0x00 0x00 b # VDN 1 - PAGE set
+i2cset -y 5 0x72 0x01 0x80 b # VDN 1
diff --git a/meta-ibm/recipes-phosphor/chassis/avsbus-control/mihawk/avsbus-disable@.service b/meta-ibm/recipes-phosphor/chassis/avsbus-control/mihawk/avsbus-disable@.service
new file mode 100644
index 000000000..5396948bc
--- /dev/null
+++ b/meta-ibm/recipes-phosphor/chassis/avsbus-control/mihawk/avsbus-disable@.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=Disable the AVS bus on the VRMs
+Wants=ir35221-on-unbind@%i.service
+After=ir35221-on-unbind@%i.service
+Before=avsbus-enable@%i.service
+Conflicts=obmc-chassis-poweroff@%i.target
+ConditionPathExists=!/run/openbmc/chassis@%i-on
+
+[Service]
+ExecStart=/usr/bin/env avsbus-disable.sh
+SyslogIdentifier=avsbus-disable.sh
+Type=oneshot
+RemainAfterExit=yes
+
+[Install]
+WantedBy=obmc-chassis-poweron@%i.target
diff --git a/meta-ibm/recipes-phosphor/chassis/avsbus-control/mihawk/avsbus-enable.sh b/meta-ibm/recipes-phosphor/chassis/avsbus-control/mihawk/avsbus-enable.sh
new file mode 100755
index 000000000..67acc730b
--- /dev/null
+++ b/meta-ibm/recipes-phosphor/chassis/avsbus-control/mihawk/avsbus-enable.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+i2cset -y 4 0x70 0x00 0x00 b # VDD 0 - PAGE set
+i2cset -y 4 0x70 0x01 0xB0 b # VDD 0
+i2cset -y 4 0x70 0x00 0x01 b # VCS 0 - PAGE set
+i2cset -y 4 0x70 0x01 0xB0 b # VCS 0
+i2cset -y 4 0x70 0x00 0x00 b # VCS 0 - PAGE reset
+i2cset -y 4 0x72 0x00 0x00 b # VDN 0 - PAGE set
+i2cset -y 4 0x72 0x01 0xB0 b # VDN 0
+i2cset -y 5 0x70 0x00 0x00 b # VDD 1 - PAGE set
+i2cset -y 5 0x70 0x01 0xB0 b # VDD 1
+i2cset -y 5 0x70 0x00 0x01 b # VCS 1 - PAGE set
+i2cset -y 5 0x70 0x01 0xB0 b # VCS 1
+i2cset -y 5 0x70 0x00 0x00 b # VCS 1 - PAGE reset
+i2cset -y 5 0x72 0x00 0x00 b # VDN 1 - PAGE set
+i2cset -y 5 0x72 0x01 0xB0 b # VDN 1
diff --git a/meta-ibm/recipes-phosphor/chassis/avsbus-control/mihawk/avsbus-enable@.service b/meta-ibm/recipes-phosphor/chassis/avsbus-control/mihawk/avsbus-enable@.service
new file mode 100644
index 000000000..34d9e4b0f
--- /dev/null
+++ b/meta-ibm/recipes-phosphor/chassis/avsbus-control/mihawk/avsbus-enable@.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Enable the AVS bus on VRMs
+Wants=op-power-start@%i.service
+After=op-power-start@%i.service
+Conflicts=obmc-chassis-poweroff@%i.target
+ConditionPathExists=!/run/openbmc/chassis@%i-on
+
+[Service]
+ExecStart=/usr/bin/env avsbus-enable.sh
+SyslogIdentifier=avsbus-enable.sh
+Type=oneshot
+RemainAfterExit=yes
+
+[Install]
+WantedBy=obmc-chassis-poweron@%i.target
diff --git a/meta-ibm/recipes-phosphor/chassis/avsbus-control/swift/avsbus-enable.sh b/meta-ibm/recipes-phosphor/chassis/avsbus-control/swift/avsbus-enable.sh
new file mode 100644
index 000000000..7ff607a4b
--- /dev/null
+++ b/meta-ibm/recipes-phosphor/chassis/avsbus-control/swift/avsbus-enable.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+# For each AVSBus attached power rail set the default boot voltage and then
+# program the OPERATION register to switch to AVSBus mode and update default
+# start voltage to what was last programmed in VOUT_COMMAND. This should be run
+# before power-on. This is platform specific settings that must be
+# updated/removed if not Swift.
+
+i2cset -y 9 0x70 0x00 0x00 b # VDD 0 - PAGE set
+i2cset -y 9 0x70 0x01 0xB0 b # VDD 0
+i2cset -y 9 0x71 0x00 0x01 b # VCS 0 - PAGE set
+i2cset -y 9 0x71 0x01 0xB0 b # VCS 0
+i2cset -y 9 0x71 0x00 0x00 b # VDN 0 - PAGE set
+i2cset -y 9 0x71 0x01 0xB0 b # VDN 0
+
+i2cset -y 10 0x70 0x00 0x00 b # VDD 1 - PAGE set
+i2cset -y 10 0x70 0x01 0xB0 b # VDD 1
+i2cset -y 10 0x71 0x00 0x01 b # VCS 1 - PAGE set
+i2cset -y 10 0x71 0x01 0xB0 b # VCS 1
+i2cset -y 10 0x71 0x00 0x00 b # VDN 1 - PAGE set
+i2cset -y 10 0x71 0x01 0xB0 b # VDN 1
diff --git a/meta-ibm/recipes-phosphor/chassis/avsbus-control/swift/avsbus-enable@.service b/meta-ibm/recipes-phosphor/chassis/avsbus-control/swift/avsbus-enable@.service
new file mode 100644
index 000000000..45776aa71
--- /dev/null
+++ b/meta-ibm/recipes-phosphor/chassis/avsbus-control/swift/avsbus-enable@.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Enable the AVS bus on VRMs
+Wants=op-power-start@%i.service
+Before=op-power-start@%i.service
+Conflicts=obmc-chassis-poweroff@%i.target
+ConditionPathExists=!/run/openbmc/chassis@%i-on
+
+[Service]
+ExecStart={bindir}/avsbus-enable.sh
+SyslogIdentifier=avsbus-enable.sh
+Type=oneshot
+RemainAfterExit=yes
+
+[Install]
+WantedBy=obmc-chassis-poweron@%i.target
diff --git a/meta-ibm/recipes-phosphor/chassis/avsbus-control/witherspoon/avsbus-disable.sh b/meta-ibm/recipes-phosphor/chassis/avsbus-control/witherspoon/avsbus-disable.sh
new file mode 100644
index 000000000..a158f159e
--- /dev/null
+++ b/meta-ibm/recipes-phosphor/chassis/avsbus-control/witherspoon/avsbus-disable.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+i2cset -y 4 0x70 0x00 0x00 b # VDD 0 - PAGE set
+i2cset -y 4 0x70 0x01 0x80 b # VDD 0
+i2cset -y 4 0x70 0x00 0x01 b # VCS 0 - PAGE set
+i2cset -y 4 0x70 0x01 0x80 b # VCS 0
+i2cset -y 4 0x70 0x00 0x00 b # VCS 0 - PAGE reset
+i2cset -y 4 0x71 0x00 0x00 b # VDN 0 - PAGE set
+i2cset -y 4 0x71 0x01 0x80 b # VDN 0
+i2cset -y 5 0x70 0x00 0x00 b # VDD 1 - PAGE set
+i2cset -y 5 0x70 0x01 0x80 b # VDD 1
+i2cset -y 5 0x70 0x00 0x01 b # VCS 1 - PAGE set
+i2cset -y 5 0x70 0x01 0x80 b # VCS 1
+i2cset -y 5 0x70 0x00 0x00 b # VCS 1 - PAGE reset
+i2cset -y 5 0x71 0x00 0x00 b # VDN 1 - PAGE set
+i2cset -y 5 0x71 0x01 0x80 b # VDN 1
diff --git a/meta-ibm/recipes-phosphor/chassis/avsbus-control/witherspoon/avsbus-disable@.service b/meta-ibm/recipes-phosphor/chassis/avsbus-control/witherspoon/avsbus-disable@.service
new file mode 100644
index 000000000..859f42883
--- /dev/null
+++ b/meta-ibm/recipes-phosphor/chassis/avsbus-control/witherspoon/avsbus-disable@.service
@@ -0,0 +1,16 @@
+[Unit]
+Description=Disable the AVS bus on the VRMs
+Wants=power-workarounds@%i.service
+After=power-workarounds@%i.service
+Before=vrm-control@%i.service
+Conflicts=obmc-chassis-poweroff@%i.target
+ConditionPathExists=!/run/openbmc/chassis@%i-on
+
+[Service]
+ExecStart=/usr/bin/env avsbus-disable.sh
+SyslogIdentifier=avsbus-disable.sh
+Type=oneshot
+RemainAfterExit=yes
+
+[Install]
+WantedBy=obmc-chassis-poweron@%i.target
diff --git a/meta-ibm/recipes-phosphor/chassis/avsbus-control/witherspoon/avsbus-enable.sh b/meta-ibm/recipes-phosphor/chassis/avsbus-control/witherspoon/avsbus-enable.sh
new file mode 100644
index 000000000..6306c58b0
--- /dev/null
+++ b/meta-ibm/recipes-phosphor/chassis/avsbus-control/witherspoon/avsbus-enable.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+i2cset -y 4 0x70 0x00 0x00 b # VDD 0 - PAGE set
+i2cset -y 4 0x70 0x21 0x00 0x01 i # VDD 0 - Set default HW boot voltage
+i2cset -y 4 0x70 0x01 0xB0 b # VDD 0
+i2cset -y 4 0x70 0x00 0x01 b # VCS 0 - PAGE set
+i2cset -y 4 0x70 0x21 0x08 0x01 i # VCS 0 - Set default HW boot voltage
+i2cset -y 4 0x70 0x01 0xB0 b # VCS 0
+i2cset -y 4 0x70 0x00 0x00 b # VCS 0 - PAGE reset
+i2cset -y 4 0x71 0x00 0x00 b # VDN 0 - PAGE set
+i2cset -y 4 0x71 0x21 0x00 0x01 i # VDN 0 - Set default HW boot voltage
+i2cset -y 4 0x71 0x01 0xB0 b # VDN 0
+i2cset -y 5 0x70 0x00 0x00 b # VDD 1 - PAGE set
+i2cset -y 5 0x70 0x21 0x00 0x01 i # VDD 1 - Set default HW boot voltage
+i2cset -y 5 0x70 0x01 0xB0 b # VDD 1
+i2cset -y 5 0x70 0x00 0x01 b # VCS 1 - PAGE set
+i2cset -y 5 0x70 0x21 0x08 0x01 i # VCS 1 - Set default HW boot voltage
+i2cset -y 5 0x70 0x01 0xB0 b # VCS 1
+i2cset -y 5 0x70 0x00 0x00 b # VCS 1 - PAGE reset
+i2cset -y 5 0x71 0x00 0x00 b # VDN 1 - PAGE set
+i2cset -y 5 0x71 0x21 0x00 0x01 i # VDN 1 - Set default HW boot voltage
+i2cset -y 5 0x71 0x01 0xB0 b # VDN 1
diff --git a/meta-ibm/recipes-phosphor/chassis/avsbus-control/witherspoon/avsbus-enable@.service b/meta-ibm/recipes-phosphor/chassis/avsbus-control/witherspoon/avsbus-enable@.service
new file mode 100644
index 000000000..b7fb41e24
--- /dev/null
+++ b/meta-ibm/recipes-phosphor/chassis/avsbus-control/witherspoon/avsbus-enable@.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Enable the AVS bus on VRMs
+Wants=vrm-control@%i.service
+After=vrm-control@%i.service
+Conflicts=obmc-chassis-poweroff@%i.target
+ConditionPathExists=!/run/openbmc/chassis@%i-on
+
+[Service]
+ExecStart=/usr/bin/env avsbus-enable.sh
+SyslogIdentifier=avsbus-enable.sh
+Type=oneshot
+RemainAfterExit=yes
+
+[Install]
+WantedBy=obmc-chassis-poweron@%i.target