2018-02-28 18:27:46 +08:00
|
|
|
# Copyright (c) 2018 Intel Corporation
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
2020-04-12 21:53:44 +08:00
|
|
|
DT_COMPAT_ST_STM32_I2C_V1 := st,stm32-i2c-v1
|
|
|
|
DT_COMPAT_ST_STM32_I2C_V2 := st,stm32-i2c-v2
|
|
|
|
|
2018-02-28 18:27:46 +08:00
|
|
|
menuconfig I2C_STM32
|
|
|
|
bool "STM32 I2C driver"
|
2020-04-12 21:53:44 +08:00
|
|
|
default $(dt_compat_enabled,$(DT_COMPAT_ST_STM32_I2C_V1)) || $(dt_compat_enabled,$(DT_COMPAT_ST_STM32_I2C_V2))
|
2021-02-11 01:48:02 +08:00
|
|
|
depends on SOC_FAMILY_STM32
|
2018-02-28 18:27:46 +08:00
|
|
|
help
|
|
|
|
Enable I2C support on the STM32 SoCs
|
|
|
|
|
|
|
|
if I2C_STM32
|
|
|
|
|
|
|
|
config I2C_STM32_V1
|
2019-05-24 20:26:26 +08:00
|
|
|
bool
|
2020-04-12 21:53:44 +08:00
|
|
|
default $(dt_compat_enabled,$(DT_COMPAT_ST_STM32_I2C_V1))
|
2018-02-28 18:27:46 +08:00
|
|
|
select USE_STM32_LL_I2C
|
2019-07-16 19:22:38 +08:00
|
|
|
select I2C_STM32_INTERRUPT if I2C_SLAVE
|
2018-02-28 18:27:46 +08:00
|
|
|
help
|
|
|
|
Enable I2C support on the STM32 F1 and F4X family of processors. This
|
|
|
|
driver also supports the F2 and L1 series.
|
|
|
|
|
|
|
|
config I2C_STM32_V2
|
2019-05-24 20:26:26 +08:00
|
|
|
bool
|
2020-04-12 21:53:44 +08:00
|
|
|
default $(dt_compat_enabled,$(DT_COMPAT_ST_STM32_I2C_V2))
|
2018-02-28 18:27:46 +08:00
|
|
|
select USE_STM32_LL_I2C
|
|
|
|
select USE_STM32_LL_RCC if SOC_SERIES_STM32F0X || SOC_SERIES_STM32F3X
|
2018-03-01 17:53:49 +08:00
|
|
|
select I2C_STM32_INTERRUPT if I2C_SLAVE
|
2018-02-28 18:27:46 +08:00
|
|
|
help
|
2021-01-27 23:34:12 +08:00
|
|
|
Enable I2C support on the STM32 F0, F3, F7, L4, WBX, MP1, G0, G4, WL and
|
2020-03-07 00:35:32 +08:00
|
|
|
H7 family of processors.
|
2018-07-04 22:51:13 +08:00
|
|
|
This driver also supports the L0 series.
|
2018-03-01 17:53:49 +08:00
|
|
|
If I2C_SLAVE is enabled it selects I2C_STM32_INTERRUPT, since slave mode
|
|
|
|
is only supported by this driver with interrupts enabled.
|
2018-02-28 18:27:46 +08:00
|
|
|
|
|
|
|
config I2C_STM32_INTERRUPT
|
|
|
|
bool "STM32 MCU I2C Interrupt Support"
|
|
|
|
depends on I2C_STM32_V1 || I2C_STM32_V2
|
2020-01-24 22:00:47 +08:00
|
|
|
default y
|
2018-02-28 18:27:46 +08:00
|
|
|
help
|
|
|
|
Enable Interrupt support for the I2C Driver
|
|
|
|
|
|
|
|
config I2C_STM32_COMBINED_INTERRUPT
|
|
|
|
bool
|
|
|
|
depends on I2C_STM32_INTERRUPT
|
2019-11-07 23:04:13 +08:00
|
|
|
default y if SOC_SERIES_STM32F0X || SOC_SERIES_STM32G0X || SOC_SERIES_STM32L0X
|
2018-02-28 18:27:46 +08:00
|
|
|
|
|
|
|
endif # I2C_STM32
|