diff options
Diffstat (limited to 'meta-ibm/recipes-phosphor/chassis/avsbus-control')
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 |