avsbus-control: Add system-specific scripts
The avsbus-control scripts differ between different machine
configurations. Rename the existing ones to witherspoon-* and
add the swift-* ones. Install the appropriate script depending
on the machine being built.
Tested: Built swift and witherspoon and verified that the scripts
rootfs/usr/bin/ were the ones for the machine being built.
(From meta-ibm rev: d95d6afadd61c6ab8276736d719682775d7880d0)
Change-Id: Ib2ee438a0375de0d69dec7ae005118c8fdb46845
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
diff --git a/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control/swift-avsbus-disable.sh b/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control/swift-avsbus-disable.sh
new file mode 100644
index 0000000..1228ff9
--- /dev/null
+++ b/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control/swift-avsbus-disable.sh
@@ -0,0 +1,18 @@
+#!/bin/sh
+# For each AVSBus attached rail go back to using VOUT_COMMAND (PMBus voltage)
+# instead of AVSBus and do *not* update VOUT_COMMAND with last voltage sent via
+# AVSBus. This should be run after power-down. 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 0x80 b # VDD 0
+i2cset -y 9 0x71 0x00 0x01 b # VCS 0 - PAGE set
+i2cset -y 9 0x71 0x01 0x80 b # VCS 0
+i2cset -y 9 0x71 0x00 0x00 b # VDN 0 - PAGE set
+i2cset -y 9 0x71 0x01 0x80 b # VDN 0
+i2cset -y 10 0x70 0x00 0x00 b # VDD 1 - PAGE set
+i2cset -y 10 0x70 0x01 0x80 b # VDD 1
+i2cset -y 10 0x71 0x00 0x01 b # VCS 1 - PAGE set
+i2cset -y 10 0x71 0x01 0x80 b # VCS 1
+i2cset -y 10 0x71 0x00 0x00 b # VDN 1 - PAGE set
+i2cset -y 10 0x71 0x01 0x80 b # VDN 1