|
| 1 | +# Copyright (c) 2025 ITE Corporation. All Rights Reserved. |
| 2 | +# SPDX-License-Identifier: Apache-2.0 |
| 3 | + |
| 4 | +config I2C_ITE_IT51XXX |
| 5 | + bool "ITE IT51XXX I2C driver" |
| 6 | + default y |
| 7 | + depends on DT_HAS_ITE_IT51XXX_I2C_ENABLED |
| 8 | + select PINCTRL |
| 9 | + select I2C_BITBANG |
| 10 | + help |
| 11 | + Enable I2C support on IT51XXX series. |
| 12 | + Supports nine hosts and three targets and each one able to located |
| 13 | + at I2C interface0~8. |
| 14 | + Three I2C targets on design A, B and C. Support 16 bytes dedicated |
| 15 | + FIFO mode for read/write. |
| 16 | + Supported Speeds: 50kHz, 100kHz, 400kHz and 1MHz. |
| 17 | + This driver supports repeated start. |
| 18 | + |
| 19 | +if I2C_ITE_IT51XXX |
| 20 | + |
| 21 | +config I2C_IT51XXX_FIFO_MODE |
| 22 | + bool "IT51XXX I2C FIFO mode" |
| 23 | + default y |
| 24 | + help |
| 25 | + This is an option to enable FIFO mode which can reduce the time |
| 26 | + between each byte to improve the I2C bus clock stretching during |
| 27 | + I2C transaction. |
| 28 | + The I2C controller supports two 32-bytes FIFOs, |
| 29 | + FIFO1 supports I2C 0, and FIFO2 supports other ports. |
| 30 | + I2C FIFO mode of IT51XXX can support I2C APIs including: |
| 31 | + i2c_write(), i2c_read(), i2c_burst_read. |
| 32 | + |
| 33 | +endif # I2C_ITE_IT51XXX |
| 34 | + |
| 35 | +if I2C_TARGET |
| 36 | + |
| 37 | +config I2C_TARGET_IT51XXX_MAX_BUF_SIZE |
| 38 | + int "It is allowed to configure the dedicated FIFO size up to 256 bytes." |
| 39 | + default 256 |
| 40 | + |
| 41 | +config I2C_IT51XXX_MAX_SHARE_FIFO_SIZE |
| 42 | + int "It is allowed to configure the shared FIFO size up to 256 bytes." |
| 43 | + range 16 256 |
| 44 | + default 256 |
| 45 | + |
| 46 | +config SOC_IT51XXX_CPU_IDLE_GATING |
| 47 | + default y |
| 48 | + help |
| 49 | + This option is used when the I2C target shared FIFO property is enabled. |
| 50 | + |
| 51 | +endif # I2C_TARGET |
0 commit comments