From 9949645dd447bce65c66c03066e4034ba86631be Mon Sep 17 00:00:00 2001 From: Nikodem Kastelik Date: Wed, 3 Apr 2024 12:39:13 +0200 Subject: [PATCH] modules: hal_nordic: nrfx: add support for nRF54 PWM Add Kconfig-to-nrfx symbol redefinitions so that PWM instances found on nRF54H20 and nRF54L15 devices are supported. Signed-off-by: Nikodem Kastelik --- modules/hal_nordic/nrfx/Kconfig | 40 +++++++++++++++++++++++++++ modules/hal_nordic/nrfx/nrfx_config.h | 24 ++++++++++++++++ 2 files changed, 64 insertions(+) diff --git a/modules/hal_nordic/nrfx/Kconfig b/modules/hal_nordic/nrfx/Kconfig index a731013bd4b..541d9fac5e7 100644 --- a/modules/hal_nordic/nrfx/Kconfig +++ b/modules/hal_nordic/nrfx/Kconfig @@ -184,6 +184,46 @@ config NRFX_PWM3 depends on $(dt_nodelabel_has_compat,pwm3,$(DT_COMPAT_NORDIC_NRF_PWM)) select NRFX_PWM +config NRFX_PWM20 + bool "PWM20 driver instance" + depends on $(dt_nodelabel_has_compat,pwm20,$(DT_COMPAT_NORDIC_NRF_PWM)) + select NRFX_PWM + +config NRFX_PWM21 + bool "PWM21 driver instance" + depends on $(dt_nodelabel_has_compat,pwm21,$(DT_COMPAT_NORDIC_NRF_PWM)) + select NRFX_PWM + +config NRFX_PWM22 + bool "PWM22 driver instance" + depends on $(dt_nodelabel_has_compat,pwm22,$(DT_COMPAT_NORDIC_NRF_PWM)) + select NRFX_PWM + +config NRFX_PWM120 + bool "PWM120 driver instance" + depends on $(dt_nodelabel_has_compat,pwm120,$(DT_COMPAT_NORDIC_NRF_PWM)) + select NRFX_PWM + +config NRFX_PWM130 + bool "PWM130 driver instance" + depends on $(dt_nodelabel_has_compat,pwm130,$(DT_COMPAT_NORDIC_NRF_PWM)) + select NRFX_PWM + +config NRFX_PWM131 + bool "PWM131 driver instance" + depends on $(dt_nodelabel_has_compat,pwm131,$(DT_COMPAT_NORDIC_NRF_PWM)) + select NRFX_PWM + +config NRFX_PWM132 + bool "PWM132 driver instance" + depends on $(dt_nodelabel_has_compat,pwm132,$(DT_COMPAT_NORDIC_NRF_PWM)) + select NRFX_PWM + +config NRFX_PWM133 + bool "PWM133 driver instance" + depends on $(dt_nodelabel_has_compat,pwm133,$(DT_COMPAT_NORDIC_NRF_PWM)) + select NRFX_PWM + config NRFX_QDEC bool diff --git a/modules/hal_nordic/nrfx/nrfx_config.h b/modules/hal_nordic/nrfx/nrfx_config.h index 89c07938293..60fcd276ea4 100644 --- a/modules/hal_nordic/nrfx/nrfx_config.h +++ b/modules/hal_nordic/nrfx/nrfx_config.h @@ -248,6 +248,30 @@ #ifdef CONFIG_NRFX_PWM3 #define NRFX_PWM3_ENABLED 1 #endif +#ifdef CONFIG_NRFX_PWM20 +#define NRFX_PWM20_ENABLED 1 +#endif +#ifdef CONFIG_NRFX_PWM21 +#define NRFX_PWM21_ENABLED 1 +#endif +#ifdef CONFIG_NRFX_PWM22 +#define NRFX_PWM22_ENABLED 1 +#endif +#ifdef CONFIG_NRFX_PWM120 +#define NRFX_PWM120_ENABLED 1 +#endif +#ifdef CONFIG_NRFX_PWM130 +#define NRFX_PWM130_ENABLED 1 +#endif +#ifdef CONFIG_NRFX_PWM131 +#define NRFX_PWM131_ENABLED 1 +#endif +#ifdef CONFIG_NRFX_PWM132 +#define NRFX_PWM132_ENABLED 1 +#endif +#ifdef CONFIG_NRFX_PWM133 +#define NRFX_PWM133_ENABLED 1 +#endif #ifdef CONFIG_NRFX_QDEC #define NRFX_QDEC_ENABLED 1