2 * Configuration settings for the SAMA5D3 Xplained board.
4 * Copyright (C) 2014 Atmel Corporation
5 * Bo Shen <voice.shen@atmel.com>
7 * SPDX-License-Identifier: GPL-2.0+
13 #include <asm/hardware.h>
15 #define CONFIG_SYS_TEXT_BASE 0x26f00000
17 /* ARM asynchronous clock */
18 #define CONFIG_SYS_AT91_SLOW_CLOCK 32768
19 #define CONFIG_SYS_AT91_MAIN_CLOCK 12000000 /* from 12 MHz crystal */
21 #define CONFIG_AT91FAMILY
22 #define CONFIG_ARCH_CPU_INIT
23 #define CONFIG_SKIP_LOWLEVEL_INIT
24 #define CONFIG_BOARD_EARLY_INIT_F
25 #define CONFIG_DISPLAY_CPUINFO
27 #define CONFIG_CMD_BOOTZ
28 #define CONFIG_OF_LIBFDT /* Device Tree support */
30 /* general purpose I/O */
31 #define CONFIG_AT91_GPIO
34 #define CONFIG_ATMEL_USART
35 #define CONFIG_USART_BASE ATMEL_BASE_DBGU
36 #define CONFIG_USART_ID ATMEL_ID_DBGU
39 * This needs to be defined for the OHCI code to work but it is defined as
40 * ATMEL_ID_UHPHS in the CPU specific header files.
42 #define ATMEL_ID_UHP ATMEL_ID_UHPHS
45 * Specify the clock enable bit in the PMC_SCER register.
47 #define ATMEL_PMC_UHP AT91SAM926x_PMC_UHP
49 #define CONFIG_BOOTDELAY 3
54 #define CONFIG_BOOTP_BOOTFILESIZE
55 #define CONFIG_BOOTP_BOOTPATH
56 #define CONFIG_BOOTP_GATEWAY
57 #define CONFIG_BOOTP_HOSTNAME
60 #define CONFIG_SYS_NO_FLASH
63 * Command line configuration.
65 #include <config_cmd_default.h>
66 #undef CONFIG_CMD_FPGA
68 #undef CONFIG_CMD_LOADS
69 #define CONFIG_CMD_PING
70 #define CONFIG_CMD_DHCP
73 #define CONFIG_NR_DRAM_BANKS 1
74 #define CONFIG_SYS_SDRAM_BASE ATMEL_BASE_DDRCS
75 #define CONFIG_SYS_SDRAM_SIZE 0x10000000
77 #define CONFIG_SYS_INIT_SP_ADDR \
78 (CONFIG_SYS_SDRAM_BASE + 4 * 1024 - GENERATED_GBL_DATA_SIZE)
81 #define CONFIG_CMD_NAND
83 #ifdef CONFIG_CMD_NAND
84 #define CONFIG_NAND_ATMEL
85 #define CONFIG_SYS_MAX_NAND_DEVICE 1
86 #define CONFIG_SYS_NAND_BASE ATMEL_BASE_CS3
88 #define CONFIG_SYS_NAND_MASK_ALE (1 << 21)
90 #define CONFIG_SYS_NAND_MASK_CLE (1 << 22)
91 #define CONFIG_SYS_NAND_ONFI_DETECTION
92 /* PMECC & PMERRLOC */
93 #define CONFIG_ATMEL_NAND_HWECC
94 #define CONFIG_ATMEL_NAND_HW_PMECC
95 #define CONFIG_PMECC_CAP 4
96 #define CONFIG_PMECC_SECTOR_SIZE 512
97 #define CONFIG_CMD_NAND_TRIMFFS
98 #define CONFIG_CMD_MTDPARTS
100 #define CONFIG_MTD_DEVICE
101 #define CONFIG_MTD_PARTITIONS
102 #define CONFIG_RBTREE
104 #define CONFIG_CMD_UBI
105 #define CONFIG_CMD_UBIFS
108 /* Ethernet Hardware */
111 #define CONFIG_NET_MULTI
112 #define CONFIG_NET_RETRY_COUNT 20
113 #define CONFIG_MACB_SEARCH_PHY
115 #define CONFIG_CMD_MII
116 #define CONFIG_PHYLIB
119 #define CONFIG_CMD_MMC
121 #ifdef CONFIG_CMD_MMC
123 #define CONFIG_GENERIC_MMC
124 #define CONFIG_GENERIC_ATMEL_MCI
125 #define CONFIG_ATMEL_MCI_8BIT
129 #define CONFIG_CMD_USB
131 #ifdef CONFIG_CMD_USB
132 #define CONFIG_USB_ATMEL
133 #define CONFIG_USB_ATMEL_CLK_SEL_UPLL
134 #define CONFIG_USB_OHCI_NEW
135 #define CONFIG_SYS_USB_OHCI_CPU_INIT
136 #define CONFIG_SYS_USB_OHCI_REGS_BASE ATMEL_BASE_OHCI
137 #define CONFIG_SYS_USB_OHCI_SLOT_NAME "SAMA5D3 Xplained"
138 #define CONFIG_SYS_USB_OHCI_MAX_ROOT_PORTS 2
139 #define CONFIG_DOS_PARTITION
140 #define CONFIG_USB_STORAGE
143 #if defined(CONFIG_CMD_USB) || defined(CONFIG_CMD_MMC)
144 #define CONFIG_CMD_FAT
145 #define CONFIG_FAT_WRITE
146 #define CONFIG_CMD_EXT4
147 #define CONFIG_CMD_EXT4_WRITE
150 #define CONFIG_SYS_LOAD_ADDR 0x22000000 /* load address */
152 #if CONFIG_SYS_USE_NANDFLASH
153 /* bootstrap + u-boot + env in nandflash */
154 #define CONFIG_ENV_IS_IN_NAND
155 #define CONFIG_ENV_OFFSET 0xc0000
156 #define CONFIG_ENV_OFFSET_REDUND 0x100000
157 #define CONFIG_ENV_SIZE 0x20000
158 #define CONFIG_BOOTCOMMAND "nand read 0x21000000 0x180000 0x80000;" \
159 "nand read 0x22000000 0x200000 0x600000;" \
160 "bootz 0x22000000 - 0x21000000"
161 #elif CONFIG_SYS_USE_MMC
162 /* bootstrap + u-boot + env in sd card */
163 #define CONFIG_ENV_IS_IN_MMC
164 #define CONFIG_ENV_OFFSET 0x2000
165 #define CONFIG_ENV_SIZE 0x1000
166 #define CONFIG_BOOTCOMMAND "fatload mmc 0:1 0x21000000 at91-sama5d3_xplained.dtb; " \
167 "fatload mmc 0:1 0x22000000 zImage; " \
168 "bootz 0x22000000 - 0x21000000"
169 #define CONFIG_SYS_MMC_ENV_DEV 0
171 #define CONFIG_ENV_IS_NOWHERE
174 #ifdef CONFIG_SYS_USE_MMC
175 #define CONFIG_BOOTARGS \
176 "console=ttyS0,115200 earlyprintk " \
177 "root=/dev/mmcblk0p2 rw rootwait"
179 #define CONFIG_BOOTARGS \
180 "console=ttyS0,115200 earlyprintk " \
181 "mtdparts=atmel_nand:256k(bootstrap)ro,512k(uboot)ro," \
182 "256K(env),256k(evn_redundent),256k(spare)," \
183 "512k(dtb),6M(kernel)ro,-(rootfs) " \
184 "rootfstype=ubifs ubi.mtd=7 root=ubi0:rootfs"
187 #define CONFIG_BAUDRATE 115200
189 #define CONFIG_SYS_PROMPT "U-Boot> "
190 #define CONFIG_SYS_CBSIZE 256
191 #define CONFIG_SYS_MAXARGS 16
192 #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
193 sizeof(CONFIG_SYS_PROMPT) + 16)
194 #define CONFIG_SYS_LONGHELP
195 #define CONFIG_CMDLINE_EDITING
196 #define CONFIG_AUTO_COMPLETE
197 #define CONFIG_SYS_HUSH_PARSER
199 /* Size of malloc() pool */
200 #define CONFIG_SYS_MALLOC_LEN (4 * 1024 * 1024)