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:
Andrzej Głąbek 2022-03-28 13:38:03 +02:00 committed by Carles Cufí
commit 586e26e8fc
18 changed files with 178 additions and 837 deletions

View file

@ -3,12 +3,9 @@
# Copyright (c) 2020 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
# Workaround for not being able to have commas in macro arguments
DT_COMPAT_NORDIC_NRF_ECB := nordic,nrf-ecb
config CRYPTO_NRF_ECB
bool "nRF AES electronic codebook mode encryption"
depends on $(dt_compat_enabled,$(DT_COMPAT_NORDIC_NRF_ECB))
depends on HAS_HW_NRF_ECB
# Bluetooth controller uses the ECB peripheral directly
# (see subsys/bluetooth/controller/ll_sw/nordic/hal/nrf5/ecb.c),
# hence this driver cannot be enabled together with it.