]> git.ipfire.org Git - people/ms/u-boot.git/blob - include/configs/ts4800.h
ARM: ts4800: add basic board support
[people/ms/u-boot.git] / include / configs / ts4800.h
1 /*
2 * Copyright (C) 2015, Savoir-faire Linux Inc.
3 *
4 * Derived from MX51EVK code by
5 * Guennadi Liakhovetski <lg@denx.de>
6 * Freescale Semiconductor, Inc.
7 *
8 * Configuration settings for the TS4800 Board
9 *
10 * SPDX-License-Identifier: GPL-2.0+
11 */
12
13 #ifndef __CONFIG_H
14 #define __CONFIG_H
15
16 /* High Level Configuration Options */
17 #define CONFIG_MX51
18
19 #define CONFIG_DISPLAY_CPUINFO
20 #define CONFIG_DISPLAY_BOARDINFO
21
22 #define CONFIG_SYS_NO_FLASH /* No NOR Flash */
23 #define CONFIG_SKIP_LOWLEVEL_INIT /* U-boot is a 2nd stage bootloader */
24
25 #define CONFIG_HW_WATCHDOG
26
27 #define CONFIG_MACH_TYPE MACH_TYPE_TS48XX
28
29 /* text base address used when linking */
30 #define CONFIG_SYS_TEXT_BASE 0x90008000
31
32 #include <asm/arch/imx-regs.h>
33
34 /* enable passing of ATAGs */
35 #define CONFIG_CMDLINE_TAG
36 #define CONFIG_SETUP_MEMORY_TAGS
37 #define CONFIG_INITRD_TAG
38 #define CONFIG_REVISION_TAG
39
40 /* use common/board_f.c instead of arch/<arch>/lib/<board>.c */
41 #define CONFIG_SYS_GENERIC_BOARD
42
43 /*
44 * Size of malloc() pool
45 */
46 #define CONFIG_SYS_MALLOC_LEN (10 * 1024 * 1024)
47
48 /*
49 * Hardware drivers
50 */
51
52 #define CONFIG_MXC_UART
53 #define CONFIG_MXC_UART_BASE UART1_BASE
54 #define CONFIG_MXC_GPIO
55
56 /*
57 * SPI Configs
58 * */
59 #define CONFIG_HARD_SPI /* puts SPI: ready */
60 #define CONFIG_MXC_SPI /* driver for the SPI controllers*/
61 #define CONFIG_CMD_SPI /* SPI serial bus support */
62
63 /*
64 * MMC Configs
65 * */
66 #define CONFIG_FSL_ESDHC
67 #define CONFIG_SYS_FSL_ESDHC_ADDR MMC_SDHC1_BASE_ADDR
68
69 #define CONFIG_MMC
70
71 #define CONFIG_CMD_MMC
72 #define CONFIG_GENERIC_MMC
73 #define CONFIG_CMD_FAT
74 #define CONFIG_DOS_PARTITION
75
76 /* allow to overwrite serial and ethaddr */
77 #define CONFIG_ENV_OVERWRITE /* disable vendor parameters protection (serial#, ethaddr) */
78 #define CONFIG_CONS_INDEX 1 /* use UART0 : used by serial driver */
79 #define CONFIG_BAUDRATE 115200
80
81 /***********************************************************
82 * Command definition
83 ***********************************************************/
84
85 #define CONFIG_CMD_BOOTZ
86 #undef CONFIG_CMD_IMLS
87
88 /* Environment variables */
89
90 #define CONFIG_BOOTDELAY 1
91
92 #define CONFIG_LOADADDR 0x91000000 /* loadaddr env var */
93
94 #define CONFIG_EXTRA_ENV_SETTINGS \
95 "script=boot.scr\0" \
96 "image=uImage\0" \
97 "mmcdev=0\0" \
98 "mmcpart=1\0" \
99 "mmcargs=setenv bootargs root=/dev/mmcblk0p2 rootwait rw\0" \
100 "addtty=setenv bootargs ${bootargs} console=ttymxc0,${baudrate}\0" \
101 "loadbootscript=" \
102 "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
103 "bootscript=echo Running bootscript from mmc ...; " \
104 "source\0" \
105 "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image};\0" \
106 "mmcboot=echo Booting from mmc ...; " \
107 "run mmcargs addtty; " \
108 "bootm; "
109
110 #define CONFIG_BOOTCOMMAND \
111 "mmc dev ${mmcdev}; if mmc rescan; then " \
112 "if run loadbootscript; then " \
113 "run bootscript; " \
114 "else " \
115 "if run loadimage; then " \
116 "run mmcboot; " \
117 "fi; " \
118 "fi; " \
119 "fi; "
120
121 /*
122 * Miscellaneous configurable options
123 */
124 #define CONFIG_SYS_LONGHELP /* undef to save memory */
125 #define CONFIG_SYS_HUSH_PARSER /* use "hush" command parser */
126 #define CONFIG_AUTO_COMPLETE
127 #define CONFIG_SYS_CBSIZE 256 /* Console I/O Buffer Size */
128 /* Print Buffer Size */
129 #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
130 #define CONFIG_SYS_MAXARGS 16 /* max number of command args */
131 #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */
132
133 #define CONFIG_SYS_LOAD_ADDR CONFIG_LOADADDR
134
135 #define CONFIG_CMDLINE_EDITING
136
137 /*-----------------------------------------------------------------------
138 * Physical Memory Map
139 */
140 #define CONFIG_NR_DRAM_BANKS 1
141 #define PHYS_SDRAM_1 CSD0_BASE_ADDR
142 #define PHYS_SDRAM_1_SIZE (256 * 1024 * 1024)
143
144 #define CONFIG_SYS_SDRAM_BASE (PHYS_SDRAM_1)
145 #define CONFIG_SYS_INIT_RAM_ADDR (IRAM_BASE_ADDR)
146 #define CONFIG_SYS_INIT_RAM_SIZE (IRAM_SIZE)
147
148 #define CONFIG_BOARD_EARLY_INIT_F
149
150 #define CONFIG_SYS_INIT_SP_OFFSET \
151 (CONFIG_SYS_INIT_RAM_SIZE - GENERATED_GBL_DATA_SIZE)
152 #define CONFIG_SYS_INIT_SP_ADDR \
153 (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET)
154
155 /* Low level init */
156 #define CONFIG_SYS_DDR_CLKSEL 0
157 #define CONFIG_SYS_CLKTL_CBCDR 0x59E35100
158 #define CONFIG_SYS_MAIN_PWR_ON
159
160 /*-----------------------------------------------------------------------
161 * Environment organization
162 */
163
164 #define CONFIG_ENV_OFFSET (6 * 64 * 1024)
165 #define CONFIG_ENV_SIZE (8 * 1024)
166 #define CONFIG_ENV_IS_IN_MMC
167 #define CONFIG_SYS_MMC_ENV_DEV 0
168
169 #endif