summaryrefslogtreecommitdiff
path: root/board/servo_v4p1/dacs.c
diff options
context:
space:
mode:
authorMichał Barnaś <mb@semihalf.com>2021-01-19 18:58:11 +0100
committerCommit Bot <commit-bot@chromium.org>2021-02-23 19:12:37 +0000
commit25fa055c3ecd98c5d339cc4002054c584f99cb1b (patch)
tree1c2075387722a2a41f396da1b663e7639a4de337 /board/servo_v4p1/dacs.c
parent9497502d59d5979d4a60abb58a67eda7a8051fa4 (diff)
downloadchrome-ec-25fa055c3ecd98c5d339cc4002054c584f99cb1b.tar.gz
servo_v4p1: improve I/O expander implementation
Remove servo_v4p1 custom ioex implementations for TCA64xxA modules. Enable I/O expander module and move from custom interface to generic one. Due to the lack of flash in RW section, IOEX is not available there and required 'board_id_det' function is stubbed using raw i2c functions. This results in IOEX and DAC functions available only in RO section, so their initialization functions are moved to RO-only init. BUG=b:168385201 BRANCH=main TEST=Connect to servo's console and execute 'ioexget' command. All IOEX pins' states should be printed in terminal. Pin TCA_GPIO_DBG_LED_K_ODL should change as LED is blinking. TEST=Connect to servo's console. Plug USB-C charger to servo power port. 'ioexget' command should display EN_PP5000_ALT_3P3 value as 1. Execute 'ioexset EN_PP5000_ALT_3P3 0' command. Unplug fast the servo charger. Servo should be fully operational without any sign of reboot. Signed-off-by: Michał Barnaś <mb@semihalf.com> Change-Id: Iff98b37746a95d6a59954507ab18defac65d6329 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2700297 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'board/servo_v4p1/dacs.c')
-rw-r--r--board/servo_v4p1/dacs.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/board/servo_v4p1/dacs.c b/board/servo_v4p1/dacs.c
index b5c62bb438..d042836a2b 100644
--- a/board/servo_v4p1/dacs.c
+++ b/board/servo_v4p1/dacs.c
@@ -101,6 +101,7 @@ int write_dac(enum dac_t dac, uint16_t value)
return EC_SUCCESS;
}
+#ifdef SECION_IS_RO
static int cmd_cc_dac(int argc, char *argv[])
{
uint8_t dac;
@@ -136,3 +137,4 @@ static int cmd_cc_dac(int argc, char *argv[])
DECLARE_CONSOLE_COMMAND(cc_dac, cmd_cc_dac,
"dac <\"on\"|\"off\"|mv>",
"Set Servo v4.1 CC dacs");
+#endif