From ba34d57de26dd0a65aecdaffc5f6f38e21dcc8f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Ku=C5=BAnia?= Date: Mon, 18 Nov 2024 15:40:50 +0100 Subject: [PATCH 1/4] modules: hal_nordic: add Kconfig selecting resource header MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The resource reservation header is now included according to a Kconfig value. The Kconfig can be overriden out-of-tree in case a different header is needed. Signed-off-by: Rafał Kuźnia --- modules/hal_nordic/nrfx/Kconfig | 4 ++++ modules/hal_nordic/nrfx/nrfx_glue.h | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/modules/hal_nordic/nrfx/Kconfig b/modules/hal_nordic/nrfx/Kconfig index 1ffff73b3566f..1fbb694a29195 100644 --- a/modules/hal_nordic/nrfx/Kconfig +++ b/modules/hal_nordic/nrfx/Kconfig @@ -1209,4 +1209,8 @@ config NRFX_PRS_BOX_4 endmenu +config NRFX_RESERVED_RESOURCES_HEADER + string + default "nrfx_config_reserved_resources.h" + endmenu # "nrfx drivers" diff --git a/modules/hal_nordic/nrfx/nrfx_glue.h b/modules/hal_nordic/nrfx/nrfx_glue.h index c65318f1fe368..8f1109f4a79cd 100644 --- a/modules/hal_nordic/nrfx/nrfx_glue.h +++ b/modules/hal_nordic/nrfx/nrfx_glue.h @@ -314,7 +314,9 @@ void nrfx_busy_wait(uint32_t usec_to_wait); /*------------------------------------------------------------------------------*/ -#include "nrfx_config_reserved_resources.h" +#ifdef CONFIG_NRFX_RESERVED_RESOURCES_HEADER +#include CONFIG_NRFX_RESERVED_RESOURCES_HEADER +#endif //------------------------------------------------------------------------------ From 12dd0e294a20233041d0cb1e2f2036a89575395e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Ku=C5=BAnia?= Date: Tue, 19 Nov 2024 16:07:57 +0100 Subject: [PATCH 2/4] modules: hal_nordic: NRFX_GPPI enables GPPI on all platforms MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changed the CMakeLists to enable the nrfx_gppi utilities based solely on the CONFIG_NRFX_GPPI Kconfig. This unifies the configuration on all nRF SoC families. Signed-off-by: Rafał Kuźnia --- modules/hal_nordic/nrfx/CMakeLists.txt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/modules/hal_nordic/nrfx/CMakeLists.txt b/modules/hal_nordic/nrfx/CMakeLists.txt index fc3c8adb371c1..e71e34a403797 100644 --- a/modules/hal_nordic/nrfx/CMakeLists.txt +++ b/modules/hal_nordic/nrfx/CMakeLists.txt @@ -111,7 +111,7 @@ zephyr_library_sources(nrfx_glue.c) zephyr_library_sources(${HELPERS_DIR}/nrfx_flag32_allocator.c) zephyr_library_sources_ifdef(CONFIG_RETAINED_MEM_NRF_RAM_CTRL ${HELPERS_DIR}/nrfx_ram_ctrl.c) zephyr_library_sources_ifdef(CONFIG_NRFX_GPPI ${HELPERS_DIR}/nrfx_gppi_dppi.c) -zephyr_library_sources_ifdef(CONFIG_NRFX_PPI ${HELPERS_DIR}/nrfx_gppi_ppi.c) +zephyr_library_sources_ifdef(CONFIG_NRFX_GPPI ${HELPERS_DIR}/nrfx_gppi_ppi.c) zephyr_library_sources_ifdef(CONFIG_NRFX_PRS ${SRC_DIR}/prs/nrfx_prs.c) @@ -199,9 +199,7 @@ if(CONFIG_SOC_SERIES_NRF54LX AND CONFIG_NRFX_GPPI) zephyr_library_sources(${NRFX_DIR}/soc/interconnect/dppic_ppib/nrfx_interconnect_dppic_ppib.c) endif() -if(CONFIG_SOC_SERIES_NRF54HX AND - (CONFIG_DT_HAS_NORDIC_NRF_DPPIC_LOCAL_ENABLED OR - CONFIG_DT_HAS_NORDIC_NRF_DPPIC_GLOBAL_ENABLED)) +if(CONFIG_SOC_SERIES_NRF54HX AND CONFIG_NRFX_GPPI) zephyr_library_sources(${HELPERS_DIR}/nrfx_gppi_dppi_ppib.c) zephyr_library_sources(${NRFX_DIR}/soc/interconnect/apb/nrfx_interconnect_apb.c) zephyr_library_sources(${NRFX_DIR}/soc/interconnect/ipct/nrfx_interconnect_ipct.c) From 572071ae2740439c146da9e35b4398214dce7bdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Ku=C5=BAnia?= Date: Tue, 19 Nov 2024 16:14:28 +0100 Subject: [PATCH 3/4] modules: hal_nordic: replace LUMOS_XXAA with NRF54L_SERIES MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The NRF54L_SERIES define is more specific and should be used in favor of LUMOS_XXAA. Signed-off-by: Rafał Kuźnia --- modules/hal_nordic/nrfx/nrfx_config_reserved_resources.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/hal_nordic/nrfx/nrfx_config_reserved_resources.h b/modules/hal_nordic/nrfx/nrfx_config_reserved_resources.h index 132ba4cd89ad3..c40e22c17d7c4 100644 --- a/modules/hal_nordic/nrfx/nrfx_config_reserved_resources.h +++ b/modules/hal_nordic/nrfx/nrfx_config_reserved_resources.h @@ -44,7 +44,7 @@ #if defined(NRF53_SERIES) #define NRFX_DPPI0_CHANNELS_USED_BY_BT_CTLR BT_CTLR_USED_PPI_CHANNELS #define NRFX_DPPI0_GROUPS_USED_BY_BT_CTLR BT_CTLR_USED_PPI_GROUPS -#elif defined(LUMOS_XXAA) +#elif defined(NRF54L_SERIES) #define NRFX_DPPI10_CHANNELS_USED_BY_BT_CTLR BT_CTLR_USED_PPI_CHANNELS #define NRFX_DPPI10_GROUPS_USED_BY_BT_CTLR BT_CTLR_USED_PPI_GROUPS #endif From b6b1a3daa2d0545fc12a01c1e046037f9fef8ff6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Ku=C5=BAnia?= Date: Tue, 19 Nov 2024 16:16:23 +0100 Subject: [PATCH 4/4] dts: nordic: Add dppic0 label to nRF53 and nRF91 devices MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added dppic0 node label, alongside the dppic to maintain backward compatibility. The use of dppic0 is preferred. Signed-off-by: Rafał Kuźnia --- dts/arm/nordic/nrf5340_cpuapp_peripherals.dtsi | 2 +- dts/arm/nordic/nrf5340_cpunet.dtsi | 2 +- dts/arm/nordic/nrf91_peripherals.dtsi | 2 +- modules/hal_nordic/nrfx/Kconfig | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dts/arm/nordic/nrf5340_cpuapp_peripherals.dtsi b/dts/arm/nordic/nrf5340_cpuapp_peripherals.dtsi index 7fda659fa01c3..75c2eb9f99f28 100644 --- a/dts/arm/nordic/nrf5340_cpuapp_peripherals.dtsi +++ b/dts/arm/nordic/nrf5340_cpuapp_peripherals.dtsi @@ -339,7 +339,7 @@ rtc1: rtc@15000 { prescaler = <1>; }; -dppic: dppic@17000 { +dppic0: dppic: dppic@17000 { compatible = "nordic,nrf-dppic"; reg = <0x17000 0x1000>; status = "okay"; diff --git a/dts/arm/nordic/nrf5340_cpunet.dtsi b/dts/arm/nordic/nrf5340_cpunet.dtsi index cf752e60f4c9e..4916703310945 100644 --- a/dts/arm/nordic/nrf5340_cpunet.dtsi +++ b/dts/arm/nordic/nrf5340_cpunet.dtsi @@ -159,7 +159,7 @@ status = "okay"; }; - dppic: dppic@4100f000 { + dppic0: dppic: dppic@4100f000 { compatible = "nordic,nrf-dppic"; reg = <0x4100f000 0x1000>; status = "okay"; diff --git a/dts/arm/nordic/nrf91_peripherals.dtsi b/dts/arm/nordic/nrf91_peripherals.dtsi index 8688582911766..58cc3142bcf27 100644 --- a/dts/arm/nordic/nrf91_peripherals.dtsi +++ b/dts/arm/nordic/nrf91_peripherals.dtsi @@ -28,7 +28,7 @@ adc: adc@e000 { #io-channel-cells = <1>; }; -dppic: dppic@17000 { +dppic0: dppic: dppic@17000 { compatible = "nordic,nrf-dppic"; reg = <0x17000 0x1000>; status = "okay"; diff --git a/modules/hal_nordic/nrfx/Kconfig b/modules/hal_nordic/nrfx/Kconfig index 1fbb694a29195..2fd97920df838 100644 --- a/modules/hal_nordic/nrfx/Kconfig +++ b/modules/hal_nordic/nrfx/Kconfig @@ -31,7 +31,7 @@ config NRFX_DPPI config NRFX_DPPI0 bool "DPPI0 driver instance" default y if NRFX_GPPI - depends on $(dt_nodelabel_has_compat,dppic,$(DT_COMPAT_NORDIC_NRF_DPPIC)) + depends on $(dt_nodelabel_has_compat,dppic0,$(DT_COMPAT_NORDIC_NRF_DPPIC)) select NRFX_DPPI config NRFX_DPPI00