Initial commit

This commit is contained in:
Your Name
2026-04-23 17:07:55 +08:00
commit b7e39e063b
16725 changed files with 1625565 additions and 0 deletions
@@ -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
@@ -0,0 +1,15 @@
[Unit]
Description=Enable the AVS bus on VRMs
Wants=obmc-power-start@%i.service
Before=obmc-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
@@ -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
@@ -0,0 +1,15 @@
[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/avsbus-disable.sh
Type=oneshot
RemainAfterExit=yes
[Install]
WantedBy=obmc-chassis-poweron@%i.target
@@ -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
@@ -0,0 +1,14 @@
[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/avsbus-enable.sh
Type=oneshot
RemainAfterExit=yes
[Install]
WantedBy=obmc-chassis-poweron@%i.target