zephyr/drivers/i2c/Kconfig.nrfx
Andrzej Głąbek 011e9bac0b drivers: nrf: Remove no longer suitable dependencies on Kconfig options
Make I2C and SPI drivers for nRF SoCs no longer dependent on Kconfig
options that enable instances (i.e. I2C_x and SPI_x). Now these drivers
enable hardware instances when corresponding nodes in devicetree are
enabled (have status "okay").
For I2C, SPI, and UART drivers, instead of using Kconfig dependencies
to prevent enabling of hardware instances that cannot be used together
(e.g. SPIM1 and TWIM1), a file that signals invalid configurations with
build assertions is added to compilation.
Also dependencies on HAS_HW_NRF_* options are removed from Kconfigs
of I2C, SPI, and UART drivers, as for hidden options that activate
proper type of driver such dependencies are not actually helpful.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2020-04-03 14:47:32 +02:00

64 lines
1.9 KiB
Plaintext

# nrfx I2C support
# Copyright (c) 2018, Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
menuconfig I2C_NRFX
bool "nRF TWI nrfx drivers"
default y
depends on SOC_FAMILY_NRF
help
Enable support for nrfx TWI drivers for nRF MCU series.
if I2C_NRFX
# Workaround for not being able to have commas in macro arguments
DT_COMPAT_NORDIC_NRF_TWI := nordic,nrf-twi
DT_COMPAT_NORDIC_NRF_TWIM := nordic,nrf-twim
config I2C_0_NRF_TWI
def_bool $(dt_nodelabel_has_compat,i2c0,$(DT_COMPAT_NORDIC_NRF_TWI))
select NRFX_TWI0
help
Enable nRF TWI Master without EasyDMA on port 0.
config I2C_0_NRF_TWIM
def_bool $(dt_nodelabel_has_compat,i2c0,$(DT_COMPAT_NORDIC_NRF_TWIM))
select NRFX_TWIM0
help
Enable nRF TWI Master with EasyDMA on port 0.
This peripheral accepts transfers from RAM only,
if provided buffer is placed in flash, transfer will fail.
config I2C_1_NRF_TWI
def_bool $(dt_nodelabel_has_compat,i2c1,$(DT_COMPAT_NORDIC_NRF_TWI))
select NRFX_TWI1
help
Enable nRF TWI Master without EasyDMA on port 1.
config I2C_1_NRF_TWIM
def_bool $(dt_nodelabel_has_compat,i2c1,$(DT_COMPAT_NORDIC_NRF_TWIM))
select NRFX_TWIM1
help
Enable nRF TWI Master with EasyDMA on port 1.
This peripheral accepts transfers from RAM only,
if provided buffer is placed in flash, transfer will fail.
config I2C_2_NRF_TWIM
def_bool $(dt_nodelabel_has_compat,i2c2,$(DT_COMPAT_NORDIC_NRF_TWIM))
select NRFX_TWIM2
help
Enable nRF TWI Master with EasyDMA on port 2.
This peripheral accepts transfers from RAM only,
if provided buffer is placed in flash, transfer will fail.
config I2C_3_NRF_TWIM
def_bool $(dt_nodelabel_has_compat,i2c3,$(DT_COMPAT_NORDIC_NRF_TWIM))
select NRFX_TWIM3
help
Enable nRF TWI Master with EasyDMA on port 3.
This peripheral accepts transfers from RAM only,
if provided buffer is placed in flash, transfer will fail.
endif # I2C_NRFX