From de4c6b0a7a508e76f8bef44464820e32a4913f3d Mon Sep 17 00:00:00 2001 From: Matt Spinler Date: Wed, 12 Jun 2019 10:03:29 -0500 Subject: Swift: Remove pre-poweron VRM manipulation Swift doesn't need to run the vrm-control.sh script to set VRM voltages, which also means it doesn't need to disable/enable their AVS buses around it, nor bind/unbind the VRM device drivers. Remove all of these services, and also create a new recipe for power-workarounds.sh that was in the avsbus-control recipe so that it can remain. (From meta-ibm rev: 65ced2221d38ce08dd7dcc46ec254b1bdd4a714f) Signed-off-by: Matt Spinler Change-Id: Ib64cc45499292ae84689fb11400ff9ff0f5f5942 Signed-off-by: Brad Bishop --- .../recipes-phosphor/chassis/avsbus-control.bb | 9 +- .../avsbus-control/swift/power-workarounds.sh | 23 ---- .../swift/power-workarounds@.service | 16 --- .../witherspoon/power-workarounds.sh | 134 --------------------- .../witherspoon/power-workarounds@.service | 16 --- .../recipes-phosphor/chassis/power-workarounds.bb | 25 ++++ .../power-workarounds/swift/power-workarounds.sh | 23 ++++ .../swift/power-workarounds@.service | 16 +++ .../witherspoon/power-workarounds.sh | 134 +++++++++++++++++++++ .../witherspoon/power-workarounds@.service | 16 +++ .../recipes-phosphor/host/p9-host-start.bbappend | 5 +- 11 files changed, 218 insertions(+), 199 deletions(-) delete mode 100644 meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control/swift/power-workarounds.sh delete mode 100644 meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control/swift/power-workarounds@.service delete mode 100644 meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control/witherspoon/power-workarounds.sh delete mode 100644 meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control/witherspoon/power-workarounds@.service create mode 100644 meta-ibm/meta-witherspoon/recipes-phosphor/chassis/power-workarounds.bb create mode 100644 meta-ibm/meta-witherspoon/recipes-phosphor/chassis/power-workarounds/swift/power-workarounds.sh create mode 100644 meta-ibm/meta-witherspoon/recipes-phosphor/chassis/power-workarounds/swift/power-workarounds@.service create mode 100644 meta-ibm/meta-witherspoon/recipes-phosphor/chassis/power-workarounds/witherspoon/power-workarounds.sh create mode 100644 meta-ibm/meta-witherspoon/recipes-phosphor/chassis/power-workarounds/witherspoon/power-workarounds@.service (limited to 'meta-ibm') 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 498b622d9..3c618a6b5 100644 --- a/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control.bb +++ b/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control.bb @@ -10,30 +10,23 @@ RDEPENDS_${PN} += "i2c-tools" S = "${WORKDIR}" SRC_URI += "file://avsbus-disable.sh \ - file://avsbus-enable.sh \ - file://power-workarounds.sh" + file://avsbus-enable.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 - install -m 0755 ${S}/power-workarounds.sh ${D}${bindir}/power-workarounds.sh } TMPL_EN= "avsbus-enable@.service" TMPL_DIS= "avsbus-disable@.service" -TMPL_WA= "power-workarounds@.service" INSTFMT_EN= "avsbus-enable@{0}.service" INSTFMT_DIS= "avsbus-disable@{0}.service" -INSTFMT_WA= "power-workarounds@{0}.service" TGTFMT = "obmc-chassis-poweron@{0}.target" FMT_EN = "../${TMPL_EN}:${TGTFMT}.requires/${INSTFMT_EN}" FMT_DIS = "../${TMPL_DIS}:${TGTFMT}.requires/${INSTFMT_DIS}" -FMT_WA = "../${TMPL_WA}:${TGTFMT}.requires/${INSTFMT_WA}" 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} += "${TMPL_WA}" -SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_WA', 'OBMC_CHASSIS_INSTANCES')}" 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 deleted file mode 100644 index dc1f4803b..000000000 --- a/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control/swift/power-workarounds.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/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/swift/power-workarounds@.service b/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control/swift/power-workarounds@.service deleted file mode 100644 index 0926e033b..000000000 --- a/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control/swift/power-workarounds@.service +++ /dev/null @@ -1,16 +0,0 @@ -[Unit] -Description=Perform power workarounds on VRMs after PGOOD is up -Wants=obmc-power-on@%i.target -After=obmc-power-on@%i.target -Before=obmc-host-start-pre@%i.target -Conflicts=obmc-chassis-poweroff@%i.target -ConditionPathExists=!/run/openbmc/chassis@%i-on - -[Service] -ExecStart=/usr/bin/power-workarounds.sh -SyslogIdentifier=power-workarounds.sh -Type=oneshot -RemainAfterExit=yes - -[Install] -WantedBy=obmc-chassis-poweron@%i.target diff --git a/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control/witherspoon/power-workarounds.sh b/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control/witherspoon/power-workarounds.sh deleted file mode 100644 index d40579731..000000000 --- a/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control/witherspoon/power-workarounds.sh +++ /dev/null @@ -1,134 +0,0 @@ -#!/bin/sh - -# ensure VCS ON_OFF_CONFIG set correctly from prior FW drivers -# A side -i2cset -y 4 0x70 0x00 0x01 b -i2cset -y 4 0x70 0x02 0x16 b #respond to ENABLE pin -i2cset -y 4 0x70 0x00 0x00 b -# B side -i2cset -y 5 0x70 0x00 0x01 b -i2cset -y 5 0x70 0x02 0x16 b #respond to ENABLE pin -i2cset -y 5 0x70 0x00 0x00 b - -# vddio = 1.0V, mdat/sdat PU enabled -i2cset -y 4 0x12 0xFF 0x00 b # VDD/VCS 0 -i2cset -y 4 0x12 0x2E 0x03 b # VDD/VCS 0 -i2cset -y 4 0x13 0xFF 0x00 b # VDN 0 -i2cset -y 4 0x13 0x2E 0x03 b # VDN 0 -i2cset -y 5 0x12 0xFF 0x00 b # VDD/VCS 1 -i2cset -y 5 0x12 0x2E 0x03 b # VDD/VCS 1 -i2cset -y 5 0x13 0xFF 0x00 b # VDN 1 -i2cset -y 5 0x13 0x2E 0x03 b # VDN 1 - -# A side VDDR - set to 1.23V -i2cset -y 4 0x71 0x00 0x01 -i2cset -y 4 0x71 0x21 0x3B 0x01 i -i2cset -y 4 0x71 0x00 0x00 - -# B side VDDR - set to 1.23V -i2cset -y 5 0x71 0x00 0x01 -i2cset -y 5 0x71 0x21 0x3B 0x01 i -i2cset -y 5 0x71 0x00 0x00 - -# VDN A - PGOOD_ON threshold -i2cset -y 4 0x71 0x00 0x00 b # PAGE -i2cset -y 4 0x71 0x5E 0xCD 0x00 i # set to 0.8V - -# VDN B - PGOOD_ON threshold -i2cset -y 5 0x71 0x00 0x00 b # PAGE -i2cset -y 5 0x71 0x5E 0xCD 0x00 i # set to 0.8V - -# unbind ucd driver to permit i2cset -ucd_retries=5 -ucd= - -ucdpath="/sys/bus/i2c/drivers/ucd9000" -if [ -e $ucdpath ] -then - ucd=`ls -1 $ucdpath | grep 64` - if [ -n "$ucd" ] - then - echo $ucd > $ucdpath/unbind - fi -fi - -# make sure VCS ON_OFF_CONFIG set correctly from old FW releases -i2cset -y 11 0x64 0x00 0x0E i -i2cset -y 11 0x64 0x02 0x16 i -i2cset -y 11 0x64 0x00 0x0F i -i2cset -y 11 0x64 0x02 0x16 i - -## move memory enables to align with VDN (VDN to VDDR leakage issue) -#GPO_CONFIG_1 (GPIO15) : mem 0 reg enables -i2cset -y 11 0x64 0xF7 0x00 i -i2cset -y 11 0x64 0xF8 0x15 0x6E 0x80 0x08 0x00 0x00 0x00 0x40 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 i -#GPO_CONFIG_2 (GPIO7) : mem 1 reg enables -i2cset -y 11 0x64 0xF7 0x01 i -i2cset -y 11 0x64 0xF8 0x15 0x16 0x80 0x08 0x00 0x00 0x20 0x40 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 i - -# change VDN delays based on UCD MFR_REVISION setting -REV=`i2cget -y 11 0x64 0x9B i 2|cut -f2 -d' '` -if [ "$REV" == "0x01" -o "$REV" == "0x02" ] ; then - # use 20ms delay for VDN - #TON_DELAY rail 8 - i2cset -y 11 0x64 0x00 0x07 i - i2cset -y 11 0x64 0x60 0x80 0xDA i - #TON_DELAY rail 9 - i2cset -y 11 0x64 0x00 0x08 i - i2cset -y 11 0x64 0x60 0x80 0xDA i -else - # use 70ms delay for VDN - #TON_DELAY rail 8 - i2cset -y 11 0x64 0x00 0x07 i - i2cset -y 11 0x64 0x60 0x30 0xEA i - #TON_DELAY rail 9 - i2cset -y 11 0x64 0x00 0x08 i - i2cset -y 11 0x64 0x60 0x30 0xEA i -fi - -# Raise AVDD +100mV -i2cset -y 11 0x64 0x00 0x09 i # set PAGE -i2cset -y 11 0x64 0xF5 0x81 i # set margin_config -i2cset -y 11 0x64 0x21 0x85 0x33 i # set VOUT_COMMAND - -# Increase over-current settings -#VDD A phase current -i2cset -y 4 0x12 0xFF 0x04 b # set window register high byte to 4 -i2cset -y 4 0x12 0x3C 0x80 b # Set to 64A -#VDD B phase current -i2cset -y 5 0x12 0xFF 0x04 b # set window register high byte to 4 -i2cset -y 5 0x12 0x3C 0x80 b # Set to 64A -#VDD A master OC fault to 445A -i2cset -y 4 0x70 0x00 0x00 b # PAGE -i2cset -y 4 0x70 0x46 0x08DE w -# VDD A master OC warn to 326A -i2cset -y 4 0x70 0x4A 0x08A3 w # A308 -#VDD B master OC fault to 445A -i2cset -y 5 0x70 0x00 0x00 b # PAGE -i2cset -y 5 0x70 0x46 0x08DE w -# VDD B master OC warn to 326A -i2cset -y 5 0x70 0x4A 0x08A3 w -#VCS phase current to 30A C/C -i2cset -y 4 0x12 0xFF 0x08 b # set window register to 8 -i2cset -y 4 0x12 0x3C 0x3C b # 30A -i2cset -y 5 0x12 0xFF 0x08 b # set window register to 8 -i2cset -y 5 0x12 0x3C 0x3C b # 30A -#VCS master OC to 43A -i2cset -y 4 0x70 0x00 0x01 # PAGE 1 -i2cset -y 4 0x70 0x46 0x0816 w # OC to 43A -i2cset -y 5 0x70 0x00 0x01 # PAGE 1 -i2cset -y 5 0x70 0x46 0x0816 w # OC to 43A - -# re-bind ucd driver only if we unbound it (i.e. ucd has been set with a value) -if [ -e $ucdpath -a -n "$ucd" ]; then - j=0 - until [ $j -ge $ucd_retries ] || [ -e $ucdpath/$ucd ]; do - j=$((j+1)) - echo $ucd > $ucdpath/bind || ret=$? - if [ $j -gt 1 ]; then - echo "rebinding UCD driver. Retry number $j" - sleep 1 - fi - done - if [ ! -e $ucdpath/$ucd ]; then exit $ret; fi -fi diff --git a/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control/witherspoon/power-workarounds@.service b/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control/witherspoon/power-workarounds@.service deleted file mode 100644 index 74d8e4bfc..000000000 --- a/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/avsbus-control/witherspoon/power-workarounds@.service +++ /dev/null @@ -1,16 +0,0 @@ -[Unit] -Description=Perform power workarounds on VRMs -Wants=ir35221-on-unbind@%i.service -After=ir35221-on-unbind@%i.service -Before=avsbus-disable@%i.service -Conflicts=obmc-chassis-poweroff@%i.target -ConditionPathExists=!/run/openbmc/chassis@%i-on - -[Service] -ExecStart=/usr/bin/env power-workarounds.sh -SyslogIdentifier=power-workarounds.sh -Type=oneshot -RemainAfterExit=yes - -[Install] -WantedBy=obmc-chassis-poweron@%i.target diff --git a/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/power-workarounds.bb b/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/power-workarounds.bb new file mode 100644 index 000000000..c51084296 --- /dev/null +++ b/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/power-workarounds.bb @@ -0,0 +1,25 @@ +SUMMARY = "Power device Workarounds" +PR = "r1" +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://${IBMBASE}/COPYING.apache-2.0;md5=34400b68072d710fecd0a2940a0d1658" + +inherit obmc-phosphor-systemd + +RDEPENDS_${PN} += "i2c-tools" + +S = "${WORKDIR}" + +SRC_URI += "file://power-workarounds.sh" + +do_install() { + install -d ${D}${bindir} + install -m 0755 ${S}/power-workarounds.sh ${D}${bindir}/power-workarounds.sh +} + +TMPL_WA = "power-workarounds@.service" +INSTFMT_WA = "power-workarounds@{0}.service" +TGTFMT = "obmc-chassis-poweron@{0}.target" +FMT_WA = "../${TMPL_WA}:${TGTFMT}.requires/${INSTFMT_WA}" + +SYSTEMD_SERVICE_${PN} += "${TMPL_WA}" +SYSTEMD_LINK_${PN} += "${@compose_list(d, 'FMT_WA', 'OBMC_CHASSIS_INSTANCES')}" diff --git a/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/power-workarounds/swift/power-workarounds.sh b/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/power-workarounds/swift/power-workarounds.sh new file mode 100644 index 000000000..dc1f4803b --- /dev/null +++ b/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/power-workarounds/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/power-workarounds/swift/power-workarounds@.service b/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/power-workarounds/swift/power-workarounds@.service new file mode 100644 index 000000000..0926e033b --- /dev/null +++ b/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/power-workarounds/swift/power-workarounds@.service @@ -0,0 +1,16 @@ +[Unit] +Description=Perform power workarounds on VRMs after PGOOD is up +Wants=obmc-power-on@%i.target +After=obmc-power-on@%i.target +Before=obmc-host-start-pre@%i.target +Conflicts=obmc-chassis-poweroff@%i.target +ConditionPathExists=!/run/openbmc/chassis@%i-on + +[Service] +ExecStart=/usr/bin/power-workarounds.sh +SyslogIdentifier=power-workarounds.sh +Type=oneshot +RemainAfterExit=yes + +[Install] +WantedBy=obmc-chassis-poweron@%i.target diff --git a/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/power-workarounds/witherspoon/power-workarounds.sh b/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/power-workarounds/witherspoon/power-workarounds.sh new file mode 100644 index 000000000..d40579731 --- /dev/null +++ b/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/power-workarounds/witherspoon/power-workarounds.sh @@ -0,0 +1,134 @@ +#!/bin/sh + +# ensure VCS ON_OFF_CONFIG set correctly from prior FW drivers +# A side +i2cset -y 4 0x70 0x00 0x01 b +i2cset -y 4 0x70 0x02 0x16 b #respond to ENABLE pin +i2cset -y 4 0x70 0x00 0x00 b +# B side +i2cset -y 5 0x70 0x00 0x01 b +i2cset -y 5 0x70 0x02 0x16 b #respond to ENABLE pin +i2cset -y 5 0x70 0x00 0x00 b + +# vddio = 1.0V, mdat/sdat PU enabled +i2cset -y 4 0x12 0xFF 0x00 b # VDD/VCS 0 +i2cset -y 4 0x12 0x2E 0x03 b # VDD/VCS 0 +i2cset -y 4 0x13 0xFF 0x00 b # VDN 0 +i2cset -y 4 0x13 0x2E 0x03 b # VDN 0 +i2cset -y 5 0x12 0xFF 0x00 b # VDD/VCS 1 +i2cset -y 5 0x12 0x2E 0x03 b # VDD/VCS 1 +i2cset -y 5 0x13 0xFF 0x00 b # VDN 1 +i2cset -y 5 0x13 0x2E 0x03 b # VDN 1 + +# A side VDDR - set to 1.23V +i2cset -y 4 0x71 0x00 0x01 +i2cset -y 4 0x71 0x21 0x3B 0x01 i +i2cset -y 4 0x71 0x00 0x00 + +# B side VDDR - set to 1.23V +i2cset -y 5 0x71 0x00 0x01 +i2cset -y 5 0x71 0x21 0x3B 0x01 i +i2cset -y 5 0x71 0x00 0x00 + +# VDN A - PGOOD_ON threshold +i2cset -y 4 0x71 0x00 0x00 b # PAGE +i2cset -y 4 0x71 0x5E 0xCD 0x00 i # set to 0.8V + +# VDN B - PGOOD_ON threshold +i2cset -y 5 0x71 0x00 0x00 b # PAGE +i2cset -y 5 0x71 0x5E 0xCD 0x00 i # set to 0.8V + +# unbind ucd driver to permit i2cset +ucd_retries=5 +ucd= + +ucdpath="/sys/bus/i2c/drivers/ucd9000" +if [ -e $ucdpath ] +then + ucd=`ls -1 $ucdpath | grep 64` + if [ -n "$ucd" ] + then + echo $ucd > $ucdpath/unbind + fi +fi + +# make sure VCS ON_OFF_CONFIG set correctly from old FW releases +i2cset -y 11 0x64 0x00 0x0E i +i2cset -y 11 0x64 0x02 0x16 i +i2cset -y 11 0x64 0x00 0x0F i +i2cset -y 11 0x64 0x02 0x16 i + +## move memory enables to align with VDN (VDN to VDDR leakage issue) +#GPO_CONFIG_1 (GPIO15) : mem 0 reg enables +i2cset -y 11 0x64 0xF7 0x00 i +i2cset -y 11 0x64 0xF8 0x15 0x6E 0x80 0x08 0x00 0x00 0x00 0x40 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 i +#GPO_CONFIG_2 (GPIO7) : mem 1 reg enables +i2cset -y 11 0x64 0xF7 0x01 i +i2cset -y 11 0x64 0xF8 0x15 0x16 0x80 0x08 0x00 0x00 0x20 0x40 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 i + +# change VDN delays based on UCD MFR_REVISION setting +REV=`i2cget -y 11 0x64 0x9B i 2|cut -f2 -d' '` +if [ "$REV" == "0x01" -o "$REV" == "0x02" ] ; then + # use 20ms delay for VDN + #TON_DELAY rail 8 + i2cset -y 11 0x64 0x00 0x07 i + i2cset -y 11 0x64 0x60 0x80 0xDA i + #TON_DELAY rail 9 + i2cset -y 11 0x64 0x00 0x08 i + i2cset -y 11 0x64 0x60 0x80 0xDA i +else + # use 70ms delay for VDN + #TON_DELAY rail 8 + i2cset -y 11 0x64 0x00 0x07 i + i2cset -y 11 0x64 0x60 0x30 0xEA i + #TON_DELAY rail 9 + i2cset -y 11 0x64 0x00 0x08 i + i2cset -y 11 0x64 0x60 0x30 0xEA i +fi + +# Raise AVDD +100mV +i2cset -y 11 0x64 0x00 0x09 i # set PAGE +i2cset -y 11 0x64 0xF5 0x81 i # set margin_config +i2cset -y 11 0x64 0x21 0x85 0x33 i # set VOUT_COMMAND + +# Increase over-current settings +#VDD A phase current +i2cset -y 4 0x12 0xFF 0x04 b # set window register high byte to 4 +i2cset -y 4 0x12 0x3C 0x80 b # Set to 64A +#VDD B phase current +i2cset -y 5 0x12 0xFF 0x04 b # set window register high byte to 4 +i2cset -y 5 0x12 0x3C 0x80 b # Set to 64A +#VDD A master OC fault to 445A +i2cset -y 4 0x70 0x00 0x00 b # PAGE +i2cset -y 4 0x70 0x46 0x08DE w +# VDD A master OC warn to 326A +i2cset -y 4 0x70 0x4A 0x08A3 w # A308 +#VDD B master OC fault to 445A +i2cset -y 5 0x70 0x00 0x00 b # PAGE +i2cset -y 5 0x70 0x46 0x08DE w +# VDD B master OC warn to 326A +i2cset -y 5 0x70 0x4A 0x08A3 w +#VCS phase current to 30A C/C +i2cset -y 4 0x12 0xFF 0x08 b # set window register to 8 +i2cset -y 4 0x12 0x3C 0x3C b # 30A +i2cset -y 5 0x12 0xFF 0x08 b # set window register to 8 +i2cset -y 5 0x12 0x3C 0x3C b # 30A +#VCS master OC to 43A +i2cset -y 4 0x70 0x00 0x01 # PAGE 1 +i2cset -y 4 0x70 0x46 0x0816 w # OC to 43A +i2cset -y 5 0x70 0x00 0x01 # PAGE 1 +i2cset -y 5 0x70 0x46 0x0816 w # OC to 43A + +# re-bind ucd driver only if we unbound it (i.e. ucd has been set with a value) +if [ -e $ucdpath -a -n "$ucd" ]; then + j=0 + until [ $j -ge $ucd_retries ] || [ -e $ucdpath/$ucd ]; do + j=$((j+1)) + echo $ucd > $ucdpath/bind || ret=$? + if [ $j -gt 1 ]; then + echo "rebinding UCD driver. Retry number $j" + sleep 1 + fi + done + if [ ! -e $ucdpath/$ucd ]; then exit $ret; fi +fi diff --git a/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/power-workarounds/witherspoon/power-workarounds@.service b/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/power-workarounds/witherspoon/power-workarounds@.service new file mode 100644 index 000000000..74d8e4bfc --- /dev/null +++ b/meta-ibm/meta-witherspoon/recipes-phosphor/chassis/power-workarounds/witherspoon/power-workarounds@.service @@ -0,0 +1,16 @@ +[Unit] +Description=Perform power workarounds on VRMs +Wants=ir35221-on-unbind@%i.service +After=ir35221-on-unbind@%i.service +Before=avsbus-disable@%i.service +Conflicts=obmc-chassis-poweroff@%i.target +ConditionPathExists=!/run/openbmc/chassis@%i-on + +[Service] +ExecStart=/usr/bin/env power-workarounds.sh +SyslogIdentifier=power-workarounds.sh +Type=oneshot +RemainAfterExit=yes + +[Install] +WantedBy=obmc-chassis-poweron@%i.target 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 4cac4903f..45deee59a 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,3 +1,4 @@ -RDEPENDS_${PN} += 'avsbus-control' -RDEPENDS_${PN} += 'vrm-control' +RDEPENDS_${PN}_witherspoon_append = ' avsbus-control' +RDEPENDS_${PN}_witherspoon_append = ' vrm-control' +RDEPENDS_${PN}_append = ' power-workarounds' RDEPENDS_${PN}_remove += "p9-vcs-workaround" -- cgit v1.2.3