blob: b3099b715e7f919dd3f0c54f524038d12f0fcdf6 [file] [log] [blame]
Sandrine Bailleux798140d2014-07-17 16:06:39 +01001/*
2 * Copyright (c) 2014, ARM Limited and Contributors. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are met:
6 *
7 * Redistributions of source code must retain the above copyright notice, this
8 * list of conditions and the following disclaimer.
9 *
10 * Redistributions in binary form must reproduce the above copyright notice,
11 * this list of conditions and the following disclaimer in the documentation
12 * and/or other materials provided with the distribution.
13 *
14 * Neither the name of ARM nor the names of its contributors may be used
15 * to endorse or promote products derived from this software without specific
16 * prior written permission.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
22 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 * POSSIBILITY OF SUCH DAMAGE.
29 */
30
31#ifndef __JUNO_DEF_H__
32#define __JUNO_DEF_H__
33
34/* Special value used to verify platform parameters from BL2 to BL3-1 */
35#define JUNO_BL31_PLAT_PARAM_VAL 0x0f1e2d3c4b5a6978ULL
36
37#define JUNO_PRIMARY_CPU 0x100
38
39/*******************************************************************************
40 * Juno memory map related constants
41 ******************************************************************************/
42#define MHU_SECURE_BASE 0x04000000
43#define MHU_SECURE_SIZE 0x00001000
44
45#define MHU_PAYLOAD_CACHED 0
46
47#define TRUSTED_MAILBOXES_BASE MHU_SECURE_BASE
48#define TRUSTED_MAILBOX_SHIFT 4
49
50#define EMMC_BASE 0x0c000000
51#define EMMC_SIZE 0x04000000
52
53#define PSRAM_BASE 0x14000000
54#define PSRAM_SIZE 0x02000000
55
56#define IOFPGA_BASE 0x1c000000
57#define IOFPGA_SIZE 0x03000000
58
59#define NSROM_BASE 0x1f000000
60#define NSROM_SIZE 0x00001000
61
62/* Following covers Columbus Peripherals excluding NSROM and NSRAM */
63#define DEVICE0_BASE 0x20000000
64#define DEVICE0_SIZE 0x0e000000
65#define MHU_BASE 0x2b1f0000
66
67#define NSRAM_BASE 0x2e000000
68#define NSRAM_SIZE 0x00008000
69
70/* Following covers Juno Peripherals and PCIe expansion area */
71#define DEVICE1_BASE 0x40000000
72#define DEVICE1_SIZE 0x40000000
73#define PCIE_CONTROL_BASE 0x7ff20000
74
75#define DRAM_BASE 0x80000000
76#define DRAM_SIZE 0x80000000
77
78/* Memory mapped Generic timer interfaces */
79#define SYS_CNTCTL_BASE 0x2a430000
80#define SYS_CNTREAD_BASE 0x2a800000
81#define SYS_TIMCTL_BASE 0x2a810000
82
83/* V2M motherboard system registers & offsets */
84#define VE_SYSREGS_BASE 0x1c010000
85#define V2M_SYS_LED 0x8
86
87/*
88 * V2M sysled bit definitions. The values written to this
89 * register are defined in arch.h & runtime_svc.h. Only
90 * used by the primary cpu to diagnose any cold boot issues.
91 *
92 * SYS_LED[0] - Security state (S=0/NS=1)
93 * SYS_LED[2:1] - Exception Level (EL3-EL0)
94 * SYS_LED[7:3] - Exception Class (Sync/Async & origin)
95 *
96 */
97#define SYS_LED_SS_SHIFT 0x0
98#define SYS_LED_EL_SHIFT 0x1
99#define SYS_LED_EC_SHIFT 0x3
100
101/*******************************************************************************
102 * GIC-400 & interrupt handling related constants
103 ******************************************************************************/
104#define GICD_BASE 0x2c010000
105#define GICC_BASE 0x2c02f000
106#define GICH_BASE 0x2c04f000
107#define GICV_BASE 0x2c06f000
108
109#define IRQ_MHU 69
110#define IRQ_GPU_SMMU_0 71
111#define IRQ_GPU_SMMU_1 73
112#define IRQ_ETR_SMMU 75
113#define IRQ_TZC400 80
114#define IRQ_TZ_WDOG 86
115
Sandrine Bailleux1fe43362014-07-17 09:56:29 +0100116#define IRQ_SEC_PHY_TIMER 29
Sandrine Bailleux798140d2014-07-17 16:06:39 +0100117#define IRQ_SEC_SGI_0 8
118#define IRQ_SEC_SGI_1 9
119#define IRQ_SEC_SGI_2 10
120#define IRQ_SEC_SGI_3 11
121#define IRQ_SEC_SGI_4 12
122#define IRQ_SEC_SGI_5 13
123#define IRQ_SEC_SGI_6 14
124#define IRQ_SEC_SGI_7 15
125#define IRQ_SEC_SGI_8 16
126
127/*******************************************************************************
128 * PL011 related constants
129 ******************************************************************************/
130/* FPGA UART0 */
131#define PL011_UART0_BASE 0x1c090000
132/* FPGA UART1 */
133#define PL011_UART1_BASE 0x1c0a0000
134/* SoC UART0 */
135#define PL011_UART2_BASE 0x7ff80000
136/* SoC UART1 */
137#define PL011_UART3_BASE 0x7ff70000
138
139#define PL011_BAUDRATE 115200
140
141#define PL011_UART0_CLK_IN_HZ 24000000
142#define PL011_UART1_CLK_IN_HZ 24000000
143
144/*******************************************************************************
145 * NIC-400 related constants
146 ******************************************************************************/
147
148/* CSS NIC-400 Global Programmers View (GPV) */
149#define CSS_NIC400_BASE 0x2a000000
150
151/* The slave_bootsecure controls access to GPU, DMC and CS. */
152#define CSS_NIC400_SLAVE_BOOTSECURE 8
153
154/* SoC NIC-400 Global Programmers View (GPV) */
155#define SOC_NIC400_BASE 0x7fd00000
156
157#define SOC_NIC400_USB_EHCI 0
158#define SOC_NIC400_TLX_MASTER 1
159#define SOC_NIC400_USB_OHCI 2
160#define SOC_NIC400_PL354_SMC 3
161/*
162 * The apb4_bridge controls access to:
163 * - the PCIe configuration registers
164 * - the MMU units for USB, HDLCD and DMA
165 */
166#define SOC_NIC400_APB4_BRIDGE 4
167/*
168 * The bootsec_bridge controls access to a bunch of peripherals, e.g. the UARTs.
169 */
170#define SOC_NIC400_BOOTSEC_BRIDGE 5
171#define SOC_NIC400_BOOTSEC_BRIDGE_UART1 (1 << 12)
172
173/*******************************************************************************
174 * TZC-400 related constants
175 ******************************************************************************/
176#define TZC400_BASE 0x2a4a0000
177
178#define TZC400_NSAID_CCI400 0 /* Note: Same as default NSAID!! */
179#define TZC400_NSAID_PCIE 1
180#define TZC400_NSAID_HDLCD0 2
181#define TZC400_NSAID_HDLCD1 3
182#define TZC400_NSAID_USB 4
183#define TZC400_NSAID_DMA330 5
184#define TZC400_NSAID_THINLINKS 6
185#define TZC400_NSAID_AP 9
186#define TZC400_NSAID_GPU 10
187#define TZC400_NSAID_SCP 11
188#define TZC400_NSAID_CORESIGHT 12
189
190/*******************************************************************************
191 * CCI-400 related constants
192 ******************************************************************************/
193#define CCI400_BASE 0x2c090000
194#define CCI400_SL_IFACE3_CLUSTER_IX 1
195#define CCI400_SL_IFACE4_CLUSTER_IX 0
196
197#endif /* __JUNO_DEF_H__ */