blob: 09e89f2abd872cb1a3fc2ed3dd10645293198825 [file] [log] [blame]
Alexander Filippovb7f7dbd2019-07-25 16:42:57 +03001#!/bin/sh -eu
2
Patrick Williams20f0f662023-04-14 11:36:01 -05003override_avs_settings()
Alexander Filippovb7f7dbd2019-07-25 16:42:57 +03004{
5 BUS=$1
6
Patrick Williams20f0f662023-04-14 11:36:01 -05007 i2cset -y "${BUS}" 0x44 0x00 0x00 b # VCS
8 i2cset -y "${BUS}" 0x44 0x24 0x044C w # VOUT_MAX 1100mV
9 i2cset -y "${BUS}" 0x44 0x40 0x0456 w # VOUT_OV_FAULT_LIMIT 1110mV
10 i2cset -y "${BUS}" 0x44 0x25 0x0438 w # VOUT_MARGING_HIGH 1080mV
11 i2cset -y "${BUS}" 0x44 0x26 0x03D4 w # VOUT_MARGING_LOW 980mV
12 i2cset -y "${BUS}" 0x44 0x44 0x024E w # VOUT_UV_FAULT_LIMIT 590mV
13 i2cset -y "${BUS}" 0x44 0x2B 0x0258 w # VOUT_MIN 600mV
Alexander Filippovb7f7dbd2019-07-25 16:42:57 +030014
Patrick Williams20f0f662023-04-14 11:36:01 -050015 i2cset -y "${BUS}" 0x44 0x00 0x01 b # VDD
16 i2cset -y "${BUS}" 0x44 0x24 0x044C w # VOUT_MAX 1100mV
17 i2cset -y "${BUS}" 0x44 0x40 0x0456 w # VOUT_OV_FAULT_LIMIT 1110mV
18 i2cset -y "${BUS}" 0x44 0x25 0x041A w # VOUT_MARGING_HIGH 1050mV
19 i2cset -y "${BUS}" 0x44 0x26 0x03B6 w # VOUT_MARGING_LOW 950mV
20 i2cset -y "${BUS}" 0x44 0x44 0x024E w # VOUT_UV_FAULT_LIMIT 590mV
21 i2cset -y "${BUS}" 0x44 0x2B 0x0258 w # VOUT_MIN 600mV
Alexander Filippovb7f7dbd2019-07-25 16:42:57 +030022
Patrick Williams20f0f662023-04-14 11:36:01 -050023 i2cset -y "${BUS}" 0x44 0x00 0xFF b # All pages (VCS & VDD)
24 i2cset -y "${BUS}" 0x44 0x01 0xB0 b # Enable
Alexander Filippovb7f7dbd2019-07-25 16:42:57 +030025
Patrick Williams20f0f662023-04-14 11:36:01 -050026 i2cset -y "${BUS}" 0x46 0x00 0x01 b # VDN
27 i2cset -y "${BUS}" 0x46 0x01 0xB0 b # Enable
Alexander Filippovb7f7dbd2019-07-25 16:42:57 +030028}
29
30override_avs_settings 4
31override_avs_settings 5