forked from FrameworkComputer/EmbeddedController
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathKconfig.i2c
87 lines (73 loc) · 3.15 KB
/
Kconfig.i2c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# Copyright 2022 The ChromiumOS Authors
# 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 "EC I2C Support"
default y
depends on DT_HAS_NAMED_I2C_PORTS_ENABLED
select 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.
if PLATFORM_EC_I2C
config PLATFORM_EC_I2C_DEBUG
bool "I2C Tracing"
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"
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"
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
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"
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"
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.
config PLATFORM_EC_I2C_NACK_RETRY_COUNT
int "I2C operation retry count when transaction error"
default 0
help
Defines I2C operation retry count when transaction general input/output
error (-EIO) and also when the I2C is busy.
endif # PLATFORM_EC_I2C