diff options
author | Michał Barnaś <mb@semihalf.com> | 2021-01-19 18:58:11 +0100 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-02-23 19:12:37 +0000 |
commit | 25fa055c3ecd98c5d339cc4002054c584f99cb1b (patch) | |
tree | 1c2075387722a2a41f396da1b663e7639a4de337 /board/servo_v4p1/ioexpanders.h | |
parent | 9497502d59d5979d4a60abb58a67eda7a8051fa4 (diff) | |
download | chrome-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/ioexpanders.h')
-rw-r--r-- | board/servo_v4p1/ioexpanders.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/board/servo_v4p1/ioexpanders.h b/board/servo_v4p1/ioexpanders.h index e6b44a9d45..6565992857 100644 --- a/board/servo_v4p1/ioexpanders.h +++ b/board/servo_v4p1/ioexpanders.h @@ -6,6 +6,10 @@ #ifndef __CROS_EC_IOEXPANDERS_H #define __CROS_EC_IOEXPANDERS_H +#define BOARD_ID_DET_MASK 0x7 +#define BOARD_ID_DET_OFFSET 3 +#define BOARD_ID_DET_PORT 1 + enum uservo_fastboot_mux_sel_t { MUX_SEL_USERVO = 0, MUX_SEL_FASTBOOT = 1 |