1 /*
2 
3 Copyright (c) 2010 - 2024, 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 
41     #define NRF_DOMAIN_COUNT    NRF_DOMAIN_GLOBAL + 1
42     #define NRF_PROCESSOR_COUNT NRF_PROCESSOR_FLPR + 1
43 
44 
45     #define ADDRESS_REGION_Pos        (29UL)
46     #define ADDRESS_REGION_Msk        (0x7UL << ADDRESS_REGION_Pos)
47     #define ADDRESS_SECURITY_Pos      (28UL)
48     #define ADDRESS_SECURITY_Msk      (0x1UL << ADDRESS_SECURITY_Pos)
49     #define ADDRESS_DOMAIN_Pos        (24UL)
50     #define ADDRESS_DOMAIN_Msk        (0xFUL << ADDRESS_DOMAIN_Pos)
51     #define ADDRESS_BUS_Pos           (16UL)
52     #define ADDRESS_BUS_Msk           (0xFFUL << ADDRESS_BUS_Pos)
53     #define ADDRESS_SLAVE_Pos         (12UL)
54     #define ADDRESS_SLAVE_Msk         (0xFUL << ADDRESS_SLAVE_Pos)
55     #define ADDRESS_PERIPHID_Pos      (12UL)
56     #define ADDRESS_PERIPHID_Msk      (0x7FFUL << ADDRESS_PERIPHID_Pos)
57 
58     typedef enum
59     {
60         NRF_REGION_PROGRAM      = 0,
61         NRF_REGION_DATA         = 1,
62         NRF_REGION_PERIPHERALS  = 2,
63         NRF_REGION_EXTMEM       = 3,
64         NRF_REGION_EXTMEM_ENC   = 4,
65         NRF_REGION_STM          = 5,
66         NRF_REGION_CPU_INTERNAL = 7,
67     } nrf_region_t;
68 
69     #define GPIOTE_INT_COUNT 7
70 
71     #define GPIOTE_CH_NUM   8
72     #define GPIOTE130_CH_NUM (GPIOTE130_GPIOTE_NCHANNELS_MAX + 1UL)
73     #define GPIOTE130_AVAILABLE_GPIO_PORTS 0x207UL
74     #define GPIOTE_PORT_NUM GPIOTE_EVENTS_PORT_MaxCount
75     #define GPIOTE_FEATURE_SET_PRESENT
76     #define GPIOTE_FEATURE_CLR_PRESENT
77 
78     #define VPR_CLIC_PRIO_COUNT 4
79     #define VPR_VEVIF_EVENT_MaxCount 32
80 
81     #define GLOBAL_IRQN_START (96)
82     #define GLOBAL_IRQN_MAX   (480)
83 
84     #define SPU000_PERIPH_COUNT 16
85     #define SPU010_PERIPH_COUNT 16
86     #define SPU020_PERIPH_COUNT 16
87     #define SPU030_PERIPH_COUNT 16
88 
89     #define SAADC_CH_NUM 8
90     #define SAADC_EASYDMA_MAXCNT_SIZE 15
91 
92     #define LPCOMP_REFSEL_RESOLUTION 16
93 
94     #if !defined(DPPI_PRESENT)
95         #define DPPI_PRESENT
96     #endif
97     #define DPPI_GROUP_NUM 2
98     #if defined(NRF_RADIOCORE)
99         #define DPPI020_CH_NUM 16
100         #define DPPI020_GROUP_NUM 0
101         #define DPPI030_CH_NUM 9
102         #define DPPI030_GROUP_NUM 1
103     #endif
104 
105     #define GLOBAL_IPCT_CH_NUM 8
106     #if defined(NRF_RADIOCORE)
107         #define LOCAL_IPCT_NUM 8
108     #elif defined(NRF_APPLICATION)
109         #define LOCAL_IPCT_NUM 4
110     #endif
111 
112     #if defined(NRF_PPR) || defined(NRF_FLPR)
113         #define MVDMA_JOBLISTCOUNT 4
114     #else
115         #define MVDMA_JOBLISTCOUNT 1
116     #endif
117 
118     #define MVDMA_AXI_BUS_WIDTH 8
119 
120     #define RADIO_TIMING_RU_Legacy  0
121     #define RADIO_TIMING_RU_Fast    1
122 
123     #define MPC_MASTER_PORTS_MaxCount (32UL)
124 #endif
125 #endif // HALTIUM_INTERIM_H__
126