Skip to content

Commit 2eea9f8

Browse files
nordic-krchmasz-nordic
authored andcommitted
[nrf fromlist] modules: hal_nordic: nrfx: Align to changes in GPPI
Add support for shim which adapt GPPIv1 implementation to the new GPPI API. Upstream PR #: 98327 Signed-off-by: Krzysztof Chruściński <[email protected]>
1 parent 7895a0c commit 2eea9f8

File tree

2 files changed

+49
-31
lines changed

2 files changed

+49
-31
lines changed

modules/hal_nordic/nrfx/CMakeLists.txt

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,19 @@ zephyr_library_sources_ifdef(CONFIG_SOC_SERIES_NRF92X ${MDK_DIR}/system_nrf92.c
126126
zephyr_library_sources(nrfx_glue.c)
127127
zephyr_library_sources(${HELPERS_DIR}/nrfx_flag32_allocator.c)
128128
zephyr_library_sources_ifdef(CONFIG_HAS_NORDIC_RAM_CTRL ${HELPERS_DIR}/nrfx_ram_ctrl.c)
129-
zephyr_library_sources_ifdef(CONFIG_NRFX_GPPI ${HELPERS_DIR}/nrfx_gppi_dppi.c)
130-
zephyr_library_sources_ifdef(CONFIG_NRFX_GPPI ${HELPERS_DIR}/nrfx_gppi_ppi.c)
129+
130+
if(CONFIG_NRFX_GPPI)
131+
zephyr_library_sources_ifdef(CONFIG_NRFX_GPPI_V1 ${HELPERS_DIR}/internal/nrfx_gppiv1_shim.c)
132+
if(CONFIG_HAS_HW_NRF_PPI)
133+
zephyr_library_sources_ifdef(CONFIG_NRFX_GPPI_V1 ${HELPERS_DIR}/internal/nrfx_gppiv1_ppi.c)
134+
zephyr_library_sources_ifdef(CONFIG_NRFX_GPPI_V1 ${HELPERS_DIR}/internal/nrfx_ppi.c)
135+
zephyr_library_sources_ifndef(CONFIG_NRFX_GPPI_V1 ${HELPERS_DIR}/nrfx_gppi_ppi.c)
136+
else()
137+
zephyr_library_sources_ifdef(CONFIG_NRFX_GPPI_V1 ${HELPERS_DIR}/internal/nrfx_gppiv1_dppi.c)
138+
zephyr_library_sources_ifndef(CONFIG_NRFX_GPPI_V1 ${HELPERS_DIR}/nrfx_gppi_dppi.c)
139+
zephyr_library_sources_ifdef(CONFIG_NRFX_GPPI_V1 ${HELPERS_DIR}/internal/nrfx_dppi.c)
140+
endif()
141+
endif()
131142

132143
zephyr_library_sources_ifdef(CONFIG_NRFX_PRS ${SRC_DIR}/prs/nrfx_prs.c)
133144

@@ -137,7 +148,6 @@ zephyr_library_sources_ifdef(CONFIG_NRFX_CLOCK ${SRC_DIR}/nrfx_clock_hfclk.c)
137148
zephyr_library_sources_ifdef(CONFIG_NRFX_CLOCK ${SRC_DIR}/nrfx_clock_xo.c)
138149
zephyr_library_sources_ifdef(CONFIG_NRFX_COMP ${SRC_DIR}/nrfx_comp.c)
139150
zephyr_library_sources_ifdef(CONFIG_NRFX_CRACEN ${SRC_DIR}/nrfx_cracen.c)
140-
zephyr_library_sources_ifdef(CONFIG_NRFX_DPPI ${SRC_DIR}/nrfx_dppi.c)
141151
zephyr_library_sources_ifdef(CONFIG_NRFX_EGU ${SRC_DIR}/nrfx_egu.c)
142152
zephyr_library_sources_ifdef(CONFIG_NRFX_GPIOTE ${SRC_DIR}/nrfx_gpiote.c)
143153
zephyr_library_sources_ifdef(CONFIG_NRFX_GRTC ${SRC_DIR}/nrfx_grtc.c)
@@ -149,8 +159,6 @@ zephyr_library_sources_ifdef(CONFIG_NRFX_NFCT ${SRC_DIR}/nrfx_nfct.c)
149159
zephyr_library_sources_ifdef(CONFIG_NRFX_NVMC ${SRC_DIR}/nrfx_nvmc.c)
150160
zephyr_library_sources_ifdef(CONFIG_NRFX_PDM ${SRC_DIR}/nrfx_pdm.c)
151161
zephyr_library_sources_ifdef(CONFIG_NRFX_POWER ${SRC_DIR}/nrfx_power.c)
152-
zephyr_library_sources_ifdef(CONFIG_NRFX_PPI ${SRC_DIR}/nrfx_ppi.c)
153-
zephyr_library_sources_ifdef(CONFIG_NRFX_PPIB ${SRC_DIR}/nrfx_ppib.c)
154162
zephyr_library_sources_ifdef(CONFIG_NRFX_PWM ${SRC_DIR}/nrfx_pwm.c)
155163
zephyr_library_sources_ifdef(CONFIG_NRFX_QDEC ${SRC_DIR}/nrfx_qdec.c)
156164
zephyr_library_sources_ifdef(CONFIG_NRFX_QSPI ${SRC_DIR}/nrfx_qspi.c)
@@ -212,13 +220,16 @@ zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF54LX_SKIP_GLITCHDETECTOR_DISABLE
212220
zephyr_compile_definitions_ifndef(CONFIG_SOC_NRF54L_ANOMALY_56_WORKAROUND NRF54L_CONFIGURATION_56_ENABLE=0)
213221

214222
if(CONFIG_SOC_COMPATIBLE_NRF54LX AND CONFIG_NRFX_GPPI)
215-
zephyr_library_sources(${HELPERS_DIR}/nrfx_gppi_ppib.c)
223+
zephyr_library_sources_ifdef(CONFIG_NRFX_GPPI_V1 ${HELPERS_DIR}/internal/nrfx_gppiv1_ppib.c)
224+
zephyr_library_sources_ifdef(CONFIG_NRFX_GPPI_V1 ${HELPERS_DIR}/internal/nrfx_ppib.c)
225+
zephyr_library_sources_ifndef(CONFIG_NRFX_GPPI_V1 ${HELPERS_DIR}/nrfx_gppi_lumos.c)
216226
endif()
217227

218-
if(CONFIG_SOC_SERIES_NRF54HX AND CONFIG_NRFX_GPPI)
219-
zephyr_library_sources(${HELPERS_DIR}/nrfx_gppi_ipct.c)
228+
if(CONFIG_SOC_SERIES_NRF54HX AND CONFIG_NRFX_GPPI_V1)
229+
zephyr_library_sources(${HELPERS_DIR}/internal/nrfx_gppiv1_ipct.c)
220230
endif()
221231

232+
222233
# Get the SVD file for the current SoC
223234
macro(mdk_svd_ifdef feature_toggle filename)
224235
if(${feature_toggle})

modules/hal_nordic/nrfx/Kconfig

Lines changed: 30 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -61,85 +61,85 @@ config NRFX_DPPI
6161

6262
config NRFX_DPPI0
6363
bool "DPPI0 driver instance"
64-
default y if NRFX_GPPI
64+
default y if NRFX_GPPI_V1
6565
depends on $(dt_nodelabel_exists,dppic0)
6666
select NRFX_DPPI
6767

6868
config NRFX_DPPI00
6969
bool "DPPI00 driver instance"
70-
default y if NRFX_GPPI
70+
default y if NRFX_GPPI_V1
7171
depends on $(dt_nodelabel_exists,dppic00)
7272
select NRFX_DPPI
7373

7474
config NRFX_DPPI10
7575
bool "DPPI10 driver instance"
76-
default y if NRFX_GPPI
76+
default y if NRFX_GPPI_V1
7777
depends on $(dt_nodelabel_exists,dppic10)
7878
select NRFX_DPPI
7979

8080
config NRFX_DPPI20
8181
bool "DPPI20 driver instance"
82-
default y if NRFX_GPPI
82+
default y if NRFX_GPPI_V1
8383
depends on $(dt_nodelabel_exists,dppic20)
8484
select NRFX_DPPI
8585

8686
config NRFX_DPPI30
8787
bool "DPPI30 driver instance"
88-
default y if NRFX_GPPI
88+
default y if NRFX_GPPI_V1
8989
depends on $(dt_nodelabel_exists,dppic30)
9090
select NRFX_DPPI
9191

9292
config NRFX_DPPI020
9393
bool "DPPI020 driver instance"
94-
default y if NRFX_GPPI
94+
default y if NRFX_GPPI_V1
9595
depends on $(dt_nodelabel_exists,dppic020)
9696
select NRFX_DPPI
9797

9898
config NRFX_DPPI120
9999
bool "DPPI120 driver instance"
100-
default y if NRFX_GPPI
100+
default y if NRFX_GPPI_V1
101101
depends on $(dt_nodelabel_exists,dppic120)
102102
select NRFX_DPPI
103103

104104
config NRFX_DPPI130
105105
bool "DPPI130 driver instance"
106-
default y if NRFX_GPPI
106+
default y if NRFX_GPPI_V1
107107
depends on $(dt_nodelabel_exists,dppic130)
108108
select NRFX_DPPI
109109

110110
config NRFX_DPPI131
111111
bool "DPPI131 driver instance"
112-
default y if NRFX_GPPI
112+
default y if NRFX_GPPI_V1
113113
depends on $(dt_nodelabel_exists,dppic131)
114114
select NRFX_DPPI
115115

116116
config NRFX_DPPI132
117117
bool "DPPI132 driver instance"
118-
default y if NRFX_GPPI
118+
default y if NRFX_GPPI_V1
119119
depends on $(dt_nodelabel_exists,dppic132)
120120
select NRFX_DPPI
121121

122122
config NRFX_DPPI133
123123
bool "DPPI133 driver instance"
124-
default y if NRFX_GPPI
124+
default y if NRFX_GPPI_V1
125125
depends on $(dt_nodelabel_exists,dppic133)
126126
select NRFX_DPPI
127127

128128
config NRFX_DPPI134
129129
bool "DPPI134 driver instance"
130-
default y if NRFX_GPPI
130+
default y if NRFX_GPPI_V1
131131
depends on $(dt_nodelabel_exists,dppic134)
132132
select NRFX_DPPI
133133

134134
config NRFX_DPPI135
135135
bool "DPPI135 driver instance"
136-
default y if NRFX_GPPI
136+
default y if NRFX_GPPI_V1
137137
depends on $(dt_nodelabel_exists,dppic135)
138138
select NRFX_DPPI
139139

140140
config NRFX_DPPI136
141141
bool "DPPI136 driver instance"
142-
default y if NRFX_GPPI
142+
default y if NRFX_GPPI_V1
143143
depends on $(dt_nodelabel_exists,dppic136)
144144
select NRFX_DPPI
145145

@@ -247,6 +247,13 @@ config NRFX_GPPI
247247
Enable the nrfx_gppi utilities providing unified API for creating PPI
248248
connections across SoC families.
249249

250+
config NRFX_GPPI_V1
251+
bool "GPPI layer legacy"
252+
depends on NRFX_GPPI
253+
default y if SOC_SERIES_NRF54HX
254+
help
255+
When enabled then legacy version of Generic PPI layer is used.
256+
250257
config NRFX_GRTC
251258
bool "GRTC driver"
252259
depends on $(dt_nodelabel_exists,grtc)
@@ -287,57 +294,57 @@ config NRFX_POWER
287294

288295
config NRFX_PPI
289296
bool "PPI allocator"
290-
default y if NRFX_GPPI
297+
default y if NRFX_GPPI_V1
291298
depends on $(dt_nodelabel_exists,ppi)
292299

293300
config NRFX_PPIB
294301
bool
295302

296303
config NRFX_PPIB00
297304
bool "PPIB00 driver instance"
298-
default y if NRFX_GPPI
305+
default y if NRFX_GPPI_V1
299306
depends on $(dt_nodelabel_exists,ppib00)
300307
select NRFX_PPIB
301308

302309
config NRFX_PPIB01
303310
bool "PPIB01 driver instance"
304-
default y if NRFX_GPPI
311+
default y if NRFX_GPPI_V1
305312
depends on $(dt_nodelabel_exists,ppib01)
306313
select NRFX_PPIB
307314

308315
config NRFX_PPIB10
309316
bool "PPIB10 driver instance"
310-
default y if NRFX_GPPI
317+
default y if NRFX_GPPI_V1
311318
depends on $(dt_nodelabel_exists,ppib10)
312319
select NRFX_PPIB
313320

314321
config NRFX_PPIB11
315322
bool "PPIB11 driver instance"
316-
default y if NRFX_GPPI
323+
default y if NRFX_GPPI_V1
317324
depends on $(dt_nodelabel_exists,ppib11)
318325
select NRFX_PPIB
319326

320327
config NRFX_PPIB20
321328
bool "PPIB20 driver instance"
322-
default y if NRFX_GPPI
329+
default y if NRFX_GPPI_V1
323330
depends on $(dt_nodelabel_exists,ppib20)
324331
select NRFX_PPIB
325332

326333
config NRFX_PPIB21
327334
bool "PPIB21 driver instance"
328-
default y if NRFX_GPPI
335+
default y if NRFX_GPPI_V1
329336
depends on $(dt_nodelabel_exists,ppib21)
330337
select NRFX_PPIB
331338

332339
config NRFX_PPIB22
333340
bool "PPIB22 driver instance"
334-
default y if NRFX_GPPI
341+
default y if NRFX_GPPI_V1
335342
depends on $(dt_nodelabel_exists,ppib22)
336343
select NRFX_PPIB
337344

338345
config NRFX_PPIB30
339346
bool "PPIB30 driver instance"
340-
default y if NRFX_GPPI
347+
default y if NRFX_GPPI_V1
341348
depends on $(dt_nodelabel_exists,ppib30)
342349
select NRFX_PPIB
343350

0 commit comments

Comments
 (0)