MCUX CLNS
MCUX Crypto Library Normal Secure
Loading...
Searching...
No Matches
ip_platform.h
Go to the documentation of this file.
1/*--------------------------------------------------------------------------*/
2/* Copyright 2023 NXP */
3/* */
4/* SPDX-License-Identifier: BSD-3-Clause */
5/* */
6/* Redistribution and use in source and binary forms, with or without */
7/* modification, are permitted provided that the following conditions are */
8/* met: */
9/* */
10/* 1. Redistributions of source code must retain the above copyright */
11/* notice, this 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 the copyright holder nor the names of its */
18/* contributors may be used to endorse or promote products derived from */
19/* this software without specific prior written permission. */
20/* */
21/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS */
22/* IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED */
23/* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A */
24/* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
25/* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
26/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */
27/* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR */
28/* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF */
29/* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING */
30/* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS */
31/* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
32/*--------------------------------------------------------------------------*/
33
38
39#ifndef IP_PLATFORM_H
40#define IP_PLATFORM_H
41
43
44/* ================================================================================ */
45/* ================ Peripheral declaration ================ */
46/* ================================================================================ */
47
48// Define base addresses of Glikey instances
49#define GLIKEY0_BASEADDRESS GLIKEY0_BASE
50#define GLIKEY1_BASEADDRESS GLIKEY1_BASE
51#define GLIKEY2_BASEADDRESS GLIKEY2_BASE
52#define GLIKEY3_BASEADDRESS GLIKEY3_BASE
53#define GLIKEY4_BASEADDRESS GLIKEY4_BASE
54#define GLIKEY5_BASEADDRESS GLIKEY5_BASE
55
56#define GLIKEY_SFR_BASE(baseAddress) ((GLIKEY_Type *)baseAddress)
57#define GLIKEY_SFR_NAME(sfr) sfr
58#define GLIKEY_SFR_PREFIX GLIKEY_
59#define GLIKEY_SFR_SUFFIX_MSK _MASK
60#define GLIKEY_SFR_SUFFIX_POS _SHIFT
61
62// Define number of indexes per Glikey instance
63#define GLIKEY0_NUM_IDX 16
64#define GLIKEY1_NUM_IDX 16
65#define GLIKEY2_NUM_IDX 16
66#define GLIKEY3_NUM_IDX 16
67#define GLIKEY4_NUM_IDX 16
68#define GLIKEY5_NUM_IDX 16
69
70// Define base address of ELS
71#define ELS_SFR_BASE ELS_NS
72#define ELS_SFR_NAME(sfr) sfr
73#define ELS_SFR_PREFIX ELS_
74
75// Workaround (RT700 platform header has a bug and defines ELS_KS0 as ELS_K0, but ELS_KS1 etc. are correct)
76#define ELS_KS0 ELS_K0
77
78// Define base address of PKC
79#define PKC_SFR_BASE PKC
80#define PKC_SFR_NAME(sfr) PKC_ ## sfr
81#define PKC_SFR_PREFIX PKC_PKC_
82#define PKC_SFR_SUFFIX_MSK _MASK
83#define PKC_SFR_SUFFIX_POS _SHIFT
84
85// PKC_RAM base address is not defined in any header file
86#define PKC_RAM_ADDR ((uint32_t)0x34110000u)
87#define PKC_WORD_SIZE 8u
88
89// Define base address of TRNG
90#define TRNG_SFR_BASE TRNG
91#define TRNG_SFR_NAME(sfr) sfr
92#define TRNG_SFR_PREFIX TRNG_
93#define TRNG_SFR_SUFFIX_MSK _MASK
94#define TRNG_SFR_SUFFIX_POS _SHIFT
95
96// Define base address of SAFO
97#define SAFO_SFR_BASE OSCCA
98#define SAFO_SFR_NAME(sfr) SAFO_SGI_ ## sfr
99#define SAFO_SFR_PREFIX OSCCA_SAFO_SGI_
100
101// CSS interrupt definitions
102#define CSS_INTERRUPT_ERR_NUMBER ELS_IRQn
103#define CSS_INTERRUPT_BUSY_NUMBER ELS_IRQn
104#define CSS_INTERRUPT_IRQ_NUMBER ELS_IRQn
105
106// Glikey interrupt definitions
107#define GLIKEY0_INTERRUPT_NUMBER GLIKEY0_IRQn
108//#define GLIKEY1_INTERRUPT_NUMBER GLIKEY1_IRQn // missing in HW header
109#define GLIKEY2_INTERRUPT_NUMBER GLIKEY2_IRQn
110#define GLIKEY3_INTERRUPT_NUMBER GLIKEY3_IRQn
111//#define GLIKEY4_INTERRUPT_NUMBER GLIKEY4_IRQn // missing in HW header
112#define GLIKEY5_INTERRUPT_NUMBER GLIKEY5_IRQn
113
114// ELS version
115#define ELS_HW_VERSION_REVISION 0
116#define ELS_HW_VERSION_MINOR 10
117#define ELS_HW_VERSION_MAJOR 3
118#define ELS_HW_VERSION_FW_REVISION 0
119#define ELS_HW_VERSION_FW_MINOR 10
120#define ELS_HW_VERSION_FW_MAJOR 2
121
122// Define SYSCON0 ASSERT PROT Address Register
123#define SYSCON_ASSERT_PROT *(volatile uint32_t*) 0x50002B68
124
125
126/* If we are supposed to determine the ELS base address at link time, do not use the definitions from the platform header file
127 * Redefine ELS_SFR_BASE as an extern pointer.
128 */
129#undef ELS_SFR_BASE
130extern void * ip_css_base;
131#define ELS_SFR_BASE ((ELS_Type *) ip_css_base)
132
133#endif
CMSIS Peripheral Access Layer for MIMXRT798S_cm33_core0.