blob: 61ca866006116e60473d681aba520bd735c051c7 [file] [log] [blame]
Usama Arif9218a112020-08-12 16:12:53 +01001/* SPDX-License-Identifier: GPL-2.0+ */
2/*
3 * Configuration for Total Compute platform. Parts were derived from other ARM
4 * configurations.
5 * (C) Copyright 2020 Arm Limited
6 * Usama Arif <usama.arif@arm.com>
7 */
8
9#ifndef __TOTAL_COMPUTE_H
10#define __TOTAL_COMPUTE_H
11
12#define CONFIG_REMAKE_ELF
13
14/* Link Definitions */
15#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + 0x7fff0)
16
17#define CONFIG_SYS_BOOTM_LEN (64 << 20)
18
19#define UART0_BASE 0x7ff80000
20
21/* Size of malloc() pool */
22#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (8 << 20))
23
24/* PL011 Serial Configuration */
25#define CONFIG_PL011_CLOCK 7372800
26
27/* Miscellaneous configurable options */
28#define CONFIG_SYS_LOAD_ADDR 0x90000000
29
30/* Physical Memory Map */
31#define PHYS_SDRAM_1 0x80000000
32/* Top 48MB reserved for secure world use */
33#define DRAM_SEC_SIZE 0x03000000
34#define PHYS_SDRAM_1_SIZE 0x80000000 - DRAM_SEC_SIZE
35#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
36
Usama Arif9218a112020-08-12 16:12:53 +010037#define CONFIG_SYS_MMC_MAX_BLK_COUNT 127
Usama Arif9218a112020-08-12 16:12:53 +010038
39#define CONFIG_EXTRA_ENV_SETTINGS \
40 "bootm_size=0x20000000\0" \
41 "load_addr=0xa0000000\0" \
42 "kernel_addr_r=0x80080000\0" \
43 "initrd_addr_r=0x88000000\0" \
44 "fdt_addr_r=0x83000000\0"
45/*
46 * If vbmeta partition is present, boot Android with verification using AVB.
47 * Else if system partition is present (no vbmeta partition), boot Android
48 * without verification (for development purposes).
49 * Else boot FIT image.
50 */
51#define CONFIG_BOOTCOMMAND \
52 "if part number mmc 0 vbmeta is_avb; then" \
53 " echo MMC with vbmeta partition detected.;" \
54 " echo starting Android Verified boot.;" \
55 " avb init 0; " \
56 " if avb verify; then " \
57 " set bootargs $bootargs $avb_bootargs; " \
58 " part start mmc 0 boot boot_start; " \
59 " part size mmc 0 boot boot_size; " \
60 " mmc read ${load_addr} ${boot_start} ${boot_size}; " \
61 " bootm ${load_addr} ${load_addr} ${fdt_addr_r}; " \
62 " else; " \
63 " echo AVB verification failed.; " \
64 " exit; " \
65 " fi; " \
66 "elif part number mmc 0 system is_non_avb_android; then " \
67 " booti ${kernel_addr_r} ${initrd_addr_r} ${fdt_addr_r};" \
68 "else;" \
69 " echo Booting FIT image.;" \
70 " bootm ${load_addr} ${load_addr} ${fdt_addr_r}; " \
71 "fi;"
72
73/* Monitor Command Prompt */
74#define CONFIG_SYS_CBSIZE 512 /* Console I/O Buffer Size */
75#define CONFIG_SYS_MAXARGS 64 /* max command args */
76
77#define CONFIG_SYS_FLASH_BASE 0x0C000000
78/* 256 x 256KiB sectors */
79#define CONFIG_SYS_MAX_FLASH_SECT 256
80
81#define CONFIG_SYS_FLASH_CFI_WIDTH FLASH_CFI_32BIT
82#define CONFIG_SYS_MAX_FLASH_BANKS 1
83
84#define CONFIG_SYS_FLASH_EMPTY_INFO /* flinfo indicates empty blocks */
85#define FLASH_MAX_SECTOR_SIZE 0x00040000
86
87#endif /* __TOTAL_COMPUTE_H */