Skip to content

Commit ae28bb9

Browse files
committed
[nrf fromtree] soc: nordic: common: gppi: Rework sd2ppi_global setup
Rework GPPI configuration for SD^2PPI global domain. There can be an SoC which does not have dppic135, dppic136, ppib136 and ppib137 nodes. Add build time conditions to configuration files. Additionally, remove references to APBxx (bus) names which could be confusing as they are not references anywhere else. Use DPPIxxx identification instead. Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no> (cherry picked from commit 3145230)
1 parent 9be0fbb commit ae28bb9

3 files changed

Lines changed: 348 additions & 226 deletions

File tree

soc/nordic/common/gppi_init.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,14 @@ static int gppi_init(void)
6767
BIT_MASK(DT_PROP(DT_NODELABEL(dppic133), channels)));
6868
nrfx_gppi_channel_init(NRFX_GPPI_NODE_DPPIC134,
6969
BIT_MASK(DT_PROP(DT_NODELABEL(dppic134), channels)));
70+
#if DT_NODE_EXISTS(DT_NODELABEL(dppic135))
7071
nrfx_gppi_channel_init(NRFX_GPPI_NODE_DPPIC135,
7172
BIT_MASK(DT_PROP(DT_NODELABEL(dppic135), channels)));
73+
#endif
74+
#if DT_NODE_EXISTS(DT_NODELABEL(dppic136))
7275
nrfx_gppi_channel_init(NRFX_GPPI_NODE_DPPIC136,
7376
BIT_MASK(DT_PROP(DT_NODELABEL(dppic136), channels)));
77+
#endif
7478
nrfx_gppi_channel_init(NRFX_GPPI_NODE_DPPIC120,
7579
BIT_MASK(DT_PROP(DT_NODELABEL(dppic120), channels)));
7680

@@ -85,10 +89,14 @@ static int gppi_init(void)
8589
BIT_MASK(DT_PROP(DT_NODELABEL(dppic133), groups)));
8690
nrfx_gppi_groups_init(NRFX_GPPI_NODE_DPPIC134,
8791
BIT_MASK(DT_PROP(DT_NODELABEL(dppic134), groups)));
92+
#if DT_NODE_EXISTS(DT_NODELABEL(dppic135))
8893
nrfx_gppi_groups_init(NRFX_GPPI_NODE_DPPIC135,
8994
BIT_MASK(DT_PROP(DT_NODELABEL(dppic135), groups)));
95+
#endif
96+
#if DT_NODE_EXISTS(DT_NODELABEL(dppic136))
9097
nrfx_gppi_groups_init(NRFX_GPPI_NODE_DPPIC136,
9198
BIT_MASK(DT_PROP(DT_NODELABEL(dppic136), groups)));
99+
#endif
92100
nrfx_gppi_groups_init(NRFX_GPPI_NODE_DPPIC120,
93101
BIT_MASK(DT_PROP(DT_NODELABEL(dppic120), groups)));
94102

@@ -101,10 +109,14 @@ static int gppi_init(void)
101109
BIT_MASK(DT_PROP(DT_NODELABEL(ppib134), channels)));
102110
nrfx_gppi_channel_init(NRFX_GPPI_NODE_PPIB130_135,
103111
BIT_MASK(DT_PROP(DT_NODELABEL(ppib135), channels)));
112+
#if DT_NODE_EXISTS(DT_NODELABEL(dppic135))
104113
nrfx_gppi_channel_init(NRFX_GPPI_NODE_PPIB131_136,
105114
BIT_MASK(DT_PROP(DT_NODELABEL(ppib136), channels)));
115+
#endif
116+
#if DT_NODE_EXISTS(DT_NODELABEL(dppic136))
106117
nrfx_gppi_channel_init(NRFX_GPPI_NODE_PPIB131_137,
107118
BIT_MASK(DT_PROP(DT_NODELABEL(ppib137), channels)));
119+
#endif
108120
nrfx_gppi_channel_init(NRFX_GPPI_NODE_PPIB131_121,
109121
BIT_MASK(DT_PROP(DT_NODELABEL(ppib121), channels)));
110122
#elif defined(CONFIG_SOC_NRF54H20_CPURAD)

0 commit comments

Comments
 (0)