diff options
author | Adriana Kobylak <anoo@us.ibm.com> | 2019-03-19 18:40:36 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2019-04-26 16:38:58 +0300 |
commit | 50f884606b78c55005bb62f3a3421f019e48eebb (patch) | |
tree | 63ae0b71512b6309dc37706266d83c59c7a4ccd1 /meta-ibm | |
parent | dbf2ae5fced5ae8155f70f353844ff1d8080cf56 (diff) | |
download | openbmc-50f884606b78c55005bb62f3a3421f019e48eebb.tar.xz |
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>
Diffstat (limited to 'meta-ibm')
7 files changed, 96 insertions, 6 deletions
diff --git a/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control.bb b/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control.bb index 5abe1be1f..414d0b83e 100644 --- a/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control.bb +++ b/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control.bb @@ -8,18 +8,42 @@ inherit obmc-phosphor-systemd RDEPENDS_${PN} += "i2c-tools" S = "${WORKDIR}" -SRC_URI += "file://power-workarounds.sh \ - file://avsbus-enable.sh \ - file://avsbus-disable.sh" +SRC_URI_append_swift = " file://swift-avsbus-disable.sh" +SRC_URI_append_swift = " file://swift-avsbus-enable.sh" +SRC_URI_append_swift = " file://swift-power-workarounds.sh" +SRC_URI_append_witherspoon = " file://witherspoon-avsbus-disable.sh" +SRC_URI_append_witherspoon = " file://witherspoon-avsbus-enable.sh" +SRC_URI_append_witherspoon = " file://witherspoon-power-workarounds.sh" +SRC_URI_append_witherspoon-128 = " file://witherspoon-avsbus-disable.sh" +SRC_URI_append_witherspoon-128 = " file://witherspoon-avsbus-enable.sh" +SRC_URI_append_witherspoon-128 = " file://witherspoon-power-workarounds.sh" do_install() { install -d ${D}${bindir} - install -m 0755 ${WORKDIR}/power-workarounds.sh \ +} +do_install_append_swift() { + install -m 0755 ${WORKDIR}/swift-avsbus-disable.sh \ + ${D}${bindir}/avsbus-disable.sh + install -m 0755 ${WORKDIR}/swift-avsbus-enable.sh \ + ${D}${bindir}/avsbus-enable.sh + install -m 0755 ${WORKDIR}/swift-power-workarounds.sh \ ${D}${bindir}/power-workarounds.sh - install -m 0755 ${WORKDIR}/avsbus-disable.sh \ +} +do_install_append_witherspoon() { + install -m 0755 ${WORKDIR}/witherspoon-avsbus-disable.sh \ ${D}${bindir}/avsbus-disable.sh - install -m 0755 ${WORKDIR}/avsbus-enable.sh \ + install -m 0755 ${WORKDIR}/witherspoon-avsbus-enable.sh \ ${D}${bindir}/avsbus-enable.sh + install -m 0755 ${WORKDIR}/witherspoon-power-workarounds.sh \ + ${D}${bindir}/power-workarounds.sh +} +do_install_append_witherspoon-128() { + install -m 0755 ${WORKDIR}/witherspoon-avsbus-disable.sh \ + ${D}${bindir}/avsbus-disable.sh + install -m 0755 ${WORKDIR}/witherspoon-avsbus-enable.sh \ + ${D}${bindir}/avsbus-enable.sh + install -m 0755 ${WORKDIR}/witherspoon-power-workarounds.sh \ + ${D}${bindir}/power-workarounds.sh } TMPL_EN= "avsbus-enable@.service" 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 000000000..1228ff945 --- /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
diff --git a/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control/swift-avsbus-enable.sh b/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control/swift-avsbus-enable.sh new file mode 100644 index 000000000..d3840910a --- /dev/null +++ b/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control/swift-avsbus-enable.sh @@ -0,0 +1,25 @@ +#!/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 0x21 0xE6 0x00 i # VDD 0 - Set default HW boot voltage to 0.9V +i2cset -y 9 0x70 0x01 0xB0 b # VDD 0 +i2cset -y 9 0x71 0x00 0x01 b # VCS 0 - PAGE set +i2cset -y 9 0x71 0x21 0x00 0x01 i # VCS 0 - Set default HW boot voltage to 1.0V +i2cset -y 9 0x71 0x01 0xB0 b # VCS 0 +i2cset -y 9 0x71 0x00 0x00 b # VDN 0 - PAGE set +i2cset -y 9 0x71 0x21 0xCD 0x00 i # VDN 0 - Set default HW boot voltage to 0.8V +i2cset -y 9 0x71 0x01 0xB0 b # VDN 0 +i2cset -y 10 0x70 0x00 0x00 b # VDD 1 - PAGE set +i2cset -y 10 0x70 0x21 0xE6 0x00 i # VDD 1 - Set default HW boot voltage to 0.9V +i2cset -y 10 0x70 0x01 0xB0 b # VDD 1 +i2cset -y 10 0x71 0x00 0x01 b # VCS 1 - PAGE set +i2cset -y 10 0x71 0x21 0x00 0x01 i # VCS 1 - Set default HW boot voltage to 1.0V +i2cset -y 10 0x71 0x01 0xB0 b # VCS 1 +i2cset -y 10 0x71 0x00 0x00 b # VDN 1 - PAGE set +i2cset -y 10 0x71 0x21 0xCD 0x00 i # VDN 1 - Set default HW boot voltage to 0.8V +i2cset -y 10 0x71 0x01 0xB0 b # VDN 1 diff --git a/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control/swift-power-workarounds.sh b/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control/swift-power-workarounds.sh new file mode 100644 index 000000000..dc1f4803b --- /dev/null +++ b/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control/swift-power-workarounds.sh @@ -0,0 +1,23 @@ +#!/bin/sh +# This should be run before power-on and used to patch/update power specific +# hardware settings. This is platform specific settings that must be +# updated/removed if not Swift. + +########## Program TPS53915 FSW to desired frequency ######### +# FREQUENCY_CONFIG D3h, bits 2:0 + +# AVDD, bus 3 addr 1D, set to 600khz +# 600khz = 1,0,0 +i2cset -y 3 0x1D 0xD3 0x04 b + +# 3.3VA, bus 3 addr 1C, set to 600khz +i2cset -y 3 0x1C 0xD3 0x04 b + +# 3.3VB, bus 3 addr 1B, set to 600khz +i2cset -y 3 0x1B 0xD3 0x04 b + +# 5.0V, bus 3 addr 1A, set to 850khz +# 850khz = 1,1,0 +i2cset -y 3 0x1A 0xD3 0x06 b +########## END Program TPS53915 FSW to desired frequency ######### + diff --git a/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control/avsbus-disable.sh b/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control/witherspoon-avsbus-disable.sh index a158f159e..a158f159e 100644 --- a/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control/avsbus-disable.sh +++ b/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control/witherspoon-avsbus-disable.sh diff --git a/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control/avsbus-enable.sh b/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control/witherspoon-avsbus-enable.sh index 6306c58b0..6306c58b0 100644 --- a/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control/avsbus-enable.sh +++ b/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control/witherspoon-avsbus-enable.sh diff --git a/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control/power-workarounds.sh b/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control/witherspoon-power-workarounds.sh index d40579731..d40579731 100644 --- a/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control/power-workarounds.sh +++ b/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control/witherspoon-power-workarounds.sh |