|
| 1 | +/* |
| 2 | + * Copyright (c) 2024, Nordic Semiconductor ASA |
| 3 | + * |
| 4 | + * SPDX-License-Identifier: Apache-2.0 |
| 5 | + */ |
| 6 | + |
| 7 | +#ifndef NRFX_RESERVED_RESOURCES_H__ |
| 8 | +#define NRFX_RESERVED_RESOURCES_H__ |
| 9 | + |
| 10 | +#if defined(CONFIG_BT_LL_SOFTDEVICE) |
| 11 | +#include <sdc_soc.h> |
| 12 | +#if defined(CONFIG_SOC_COMPATIBLE_NRF52X) |
| 13 | +#define NRFX_PPI_CHANNELS_USED_BY_BT_CTLR SDC_NRF52_PPI_CHANNELS_USED_MASK |
| 14 | +#elif defined(CONFIG_SOC_COMPATIBLE_NRF53X) |
| 15 | +#define NRFX_DPPI0_CHANNELS_USED_BY_BT_CTLR SDC_NRF53_DPPI_CHANNELS_USED_MASK |
| 16 | +#elif defined(CONFIG_SOC_COMPATIBLE_NRF54LX) |
| 17 | +#define NRFX_DPPI10_CHANNELS_USED_BY_BT_CTLR SDC_NRF54L_DPPIC10_CHANNELS_USED_MASK |
| 18 | +#define NRFX_DPPI00_CHANNELS_USED_BY_BT_CTLR SDC_NRF54L_DPPIC00_CHANNELS_USED_MASK |
| 19 | +#define NRFX_PPIB_00_10_CHANNELS_USED_BY_BT_CTLR \ |
| 20 | + (SDC_NRF54L_PPIB00_CHANNELS_USED_MASK | SDC_NRF54L_PPIB10_CHANNELS_USED_MASK) |
| 21 | +#elif defined(CONFIG_SOC_SERIES_NRF54HX) |
| 22 | +#define NRFX_DPPI020_CHANNELS_USED_BY_BT_CTLR SDC_NRF54H_DPPIC020_CHANNELS_USED_MASK |
| 23 | +#define NRFX_DPPI030_CHANNELS_USED_BY_BT_CTLR SDC_NRF54H_DPPIC030_CHANNELS_USED_MASK |
| 24 | +#define NRFX_PPIB_020_030_CHANNELS_USED_BY_BT_CTLR \ |
| 25 | + (SDC_NRF54H_PPIB020_CHANNELS_USED_MASK | SDC_NRF54H_PPIB030_CHANNELS_USED_MASK) |
| 26 | +#else |
| 27 | +#error Unsupported chip family |
| 28 | +#endif |
| 29 | +#endif /* defined(CONFIG_BT_LL_SOFTDEVICE) */ |
| 30 | + |
| 31 | +#if defined(CONFIG_MPSL) |
| 32 | +#include <mpsl_hwres.h> |
| 33 | +#if defined(CONFIG_SOC_COMPATIBLE_NRF52X) |
| 34 | +#define NRFX_PPI_CHANNELS_USED_BY_MPSL MPSL_NRF52_PPI_CHANNELS_USED_MASK |
| 35 | +#elif defined(CONFIG_SOC_COMPATIBLE_NRF53X) |
| 36 | +#define NRFX_DPPI0_CHANNELS_USED_BY_MPSL MPSL_NRF53_DPPIC_CHANNELS_USED_MASK |
| 37 | +#elif defined(CONFIG_SOC_COMPATIBLE_NRF54LX) |
| 38 | +#define NRFX_DPPI10_CHANNELS_USED_BY_MPSL MPSL_NRF54L_DPPIC10_CHANNELS_USED_MASK |
| 39 | +#define NRFX_DPPI20_CHANNELS_USED_BY_MPSL MPSL_NRF54L_DPPIC20_CHANNELS_USED_MASK |
| 40 | +#define NRFX_PPIB_11_21_CHANNELS_USED_BY_MPSL \ |
| 41 | + (MPSL_NRF54L_PPIB11_CHANNELS_USED_MASK | MPSL_NRF54L_PPIB21_CHANNELS_USED_MASK) |
| 42 | +#elif defined(CONFIG_SOC_SERIES_NRF54HX) |
| 43 | +#define NRFX_DPPI020_CHANNELS_USED_BY_MPSL MPSL_NRF54H_DPPIC020_CHANNELS_USED_MASK |
| 44 | +#else |
| 45 | +#error Unsupported chip family |
| 46 | +#endif |
| 47 | +#endif |
| 48 | + |
| 49 | +#include "nrfx_reserved_resources.h" |
| 50 | + |
| 51 | +#if defined(NRF_802154_VERIFY_PERIPHS_ALLOC_AGAINST_MPSL) |
| 52 | + |
| 53 | +BUILD_ASSERT((NRFX_DPPI0_CHANNELS_USED_BY_802154_DRV & NRFX_DPPI0_CHANNELS_USED_BY_MPSL) == 0, |
| 54 | + "PPI channels used by the IEEE802.15.4 radio driver overlap with those " |
| 55 | + "assigned to the MPSL."); |
| 56 | + |
| 57 | +BUILD_ASSERT((NRFX_DPPI0_GROUPS_USED_BY_802154_DRV & NRFX_DPPI0_GROUPS_USED_BY_MPSL) == 0, |
| 58 | + "PPI groups used by the IEEE802.15.4 radio driver overlap with those " |
| 59 | + "assigned to the MPSL."); |
| 60 | + |
| 61 | +BUILD_ASSERT((NRFX_DPPI00_CHANNELS_USED_BY_802154_DRV & NRFX_DPPI00_CHANNELS_USED_BY_MPSL) == 0, |
| 62 | + "PPI channels used by the IEEE802.15.4 radio driver overlap with those " |
| 63 | + "assigned to the MPSL."); |
| 64 | + |
| 65 | +BUILD_ASSERT((NRFX_DPPI00_GROUPS_USED_BY_802154_DRV & NRFX_DPPI00_GROUPS_USED_BY_MPSL) == 0, |
| 66 | + "PPI groups used by the IEEE802.15.4 radio driver overlap with those " |
| 67 | + "assigned to the MPSL."); |
| 68 | + |
| 69 | +BUILD_ASSERT((NRFX_DPPI10_CHANNELS_USED_BY_802154_DRV & NRFX_DPPI10_CHANNELS_USED_BY_MPSL) == 0, |
| 70 | + "PPI channels used by the IEEE802.15.4 radio driver overlap with those " |
| 71 | + "assigned to the MPSL."); |
| 72 | + |
| 73 | +BUILD_ASSERT((NRFX_DPPI10_GROUPS_USED_BY_802154_DRV & NRFX_DPPI10_GROUPS_USED_BY_MPSL) == 0, |
| 74 | + "PPI groups used by the IEEE802.15.4 radio driver overlap with those " |
| 75 | + "assigned to the MPSL."); |
| 76 | + |
| 77 | +BUILD_ASSERT((NRFX_DPPI20_CHANNELS_USED_BY_802154_DRV & NRFX_DPPI20_CHANNELS_USED_BY_MPSL) == 0, |
| 78 | + "PPI channels used by the IEEE802.15.4 radio driver overlap with those " |
| 79 | + "assigned to the MPSL."); |
| 80 | + |
| 81 | +BUILD_ASSERT((NRFX_DPPI20_GROUPS_USED_BY_802154_DRV & NRFX_DPPI20_GROUPS_USED_BY_MPSL) == 0, |
| 82 | + "PPI groups used by the IEEE802.15.4 radio driver overlap with those " |
| 83 | + "assigned to the MPSL."); |
| 84 | + |
| 85 | +BUILD_ASSERT((NRFX_DPPI30_CHANNELS_USED_BY_802154_DRV & NRFX_DPPI30_CHANNELS_USED_BY_MPSL) == 0, |
| 86 | + "PPI channels used by the IEEE802.15.4 radio driver overlap with those " |
| 87 | + "assigned to the MPSL."); |
| 88 | + |
| 89 | +BUILD_ASSERT((NRFX_DPPI30_GROUPS_USED_BY_802154_DRV & NRFX_DPPI30_GROUPS_USED_BY_MPSL) == 0, |
| 90 | + "PPI groups used by the IEEE802.15.4 radio driver overlap with those " |
| 91 | + "assigned to the MPSL."); |
| 92 | + |
| 93 | +BUILD_ASSERT((NRFX_DPPI020_CHANNELS_USED_BY_802154_DRV & NRFX_DPPI020_CHANNELS_USED_BY_MPSL) == 0, |
| 94 | + "PPI channels used by the IEEE802.15.4 radio driver overlap with those " |
| 95 | + "assigned to the MPSL."); |
| 96 | + |
| 97 | +BUILD_ASSERT((NRFX_DPPI020_GROUPS_USED_BY_802154_DRV & NRFX_DPPI020_GROUPS_USED_BY_MPSL) == 0, |
| 98 | + "PPI groups used by the IEEE802.15.4 radio driver overlap with those " |
| 99 | + "assigned to the MPSL."); |
| 100 | + |
| 101 | +BUILD_ASSERT((NRFX_DPPI030_CHANNELS_USED_BY_802154_DRV & NRFX_DPPI030_CHANNELS_USED_BY_MPSL) == 0, |
| 102 | + "PPI channels used by the IEEE802.15.4 radio driver overlap with those " |
| 103 | + "assigned to the MPSL."); |
| 104 | + |
| 105 | +BUILD_ASSERT((NRFX_DPPI030_GROUPS_USED_BY_802154_DRV & NRFX_DPPI030_GROUPS_USED_BY_MPSL) == 0, |
| 106 | + "PPI groups used by the IEEE802.15.4 radio driver overlap with those " |
| 107 | + "assigned to the MPSL."); |
| 108 | + |
| 109 | +BUILD_ASSERT((NRFX_DPPI120_CHANNELS_USED_BY_802154_DRV & NRFX_DPPI120_CHANNELS_USED_BY_MPSL) == 0, |
| 110 | + "PPI channels used by the IEEE802.15.4 radio driver overlap with those " |
| 111 | + "assigned to the MPSL."); |
| 112 | + |
| 113 | +BUILD_ASSERT((NRFX_DPPI120_GROUPS_USED_BY_802154_DRV & NRFX_DPPI120_GROUPS_USED_BY_MPSL) == 0, |
| 114 | + "PPI groups used by the IEEE802.15.4 radio driver overlap with those " |
| 115 | + "assigned to the MPSL."); |
| 116 | + |
| 117 | +BUILD_ASSERT((NRFX_DPPI130_CHANNELS_USED_BY_802154_DRV & NRFX_DPPI130_CHANNELS_USED_BY_MPSL) == 0, |
| 118 | + "PPI channels used by the IEEE802.15.4 radio driver overlap with those " |
| 119 | + "assigned to the MPSL."); |
| 120 | + |
| 121 | +BUILD_ASSERT((NRFX_DPPI130_GROUPS_USED_BY_802154_DRV & NRFX_DPPI130_GROUPS_USED_BY_MPSL) == 0, |
| 122 | + "PPI groups used by the IEEE802.15.4 radio driver overlap with those " |
| 123 | + "assigned to the MPSL."); |
| 124 | + |
| 125 | +BUILD_ASSERT((NRFX_DPPI131_CHANNELS_USED_BY_802154_DRV & NRFX_DPPI131_CHANNELS_USED_BY_MPSL) == 0, |
| 126 | + "PPI channels used by the IEEE802.15.4 radio driver overlap with those " |
| 127 | + "assigned to the MPSL."); |
| 128 | + |
| 129 | +BUILD_ASSERT((NRFX_DPPI131_GROUPS_USED_BY_802154_DRV & NRFX_DPPI131_GROUPS_USED_BY_MPSL) == 0, |
| 130 | + "PPI groups used by the IEEE802.15.4 radio driver overlap with those " |
| 131 | + "assigned to the MPSL."); |
| 132 | + |
| 133 | +BUILD_ASSERT((NRFX_DPPI132_CHANNELS_USED_BY_802154_DRV & NRFX_DPPI132_CHANNELS_USED_BY_MPSL) == 0, |
| 134 | + "PPI channels used by the IEEE802.15.4 radio driver overlap with those " |
| 135 | + "assigned to the MPSL."); |
| 136 | + |
| 137 | +BUILD_ASSERT((NRFX_DPPI132_GROUPS_USED_BY_802154_DRV & NRFX_DPPI132_GROUPS_USED_BY_MPSL) == 0, |
| 138 | + "PPI groups used by the IEEE802.15.4 radio driver overlap with those " |
| 139 | + "assigned to the MPSL."); |
| 140 | + |
| 141 | +BUILD_ASSERT((NRFX_DPPI133_CHANNELS_USED_BY_802154_DRV & NRFX_DPPI133_CHANNELS_USED_BY_MPSL) == 0, |
| 142 | + "PPI channels used by the IEEE802.15.4 radio driver overlap with those " |
| 143 | + "assigned to the MPSL."); |
| 144 | + |
| 145 | +BUILD_ASSERT((NRFX_DPPI133_GROUPS_USED_BY_802154_DRV & NRFX_DPPI133_GROUPS_USED_BY_MPSL) == 0, |
| 146 | + "PPI groups used by the IEEE802.15.4 radio driver overlap with those " |
| 147 | + "assigned to the MPSL."); |
| 148 | + |
| 149 | +BUILD_ASSERT((NRFX_DPPI134_CHANNELS_USED_BY_802154_DRV & NRFX_DPPI134_CHANNELS_USED_BY_MPSL) == 0, |
| 150 | + "PPI channels used by the IEEE802.15.4 radio driver overlap with those " |
| 151 | + "assigned to the MPSL."); |
| 152 | + |
| 153 | +BUILD_ASSERT((NRFX_DPPI134_GROUPS_USED_BY_802154_DRV & NRFX_DPPI134_GROUPS_USED_BY_MPSL) == 0, |
| 154 | + "PPI groups used by the IEEE802.15.4 radio driver overlap with those " |
| 155 | + "assigned to the MPSL."); |
| 156 | + |
| 157 | +BUILD_ASSERT((NRFX_DPPI135_CHANNELS_USED_BY_802154_DRV & NRFX_DPPI135_CHANNELS_USED_BY_MPSL) == 0, |
| 158 | + "PPI channels used by the IEEE802.15.4 radio driver overlap with those " |
| 159 | + "assigned to the MPSL."); |
| 160 | + |
| 161 | +BUILD_ASSERT((NRFX_DPPI135_GROUPS_USED_BY_802154_DRV & NRFX_DPPI135_GROUPS_USED_BY_MPSL) == 0, |
| 162 | + "PPI groups used by the IEEE802.15.4 radio driver overlap with those " |
| 163 | + "assigned to the MPSL."); |
| 164 | + |
| 165 | +BUILD_ASSERT((NRFX_DPPI136_CHANNELS_USED_BY_802154_DRV & NRFX_DPPI136_CHANNELS_USED_BY_MPSL) == 0, |
| 166 | + "PPI channels used by the IEEE802.15.4 radio driver overlap with those " |
| 167 | + "assigned to the MPSL."); |
| 168 | + |
| 169 | +BUILD_ASSERT((NRFX_DPPI136_GROUPS_USED_BY_802154_DRV & NRFX_DPPI136_GROUPS_USED_BY_MPSL) == 0, |
| 170 | + "PPI groups used by the IEEE802.15.4 radio driver overlap with those " |
| 171 | + "assigned to the MPSL."); |
| 172 | + |
| 173 | +BUILD_ASSERT((NRFX_PPI_CHANNELS_USED_BY_802154_DRV & NRFX_PPI_CHANNELS_USED_BY_MPSL) == 0, |
| 174 | + "PPI channels used by the IEEE802.15.4 radio driver overlap with those " |
| 175 | + "assigned to the MPSL."); |
| 176 | + |
| 177 | +BUILD_ASSERT((NRFX_PPI_GROUPS_USED_BY_802154_DRV & NRFX_PPI_GROUPS_USED_BY_MPSL) == 0, |
| 178 | + "PPI groups used by the IEEE802.15.4 radio driver overlap with those " |
| 179 | + "assigned to the MPSL."); |
| 180 | + |
| 181 | +BUILD_ASSERT((NRFX_PPIB_00_10_CHANNELS_USED_BY_802154_DRV & |
| 182 | + NRFX_PPIB_00_10_CHANNELS_USED_BY_MPSL) == 0, |
| 183 | + "PPI channels used by the IEEE802.15.4 radio driver overlap with those " |
| 184 | + "assigned to the MPSL."); |
| 185 | + |
| 186 | +BUILD_ASSERT((NRFX_PPIB_01_20_CHANNELS_USED_BY_802154_DRV & |
| 187 | + NRFX_PPIB_01_20_CHANNELS_USED_BY_MPSL) == 0, |
| 188 | + "PPI channels used by the IEEE802.15.4 radio driver overlap with those " |
| 189 | + "assigned to the MPSL."); |
| 190 | + |
| 191 | +BUILD_ASSERT((NRFX_PPIB_11_21_CHANNELS_USED_BY_802154_DRV & |
| 192 | + NRFX_PPIB_11_21_CHANNELS_USED_BY_MPSL) == 0, |
| 193 | + "PPI channels used by the IEEE802.15.4 radio driver overlap with those " |
| 194 | + "assigned to the MPSL."); |
| 195 | + |
| 196 | +BUILD_ASSERT((NRFX_PPIB_22_30_CHANNELS_USED_BY_802154_DRV & |
| 197 | + NRFX_PPIB_22_30_CHANNELS_USED_BY_MPSL) == 0, |
| 198 | + "PPI channels used by the IEEE802.15.4 radio driver overlap with those " |
| 199 | + "assigned to the MPSL."); |
| 200 | + |
| 201 | +BUILD_ASSERT((NRFX_PPIB_02_03_CHANNELS_USED_BY_802154_DRV & |
| 202 | + NRFX_PPIB_02_03_CHANNELS_USED_BY_MPSL) == 0, |
| 203 | + "PPI channels used by the IEEE802.15.4 radio driver overlap with those " |
| 204 | + "assigned to the MPSL."); |
| 205 | + |
| 206 | +BUILD_ASSERT((NRFX_PPIB_04_12_CHANNELS_USED_BY_802154_DRV & |
| 207 | + NRFX_PPIB_04_12_CHANNELS_USED_BY_MPSL) == 0, |
| 208 | + "PPI channels used by the IEEE802.15.4 radio driver overlap with those " |
| 209 | + "assigned to the MPSL."); |
| 210 | + |
| 211 | +BUILD_ASSERT((NRFX_PPIB_020_030_CHANNELS_USED_BY_802154_DRV & |
| 212 | + NRFX_PPIB_020_030_CHANNELS_USED_BY_MPSL) == 0, |
| 213 | + "PPI channels used by the IEEE802.15.4 radio driver overlap with those " |
| 214 | + "assigned to the MPSL."); |
| 215 | + |
| 216 | +#endif /* NRF_802154_VERIFY_PERIPHS_ALLOC_AGAINST_MPSL */ |
| 217 | +#endif /* NRFX_RESERVED_RESOURCES_H__ */ |
0 commit comments