1 /* 2 3 Copyright (c) 2010 - 2023, Nordic Semiconductor ASA All rights reserved. 4 5 SPDX-License-Identifier: BSD-3-Clause 6 7 Redistribution and use in source and binary forms, with or without 8 modification, are permitted provided that the following conditions are met: 9 10 1. Redistributions of source code must retain the above copyright notice, this 11 list of conditions and the following disclaimer. 12 13 2. Redistributions in binary form must reproduce the above copyright 14 notice, this list of conditions and the following disclaimer in the 15 documentation and/or other materials provided with the distribution. 16 17 3. Neither the name of Nordic Semiconductor ASA nor the names of its 18 contributors may be used to endorse or promote products derived from this 19 software without specific prior written permission. 20 21 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 IMPLIED WARRANTIES OF MERCHANTABILITY, AND FITNESS FOR A PARTICULAR PURPOSE 24 ARE DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE 25 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 26 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 27 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 28 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 29 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 30 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 31 POSSIBILITY OF SUCH DAMAGE. 32 33 */ 34 35 #ifndef HALTIUM_INTERIM_H__ 36 #define HALTIUM_INTERIM_H__ 37 38 #if defined(HALTIUM_XXAA) 39 40 typedef enum { 41 NRF_DOMAIN_APPLICATION = 2, /* Application Core */ 42 NRF_DOMAIN_RADIOCORE = 3, /* Radio Core */ 43 NRF_DOMAIN_GLOBALFAST = 12, /* Global Domain - Fast clock domain */ 44 NRF_DOMAIN_GLOBALSLOW = 13, /* Global Domain - Slow clock domain */ 45 NRF_DOMAIN_GLOBAL = 15, /* Global Domain */ 46 } NRF_DOMAINID_Type; 47 48 #define NRF_DOMAINS_t NRF_DOMAINID_Type 49 50 typedef enum { 51 NRF_OWNER_NONE = 0, /* Used to denote that ownership is not enforced */ 52 NRF_OWNER_APPLICATION = 2, /* Application Core */ 53 NRF_OWNER_RADIOCORE = 3, /* Radio Core */ 54 NRF_OWNER_DBG_APPLICATION = 10, /* AHB-AP for Application Core CPU */ 55 NRF_OWNER_DBG_RADIOCORE = 11, /* AHB-AP for Radio core CPU */ 56 } NRF_OWNERID_Type; 57 58 typedef enum { 59 NRF_PROCESSOR_APPLICATION = 2, /* Application Core Processor */ 60 NRF_PROCESSOR_RADIOCORE = 3, /* Radio Core Processor */ 61 NRF_PROCESSOR_PPR = 13, /* Peripheral Processor */ 62 NRF_PROCESSOR_FLPR = 14, /* Fast Lightweight Processor */ 63 } NRF_PROCESSORID_Type; 64 65 66 #define NRF_DOMAIN_COUNT NRF_DOMAIN_GLOBAL + 1 67 #define NRF_PROCESSOR_COUNT NRF_PROCESSOR_FLPR + 1 68 69 #if defined(NRF_APPLICATION) 70 #define NRF_DOMAIN NRF_DOMAIN_APPLICATION 71 #elif defined(NRF_RADIOCORE) 72 #define NRF_DOMAIN NRF_DOMAIN_RADIOCORE 73 #elif defined(NRF_FLPR) 74 #define NRF_DOMAIN NRF_DOMAIN_GLOBALFAST 75 #elif defined(NRF_PPR) 76 #define NRF_DOMAIN NRF_DOMAIN_GLOBALSLOW 77 #endif 78 79 #if defined(NRF_APPLICATION) 80 #define NRF_PROCESSOR NRF_PROCESSOR_APPLICATION 81 #elif defined(NRF_RADIOCORE) 82 #define NRF_PROCESSOR NRF_PROCESSOR_RADIOCORE 83 #elif defined(NRF_FLPR) 84 #define NRF_PROCESSOR NRF_PROCESSOR_FLPR 85 #elif defined(NRF_PPR) 86 #define NRF_PROCESSOR NRF_PROCESSOR_PPR 87 #endif 88 89 #if defined(NRF_APPLICATION) 90 #define NRF_OWNER NRF_OWNER_APPLICATION 91 #elif defined(NRF_RADIOCORE) 92 #define NRF_OWNER NRF_OWNER_RADIOCORE 93 #elif defined(NRF_FLPR) && !defined(NRF_OWNER) 94 #define NRF_OWNER NRF_OWNER_APPLICATION 95 #elif defined(NRF_PPR) && !defined(NRF_OWNER) 96 #define NRF_OWNER NRF_OWNER_APPLICATION 97 #endif 98 99 #define ADDRESS_REGION_Pos (29UL) 100 #define ADDRESS_REGION_Msk (0x7UL << ADDRESS_REGION_Pos) 101 #define ADDRESS_SECURITY_Pos (28UL) 102 #define ADDRESS_SECURITY_Msk (0x1UL << ADDRESS_SECURITY_Pos) 103 #define ADDRESS_DOMAIN_Pos (24UL) 104 #define ADDRESS_DOMAIN_Msk (0xFUL << ADDRESS_DOMAIN_Pos) 105 #define ADDRESS_BUS_Pos (16UL) 106 #define ADDRESS_BUS_Msk (0xFFUL << ADDRESS_BUS_Pos) 107 #define ADDRESS_SLAVE_Pos (12UL) 108 #define ADDRESS_SLAVE_Msk (0xFUL << ADDRESS_SLAVE_Pos) 109 #define ADDRESS_PERIPHID_Pos (12UL) 110 #define ADDRESS_PERIPHID_Msk (0x7FFUL << ADDRESS_PERIPHID_Pos) 111 112 typedef enum 113 { 114 NRF_REGION_PROGRAM = 0, 115 NRF_REGION_DATA = 1, 116 NRF_REGION_PERIPHERALS = 2, 117 NRF_REGION_EXTMEM = 3, 118 NRF_REGION_EXTMEM_ENC = 4, 119 NRF_REGION_STM = 5, 120 NRF_REGION_CPU_INTERNAL = 7, 121 } nrf_region_t; 122 123 #define GPIOTE_INT_COUNT 7 124 125 #define GPIOTE_CH_NUM 8 126 #define GPIOTE130_CH_NUM (GPIOTE130_GPIOTE_NCHANNELS_MAX + 1UL) 127 #define GPIOTE130_AVAILABLE_GPIO_PORTS 0x207UL 128 #define GPIOTE_PORT_NUM GPIOTE_EVENTS_PORT_MaxCount 129 #define GPIOTE_FEATURE_SET_PRESENT 130 #define GPIOTE_FEATURE_CLR_PRESENT 131 132 #define VPR_CLIC_PRIO_COUNT 4 133 #define VPR_VEVIF_EVENT_MaxCount 32 134 135 #define GLOBAL_IRQN_START (96) 136 #define GLOBAL_IRQN_MAX (480) 137 138 #define SPU000_PERIPH_COUNT 16 139 #define SPU010_PERIPH_COUNT 16 140 #define SPU020_PERIPH_COUNT 16 141 #define SPU030_PERIPH_COUNT 16 142 143 #define SAADC_CH_NUM 8 144 #define SAADC_EASYDMA_MAXCNT_SIZE 15 145 146 #define LPCOMP_REFSEL_RESOLUTION 16 147 148 #if !defined(DPPI_PRESENT) 149 #define DPPI_PRESENT 150 #endif 151 #define DPPI_GROUP_NUM 2 152 #if defined(NRF_RADIOCORE) 153 #define DPPI020_CH_NUM 16 154 #define DPPI020_GROUP_NUM 0 155 #define DPPI030_CH_NUM 9 156 #define DPPI030_GROUP_NUM 1 157 #endif 158 159 #define GLOBAL_IPCT_CH_NUM 8 160 #if defined(NRF_RADIOCORE) 161 #define LOCAL_IPCT_NUM 8 162 #elif defined(NRF_APPLICATION) 163 #define LOCAL_IPCT_NUM 4 164 #endif 165 166 #if defined(NRF_PPR) || defined(NRF_FLPR) 167 #define MVDMA_JOBLISTCOUNT 4 168 #else 169 #define MVDMA_JOBLISTCOUNT 1 170 #endif 171 172 #define MVDMA_AXI_BUS_WIDTH 8 173 174 #define RADIO_TIMING_RU_Legacy 0 175 #define RADIO_TIMING_RU_Fast 1 176 177 #define MPC_MASTER_PORTS_MaxCount (32UL) 178 #endif 179 #endif // HALTIUM_INTERIM_H__ 180