Antonio Nino Diaz | 272e871 | 2018-09-18 01:36:00 +0100 | [diff] [blame] | 1 | /* |
Carlo Caione | 1afdfb0 | 2019-08-24 18:47:06 +0100 | [diff] [blame] | 2 | * Copyright (c) 2018-2019, ARM Limited and Contributors. All rights reserved. |
Antonio Nino Diaz | 272e871 | 2018-09-18 01:36:00 +0100 | [diff] [blame] | 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
| 7 | #ifndef GXBB_DEF_H |
| 8 | #define GXBB_DEF_H |
| 9 | |
Antonio Nino Diaz | e0f9063 | 2018-12-14 00:18:21 +0000 | [diff] [blame] | 10 | #include <lib/utils_def.h> |
Antonio Nino Diaz | 272e871 | 2018-09-18 01:36:00 +0100 | [diff] [blame] | 11 | |
| 12 | /******************************************************************************* |
| 13 | * System oscillator |
| 14 | ******************************************************************************/ |
Carlo Caione | 1e3e33b | 2019-08-28 15:32:22 +0100 | [diff] [blame] | 15 | #define AML_OSC24M_CLK_IN_HZ ULL(24000000) /* 24 MHz */ |
Antonio Nino Diaz | 272e871 | 2018-09-18 01:36:00 +0100 | [diff] [blame] | 16 | |
| 17 | /******************************************************************************* |
| 18 | * Memory regions |
| 19 | ******************************************************************************/ |
Carlo Caione | 1e3e33b | 2019-08-28 15:32:22 +0100 | [diff] [blame] | 20 | #define AML_NSDRAM0_BASE UL(0x01000000) |
| 21 | #define AML_NSDRAM0_SIZE UL(0x0F000000) |
Antonio Nino Diaz | 272e871 | 2018-09-18 01:36:00 +0100 | [diff] [blame] | 22 | |
Carlo Caione | 1e3e33b | 2019-08-28 15:32:22 +0100 | [diff] [blame] | 23 | #define AML_NSDRAM1_BASE UL(0x10000000) |
| 24 | #define AML_NSDRAM1_SIZE UL(0x00100000) |
Antonio Nino Diaz | 272e871 | 2018-09-18 01:36:00 +0100 | [diff] [blame] | 25 | |
| 26 | #define BL31_BASE UL(0x10100000) |
| 27 | #define BL31_SIZE UL(0x000C0000) |
| 28 | #define BL31_LIMIT (BL31_BASE + BL31_SIZE) |
| 29 | |
| 30 | /* Shared memory used for SMC services */ |
Carlo Caione | 107df3e | 2019-08-26 13:04:12 +0100 | [diff] [blame] | 31 | #define AML_SHARE_MEM_INPUT_BASE UL(0x100FE000) |
| 32 | #define AML_SHARE_MEM_OUTPUT_BASE UL(0x100FF000) |
Antonio Nino Diaz | 272e871 | 2018-09-18 01:36:00 +0100 | [diff] [blame] | 33 | |
Carlo Caione | 1e3e33b | 2019-08-28 15:32:22 +0100 | [diff] [blame] | 34 | #define AML_SEC_DEVICE0_BASE UL(0xC0000000) |
| 35 | #define AML_SEC_DEVICE0_SIZE UL(0x09000000) |
Antonio Nino Diaz | 272e871 | 2018-09-18 01:36:00 +0100 | [diff] [blame] | 36 | |
Carlo Caione | 1e3e33b | 2019-08-28 15:32:22 +0100 | [diff] [blame] | 37 | #define AML_SEC_DEVICE1_BASE UL(0xD0040000) |
| 38 | #define AML_SEC_DEVICE1_SIZE UL(0x00008000) |
Antonio Nino Diaz | 272e871 | 2018-09-18 01:36:00 +0100 | [diff] [blame] | 39 | |
Carlo Caione | 1e3e33b | 2019-08-28 15:32:22 +0100 | [diff] [blame] | 40 | #define AML_TZRAM_BASE UL(0xD9000000) |
| 41 | #define AML_TZRAM_SIZE UL(0x00014000) |
Antonio Nino Diaz | 272e871 | 2018-09-18 01:36:00 +0100 | [diff] [blame] | 42 | /* Top 0xC000 bytes (up to 0xD9020000) used by BL2 */ |
| 43 | |
| 44 | /* Mailboxes */ |
Carlo Caione | 9c85f25 | 2019-08-28 09:46:18 +0100 | [diff] [blame] | 45 | #define AML_MHU_SECURE_SCP_TO_AP_PAYLOAD UL(0xD9013800) |
| 46 | #define AML_MHU_SECURE_AP_TO_SCP_PAYLOAD UL(0xD9013A00) |
Carlo Caione | 883e3ca | 2019-08-28 15:19:56 +0100 | [diff] [blame] | 47 | #define AML_PSCI_MAILBOX_BASE UL(0xD9013F00) |
Antonio Nino Diaz | 272e871 | 2018-09-18 01:36:00 +0100 | [diff] [blame] | 48 | |
Carlo Caione | 1e3e33b | 2019-08-28 15:32:22 +0100 | [diff] [blame] | 49 | #define AML_TZROM_BASE UL(0xD9040000) |
| 50 | #define AML_TZROM_SIZE UL(0x00010000) |
Antonio Nino Diaz | 272e871 | 2018-09-18 01:36:00 +0100 | [diff] [blame] | 51 | |
Carlo Caione | 1e3e33b | 2019-08-28 15:32:22 +0100 | [diff] [blame] | 52 | #define AML_SEC_DEVICE2_BASE UL(0xDA000000) |
| 53 | #define AML_SEC_DEVICE2_SIZE UL(0x00200000) |
Antonio Nino Diaz | 272e871 | 2018-09-18 01:36:00 +0100 | [diff] [blame] | 54 | |
Carlo Caione | 1e3e33b | 2019-08-28 15:32:22 +0100 | [diff] [blame] | 55 | #define AML_SEC_DEVICE3_BASE UL(0xDA800000) |
| 56 | #define AML_SEC_DEVICE3_SIZE UL(0x00200000) |
Antonio Nino Diaz | 272e871 | 2018-09-18 01:36:00 +0100 | [diff] [blame] | 57 | |
| 58 | /******************************************************************************* |
| 59 | * GIC-400 and interrupt handling related constants |
| 60 | ******************************************************************************/ |
Carlo Caione | 60c828b | 2019-08-24 18:51:48 +0100 | [diff] [blame] | 61 | #define AML_GICD_BASE UL(0xC4301000) |
| 62 | #define AML_GICC_BASE UL(0xC4302000) |
Antonio Nino Diaz | 272e871 | 2018-09-18 01:36:00 +0100 | [diff] [blame] | 63 | |
| 64 | #define IRQ_SEC_PHY_TIMER 29 |
| 65 | |
| 66 | #define IRQ_SEC_SGI_0 8 |
| 67 | #define IRQ_SEC_SGI_1 9 |
| 68 | #define IRQ_SEC_SGI_2 10 |
| 69 | #define IRQ_SEC_SGI_3 11 |
| 70 | #define IRQ_SEC_SGI_4 12 |
| 71 | #define IRQ_SEC_SGI_5 13 |
| 72 | #define IRQ_SEC_SGI_6 14 |
| 73 | #define IRQ_SEC_SGI_7 15 |
| 74 | |
| 75 | /******************************************************************************* |
| 76 | * UART definitions |
| 77 | ******************************************************************************/ |
Carlo Caione | 1afdfb0 | 2019-08-24 18:47:06 +0100 | [diff] [blame] | 78 | #define AML_UART0_AO_BASE UL(0xC81004C0) |
Carlo Caione | 1e3e33b | 2019-08-28 15:32:22 +0100 | [diff] [blame] | 79 | #define AML_UART0_AO_CLK_IN_HZ AML_OSC24M_CLK_IN_HZ |
Carlo Caione | 1afdfb0 | 2019-08-24 18:47:06 +0100 | [diff] [blame] | 80 | #define AML_UART_BAUDRATE U(115200) |
Antonio Nino Diaz | 272e871 | 2018-09-18 01:36:00 +0100 | [diff] [blame] | 81 | |
| 82 | /******************************************************************************* |
| 83 | * Memory-mapped I/O Registers |
| 84 | ******************************************************************************/ |
Carlo Caione | 1e3e33b | 2019-08-28 15:32:22 +0100 | [diff] [blame] | 85 | #define AML_AO_TIMESTAMP_CNTL UL(0xC81000B4) |
Antonio Nino Diaz | 272e871 | 2018-09-18 01:36:00 +0100 | [diff] [blame] | 86 | |
Carlo Caione | 1e3e33b | 2019-08-28 15:32:22 +0100 | [diff] [blame] | 87 | #define AML_SYS_CPU_CFG7 UL(0xC8834664) |
Antonio Nino Diaz | 272e871 | 2018-09-18 01:36:00 +0100 | [diff] [blame] | 88 | |
Carlo Caione | 883e3ca | 2019-08-28 15:19:56 +0100 | [diff] [blame] | 89 | #define AML_AO_RTI_STATUS_REG3 UL(0xDA10001C) |
Antonio Nino Diaz | 272e871 | 2018-09-18 01:36:00 +0100 | [diff] [blame] | 90 | |
Carlo Caione | 9c85f25 | 2019-08-28 09:46:18 +0100 | [diff] [blame] | 91 | #define AML_HIU_MAILBOX_SET_0 UL(0xDA83C404) |
| 92 | #define AML_HIU_MAILBOX_STAT_0 UL(0xDA83C408) |
| 93 | #define AML_HIU_MAILBOX_CLR_0 UL(0xDA83C40C) |
| 94 | #define AML_HIU_MAILBOX_SET_3 UL(0xDA83C428) |
| 95 | #define AML_HIU_MAILBOX_STAT_3 UL(0xDA83C42C) |
| 96 | #define AML_HIU_MAILBOX_CLR_3 UL(0xDA83C430) |
Antonio Nino Diaz | 272e871 | 2018-09-18 01:36:00 +0100 | [diff] [blame] | 97 | |
| 98 | /******************************************************************************* |
| 99 | * System Monitor Call IDs and arguments |
| 100 | ******************************************************************************/ |
Carlo Caione | 107df3e | 2019-08-26 13:04:12 +0100 | [diff] [blame] | 101 | #define AML_SM_GET_SHARE_MEM_INPUT_BASE U(0x82000020) |
| 102 | #define AML_SM_GET_SHARE_MEM_OUTPUT_BASE U(0x82000021) |
Antonio Nino Diaz | 272e871 | 2018-09-18 01:36:00 +0100 | [diff] [blame] | 103 | |
Carlo Caione | 107df3e | 2019-08-26 13:04:12 +0100 | [diff] [blame] | 104 | #define AML_SM_EFUSE_READ U(0x82000030) |
| 105 | #define AML_SM_EFUSE_USER_MAX U(0x82000033) |
Antonio Nino Diaz | 272e871 | 2018-09-18 01:36:00 +0100 | [diff] [blame] | 106 | |
Carlo Caione | 107df3e | 2019-08-26 13:04:12 +0100 | [diff] [blame] | 107 | #define AML_SM_JTAG_ON U(0x82000040) |
| 108 | #define AML_SM_JTAG_OFF U(0x82000041) |
Carlo Caione | f7c4f9b | 2019-09-16 12:13:49 +0100 | [diff] [blame] | 109 | #define AML_SM_GET_CHIP_ID U(0x82000044) |
Antonio Nino Diaz | 272e871 | 2018-09-18 01:36:00 +0100 | [diff] [blame] | 110 | |
Carlo Caione | 107df3e | 2019-08-26 13:04:12 +0100 | [diff] [blame] | 111 | #define AML_JTAG_STATE_ON U(0) |
| 112 | #define AML_JTAG_STATE_OFF U(1) |
Antonio Nino Diaz | 272e871 | 2018-09-18 01:36:00 +0100 | [diff] [blame] | 113 | |
Carlo Caione | 107df3e | 2019-08-26 13:04:12 +0100 | [diff] [blame] | 114 | #define AML_JTAG_M3_AO U(0) |
| 115 | #define AML_JTAG_M3_EE U(1) |
| 116 | #define AML_JTAG_A53_AO U(2) |
| 117 | #define AML_JTAG_A53_EE U(3) |
Antonio Nino Diaz | 272e871 | 2018-09-18 01:36:00 +0100 | [diff] [blame] | 118 | |
| 119 | #endif /* GXBB_DEF_H */ |