Alexander Filippov | b7f7dbd | 2019-07-25 16:42:57 +0300 | [diff] [blame] | 1 | #!/bin/sh -eu |
| 2 | |
| 3 | function override_avs_settings() |
| 4 | { |
| 5 | BUS=$1 |
| 6 | |
| 7 | 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 |
| 14 | |
| 15 | 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 |
| 22 | |
| 23 | i2cset -y ${BUS} 0x44 0x00 0xFF b # All pages (VCS & VDD) |
| 24 | i2cset -y ${BUS} 0x44 0x01 0xB0 b # Enable |
| 25 | |
| 26 | i2cset -y ${BUS} 0x46 0x00 0x01 b # VDN |
| 27 | i2cset -y ${BUS} 0x46 0x01 0xB0 b # Enable |
| 28 | } |
| 29 | |
| 30 | override_avs_settings 4 |
| 31 | override_avs_settings 5 |