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>
This commit is contained in:
parent
f80e572750
commit
586e26e8fc
18 changed files with 178 additions and 837 deletions
|
@ -12,18 +12,14 @@ menuconfig I2C_NRFX
|
|||
|
||||
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))
|
||||
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 $(dt_nodelabel_has_compat,i2c0,$(DT_COMPAT_NORDIC_NRF_TWIM))
|
||||
def_bool HAS_HW_NRF_TWIM0
|
||||
select NRFX_TWIM0
|
||||
help
|
||||
Enable nRF TWI Master with EasyDMA on port 0.
|
||||
|
@ -31,13 +27,13 @@ config I2C_0_NRF_TWIM
|
|||
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))
|
||||
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 $(dt_nodelabel_has_compat,i2c1,$(DT_COMPAT_NORDIC_NRF_TWIM))
|
||||
def_bool HAS_HW_NRF_TWIM1
|
||||
select NRFX_TWIM1
|
||||
help
|
||||
Enable nRF TWI Master with EasyDMA on port 1.
|
||||
|
@ -45,7 +41,7 @@ config I2C_1_NRF_TWIM
|
|||
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))
|
||||
def_bool HAS_HW_NRF_TWIM2
|
||||
select NRFX_TWIM2
|
||||
help
|
||||
Enable nRF TWI Master with EasyDMA on port 2.
|
||||
|
@ -53,7 +49,7 @@ config I2C_2_NRF_TWIM
|
|||
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))
|
||||
def_bool HAS_HW_NRF_TWIM3
|
||||
select NRFX_TWIM3
|
||||
help
|
||||
Enable nRF TWI Master with EasyDMA on port 3.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue