@@ -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,28 @@ static inline void power_and_clock_configuration(void)
147151}
148152#endif /* NRF_APPLICATION && !CONFIG_TRUSTED_EXECUTION_NONSECURE */
149153
154+ void gppi_init (void )
155+ {
156+ gppi_instance .routes = nrfx_gppi_routes_get ();
157+ gppi_instance .route_map = nrfx_gppi_route_map_get ();
158+ gppi_instance .nodes = nrfx_gppi_nodes_get ();
159+
160+ nrfx_gppi_channel_init (NRFX_GPPI_NODE_DPPIC00 , NRFX_BIT_MASK (DPPIC00_CH_NUM_SIZE ));
161+ nrfx_gppi_channel_init (NRFX_GPPI_NODE_DPPIC10 , NRFX_BIT_MASK (DPPIC10_CH_NUM_SIZE ));
162+ nrfx_gppi_channel_init (NRFX_GPPI_NODE_DPPIC20 , NRFX_BIT_MASK (DPPIC20_CH_NUM_SIZE ));
163+ nrfx_gppi_channel_init (NRFX_GPPI_NODE_DPPIC30 , NRFX_BIT_MASK (DPPIC30_CH_NUM_SIZE ));
164+ nrfx_gppi_channel_init (NRFX_GPPI_NODE_PPIB00_10 , NRFX_BIT_MASK (PPIB10_NTASKSEVENTS_SIZE ));
165+ nrfx_gppi_channel_init (NRFX_GPPI_NODE_PPIB11_21 , NRFX_BIT_MASK (PPIB11_NTASKSEVENTS_SIZE ));
166+ nrfx_gppi_channel_init (NRFX_GPPI_NODE_PPIB01_20 , NRFX_BIT_MASK (PPIB01_NTASKSEVENTS_SIZE ));
167+ nrfx_gppi_channel_init (NRFX_GPPI_NODE_PPIB22_30 , NRFX_BIT_MASK (PPIB22_NTASKSEVENTS_SIZE ));
168+
169+ nrfx_gppi_groups_init (NRFX_GPPI_NODE_DPPIC00 , NRFX_BIT_MASK (DPPIC00_GROUP_NUM_SIZE ));
170+ nrfx_gppi_groups_init (NRFX_GPPI_NODE_DPPIC10 , NRFX_BIT_MASK (DPPIC10_GROUP_NUM_SIZE ));
171+ nrfx_gppi_groups_init (NRFX_GPPI_NODE_DPPIC20 , NRFX_BIT_MASK (DPPIC20_GROUP_NUM_SIZE ));
172+ nrfx_gppi_groups_init (NRFX_GPPI_NODE_DPPIC30 , NRFX_BIT_MASK (DPPIC30_GROUP_NUM_SIZE ));
173+ nrfx_gppi_init (& gppi_instance );
174+ }
175+
150176int nordicsemi_nrf54l_init (void )
151177{
152178 /* Update the SystemCoreClock global variable with current core clock
@@ -161,6 +187,10 @@ int nordicsemi_nrf54l_init(void)
161187 power_and_clock_configuration ();
162188#endif
163189
190+ if (IS_ENABLED (CONFIG_NRFX_GPPI ) && !IS_ENABLED (CONFIG_NRFX_GPPI_V1 )) {
191+ gppi_init ();
192+ }
193+
164194 return 0 ;
165195}
166196
0 commit comments