blob: 69a67d5b2455219be621e4f7b81ec427e425780d [file] [log] [blame]
Haojian Zhuang602362d2017-06-01 12:15:14 +08001/*
Arthur Cassegrain98fe4c42021-11-26 16:34:36 +01002 * Copyright (c) 2017-2022, ARM Limited and Contributors. All rights reserved.
Haojian Zhuang602362d2017-06-01 12:15:14 +08003 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
Antonio Nino Diaz5eb88372018-11-08 10:20:19 +00007#ifndef HIKEY960_DEF_H
8#define HIKEY960_DEF_H
Haojian Zhuang602362d2017-06-01 12:15:14 +08009
Antonio Nino Diaze0f90632018-12-14 00:18:21 +000010#include <common/tbbr/tbbr_img_def.h>
11#include <plat/common/common_def.h>
Haojian Zhuang602362d2017-06-01 12:15:14 +080012
13#define DDR_BASE 0x0
Joel Hutton424925a2018-12-27 13:42:19 +000014#define DDR_SIZE 0xE0000000
Haojian Zhuang602362d2017-06-01 12:15:14 +080015
16#define DEVICE_BASE 0xE0000000
17#define DEVICE_SIZE 0x20000000
18
Victor Chong91287682017-05-28 00:14:37 +090019/* Memory location options for TSP */
20#define HIKEY960_SRAM_ID 0
21#define HIKEY960_DRAM_ID 1
22
23/*
Lukas Hanel8a4de612022-03-01 14:18:22 +010024 * DDR for TEE (80MB from 0x3E00000-0x43000FFF) is divided into several
Victor Chong91287682017-05-28 00:14:37 +090025 * regions:
Lukas Hanel8a4de612022-03-01 14:18:22 +010026 * - SPMC manifest (4KB at the top) used by SPMC_AT_EL3 and the TEE
Arthur Cassegrain98fe4c42021-11-26 16:34:36 +010027 * - Secure DDR (default is the top 64MB) used by OP-TEE
Victor Chong91287682017-05-28 00:14:37 +090028 * - Non-secure DDR used by OP-TEE (shared memory and padding) (4MB)
29 * - Secure DDR (4MB aligned on 4MB) for OP-TEE's "Secure Data Path" feature
30 * - Non-secure DDR (8MB) reserved for OP-TEE's future use
31 */
Arthur Cassegrain98fe4c42021-11-26 16:34:36 +010032#define DDR_SEC_SIZE 0x04000000 /* reserve 64MB secure memory */
Victor Chong91287682017-05-28 00:14:37 +090033#define DDR_SEC_BASE 0x3F000000
Lukas Hanel8a4de612022-03-01 14:18:22 +010034#define DDR_SEC_CONFIG_SIZE 0x00001000 /* SPMC_AT_EL3: SPMC manifest */
35#define DDR_SEC_CONFIG_BASE 0x43000000
Victor Chong91287682017-05-28 00:14:37 +090036
37#define DDR_SDP_SIZE 0x00400000
38#define DDR_SDP_BASE (DDR_SEC_BASE - 0x400000 /* align */ - \
39 DDR_SDP_SIZE)
40
Haojian Zhuang602362d2017-06-01 12:15:14 +080041/*
42 * PL011 related constants
43 */
44#define PL011_UART5_BASE 0xFDF05000
45#define PL011_UART6_BASE 0xFFF32000
46#define PL011_BAUDRATE 115200
47#define PL011_UART_CLK_IN_HZ 19200000
48
49#define UFS_BASE 0
Haojian Zhuang602362d2017-06-01 12:15:14 +080050
51#define HIKEY960_UFS_DESC_BASE 0x20000000
52#define HIKEY960_UFS_DESC_SIZE 0x00200000 /* 2MB */
53#define HIKEY960_UFS_DATA_BASE 0x10000000
54#define HIKEY960_UFS_DATA_SIZE 0x0A000000 /* 160MB */
55
Antonio Nino Diaz5eb88372018-11-08 10:20:19 +000056#endif /* HIKEY960_DEF_H */