From f0a463adf45dc2baedd2e5d60a22dd41827781eb Mon Sep 17 00:00:00 2001 From: Xo Wang Date: Tue, 14 Mar 2017 16:15:29 -0700 Subject: meta-zaius: avsbus-control: Add VOUT_COMMAND workaround When switching voltage regulator modules (VRM) on Zaius to AVSBus- controlled operation, the initial output voltage should be copied from the PMBus VOUT_COMMAND register. However, the Intersil VRM does not perform the copy following the first switch from PMBus- to AVSBus- controlled operation. Add a workaround to the AVSBus enable step that writes the value of VOUT_COMMAND to itself in order to initialize the otherwise BMC inaccessible AVSBus voltage setpoint. Signed-off-by: Xo Wang Change-Id: I3335586d98e95eb52d44d6d31e688f9b7c292136 --- .../recipes-phosphor/chassis/avsbus-control/zaius_avsbus.sh | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'meta-openbmc-machines') diff --git a/meta-openbmc-machines/meta-openpower/meta-ingrasys/meta-zaius/recipes-phosphor/chassis/avsbus-control/zaius_avsbus.sh b/meta-openbmc-machines/meta-openpower/meta-ingrasys/meta-zaius/recipes-phosphor/chassis/avsbus-control/zaius_avsbus.sh index e8861f984..afe821c4f 100755 --- a/meta-openbmc-machines/meta-openpower/meta-ingrasys/meta-zaius/recipes-phosphor/chassis/avsbus-control/zaius_avsbus.sh +++ b/meta-openbmc-machines/meta-openpower/meta-ingrasys/meta-zaius/recipes-phosphor/chassis/avsbus-control/zaius_avsbus.sh @@ -19,14 +19,21 @@ vrm_set_page() } # Usage: vrm_avs_enable +# Initializes the AVSBus VOUT setpoint to the value in PMBus VOUT_COMMAND # Sets OPERATION PMBUS register to # - Enable/Disable: On # - VOUT Source: AVSBus Target Rail Voltage # - AVSBus Copy: VOUT_COMMAND remains unchanged +# Writes to VOUT setpoint over AVSBus will persist after the VRM is switched to +# PMBus control. Switching back to AVSBus control restores this persisted +# setpoint rather than re-initializing to PMBus VOUT_COMMAND. This behavior is +# known to Intersil and writing VOUT_COMMAND over PMBus is the only workaround. vrm_avs_enable() { vrm_set_page "$@" echo Enabling AVSBus on bus $1 VRM @$2 rail $3... + local vout_command=`i2cget -y $1 $2 0x21 w` + i2cset -y $1 $2 0x21 $vout_command w i2cset -y $1 $2 0x01 0xb0 b } -- cgit v1.2.1