blob: 476bdd86b4c78dad287b4dd8939a5b97024c821e [file] [log] [blame]
Erik van Luijkbfc37f32015-08-17 12:47:34 +02001/*
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
Erik van Luijkbfc37f32015-08-17 12:47:34 +020033
Erik van Luijkbfc37f32015-08-17 12:47:34 +020034/* general purpose I/O */
35#define CONFIG_ATMEL_LEGACY /* required until (g)pio is fixed */
36#define CONFIG_AT91_GPIO
37#define CONFIG_AT91_GPIO_PULLUP 1 /* keep pullups on peripheral pins */
38
39/* serial console */
40#define CONFIG_ATMEL_USART
41#define CONFIG_USART_BASE ATMEL_BASE_DBGU
42#define CONFIG_USART_ID ATMEL_ID_SYS
43
44/* LCD */
Erik van Luijkbfc37f32015-08-17 12:47:34 +020045#define LCD_BPP LCD_COLOR8
46#define CONFIG_LCD_LOGO
47#undef LCD_TEST_PATTERN
48#define CONFIG_LCD_INFO
49#define CONFIG_LCD_INFO_BELOW_LOGO
50#define CONFIG_SYS_WHITE_ON_BLACK
51#define CONFIG_ATMEL_LCD
52#define CONFIG_ATMEL_LCD_RGB565
Erik van Luijkbfc37f32015-08-17 12:47:34 +020053/* board specific(not enough SRAM) */
54#define CONFIG_AT91SAM9G45_LCD_BASE 0x23E00000
55
56/* LED */
57#define CONFIG_AT91_LED
58#define CONFIG_GREEN_LED AT91_PIN_PD31 /* this is the user1 led */
59
Erik van Luijkbfc37f32015-08-17 12:47:34 +020060
61/*
62 * BOOTP options
63 */
64#define CONFIG_BOOTP_BOOTFILESIZE
65#define CONFIG_BOOTP_BOOTPATH
66#define CONFIG_BOOTP_GATEWAY
67#define CONFIG_BOOTP_HOSTNAME
68
69/* Enable the watchdog */
70#define CONFIG_AT91SAM9_WATCHDOG
71#define CONFIG_HW_WATCHDOG
72
73/*
74 * Command line configuration.
75 */
76
77/* No NOR flash */
78#define CONFIG_SYS_NO_FLASH
Erik van Luijkbfc37f32015-08-17 12:47:34 +020079
80/* SDRAM */
81#define CONFIG_NR_DRAM_BANKS 2
82#define PHYS_SDRAM_1 ATMEL_BASE_CS1 /* on DDRSDRC1 */
83#define PHYS_SDRAM_1_SIZE 0x08000000 /* 128 MB */
84#define PHYS_SDRAM_2 ATMEL_BASE_CS6 /* on DDRSDRC0 */
85#define PHYS_SDRAM_2_SIZE 0x08000000 /* 128 MB */
86#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
87
88#define CONFIG_SYS_INIT_SP_ADDR \
89 (CONFIG_SYS_SDRAM_BASE + 4 * 1024 - GENERATED_GBL_DATA_SIZE)
90
91/* MMC */
Erik van Luijkbfc37f32015-08-17 12:47:34 +020092
93#ifdef CONFIG_CMD_MMC
Erik van Luijkbfc37f32015-08-17 12:47:34 +020094#define CONFIG_GENERIC_MMC
95#define CONFIG_GENERIC_ATMEL_MCI
96#endif
97
Erik van Luijkbfc37f32015-08-17 12:47:34 +020098/* Ethernet */
99#define CONFIG_MACB
100#define CONFIG_RMII
101#define CONFIG_NET_RETRY_COUNT 20
102#define CONFIG_RESET_PHY_R
103#define CONFIG_AT91_WANTS_COMMON_PHY
104
105/* USB */
106#define CONFIG_USB_EHCI
107#define CONFIG_USB_EHCI_ATMEL
108#define CONFIG_SYS_USB_EHCI_MAX_ROOT_PORTS 2
Erik van Luijkbfc37f32015-08-17 12:47:34 +0200109
110#define CONFIG_SYS_LOAD_ADDR 0x22000000 /* load address */
111
112#define CONFIG_SYS_MEMTEST_START CONFIG_SYS_SDRAM_BASE
113#define CONFIG_SYS_MEMTEST_END 0x23e00000
114
115#ifdef CONFIG_SYS_USE_MMC
116/* bootstrap + u-boot + env + linux in mmc */
117#define FAT_ENV_INTERFACE "mmc"
118/*
119 * We don't specify the part number, if device 0 has partition table, it means
120 * the first partition; it no partition table, then take whole device as a
121 * FAT file system.
122 */
123#define FAT_ENV_DEVICE_AND_PART "0"
124#define FAT_ENV_FILE "uboot.env"
125#define CONFIG_ENV_IS_IN_FAT
126#define CONFIG_FAT_WRITE
127#define CONFIG_ENV_SIZE 0x4000
128
129#define CONFIG_BOOTARGS "console=ttyS0,115200 " \
130 "root=/dev/mmcblk0p2 rw rootwait"
131#define CONFIG_BOOTCOMMAND "fatload mmc 0:1 0x21000000 dtb; " \
132 "fatload mmc 0:1 0x22000000 zImage; " \
133 "bootz 0x22000000 - 0x21000000"
134#endif
135
136#define CONFIG_BAUDRATE 115200
137
Erik van Luijkbfc37f32015-08-17 12:47:34 +0200138#define CONFIG_SYS_CBSIZE 256
139#define CONFIG_SYS_MAXARGS 16
140#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE \
141 + sizeof(CONFIG_SYS_PROMPT) + 16)
142#define CONFIG_SYS_LONGHELP
143#define CONFIG_CMDLINE_EDITING
144#define CONFIG_AUTO_COMPLETE
Erik van Luijkbfc37f32015-08-17 12:47:34 +0200145
146/*
147 * Size of malloc() pool
148 */
149#define CONFIG_SYS_MALLOC_LEN ROUND(3 * CONFIG_ENV_SIZE + 128*1024, 0x1000)
150
151/* Defines for SPL */
152#define CONFIG_SPL_FRAMEWORK
153#define CONFIG_SPL_TEXT_BASE 0x300000
154#define CONFIG_SPL_MAX_SIZE 0x010000
155#define CONFIG_SPL_STACK 0x310000
156
Erik van Luijkbfc37f32015-08-17 12:47:34 +0200157#define CONFIG_SYS_MONITOR_LEN 0x80000
158
159#ifdef CONFIG_SYS_USE_MMC
160
161#define CONFIG_SPL_BSS_START_ADDR 0x20000000
162#define CONFIG_SPL_BSS_MAX_SIZE 0x00080000
163#define CONFIG_SYS_SPL_MALLOC_START 0x20080000
164#define CONFIG_SYS_SPL_MALLOC_SIZE 0x00080000
165
166#define CONFIG_SPL_LDSCRIPT arch/arm/mach-at91/arm926ejs/u-boot-spl.lds
Erik van Luijkbfc37f32015-08-17 12:47:34 +0200167#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1
168#define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot.img"
Erik van Luijkbfc37f32015-08-17 12:47:34 +0200169
170#define CONFIG_SPL_ATMEL_SIZE
171#define CONFIG_SYS_MASTER_CLOCK 132096000
172#define CONFIG_SYS_AT91_PLLA 0x20c73f03
173#define CONFIG_SYS_MCKR 0x1301
174#define CONFIG_SYS_MCKR_CSS 0x1302
175
176#endif
177#endif