1 /*
2  * Copyright (C) 2012 Lucas Stach
3  *
4  * Configuration settings for the Toradex Colibri T20 modules.
5  *
6  * SPDX-License-Identifier:	GPL-2.0+
7  */
8 
9 #ifndef __CONFIG_H
10 #define __CONFIG_H
11 
12 #include "tegra20-common.h"
13 
14 #define CONFIG_ARCH_MISC_INIT
15 
16 /* High-level configuration options */
17 #define CONFIG_TEGRA_BOARD_STRING	"Toradex Colibri T20"
18 
19 /* Board-specific serial config */
20 #define CONFIG_TEGRA_ENABLE_UARTA
21 #define CONFIG_TEGRA_UARTA_SDIO1
22 #define CONFIG_SYS_NS16550_COM1		NV_PA_APB_UARTA_BASE
23 
24 #define CONFIG_MACH_TYPE		MACH_TYPE_COLIBRI_T20
25 
26 /* I2C */
27 #define CONFIG_SYS_I2C_TEGRA
28 #define CONFIG_CMD_I2C
29 
30 /* SD/MMC support */
31 #define CONFIG_MMC
32 #define CONFIG_GENERIC_MMC
33 #define CONFIG_TEGRA_MMC
34 #define CONFIG_CMD_MMC
35 
36 /* USB host support */
37 #define CONFIG_USB_EHCI
38 #define CONFIG_USB_EHCI_TEGRA
39 #define CONFIG_USB_ULPI
40 #define CONFIG_USB_ULPI_VIEWPORT
41 #define CONFIG_USB_STORAGE
42 #define CONFIG_CMD_USB
43 
44 /* USB networking support */
45 #define CONFIG_USB_HOST_ETHER
46 #define CONFIG_USB_ETHER_ASIX
47 
48 /* General networking support */
49 #define CONFIG_CMD_DHCP
50 #define CONFIG_IP_DEFRAG
51 #define CONFIG_TFTP_BLOCKSIZE		1536
52 #define CONFIG_TFTP_TSIZE
53 
54 /* LCD support */
55 #define CONFIG_SYS_WHITE_ON_BLACK
56 #define CONFIG_CONSOLE_SCROLL_LINES	10
57 #define CONFIG_CMD_BMP
58 #define CONFIG_LCD_LOGO
59 
60 /* NAND support */
61 #define CONFIG_CMD_NAND
62 #define CONFIG_TEGRA_NAND
63 #define CONFIG_SYS_MAX_NAND_DEVICE	1
64 
65 /* Dynamic MTD partition support */
66 #define CONFIG_CMD_MTDPARTS	/* Enable 'mtdparts' command line support */
67 #define CONFIG_MTD_PARTITIONS
68 #define CONFIG_MTD_DEVICE	/* needed for mtdparts commands */
69 #define MTDIDS_DEFAULT		"nand0=tegra_nand"
70 #define MTDPARTS_DEFAULT	"mtdparts=tegra_nand:"		\
71 				"2m(u-boot)ro,"			\
72 				"1m(u-boot-env),"		\
73 				"1m(cfgblock)ro,"		\
74 				"-(ubi)"
75 
76 /* Environment in NAND, 64K is a bit excessive but erase block is 512K anyway */
77 #define CONFIG_ENV_IS_IN_NAND
78 #define CONFIG_ENV_OFFSET		(SZ_2M)
79 #undef CONFIG_ENV_SIZE		/* undef size from tegra20-common.h */
80 #define CONFIG_ENV_SIZE			(SZ_64K)
81 
82 /* UBI */
83 #define CONFIG_CMD_BOOTZ
84 #define CONFIG_CMD_UBI
85 #define CONFIG_CMD_UBIFS	/* increases size by almost 60 KB */
86 #define CONFIG_LZO
87 #define CONFIG_MTD_UBI_FASTMAP
88 #define CONFIG_RBTREE
89 
90 /* Debug commands */
91 #define CONFIG_CMD_CACHE
92 
93 /* Miscellaneous commands */
94 #define CONFIG_FAT_WRITE
95 
96 #define BOARD_EXTRA_ENV_SETTINGS \
97 	"mtdparts=" MTDPARTS_DEFAULT "\0"
98 
99 /* Increase console I/O buffer size */
100 #undef CONFIG_SYS_CBSIZE
101 #define CONFIG_SYS_CBSIZE		1024
102 
103 /* Increase arguments buffer size */
104 #undef CONFIG_SYS_BARGSIZE
105 #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
106 
107 /* Increase print buffer size */
108 #define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + sizeof(CONFIG_SYS_PROMPT) + 16)
109 
110 /* Increase maximum number of arguments */
111 #undef CONFIG_SYS_MAXARGS
112 #define CONFIG_SYS_MAXARGS		32
113 
114 #include "tegra-common-usb-gadget.h"
115 #include "tegra-common-post.h"
116 
117 #endif /* __CONFIG_H */
118