summaryrefslogtreecommitdiff
path: root/meta-ibm
diff options
context:
space:
mode:
authorMatt Spinler <spinler@us.ibm.com>2019-07-29 16:56:51 +0300
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2019-08-06 23:49:25 +0300
commit863e5de9bbbd0ba409dea3b582faf48f9d3ae53a (patch)
tree5285f333caf687266bf8061154594af902003597 /meta-ibm
parentb001719527b5ef1caf36896c64580c5f33574054 (diff)
downloadopenbmc-863e5de9bbbd0ba409dea3b582faf48f9d3ae53a.tar.xz
Swift: Put in avsbus-enable
As on Witherspoon, some VRMs on Swift need their AVS buses enabled as part of the power on sequence. The AVS bus connects those VRMs to the processors so the processors can set voltages. On Witherspoon, the sequence was 1. Disable the AVS bus 2. Manually set VRM voltages 3. Enable AVS bus Currently on Swift there is no need to manually set voltages, so the AVS bus disable service and script isn't required. Tested: Tested on swift, and ensured both witherspoon and witherspoon-128 still have all avs scripts and services installed. (From meta-ibm rev: f1ceece0b75a4522ef3089319b12d22fd83ed9ef) Signed-off-by: Matt Spinler <spinler@us.ibm.com> Change-Id: Ifd7ebdd5ec3dcdfef97c04e666d83fcb4991b452 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'meta-ibm')
-rw-r--r--meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control.bb13
-rw-r--r--meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control/swift/avsbus-disable.sh18
-rw-r--r--meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control/swift/avsbus-enable.sh7
-rw-r--r--meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control/swift/avsbus-enable@.service (renamed from meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control/swift/avsbus-disable@.service)9
-rw-r--r--meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control/witherspoon/avsbus-enable@.service (renamed from meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control/avsbus-enable@.service)0
-rw-r--r--meta-ibm/meta-witherspoon/recipes-phosphor/host/p9-host-start.bbappend2
6 files changed, 15 insertions, 34 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 d2804dfcad..74e0968d38 100644
--- a/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control.bb
+++ b/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control.bb
@@ -10,15 +10,18 @@ RDEPENDS_${PN} += "i2c-tools"
S = "${WORKDIR}"
-SRC_URI += "file://avsbus-disable.sh \
- file://avsbus-enable.sh"
+SRC_URI += "file://avsbus-enable.sh"
+SRC_URI_append_witherspoon = " file://avsbus-disable.sh"
do_install() {
install -d ${D}${bindir}
- install -m 0755 ${S}/avsbus-disable.sh ${D}${bindir}/avsbus-disable.sh
install -m 0755 ${S}/avsbus-enable.sh ${D}${bindir}/avsbus-enable.sh
}
+do_install_append_witherspoon() {
+ install -m 0755 ${S}/avsbus-disable.sh ${D}${bindir}/avsbus-disable.sh
+}
+
TMPL_EN= "avsbus-enable@.service"
TMPL_DIS= "avsbus-disable@.service"
INSTFMT_EN= "avsbus-enable@{0}.service"
@@ -29,5 +32,5 @@ FMT_DIS = "../${TMPL_DIS}:${TGTFMT}.requires/${INSTFMT_DIS}"
SYSTEMD_SERVICE_${PN} += "${TMPL_EN}"
SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_EN', 'OBMC_CHASSIS_INSTANCES')}"
-SYSTEMD_SERVICE_${PN} += "${TMPL_DIS}"
-SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_DIS', 'OBMC_CHASSIS_INSTANCES')}"
+SYSTEMD_SERVICE_${PN}_append_witherspoon = " ${TMPL_DIS}"
+SYSTEMD_LINK_${PN}_append_witherspoon = " ${@compose_list(d, 'FMT_DIS', 'OBMC_CHASSIS_INSTANCES')}"
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
deleted file mode 100644
index 61d8516bcc..0000000000
--- a/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control/swift/avsbus-disable.sh
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/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
index d3840910ae..7ff607a4ba 100644
--- 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
@@ -6,20 +6,15 @@
# 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/avsbus-disable@.service b/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control/swift/avsbus-enable@.service
index fbab180ce6..45776aa712 100644
--- a/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control/swift/avsbus-disable@.service
+++ b/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control/swift/avsbus-enable@.service
@@ -1,12 +1,13 @@
[Unit]
-Description=Disable the AVS bus on the VRMs
-Before=vrm-control@%i.service
+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=/usr/bin/env avsbus-disable.sh
-SyslogIdentifier=avsbus-disable.sh
+ExecStart={bindir}/avsbus-enable.sh
+SyslogIdentifier=avsbus-enable.sh
Type=oneshot
RemainAfterExit=yes
diff --git a/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control/avsbus-enable@.service b/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control/witherspoon/avsbus-enable@.service
index b7fb41e245..b7fb41e245 100644
--- a/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control/avsbus-enable@.service
+++ b/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control/witherspoon/avsbus-enable@.service
diff --git a/meta-ibm/meta-witherspoon/recipes-phosphor/host/p9-host-start.bbappend b/meta-ibm/meta-witherspoon/recipes-phosphor/host/p9-host-start.bbappend
index 3ae8bcb965..4b978c9508 100644
--- a/meta-ibm/meta-witherspoon/recipes-phosphor/host/p9-host-start.bbappend
+++ b/meta-ibm/meta-witherspoon/recipes-phosphor/host/p9-host-start.bbappend
@@ -1,4 +1,4 @@
-RDEPENDS_${PN}_append_witherspoon = " avsbus-control"
+RDEPENDS_${PN}_append_ibm-ac-server = " avsbus-control"
RDEPENDS_${PN}_append_witherspoon = " vrm-control"
RDEPENDS_${PN}_append_ibm-ac-server = " power-workarounds"
RDEPENDS_${PN}_remove_ibm-ac-server = "p9-vcs-workaround"