1 /* 2 * Configuration settings for the mini-box PICOSAM9G45 board. 3 * (C) Copyright 2015 Inter Act B.V. 4 * 5 * Based on: 6 * U-Boot file: include/configs/at91sam9m10g45ek.h 7 * (C) Copyright 2007-2008 8 * Stelian Pop <stelian@popies.net> 9 * Lead Tech Design <www.leadtechdesign.com> 10 * 11 * SPDX-License-Identifier: GPL-2.0+ 12 */ 13 14 #ifndef __CONFIG_H 15 #define __CONFIG_H 16 17 #include <asm/hardware.h> 18 19 #define CONFIG_SYS_TEXT_BASE 0x23f00000 20 21 #define CONFIG_ATMEL_LEGACY /* required until (g)pio is fixed */ 22 23 /* ARM asynchronous clock */ 24 #define CONFIG_SYS_AT91_SLOW_CLOCK 32768 25 #define CONFIG_SYS_AT91_MAIN_CLOCK 12000000 /* from 12 MHz crystal */ 26 27 #define CONFIG_PICOSAM 28 29 #define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */ 30 #define CONFIG_SETUP_MEMORY_TAGS 31 #define CONFIG_INITRD_TAG 32 #define CONFIG_SKIP_LOWLEVEL_INIT 33 #define CONFIG_BOARD_EARLY_INIT_F 34 #define CONFIG_DISPLAY_CPUINFO 35 36 #define CONFIG_CMD_BOOTZ 37 38 /* general purpose I/O */ 39 #define CONFIG_ATMEL_LEGACY /* required until (g)pio is fixed */ 40 #define CONFIG_AT91_GPIO 41 #define CONFIG_AT91_GPIO_PULLUP 1 /* keep pullups on peripheral pins */ 42 43 /* serial console */ 44 #define CONFIG_ATMEL_USART 45 #define CONFIG_USART_BASE ATMEL_BASE_DBGU 46 #define CONFIG_USART_ID ATMEL_ID_SYS 47 48 /* LCD */ 49 #define CONFIG_LCD 50 #define LCD_BPP LCD_COLOR8 51 #define CONFIG_LCD_LOGO 52 #undef LCD_TEST_PATTERN 53 #define CONFIG_LCD_INFO 54 #define CONFIG_LCD_INFO_BELOW_LOGO 55 #define CONFIG_SYS_WHITE_ON_BLACK 56 #define CONFIG_ATMEL_LCD 57 #define CONFIG_ATMEL_LCD_RGB565 58 #define CONFIG_SYS_CONSOLE_IS_IN_ENV 59 /* board specific(not enough SRAM) */ 60 #define CONFIG_AT91SAM9G45_LCD_BASE 0x23E00000 61 62 /* LED */ 63 #define CONFIG_AT91_LED 64 #define CONFIG_GREEN_LED AT91_PIN_PD31 /* this is the user1 led */ 65 66 #define CONFIG_BOOTDELAY 3 67 68 /* 69 * BOOTP options 70 */ 71 #define CONFIG_BOOTP_BOOTFILESIZE 72 #define CONFIG_BOOTP_BOOTPATH 73 #define CONFIG_BOOTP_GATEWAY 74 #define CONFIG_BOOTP_HOSTNAME 75 76 /* Enable the watchdog */ 77 #define CONFIG_AT91SAM9_WATCHDOG 78 #define CONFIG_HW_WATCHDOG 79 80 /* 81 * Command line configuration. 82 */ 83 84 /* No NOR flash */ 85 #define CONFIG_SYS_NO_FLASH 86 #define CONFIG_CMD_PING 87 #define CONFIG_CMD_DHCP 88 #define CONFIG_CMD_USB 89 90 /* SDRAM */ 91 #define CONFIG_NR_DRAM_BANKS 2 92 #define PHYS_SDRAM_1 ATMEL_BASE_CS1 /* on DDRSDRC1 */ 93 #define PHYS_SDRAM_1_SIZE 0x08000000 /* 128 MB */ 94 #define PHYS_SDRAM_2 ATMEL_BASE_CS6 /* on DDRSDRC0 */ 95 #define PHYS_SDRAM_2_SIZE 0x08000000 /* 128 MB */ 96 #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1 97 98 #define CONFIG_SYS_INIT_SP_ADDR \ 99 (CONFIG_SYS_SDRAM_BASE + 4 * 1024 - GENERATED_GBL_DATA_SIZE) 100 101 /* MMC */ 102 #define CONFIG_CMD_MMC 103 104 #ifdef CONFIG_CMD_MMC 105 #define CONFIG_MMC 106 #define CONFIG_GENERIC_MMC 107 #define CONFIG_GENERIC_ATMEL_MCI 108 #endif 109 110 #if defined(CONFIG_CMD_USB) || defined(CONFIG_CMD_MMC) 111 #define CONFIG_CMD_FAT 112 #define CONFIG_DOS_PARTITION 113 #endif 114 115 /* Ethernet */ 116 #define CONFIG_MACB 117 #define CONFIG_RMII 118 #define CONFIG_NET_RETRY_COUNT 20 119 #define CONFIG_RESET_PHY_R 120 #define CONFIG_AT91_WANTS_COMMON_PHY 121 122 /* USB */ 123 #define CONFIG_USB_EHCI 124 #define CONFIG_USB_EHCI_ATMEL 125 #define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 2 126 #define CONFIG_USB_STORAGE 127 128 #define CONFIG_SYS_LOAD_ADDR 0x22000000 /* load address */ 129 130 #define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE 131 #define CONFIG_SYS_MEMTEST_END 0x23e00000 132 133 #ifdef CONFIG_SYS_USE_MMC 134 /* bootstrap + u-boot + env + linux in mmc */ 135 #define FAT_ENV_INTERFACE "mmc" 136 /* 137 * We don't specify the part number, if device 0 has partition table, it means 138 * the first partition; it no partition table, then take whole device as a 139 * FAT file system. 140 */ 141 #define FAT_ENV_DEVICE_AND_PART "0" 142 #define FAT_ENV_FILE "uboot.env" 143 #define CONFIG_ENV_IS_IN_FAT 144 #define CONFIG_FAT_WRITE 145 #define CONFIG_ENV_SIZE 0x4000 146 147 #define CONFIG_BOOTARGS "console=ttyS0,115200 " \ 148 "root=/dev/mmcblk0p2 rw rootwait" 149 #define CONFIG_BOOTCOMMAND "fatload mmc 0:1 0x21000000 dtb; " \ 150 "fatload mmc 0:1 0x22000000 zImage; " \ 151 "bootz 0x22000000 - 0x21000000" 152 #endif 153 154 #define CONFIG_BAUDRATE 115200 155 156 #define CONFIG_SYS_CBSIZE 256 157 #define CONFIG_SYS_MAXARGS 16 158 #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE \ 159 + sizeof(CONFIG_SYS_PROMPT) + 16) 160 #define CONFIG_SYS_LONGHELP 161 #define CONFIG_CMDLINE_EDITING 162 #define CONFIG_AUTO_COMPLETE 163 #define CONFIG_SYS_HUSH_PARSER 164 165 /* 166 * Size of malloc() pool 167 */ 168 #define CONFIG_SYS_MALLOC_LEN ROUND(3 * CONFIG_ENV_SIZE + 128*1024, 0x1000) 169 170 /* Defines for SPL */ 171 #define CONFIG_SPL_FRAMEWORK 172 #define CONFIG_SPL_TEXT_BASE 0x300000 173 #define CONFIG_SPL_MAX_SIZE 0x010000 174 #define CONFIG_SPL_STACK 0x310000 175 176 #define CONFIG_SPL_LIBCOMMON_SUPPORT 177 #define CONFIG_SPL_LIBGENERIC_SUPPORT 178 #define CONFIG_SPL_SERIAL_SUPPORT 179 #define CONFIG_SPL_GPIO_SUPPORT 180 #define CONFIG_SPL_WATCHDOG_SUPPORT 181 182 #define CONFIG_SYS_MONITOR_LEN 0x80000 183 184 #ifdef CONFIG_SYS_USE_MMC 185 186 #define CONFIG_SPL_BSS_START_ADDR 0x20000000 187 #define CONFIG_SPL_BSS_MAX_SIZE 0x00080000 188 #define CONFIG_SYS_SPL_MALLOC_START 0x20080000 189 #define CONFIG_SYS_SPL_MALLOC_SIZE 0x00080000 190 191 #define CONFIG_SPL_LDSCRIPT arch/arm/mach-at91/arm926ejs/u-boot-spl.lds 192 #define CONFIG_SPL_MMC_SUPPORT 193 #define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS 0x400 194 #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x200 195 #define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1 196 #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot.img" 197 #define CONFIG_SPL_FAT_SUPPORT 198 #define CONFIG_SPL_LIBDISK_SUPPORT 199 200 #define CONFIG_SPL_ATMEL_SIZE 201 #define CONFIG_SYS_MASTER_CLOCK 132096000 202 #define CONFIG_SYS_AT91_PLLA 0x20c73f03 203 #define CONFIG_SYS_MCKR 0x1301 204 #define CONFIG_SYS_MCKR_CSS 0x1302 205 206 #endif 207 #endif 208