94d9111cbaae2a594fda43ffa3f32dc18dec6a5c
[oweals/u-boot.git] / include / configs / picosam9g45.h
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Configuration settings for the mini-box PICOSAM9G45 board.
4  * (C) Copyright 2015 Inter Act B.V.
5  *
6  * Based on:
7  * U-Boot file: include/configs/at91sam9m10g45ek.h
8  * (C) Copyright 2007-2008
9  * Stelian Pop <stelian@popies.net>
10  * Lead Tech Design <www.leadtechdesign.com>
11  */
12
13 #ifndef __CONFIG_H
14 #define __CONFIG_H
15
16 #include <asm/hardware.h>
17
18 #define CONFIG_ATMEL_LEGACY             /* required until (g)pio is fixed */
19
20 /* ARM asynchronous clock */
21 #define CONFIG_SYS_AT91_SLOW_CLOCK      32768
22 #define CONFIG_SYS_AT91_MAIN_CLOCK      12000000 /* from 12 MHz crystal */
23
24 #define CONFIG_CMDLINE_TAG              /* enable passing of ATAGs      */
25 #define CONFIG_SETUP_MEMORY_TAGS
26 #define CONFIG_INITRD_TAG
27 #define CONFIG_SKIP_LOWLEVEL_INIT
28
29 /* general purpose I/O */
30 #define CONFIG_ATMEL_LEGACY             /* required until (g)pio is fixed */
31 #define CONFIG_AT91_GPIO_PULLUP 1       /* keep pullups on peripheral pins */
32
33 /* serial console */
34 #define CONFIG_ATMEL_USART
35 #define CONFIG_USART_BASE               ATMEL_BASE_DBGU
36 #define CONFIG_USART_ID                 ATMEL_ID_SYS
37
38 /* LCD */
39 #define LCD_BPP                         LCD_COLOR8
40 #define CONFIG_LCD_LOGO
41 #undef LCD_TEST_PATTERN
42 #define CONFIG_LCD_INFO
43 #define CONFIG_LCD_INFO_BELOW_LOGO
44 #define CONFIG_ATMEL_LCD
45 #define CONFIG_ATMEL_LCD_RGB565
46 /* board specific(not enough SRAM) */
47 #define CONFIG_AT91SAM9G45_LCD_BASE             0x23E00000
48
49 /* LED */
50 #define CONFIG_AT91_LED
51 #define CONFIG_GREEN_LED        AT91_PIN_PD31   /* this is the user1 led */
52
53
54 /*
55  * BOOTP options
56  */
57 #define CONFIG_BOOTP_BOOTFILESIZE
58
59 /* SDRAM */
60 #define PHYS_SDRAM_1            ATMEL_BASE_CS1  /* on DDRSDRC1 */
61 #define PHYS_SDRAM_1_SIZE       0x08000000      /* 128 MB */
62 #define PHYS_SDRAM_2            ATMEL_BASE_CS6  /* on DDRSDRC0 */
63 #define PHYS_SDRAM_2_SIZE       0x08000000      /* 128 MB */
64 #define CONFIG_SYS_SDRAM_BASE   PHYS_SDRAM_1
65
66 #define CONFIG_SYS_INIT_SP_ADDR \
67         (CONFIG_SYS_SDRAM_BASE + 4 * 1024 - GENERATED_GBL_DATA_SIZE)
68
69 /* MMC */
70
71 #ifdef CONFIG_CMD_MMC
72 #define CONFIG_GENERIC_ATMEL_MCI
73 #endif
74
75 /* Ethernet */
76 #define CONFIG_MACB
77 #define CONFIG_RMII
78 #define CONFIG_NET_RETRY_COUNT          20
79 #define CONFIG_RESET_PHY_R
80 #define CONFIG_AT91_WANTS_COMMON_PHY
81
82 #define CONFIG_SYS_LOAD_ADDR            0x22000000      /* load address */
83
84 #ifdef CONFIG_SYS_USE_MMC
85 /* bootstrap + u-boot + env + linux in mmc */
86
87 #define CONFIG_BOOTCOMMAND      "fatload mmc 0:1 0x21000000 dtb; " \
88                                 "fatload mmc 0:1 0x22000000 zImage; " \
89                                 "bootz 0x22000000 - 0x21000000"
90 #endif
91
92 /*
93  * Size of malloc() pool
94  */
95 #define CONFIG_SYS_MALLOC_LEN   ROUND(3 * CONFIG_ENV_SIZE + 128*1024, 0x1000)
96
97 /* Defines for SPL */
98 #define CONFIG_SPL_MAX_SIZE             0x010000
99 #define CONFIG_SPL_STACK                0x310000
100
101 #define CONFIG_SYS_MONITOR_LEN          0x80000
102
103 #ifdef CONFIG_SYS_USE_MMC
104
105 #define CONFIG_SPL_BSS_START_ADDR       0x20000000
106 #define CONFIG_SPL_BSS_MAX_SIZE         0x00080000
107 #define CONFIG_SYS_SPL_MALLOC_START     0x20080000
108 #define CONFIG_SYS_SPL_MALLOC_SIZE      0x00080000
109
110 #define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION      1
111 #define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME         "u-boot.img"
112
113 #define CONFIG_SPL_ATMEL_SIZE
114 #define CONFIG_SYS_MASTER_CLOCK         132096000
115 #define CONFIG_SYS_AT91_PLLA            0x20c73f03
116 #define CONFIG_SYS_MCKR                 0x1301
117 #define CONFIG_SYS_MCKR_CSS             0x1302
118
119 #endif
120 #endif