1# I2C configuration options 2 3# Copyright (c) 2015 Intel Corporation 4# SPDX-License-Identifier: Apache-2.0 5 6# 7# I2C options 8# 9menuconfig I2C 10 bool "Inter-Integrated Circuit (I2C) bus drivers" 11 help 12 Enable I2C Driver Configuration 13 14if I2C 15 16config I2C_SHELL 17 bool "I2C Shell" 18 depends on SHELL 19 help 20 Enable I2C Shell. 21 22 The I2C shell supports scanning, bus recovery, I2C read and write 23 operations. 24 25config I2C_STATS 26 bool "I2C device Stats" 27 depends on STATS 28 help 29 Enable I2C Stats. 30 31config I2C_DUMP_MESSAGES 32 bool "Log I2C transactions" 33 depends on LOG 34 depends on I2C_LOG_LEVEL_DBG 35 help 36 Dump every I2C transaction to the system log as debug level log messages. 37 38config I2C_DUMP_MESSAGES_ALLOWLIST 39 bool "Use allowlist for logging of I2C transactions" 40 depends on I2C_DUMP_MESSAGES 41 depends on DT_HAS_ZEPHYR_I2C_DUMP_ALLOWLIST_ENABLED 42 help 43 Use allowlist to specify which devices transactions should be logged. 44 The allowlist is defined in the devicetree using the compatible string of 45 "zephyr,i2c-dump-allowlist" and phandles to the devices that need to be traced. 46 Example of devicetree node: 47 i2c-dump-allowlist { 48 compatible = "zephyr,i2c-dump-allowlist"; 49 devices = < &display0 >, < &sensor3 >; 50 }; 51 52config I2C_CALLBACK 53 bool "I2C asynchronous callback API" 54 help 55 API and implementations of i2c_transfer_cb. 56 57config HAS_I2C_RTIO 58 bool 59 help 60 This option must be selected by I2C controller drivers that optionally implement the RTIO 61 interface. 62 63config I2C_RTIO 64 bool "I2C RTIO API" 65 depends on HAS_I2C_RTIO 66 select RTIO 67 help 68 API and implementations of I2C for RTIO 69 70if I2C_RTIO 71config I2C_RTIO_SQ_SIZE 72 int "Submission queue size for blocking calls" 73 default 4 74 help 75 Blocking i2c calls when I2C_RTIO is enabled are copied into a per driver 76 submission queue. The queue depth determines the number of possible i2c_msg 77 structs that may be in the array given to i2c_transfer. A sensible default 78 is going to be 4 given the device address, register address, and a value 79 to be read or written. 80 81config I2C_RTIO_CQ_SIZE 82 int "Completion queue size for blocking calls" 83 default 4 84 help 85 Blocking i2c calls when I2C_RTIO is enabled are copied into a per driver 86 submission queue. The queue depth determines the number of possible i2c_msg 87 structs that may be in the array given to i2c_transfer. A sensible default 88 is going to be 4 given the device address, register address, and a value 89 to be read or written. 90 91endif # I2C_RTIO 92 93 94# Include these first so that any properties (e.g. defaults) below can be 95# overridden (by defining symbols in multiple locations) 96source "drivers/i2c/Kconfig.b91" 97source "drivers/i2c/Kconfig.bcm_iproc" 98source "drivers/i2c/Kconfig.cc13xx_cc26xx" 99source "drivers/i2c/Kconfig.dw" 100source "drivers/i2c/Kconfig.esp32" 101source "drivers/i2c/target/Kconfig" 102source "drivers/i2c/Kconfig.gpio" 103source "drivers/i2c/Kconfig.xec" 104source "drivers/i2c/Kconfig.nrfx" 105source "drivers/i2c/Kconfig.i2c_emul" 106source "drivers/i2c/Kconfig.it8xxx2" 107source "drivers/i2c/Kconfig.sbcon" 108source "drivers/i2c/Kconfig.sifive" 109source "drivers/i2c/Kconfig.stm32" 110source "drivers/i2c/Kconfig.sam0" 111source "drivers/i2c/Kconfig.sam_twihs" 112source "drivers/i2c/Kconfig.litex" 113source "drivers/i2c/Kconfig.lpc11u6x" 114source "drivers/i2c/Kconfig.npcx" 115source "drivers/i2c/Kconfig.test" 116source "drivers/i2c/Kconfig.rcar" 117source "drivers/i2c/Kconfig.tca954x" 118source "drivers/i2c/Kconfig.gd32" 119source "drivers/i2c/Kconfig.ifx_cat1" 120source "drivers/i2c/Kconfig.ifx_xmc4" 121source "drivers/i2c/Kconfig.andes_atciic100" 122source "drivers/i2c/Kconfig.sc18im704" 123source "drivers/i2c/Kconfig.smartbond" 124source "drivers/i2c/Kconfig.xilinx_axi" 125source "drivers/i2c/Kconfig.mchp_mss" 126source "drivers/i2c/Kconfig.sedi" 127source "drivers/i2c/Kconfig.ambiq" 128source "drivers/i2c/Kconfig.numaker" 129source "drivers/i2c/Kconfig.mcux" 130source "drivers/i2c/Kconfig.ene" 131source "drivers/i2c/Kconfig.max32" 132 133config I2C_INIT_PRIORITY 134 int "Init priority" 135 default KERNEL_INIT_PRIORITY_DEVICE 136 help 137 I2C device driver initialization priority. 138 139 140module = I2C 141module-str = i2c 142source "subsys/logging/Kconfig.template.log_config" 143 144config I2C_GECKO 145 bool "Gecko I2C driver" 146 default y 147 depends on DT_HAS_SILABS_GECKO_I2C_ENABLED 148 select SOC_GECKO_I2C 149 help 150 Enable the SiLabs Gecko I2C bus driver. 151 152config I2C_SAM_TWIM 153 bool "Atmel SAM (TWIM) I2C driver" 154 default y 155 depends on DT_HAS_ATMEL_SAM_I2C_TWIM_ENABLED 156 help 157 Enable Atmel SAM MCU Family (TWIM) I2C bus driver. 158 159config I2C_SAM_TWI 160 bool "Atmel SAM (TWI) I2C driver" 161 default y 162 depends on DT_HAS_ATMEL_SAM_I2C_TWI_ENABLED 163 help 164 Enable Atmel SAM MCU Family (TWI) I2C bus driver. 165 166config I2C_MCUX 167 bool "MCUX I2C driver" 168 default y 169 depends on DT_HAS_NXP_KINETIS_I2C_ENABLED 170 select PINCTRL 171 help 172 Enable the mcux I2C driver. 173 174config I2C_MCUX_LPI2C 175 bool "MCUX LPI2C driver" 176 default y 177 depends on DT_HAS_NXP_IMX_LPI2C_ENABLED 178 depends on CLOCK_CONTROL 179 select HAS_I2C_RTIO 180 select PINCTRL 181 help 182 Enable the mcux LPI2C driver. 183 184config I2C_MCUX_LPI2C_BUS_RECOVERY 185 bool "Bus recovery support" 186 depends on I2C_MCUX_LPI2C && PINCTRL 187 select I2C_BITBANG 188 help 189 Enable LPI2C driver bus recovery support via GPIO bitbanging. 190 191config I2C_IMX 192 bool "i.MX I2C driver" 193 default y 194 depends on DT_HAS_FSL_IMX21_I2C_ENABLED 195 help 196 Enable the i.MX I2C driver. 197 198config I2C_CC32XX 199 bool "CC32XX I2C driver" 200 default y 201 depends on DT_HAS_TI_CC32XX_I2C_ENABLED 202 select PINCTRL 203 help 204 Enable the CC32XX I2C driver. 205 206config I2C_BITBANG 207 bool 208 help 209 Enable library used for software driven (bit banging) I2C support 210 211config I2C_NIOS2 212 bool "Nios-II I2C driver" 213 default y 214 depends on DT_HAS_ALTR_NIOS2_I2C_ENABLED 215 help 216 Enable the Nios-II I2C driver. 217 218config I2C_RV32M1_LPI2C 219 bool "RV32M1 LPI2C driver" 220 default y 221 depends on DT_HAS_OPENISA_RV32M1_LPI2C_ENABLED 222 depends on CLOCK_CONTROL 223 select PINCTRL 224 help 225 Enable the RV32M1 LPI2C driver. 226 227config GPIO_I2C_SWITCH 228 bool "GPIO controlled I2C bus switch" 229 default y 230 depends on DT_HAS_GPIO_I2C_SWITCH_ENABLED 231 help 232 Enable GPIO controlled I2C bus switch driver. 233 234endif # I2C 235