zephyr/drivers/i2c/Kconfig.nrfx
Andrzej Głąbek 586e26e8fc soc: nrf: Use data from DTS to populate HAS_HW_NRF_* Kconfig options
Instead of selecting appropriate HAS_HW_NRF_* options for particular
nRF SoCs (and simulated nRF52 target), set their values basing on
information from devicetree.
Correct also semantics of those options so that they are set only when
a corresponding DT node is enabled. This allows using them directly in
Kconfig dependencies of Zephyr drivers for nRF peripherals. Update
appropriately these dependencies.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2022-04-02 15:14:38 +02:00

60 lines
1.5 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
config I2C_0_NRF_TWI
def_bool HAS_HW_NRF_TWI0
select NRFX_TWI0
help
Enable nRF TWI Master without EasyDMA on port 0.
config I2C_0_NRF_TWIM
def_bool HAS_HW_NRF_TWIM0
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 HAS_HW_NRF_TWI1
select NRFX_TWI1
help
Enable nRF TWI Master without EasyDMA on port 1.
config I2C_1_NRF_TWIM
def_bool HAS_HW_NRF_TWIM1
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 HAS_HW_NRF_TWIM2
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 HAS_HW_NRF_TWIM3
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