diff options
author | Keith Short <keithshort@chromium.org> | 2022-04-04 12:05:09 -0600 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-04-08 00:54:01 +0000 |
commit | a7f5db2413d9607b5094c1304fb717f15f37cad0 (patch) | |
tree | 50d954bb1ef19e70a75b5cb46c97c6adbf22222f /zephyr/Kconfig.i2c | |
parent | cf79770ff4aa19965c60fe9af5005d64141df61a (diff) | |
download | chrome-ec-a7f5db2413d9607b5094c1304fb717f15f37cad0.tar.gz |
zephyr: Move all I2C configs into a separate file
Move the I2C related Kconfigs to a separate file.
BUG=none
BRANCH=none
TEST=zmake testall
Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: Ic5518c7209217e88677a8818d3793ddc58c2d41f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3575081
Reviewed-by: Sam Hurst <shurst@google.com>
Diffstat (limited to 'zephyr/Kconfig.i2c')
-rw-r--r-- | zephyr/Kconfig.i2c | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/zephyr/Kconfig.i2c b/zephyr/Kconfig.i2c new file mode 100644 index 0000000000..ca1e39914c --- /dev/null +++ b/zephyr/Kconfig.i2c @@ -0,0 +1,86 @@ +# Copyright 2022 The Chromium OS Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +config PLATFORM_EC_I2C + bool "I2C shim" + default n if ARCH_POSIX + default y + imply I2C + help + Enable compilation of the EC i2c module. Once enabled, it will be + possible to make calls using the old platform/ec i2c APIs defined + in include/i2c.h and implemented in common/i2c_controller.c. Doing so + should make shimming other platform/ec modules which rely on i2c + communication "just work" without requiring any further code changes. + +config PLATFORM_EC_I2C_DEBUG + bool "I2C Tracing" + default n if ARCH_POSIX + depends on PLATFORM_EC_I2C + help + This option enables I2C bus communication tracing. Use the console + command "i2ctrace" to enable and disable tracing on specific I2C + peripherals. + + Please see the I2C debugging documentation for more details: + + https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/ec/docs/i2c-debugging.md + +config PLATFORM_EC_I2C_PASSTHRU_RESTRICTED + bool "Restrict I2C PASSTHRU command" + depends on PLATFORM_EC_I2C + help + Enables board-specific restrictions for the I2C PASSTHRU host command. + Once enabled, board_allow_i2c_passthru function has to be implemented, + which defines the allowed usage of the command. + +config PLATFORM_EC_I2C_DEBUG_PASSTHRU + bool "I2C Passthru Debug" + default n if ARCH_POSIX + depends on PLATFORM_EC_I2C + help + This option enables extra debug for I2C passthru operations initiated + by the AP. + +config PLATFORM_EC_CONSOLE_CMD_I2C_PORTMAP + bool "Console command: i2c_portmap" + default y + depends on PLATFORM_EC_I2C + help + Enable the 'i2c_portmap' console command. This comamnd is used to + display the mapping of the I2C ports defined by the named-i2c-ports + node to the physical port and remote port indexes. + +config PLATFORM_EC_CONSOLE_CMD_I2C_SPEED + bool "Console command: i2cspeed" + default n + depends on PLATFORM_EC_I2C + help + Enable the 'i2cspeed' console command. This comamnd is used to + display an I2C port's bus speed. Additionally, for ports with + the DYNAMIC_SPEED port flag set, the speed can be set. In all + cases, the bus speed is in units of kHz. + +config PLATFORM_EC_HOSTCMD_I2C_CONTROL + bool "Host command: i2c_control" + default n + depends on PLATFORM_EC_I2C + help + Enable the I2C_CONTROL host command. This comamnd is used to + display an I2C port's bus speed. Additionally, for ports with + the DYNAMIC_SPEED port flag set, the speed can be set. In all + cases, the bus speed is in units of kHz. More functionality of + the command may be added in the future. + +config PLATFORM_EC_SMBUS_PEC + bool "Packet error checking support for SMBus" + help + If enabled, adds error checking support for i2c_readN, i2c_writeN, + i2c_read_string and i2c_write_block. Where + - write operation appends an error checking byte at end of transfer, and + - read operatoin verifies the correctness of error checking byte from the + peripheral. + Set I2C_FLAG on addr_flags parameter to use this feature. + + This option also enables error checking function on smart batteries. |