Skip to content

Commit 97775f7

Browse files
committed
[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 3c4e058 commit 97775f7

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

@@ -136,7 +147,6 @@ zephyr_library_sources_ifdef(CONFIG_NRFX_CLOCK ${SRC_DIR}/nrfx_clock.c)
136147
zephyr_library_sources_ifdef(CONFIG_NRFX_CLOCK ${SRC_DIR}/nrfx_clock_hfclk.c)
137148
zephyr_library_sources_ifdef(CONFIG_NRFX_COMP ${SRC_DIR}/nrfx_comp.c)
138149
zephyr_library_sources_ifdef(CONFIG_NRFX_CRACEN ${SRC_DIR}/nrfx_cracen.c)
139-
zephyr_library_sources_ifdef(CONFIG_NRFX_DPPI ${SRC_DIR}/nrfx_dppi.c)
140150
zephyr_library_sources_ifdef(CONFIG_NRFX_EGU ${SRC_DIR}/nrfx_egu.c)
141151
zephyr_library_sources_ifdef(CONFIG_NRFX_GPIOTE ${SRC_DIR}/nrfx_gpiote.c)
142152
zephyr_library_sources_ifdef(CONFIG_NRFX_GRTC ${SRC_DIR}/nrfx_grtc.c)
@@ -148,8 +158,6 @@ zephyr_library_sources_ifdef(CONFIG_NRFX_NFCT ${SRC_DIR}/nrfx_nfct.c)
148158
zephyr_library_sources_ifdef(CONFIG_NRFX_NVMC ${SRC_DIR}/nrfx_nvmc.c)
149159
zephyr_library_sources_ifdef(CONFIG_NRFX_PDM ${SRC_DIR}/nrfx_pdm.c)
150160
zephyr_library_sources_ifdef(CONFIG_NRFX_POWER ${SRC_DIR}/nrfx_power.c)
151-
zephyr_library_sources_ifdef(CONFIG_NRFX_PPI ${SRC_DIR}/nrfx_ppi.c)
152-
zephyr_library_sources_ifdef(CONFIG_NRFX_PPIB ${SRC_DIR}/nrfx_ppib.c)
153161
zephyr_library_sources_ifdef(CONFIG_NRFX_PWM ${SRC_DIR}/nrfx_pwm.c)
154162
zephyr_library_sources_ifdef(CONFIG_NRFX_QDEC ${SRC_DIR}/nrfx_qdec.c)
155163
zephyr_library_sources_ifdef(CONFIG_NRFX_QSPI ${SRC_DIR}/nrfx_qspi.c)
@@ -211,13 +219,16 @@ zephyr_compile_definitions_ifdef(CONFIG_SOC_NRF54LX_SKIP_GLITCHDETECTOR_DISABLE
211219
zephyr_compile_definitions_ifndef(CONFIG_SOC_NRF54L_ANOMALY_56_WORKAROUND NRF54L_CONFIGURATION_56_ENABLE=0)
212220

213221
if(CONFIG_SOC_COMPATIBLE_NRF54LX AND CONFIG_NRFX_GPPI)
214-
zephyr_library_sources(${HELPERS_DIR}/nrfx_gppi_ppib.c)
222+
zephyr_library_sources_ifdef(CONFIG_NRFX_GPPI_V1 ${HELPERS_DIR}/internal/nrfx_gppiv1_ppib.c)
223+
zephyr_library_sources_ifdef(CONFIG_NRFX_GPPI_V1 ${HELPERS_DIR}/internal/nrfx_ppib.c)
224+
zephyr_library_sources_ifndef(CONFIG_NRFX_GPPI_V1 ${HELPERS_DIR}/nrfx_gppi_lumos.c)
215225
endif()
216226

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

231+
221232
# Get the SVD file for the current SoC
222233
macro(mdk_svd_ifdef feature_toggle filename)
223234
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)
@@ -313,57 +320,57 @@ config NRFX_POWER
313320

314321
config NRFX_PPI
315322
bool "PPI allocator"
316-
default y if NRFX_GPPI
323+
default y if NRFX_GPPI_V1
317324
depends on $(dt_nodelabel_exists,ppi)
318325

319326
config NRFX_PPIB
320327
bool
321328

322329
config NRFX_PPIB00
323330
bool "PPIB00 driver instance"
324-
default y if NRFX_GPPI
331+
default y if NRFX_GPPI_V1
325332
depends on $(dt_nodelabel_exists,ppib00)
326333
select NRFX_PPIB
327334

328335
config NRFX_PPIB01
329336
bool "PPIB01 driver instance"
330-
default y if NRFX_GPPI
337+
default y if NRFX_GPPI_V1
331338
depends on $(dt_nodelabel_exists,ppib01)
332339
select NRFX_PPIB
333340

334341
config NRFX_PPIB10
335342
bool "PPIB10 driver instance"
336-
default y if NRFX_GPPI
343+
default y if NRFX_GPPI_V1
337344
depends on $(dt_nodelabel_exists,ppib10)
338345
select NRFX_PPIB
339346

340347
config NRFX_PPIB11
341348
bool "PPIB11 driver instance"
342-
default y if NRFX_GPPI
349+
default y if NRFX_GPPI_V1
343350
depends on $(dt_nodelabel_exists,ppib11)
344351
select NRFX_PPIB
345352

346353
config NRFX_PPIB20
347354
bool "PPIB20 driver instance"
348-
default y if NRFX_GPPI
355+
default y if NRFX_GPPI_V1
349356
depends on $(dt_nodelabel_exists,ppib20)
350357
select NRFX_PPIB
351358

352359
config NRFX_PPIB21
353360
bool "PPIB21 driver instance"
354-
default y if NRFX_GPPI
361+
default y if NRFX_GPPI_V1
355362
depends on $(dt_nodelabel_exists,ppib21)
356363
select NRFX_PPIB
357364

358365
config NRFX_PPIB22
359366
bool "PPIB22 driver instance"
360-
default y if NRFX_GPPI
367+
default y if NRFX_GPPI_V1
361368
depends on $(dt_nodelabel_exists,ppib22)
362369
select NRFX_PPIB
363370

364371
config NRFX_PPIB30
365372
bool "PPIB30 driver instance"
366-
default y if NRFX_GPPI
373+
default y if NRFX_GPPI_V1
367374
depends on $(dt_nodelabel_exists,ppib30)
368375
select NRFX_PPIB
369376

0 commit comments

Comments
 (0)