]>
Commit | Line | Data |
---|---|---|
0d04f34a SW |
1 | /* |
2 | * (C) Copyright 2012 Stephen Warren | |
3 | * | |
a033171b | 4 | * SPDX-License-Identifier: GPL-2.0 |
0d04f34a SW |
5 | */ |
6 | ||
7 | #ifndef __CONFIG_H | |
8 | #define __CONFIG_H | |
9 | ||
1ace4022 | 10 | #include <linux/sizes.h> |
0d04f34a SW |
11 | |
12 | /* Architecture, CPU, etc.*/ | |
2460e175 | 13 | #define CONFIG_SYS_GENERIC_BOARD |
0d04f34a SW |
14 | #define CONFIG_BCM2835 |
15 | #define CONFIG_ARCH_CPU_INIT | |
38baa4f6 | 16 | #define CONFIG_SYS_DCACHE_OFF |
0d04f34a SW |
17 | /* |
18 | * 2835 is a SKU in a series for which the 2708 is the first or primary SoC, | |
19 | * so 2708 has historically been used rather than a dedicated 2835 ID. | |
20 | */ | |
21 | #define CONFIG_MACH_TYPE MACH_TYPE_BCM2708 | |
22 | ||
0d04f34a SW |
23 | /* Memory layout */ |
24 | #define CONFIG_NR_DRAM_BANKS 1 | |
25 | #define CONFIG_SYS_SDRAM_BASE 0x00000000 | |
26 | #define CONFIG_SYS_TEXT_BASE 0x00008000 | |
27 | #define CONFIG_SYS_UBOOT_BASE CONFIG_SYS_TEXT_BASE | |
28 | /* | |
29 | * The board really has 256M. However, the VC (VideoCore co-processor) shares | |
30 | * the RAM, and uses a configurable portion at the top. We tell U-Boot that a | |
31 | * smaller amount of RAM is present in order to avoid stomping on the area | |
32 | * the VC uses. | |
33 | */ | |
34 | #define CONFIG_SYS_SDRAM_SIZE SZ_128M | |
35 | #define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + \ | |
36 | CONFIG_SYS_SDRAM_SIZE - \ | |
37 | GENERATED_GBL_DATA_SIZE) | |
38 | #define CONFIG_SYS_MALLOC_LEN SZ_4M | |
39 | #define CONFIG_SYS_MEMTEST_START 0x00100000 | |
40 | #define CONFIG_SYS_MEMTEST_END 0x00200000 | |
131a1e60 | 41 | #define CONFIG_LOADADDR 0x00200000 |
0d04f34a SW |
42 | |
43 | /* Flash */ | |
44 | #define CONFIG_SYS_NO_FLASH | |
45 | ||
46 | /* Devices */ | |
47 | /* GPIO */ | |
48 | #define CONFIG_BCM2835_GPIO | |
6be3c9fc SW |
49 | /* LCD */ |
50 | #define CONFIG_LCD | |
ea697ae7 | 51 | #define CONFIG_LCD_DT_SIMPLEFB |
6be3c9fc SW |
52 | #define LCD_BPP LCD_COLOR16 |
53 | /* | |
54 | * Prevent allocation of RAM for FB; the real FB address is queried | |
55 | * dynamically from the VideoCore co-processor, and comes from RAM | |
56 | * not owned by the ARM CPU. | |
57 | */ | |
58 | #define CONFIG_FB_ADDR 0 | |
59 | #define CONFIG_VIDEO_BCM2835 | |
60 | #define CONFIG_SYS_WHITE_ON_BLACK | |
0d04f34a | 61 | |
131a1e60 SW |
62 | /* SD/MMC configuration */ |
63 | #define CONFIG_GENERIC_MMC | |
64 | #define CONFIG_MMC | |
65 | #define CONFIG_SDHCI | |
66 | #define CONFIG_MMC_SDHCI_IO_ACCESSORS | |
67 | #define CONFIG_BCM2835_SDHCI | |
68 | ||
227ec97f SW |
69 | #define CONFIG_CMD_USB |
70 | #ifdef CONFIG_CMD_USB | |
71 | #define CONFIG_USB_DWC2 | |
72 | #define CONFIG_USB_DWC2_REG_ADDR 0x20980000 | |
73 | #define CONFIG_USB_STORAGE | |
74 | #define CONFIG_USB_HOST_ETHER | |
75 | #define CONFIG_USB_ETHER_SMSC95XX | |
76 | #define CONFIG_MISC_INIT_R | |
77 | #endif | |
78 | ||
0d04f34a | 79 | /* Console UART */ |
11506666 | 80 | #define CONFIG_PL01X_SERIAL |
0d04f34a SW |
81 | #define CONFIG_CONS_INDEX 0 |
82 | #define CONFIG_BAUDRATE 115200 | |
83 | ||
84 | /* Console configuration */ | |
85 | #define CONFIG_SYS_CBSIZE 1024 | |
86 | #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \ | |
87 | sizeof(CONFIG_SYS_PROMPT) + 16) | |
88 | ||
89 | /* Environment */ | |
90 | #define CONFIG_ENV_SIZE SZ_16K | |
a5a83dc9 SW |
91 | #define CONFIG_ENV_IS_IN_FAT |
92 | #define FAT_ENV_INTERFACE "mmc" | |
93 | #define FAT_ENV_DEVICE_AND_PART "0:1" | |
94 | #define FAT_ENV_FILE "uboot.env" | |
95 | #define CONFIG_FAT_WRITE | |
131a1e60 | 96 | #define CONFIG_ENV_VARS_UBOOT_CONFIG |
0d04f34a | 97 | #define CONFIG_SYS_LOAD_ADDR 0x1000000 |
6be3c9fc SW |
98 | #define CONFIG_CONSOLE_MUX |
99 | #define CONFIG_SYS_CONSOLE_IS_IN_ENV | |
5c92d482 | 100 | |
ed1127e4 SW |
101 | /* Shell */ |
102 | #define CONFIG_SYS_MAXARGS 8 | |
103 | #define CONFIG_SYS_PROMPT "U-Boot> " | |
104 | #define CONFIG_COMMAND_HISTORY | |
105 | ||
106 | /* Commands */ | |
107 | #include <config_cmd_default.h> | |
108 | #define CONFIG_CMD_GPIO | |
109 | #define CONFIG_CMD_MMC | |
110 | #define CONFIG_PARTITION_UUIDS | |
111 | #define CONFIG_CMD_PART | |
112 | ||
113 | /* Device tree support */ | |
114 | #define CONFIG_OF_BOARD_SETUP | |
115 | /* ATAGs support for bootm/bootz */ | |
116 | #define CONFIG_SETUP_MEMORY_TAGS | |
117 | #define CONFIG_CMDLINE_TAG | |
118 | #define CONFIG_INITRD_TAG | |
119 | ||
120 | #include <config_distro_defaults.h> | |
121 | ||
122 | /* Some things don't make sense on this HW or yet */ | |
123 | #undef CONFIG_CMD_FPGA | |
ed1127e4 SW |
124 | |
125 | /* Environment */ | |
1998a1a6 SW |
126 | #define ENV_DEVICE_SETTINGS \ |
127 | "stdin=serial,lcd\0" \ | |
128 | "stdout=serial,lcd\0" \ | |
129 | "stderr=serial,lcd\0" | |
130 | ||
131a1e60 SW |
131 | /* |
132 | * Memory layout for where various images get loaded by boot scripts: | |
133 | * | |
134 | * scriptaddr can be pretty much anywhere that doesn't conflict with something | |
135 | * else. Put it low in memory to avoid conflicts. | |
136 | * | |
1998a1a6 SW |
137 | * pxefile_addr_r can be pretty much anywhere that doesn't conflict with |
138 | * something else. Put it low in memory to avoid conflicts. | |
139 | * | |
131a1e60 SW |
140 | * kernel_addr_r must be within the first 128M of RAM in order for the |
141 | * kernel's CONFIG_AUTO_ZRELADDR option to work. Since the kernel will | |
142 | * decompress itself to 0x8000 after the start of RAM, kernel_addr_r | |
143 | * should not overlap that area, or the kernel will have to copy itself | |
144 | * somewhere else before decompression. Similarly, the address of any other | |
145 | * data passed to the kernel shouldn't overlap the start of RAM. Pushing | |
146 | * this up to 16M allows for a sizable kernel to be decompressed below the | |
147 | * compressed load address. | |
148 | * | |
149 | * fdt_addr_r simply shouldn't overlap anything else. Choosing 32M allows for | |
150 | * the compressed kernel to be up to 16M too. | |
151 | * | |
152 | * ramdisk_addr_r simply shouldn't overlap anything else. Choosing 33M allows | |
153 | * for the FDT/DTB to be up to 1M, which is hopefully plenty. | |
154 | */ | |
1998a1a6 | 155 | #define ENV_MEM_LAYOUT_SETTINGS \ |
131a1e60 | 156 | "scriptaddr=0x00000000\0" \ |
1998a1a6 | 157 | "pxefile_addr_r=0x00100000\0" \ |
131a1e60 SW |
158 | "kernel_addr_r=0x01000000\0" \ |
159 | "fdt_addr_r=0x02000000\0" \ | |
160 | "ramdisk_addr_r=0x02100000\0" \ | |
1998a1a6 | 161 | |
ed1127e4 | 162 | #define BOOT_TARGET_DEVICES(func) \ |
227ec97f SW |
163 | func(MMC, mmc, 0) \ |
164 | func(USB, usb, 0) \ | |
165 | func(PXE, pxe, na) \ | |
166 | func(DHCP, dhcp, na) | |
ed1127e4 | 167 | #include <config_distro_bootcmd.h> |
1998a1a6 SW |
168 | |
169 | #define CONFIG_EXTRA_ENV_SETTINGS \ | |
170 | ENV_DEVICE_SETTINGS \ | |
171 | ENV_MEM_LAYOUT_SETTINGS \ | |
ed1127e4 | 172 | BOOTENV |
1998a1a6 SW |
173 | |
174 | #define CONFIG_BOOTDELAY 2 | |
0d04f34a | 175 | |
0d04f34a | 176 | #endif |