1 /*
2  * Arm SCP/MCP Software
3  * Copyright (c) 2022, Arm Limited and Contributors. All rights reserved.
4  *
5  * SPDX-License-Identifier: BSD-3-Clause
6  *
7  * Description:
8  *     Software defined memory map for LCP core.
9  */
10 
11 #ifndef LCP_SOFTWARE_MMAP_H
12 #define LCP_SOFTWARE_MMAP_H
13 
14 #include <fwk_macros.h>
15 
16 #define LCP_ITCM_SIZE (64 * 1024)
17 #define LCP_DTCM_SIZE (64 * 1024)
18 
19 #define LCP_ITCM_NS_BASE 0x00000000
20 #define LCP_ITCM_S_BASE  0x10000000
21 #define LCP_DTCM_NS_BASE 0x20000000
22 #define LCP_DTCM_S_BASE  0x30000000
23 
24 #define LCP_CORE_ITCM_REGION_START LCP_ITCM_NS_BASE
25 #define LCP_CORE_ITCM_REGION_END   (LCP_ITCM_NS_BASE + LCP_ITCM_SIZE - 1)
26 
27 #define LCP_CORE_DTCM_REGION_START LCP_DTCM_NS_BASE
28 #define LCP_CORE_DTCM_REGION_END   (LCP_DTCM_NS_BASE + LCP_DTCM_SIZE - 1)
29 
30 #define LCP_CORE_PERIPHERAL_REGION_START 0x30010000
31 #define LCP_CORE_PERIPHERAL_REGION_END   0x6FFFFFFF
32 
33 #define LCP_SRAM_REGION_START 0x70000000
34 #define LCP_SRAM_REGION_END   0xB007FFFF
35 
36 #define LCP_DEVICE_REGION_START 0xB0080000
37 #define LCP_DEVICE_REGION_END   0xFFFFFFFF
38 
39 #define LCP_TIMER_BASE_NS UINT32_C(0x48000000)
40 #define LCP_TIMER_BASE_S  UINT32_C(0x5802F000)
41 
42 #define LCP_AP_MHU_MBX_BASE 0xB0090000
43 
44 #define LCP_UART_BASE 0xB2000000
45 
46 #define SCP_MHU3_PBX_MBX_SIZE (64 * 1024)
47 
48 #define LCP_SCP_MHU_BASE 0xB3000000
49 
50 #define LCP0_SCP_MHU_PBX_BASE  LCP_SCP_MHU_BASE
51 #define LCP0_SCP_MHU_MBX_BASE  (LCP0_SCP_MHU_PBX_BASE + SCP_MHU3_PBX_MBX_SIZE)
52 #define LCP1_SCP_MHU_PBX_BASE  (LCP0_SCP_MHU_MBX_BASE + SCP_MHU3_PBX_MBX_SIZE)
53 #define LCP1_SCP_MHU_MBX_BASE  (LCP1_SCP_MHU_PBX_BASE + SCP_MHU3_PBX_MBX_SIZE)
54 #define LCP2_SCP_MHU_PBX_BASE  (LCP1_SCP_MHU_MBX_BASE + SCP_MHU3_PBX_MBX_SIZE)
55 #define LCP2_SCP_MHU_MBX_BASE  (LCP2_SCP_MHU_PBX_BASE + SCP_MHU3_PBX_MBX_SIZE)
56 #define LCP3_SCP_MHU_PBX_BASE  (LCP2_SCP_MHU_MBX_BASE + SCP_MHU3_PBX_MBX_SIZE)
57 #define LCP3_SCP_MHU_MBX_BASE  (LCP3_SCP_MHU_PBX_BASE + SCP_MHU3_PBX_MBX_SIZE)
58 #define LCP4_SCP_MHU_PBX_BASE  (LCP3_SCP_MHU_MBX_BASE + SCP_MHU3_PBX_MBX_SIZE)
59 #define LCP4_SCP_MHU_MBX_BASE  (LCP4_SCP_MHU_PBX_BASE + SCP_MHU3_PBX_MBX_SIZE)
60 #define LCP5_SCP_MHU_PBX_BASE  (LCP4_SCP_MHU_MBX_BASE + SCP_MHU3_PBX_MBX_SIZE)
61 #define LCP5_SCP_MHU_MBX_BASE  (LCP5_SCP_MHU_PBX_BASE + SCP_MHU3_PBX_MBX_SIZE)
62 #define LCP6_SCP_MHU_PBX_BASE  (LCP5_SCP_MHU_MBX_BASE + SCP_MHU3_PBX_MBX_SIZE)
63 #define LCP6_SCP_MHU_MBX_BASE  (LCP6_SCP_MHU_PBX_BASE + SCP_MHU3_PBX_MBX_SIZE)
64 #define LCP7_SCP_MHU_PBX_BASE  (LCP6_SCP_MHU_MBX_BASE + SCP_MHU3_PBX_MBX_SIZE)
65 #define LCP7_SCP_MHU_MBX_BASE  (LCP7_SCP_MHU_PBX_BASE + SCP_MHU3_PBX_MBX_SIZE)
66 #define LCP8_SCP_MHU_PBX_BASE  (LCP7_SCP_MHU_MBX_BASE + SCP_MHU3_PBX_MBX_SIZE)
67 #define LCP8_SCP_MHU_MBX_BASE  (LCP8_SCP_MHU_PBX_BASE + SCP_MHU3_PBX_MBX_SIZE)
68 #define LCP9_SCP_MHU_PBX_BASE  (LCP8_SCP_MHU_MBX_BASE + SCP_MHU3_PBX_MBX_SIZE)
69 #define LCP9_SCP_MHU_MBX_BASE  (LCP9_SCP_MHU_PBX_BASE + SCP_MHU3_PBX_MBX_SIZE)
70 #define LCP10_SCP_MHU_PBX_BASE (LCP9_SCP_MHU_MBX_BASE + SCP_MHU3_PBX_MBX_SIZE)
71 #define LCP10_SCP_MHU_MBX_BASE (LCP10_SCP_MHU_PBX_BASE + SCP_MHU3_PBX_MBX_SIZE)
72 #define LCP11_SCP_MHU_PBX_BASE (LCP10_SCP_MHU_MBX_BASE + SCP_MHU3_PBX_MBX_SIZE)
73 #define LCP11_SCP_MHU_MBX_BASE (LCP11_SCP_MHU_PBX_BASE + SCP_MHU3_PBX_MBX_SIZE)
74 #define LCP12_SCP_MHU_PBX_BASE (LCP11_SCP_MHU_MBX_BASE + SCP_MHU3_PBX_MBX_SIZE)
75 #define LCP12_SCP_MHU_MBX_BASE (LCP12_SCP_MHU_PBX_BASE + SCP_MHU3_PBX_MBX_SIZE)
76 #define LCP13_SCP_MHU_PBX_BASE (LCP12_SCP_MHU_MBX_BASE + SCP_MHU3_PBX_MBX_SIZE)
77 #define LCP13_SCP_MHU_MBX_BASE (LCP13_SCP_MHU_PBX_BASE + SCP_MHU3_PBX_MBX_SIZE)
78 #define LCP14_SCP_MHU_PBX_BASE (LCP13_SCP_MHU_MBX_BASE + SCP_MHU3_PBX_MBX_SIZE)
79 #define LCP14_SCP_MHU_MBX_BASE (LCP14_SCP_MHU_PBX_BASE + SCP_MHU3_PBX_MBX_SIZE)
80 #define LCP15_SCP_MHU_PBX_BASE (LCP14_SCP_MHU_MBX_BASE + SCP_MHU3_PBX_MBX_SIZE)
81 #define LCP15_SCP_MHU_MBX_BASE (LCP15_SCP_MHU_PBX_BASE + SCP_MHU3_PBX_MBX_SIZE)
82 
83 #define LCP_EXTEND_CTRL_FRAME_BASE 0xB0083000
84 #define LCP_CFG_BASE               LCP_EXTEND_CTRL_FRAME_BASE + 0x000
85 #define LCP_RST_SYN_BASE           LCP_EXTEND_CTRL_FRAME_BASE + 0x010
86 
87 #endif /* LCP_SOFTWARE_MMAP_H */
88