1
2
3
4
5
6
7#ifndef _RPI_COMMON_H_
8#define _RPI_COMMON_H_
9
10#include <linux/sizes.h>
11
12
13#define CONFIG_SYS_GENERIC_BOARD
14#define CONFIG_BCM2835
15#define CONFIG_ARCH_CPU_INIT
16#define CONFIG_SYS_DCACHE_OFF
17
18
19
20
21
22
23
24
25#ifndef CONFIG_BCM2836
26#define CONFIG_MACH_TYPE MACH_TYPE_BCM2708
27#endif
28
29
30#define CONFIG_NR_DRAM_BANKS 1
31#define CONFIG_SYS_SDRAM_BASE 0x00000000
32#define CONFIG_SYS_TEXT_BASE 0x00008000
33#define CONFIG_SYS_UBOOT_BASE CONFIG_SYS_TEXT_BASE
34
35
36
37
38
39
40#define CONFIG_SYS_SDRAM_SIZE SZ_128M
41#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + \
42 CONFIG_SYS_SDRAM_SIZE - \
43 GENERATED_GBL_DATA_SIZE)
44#define CONFIG_SYS_MALLOC_LEN SZ_4M
45#define CONFIG_SYS_MEMTEST_START 0x00100000
46#define CONFIG_SYS_MEMTEST_END 0x00200000
47#define CONFIG_LOADADDR 0x00200000
48
49
50#define CONFIG_SYS_NO_FLASH
51
52
53
54#define CONFIG_BCM2835_GPIO
55
56#define CONFIG_LCD
57#define CONFIG_LCD_DT_SIMPLEFB
58#define LCD_BPP LCD_COLOR16
59
60
61
62
63
64#define CONFIG_FB_ADDR 0
65#define CONFIG_VIDEO_BCM2835
66#define CONFIG_SYS_WHITE_ON_BLACK
67
68
69#define CONFIG_GENERIC_MMC
70#define CONFIG_MMC
71#define CONFIG_SDHCI
72#define CONFIG_MMC_SDHCI_IO_ACCESSORS
73#define CONFIG_BCM2835_SDHCI
74
75#define CONFIG_CMD_USB
76#ifdef CONFIG_CMD_USB
77#define CONFIG_USB_DWC2
78#ifdef CONFIG_BCM2836
79#define CONFIG_USB_DWC2_REG_ADDR 0x3f980000
80#else
81#define CONFIG_USB_DWC2_REG_ADDR 0x20980000
82#endif
83#define CONFIG_USB_STORAGE
84#define CONFIG_USB_HOST_ETHER
85#define CONFIG_USB_ETHER_SMSC95XX
86#define CONFIG_MISC_INIT_R
87#endif
88
89
90#define CONFIG_PL01X_SERIAL
91#define CONFIG_CONS_INDEX 0
92#define CONFIG_BAUDRATE 115200
93
94
95#define CONFIG_SYS_CBSIZE 1024
96#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
97 sizeof(CONFIG_SYS_PROMPT) + 16)
98
99
100#define CONFIG_ENV_SIZE SZ_16K
101#define CONFIG_ENV_IS_IN_FAT
102#define FAT_ENV_INTERFACE "mmc"
103#define FAT_ENV_DEVICE_AND_PART "0:1"
104#define FAT_ENV_FILE "uboot.env"
105#define CONFIG_FAT_WRITE
106#define CONFIG_ENV_VARS_UBOOT_CONFIG
107#define CONFIG_SYS_LOAD_ADDR 0x1000000
108#define CONFIG_CONSOLE_MUX
109#define CONFIG_SYS_CONSOLE_IS_IN_ENV
110
111
112#define CONFIG_SYS_MAXARGS 8
113#define CONFIG_SYS_PROMPT "U-Boot> "
114#define CONFIG_COMMAND_HISTORY
115
116
117#include <config_cmd_default.h>
118#define CONFIG_CMD_GPIO
119#define CONFIG_CMD_MMC
120#define CONFIG_PARTITION_UUIDS
121#define CONFIG_CMD_PART
122
123
124#define CONFIG_OF_BOARD_SETUP
125
126#define CONFIG_SETUP_MEMORY_TAGS
127#define CONFIG_CMDLINE_TAG
128#define CONFIG_INITRD_TAG
129
130#include <config_distro_defaults.h>
131
132
133#undef CONFIG_CMD_FPGA
134
135
136#define ENV_DEVICE_SETTINGS \
137 "stdin=serial,lcd\0" \
138 "stdout=serial,lcd\0" \
139 "stderr=serial,lcd\0"
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165#define ENV_MEM_LAYOUT_SETTINGS \
166 "scriptaddr=0x00000000\0" \
167 "pxefile_addr_r=0x00100000\0" \
168 "kernel_addr_r=0x01000000\0" \
169 "fdt_addr_r=0x02000000\0" \
170 "ramdisk_addr_r=0x02100000\0" \
171
172#define BOOT_TARGET_DEVICES(func) \
173 func(MMC, mmc, 0) \
174 func(USB, usb, 0) \
175 func(PXE, pxe, na) \
176 func(DHCP, dhcp, na)
177#include <config_distro_bootcmd.h>
178
179#define CONFIG_EXTRA_ENV_SETTINGS \
180 ENV_DEVICE_SETTINGS \
181 ENV_MEM_LAYOUT_SETTINGS \
182 BOOTENV
183
184#define CONFIG_BOOTDELAY 2
185
186#endif
187