1b2d387bcSWu, Josh /* 2b2d387bcSWu, Josh * Common part of configuration settings for the AT91 SAMA5 board. 3b2d387bcSWu, Josh * 4b2d387bcSWu, Josh * Copyright (C) 2015 Atmel Corporation 5b2d387bcSWu, Josh * Josh Wu <josh.wu@atmel.com> 6b2d387bcSWu, Josh * 7b2d387bcSWu, Josh * SPDX-License-Identifier: GPL-2.0+ 8b2d387bcSWu, Josh */ 9b2d387bcSWu, Josh 10b2d387bcSWu, Josh #ifndef __AT91_SAMA5_COMMON_H 11b2d387bcSWu, Josh #define __AT91_SAMA5_COMMON_H 12b2d387bcSWu, Josh 13b2d387bcSWu, Josh #include <asm/hardware.h> 14b2d387bcSWu, Josh 15b2d387bcSWu, Josh #define CONFIG_SYS_TEXT_BASE 0x26f00000 16b2d387bcSWu, Josh 17b2d387bcSWu, Josh /* ARM asynchronous clock */ 18b2d387bcSWu, Josh #define CONFIG_SYS_AT91_SLOW_CLOCK 32768 19b2d387bcSWu, Josh #define CONFIG_SYS_AT91_MAIN_CLOCK 12000000 /* from 12 MHz crystal */ 20b2d387bcSWu, Josh 21b2d387bcSWu, Josh #define CONFIG_ARCH_CPU_INIT 22b2d387bcSWu, Josh 23b2d387bcSWu, Josh #ifndef CONFIG_SPL_BUILD 24b2d387bcSWu, Josh #define CONFIG_SKIP_LOWLEVEL_INIT 25b2d387bcSWu, Josh #endif 26b2d387bcSWu, Josh 27b2d387bcSWu, Josh #define CONFIG_BOARD_EARLY_INIT_F 28b2d387bcSWu, Josh #define CONFIG_DISPLAY_CPUINFO 29b2d387bcSWu, Josh 30372ca03fSWu, Josh #define CONFIG_ENV_VARS_UBOOT_CONFIG 31b2d387bcSWu, Josh #define CONFIG_CMD_BOOTZ 32b2d387bcSWu, Josh #define CONFIG_OF_LIBFDT /* Device Tree support */ 33b2d387bcSWu, Josh 34b2d387bcSWu, Josh #define CONFIG_SYS_GENERIC_BOARD 35b2d387bcSWu, Josh 36b2d387bcSWu, Josh /* general purpose I/O */ 37b2d387bcSWu, Josh #define CONFIG_AT91_GPIO 38b2d387bcSWu, Josh 39b2d387bcSWu, Josh #define CONFIG_BOOTDELAY 3 40b2d387bcSWu, Josh 41b2d387bcSWu, Josh /* 42b2d387bcSWu, Josh * BOOTP options 43b2d387bcSWu, Josh */ 44b2d387bcSWu, Josh #define CONFIG_BOOTP_BOOTFILESIZE 45b2d387bcSWu, Josh #define CONFIG_BOOTP_BOOTPATH 46b2d387bcSWu, Josh #define CONFIG_BOOTP_GATEWAY 47b2d387bcSWu, Josh #define CONFIG_BOOTP_HOSTNAME 48b2d387bcSWu, Josh 49b2d387bcSWu, Josh /* 50b2d387bcSWu, Josh * Command line configuration. 51b2d387bcSWu, Josh */ 52b2d387bcSWu, Josh #define CONFIG_CMD_PING 53b2d387bcSWu, Josh #define CONFIG_CMD_DHCP 54b2d387bcSWu, Josh 55b2d387bcSWu, Josh #ifdef CONFIG_SYS_USE_MMC 56372ca03fSWu, Josh /* u-boot env in sd/mmc card */ 57372ca03fSWu, Josh #define CONFIG_ENV_IS_IN_FAT 58372ca03fSWu, Josh #define CONFIG_FAT_WRITE 59372ca03fSWu, Josh #define FAT_ENV_INTERFACE "mmc" 60372ca03fSWu, Josh #define FAT_ENV_DEVICE_AND_PART "0" 61372ca03fSWu, Josh #define FAT_ENV_FILE "uboot.env" 62372ca03fSWu, Josh #define CONFIG_ENV_SIZE 0x4000 63372ca03fSWu, Josh 6489a3658aSWu, Josh #define CONFIG_BOOTCOMMAND "if test ! -n ${dtb_name}; then " \ 6589a3658aSWu, Josh "setenv dtb_name at91-${board_name}.dtb; " \ 6689a3658aSWu, Josh "fi; " \ 6789a3658aSWu, Josh "fatload mmc 0:1 0x21000000 ${dtb_name}; " \ 68372ca03fSWu, Josh "fatload mmc 0:1 0x22000000 zImage; " \ 69372ca03fSWu, Josh "bootz 0x22000000 - 0x21000000" 70b2d387bcSWu, Josh #define CONFIG_BOOTARGS \ 71b2d387bcSWu, Josh "console=ttyS0,115200 earlyprintk " \ 72b2d387bcSWu, Josh "root=/dev/mmcblk0p2 rw rootwait" 73b2d387bcSWu, Josh #else 74b2d387bcSWu, Josh #define CONFIG_BOOTARGS \ 75b2d387bcSWu, Josh "console=ttyS0,115200 earlyprintk " \ 76b2d387bcSWu, Josh "mtdparts=atmel_nand:256k(bootstrap)ro,512k(uboot)ro," \ 779aee8d83SWu, Josh "256K(env),256k(env_redundent),256k(spare)," \ 78b2d387bcSWu, Josh "512k(dtb),6M(kernel)ro,-(rootfs) " \ 79b2d387bcSWu, Josh "rootfstype=ubifs ubi.mtd=7 root=ubi0:rootfs" 80*dc018fefSWu, Josh 81*dc018fefSWu, Josh #ifdef CONFIG_SYS_USE_NANDFLASH 82*dc018fefSWu, Josh /* u-boot env in nand flash */ 83*dc018fefSWu, Josh #define CONFIG_ENV_IS_IN_NAND 84*dc018fefSWu, Josh #define CONFIG_ENV_OFFSET 0xc0000 85*dc018fefSWu, Josh #define CONFIG_ENV_OFFSET_REDUND 0x100000 86*dc018fefSWu, Josh #define CONFIG_ENV_SIZE 0x20000 87*dc018fefSWu, Josh #define CONFIG_BOOTCOMMAND "nand read 0x21000000 0x180000 0x80000;" \ 88*dc018fefSWu, Josh "nand read 0x22000000 0x200000 0x600000;" \ 89*dc018fefSWu, Josh "bootz 0x22000000 - 0x21000000" 90*dc018fefSWu, Josh #endif 91*dc018fefSWu, Josh 92b2d387bcSWu, Josh #endif 93b2d387bcSWu, Josh 94b2d387bcSWu, Josh #define CONFIG_BAUDRATE 115200 95b2d387bcSWu, Josh 96b2d387bcSWu, Josh #define CONFIG_SYS_CBSIZE 256 97b2d387bcSWu, Josh #define CONFIG_SYS_MAXARGS 16 98b2d387bcSWu, Josh #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \ 99b2d387bcSWu, Josh sizeof(CONFIG_SYS_PROMPT) + 16) 100b2d387bcSWu, Josh #define CONFIG_SYS_LONGHELP 101b2d387bcSWu, Josh #define CONFIG_CMDLINE_EDITING 102b2d387bcSWu, Josh #define CONFIG_AUTO_COMPLETE 103b2d387bcSWu, Josh #define CONFIG_SYS_HUSH_PARSER 104b2d387bcSWu, Josh 105b2d387bcSWu, Josh /* Size of malloc() pool */ 106b2d387bcSWu, Josh #define CONFIG_SYS_MALLOC_LEN (4 * 1024 * 1024) 107b2d387bcSWu, Josh 108b2d387bcSWu, Josh #endif 109