diff options
author | Jerry Bradshaw <jerry.bradshaw@maximintegrated.com> | 2019-07-24 10:40:03 -0500 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-09-26 21:56:08 +0000 |
commit | 23932a57f30994297b9749f432b46d6f267e890d (patch) | |
tree | cc4d7a2b636f9c465651144841b9dda4138fced0 /board/max32660-eval/board.h | |
parent | d7d7224a85160389d235cfd3ba2dca9b8ae47c8c (diff) | |
download | chrome-ec-23932a57f30994297b9749f432b46d6f267e890d.tar.gz |
max32660: add I2C master and slave
BRANCH=none
BUG=none
TEST=slave tested with EC CMDs sent from a custom written EC HOST using
another MAX32660 device as an I2C Master
Change-Id: Icdd3ac4bacbc6536a4165f63d155760d4013a8cc
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1716928
Reviewed-by: Scott Collyer <scollyer@chromium.org>
Reviewed-by: Harry Cutts <hcutts@chromium.org>
Tested-by: Harry Cutts <hcutts@chromium.org>
Commit-Queue: Harry Cutts <hcutts@chromium.org>
Diffstat (limited to 'board/max32660-eval/board.h')
-rw-r--r-- | board/max32660-eval/board.h | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/board/max32660-eval/board.h b/board/max32660-eval/board.h index fba6c60cef..87a4b65fa1 100644 --- a/board/max32660-eval/board.h +++ b/board/max32660-eval/board.h @@ -10,6 +10,8 @@ /* Optional features */ #define CONFIG_SYSTEM_UNLOCKED /* Allow dangerous commands */ +#define CONFIG_I2C +#define CONFIG_I2C_MASTER #define CONFIG_FPU @@ -17,9 +19,17 @@ #undef CONFIG_LID_SWITCH #undef CONFIG_PECI #undef CONFIG_SWITCH +#define CONFIG_CMD_HOSTCMD -/* #define CONFIG_I2C_SLAVE */ -/* #define CONFIG_HOSTCMD_I2C_SLAVE_ADDR (0x51 << 1) */ +#undef CONFIG_HOSTCMD_EVENTS +#define CONFIG_I2C + +#define CONFIG_I2C_SLAVE +#define CONFIG_HOSTCMD_I2C_SLAVE_ADDR_FLAGS (0x51) /* 7 bit right-aligned, bits 6 to 0 */ + +/* Slave I2C port configuration */ +#define I2C_PORT_SLAVE 1 +#define I2C_PORT_EC I2C_PORT_SLAVE /* Write protect is active high */ #define CONFIG_WP_ACTIVE_HIGH |