@@ -30,11 +30,15 @@ LOG_MODULE_REGISTER(soc, CONFIG_SOC_LOG_LEVEL);
3030#include <hal/nrf_oscillators.h>
3131#include <hal/nrf_power.h>
3232#include <hal/nrf_regulators.h>
33+ #include <helpers/nrfx_gppi.h>
34+ #include <helpers/nrfx_gppi_lumos.h>
3335#include <zephyr/dt-bindings/regulator/nrf5x.h>
3436
3537#define LFXO_NODE DT_NODELABEL(lfxo)
3638#define HFXO_NODE DT_NODELABEL(hfxo)
3739
40+ static nrfx_gppi_t gppi_instance ;
41+
3842static inline void power_and_clock_configuration (void )
3943{
4044/* NRF_REGULATORS and NRF_OSCILLATORS are configured to be secure
@@ -147,6 +151,30 @@ static inline void power_and_clock_configuration(void)
147151}
148152#endif /* NRF_APPLICATION && !CONFIG_TRUSTED_EXECUTION_NONSECURE */
149153
154+ #if defined(CONFIG_NRFX_GPPI ) && !defined(CONFIG_NRFX_GPPI_V1 )
155+ void gppi_init (void )
156+ {
157+ gppi_instance .routes = nrfx_gppi_routes_get ();
158+ gppi_instance .route_map = nrfx_gppi_route_map_get ();
159+ gppi_instance .nodes = nrfx_gppi_nodes_get ();
160+
161+ nrfx_gppi_channel_init (NRFX_GPPI_NODE_DPPIC00 , NRFX_BIT_MASK (DPPIC00_CH_NUM_SIZE ));
162+ nrfx_gppi_channel_init (NRFX_GPPI_NODE_DPPIC10 , NRFX_BIT_MASK (DPPIC10_CH_NUM_SIZE ));
163+ nrfx_gppi_channel_init (NRFX_GPPI_NODE_DPPIC20 , NRFX_BIT_MASK (DPPIC20_CH_NUM_SIZE ));
164+ nrfx_gppi_channel_init (NRFX_GPPI_NODE_DPPIC30 , NRFX_BIT_MASK (DPPIC30_CH_NUM_SIZE ));
165+ nrfx_gppi_channel_init (NRFX_GPPI_NODE_PPIB00_10 , NRFX_BIT_MASK (PPIB10_NTASKSEVENTS_SIZE ));
166+ nrfx_gppi_channel_init (NRFX_GPPI_NODE_PPIB11_21 , NRFX_BIT_MASK (PPIB11_NTASKSEVENTS_SIZE ));
167+ nrfx_gppi_channel_init (NRFX_GPPI_NODE_PPIB01_20 , NRFX_BIT_MASK (PPIB01_NTASKSEVENTS_SIZE ));
168+ nrfx_gppi_channel_init (NRFX_GPPI_NODE_PPIB22_30 , NRFX_BIT_MASK (PPIB22_NTASKSEVENTS_SIZE ));
169+
170+ nrfx_gppi_groups_init (NRFX_GPPI_NODE_DPPIC00 , NRFX_BIT_MASK (DPPIC00_GROUP_NUM_SIZE ));
171+ nrfx_gppi_groups_init (NRFX_GPPI_NODE_DPPIC10 , NRFX_BIT_MASK (DPPIC10_GROUP_NUM_SIZE ));
172+ nrfx_gppi_groups_init (NRFX_GPPI_NODE_DPPIC20 , NRFX_BIT_MASK (DPPIC20_GROUP_NUM_SIZE ));
173+ nrfx_gppi_groups_init (NRFX_GPPI_NODE_DPPIC30 , NRFX_BIT_MASK (DPPIC30_GROUP_NUM_SIZE ));
174+ nrfx_gppi_init (& gppi_instance );
175+ }
176+ #endif
177+
150178int nordicsemi_nrf54l_init (void )
151179{
152180 /* Update the SystemCoreClock global variable with current core clock
@@ -161,6 +189,10 @@ int nordicsemi_nrf54l_init(void)
161189 power_and_clock_configuration ();
162190#endif
163191
192+ #if defined(CONFIG_NRFX_GPPI ) && !defined(CONFIG_NRFX_GPPI_V1 )
193+ gppi_init ();
194+ #endif
195+
164196 return 0 ;
165197}
166198
0 commit comments