board/BuR/kwb: Support booting Linux
[platform/kernel/u-boot.git] / include / configs / kwb.h
1 /*
2  * kwb.h
3  *
4  * specific parts for B&R KWB Motherboard
5  *
6  * Copyright (C) 2013 Hannes Petermaier <oe5hpm@oevsv.at> -
7  * Bernecker & Rainer Industrieelektronik GmbH - http://www.br-automation.com
8  *
9  * SPDX-License-Identifier:        GPL-2.0+
10  */
11
12 #ifndef __CONFIG_KWB_H__
13 #define __CONFIG_KWB_H__
14
15 #include <configs/bur_am335x_common.h>
16 /* ------------------------------------------------------------------------- */
17 #define CONFIG_AM335X_LCD
18 #define CONFIG_LCD
19 #define CONFIG_LCD_NOSTDOUT
20 #define CONFIG_SYS_WHITE_ON_BLACK
21 #define LCD_BPP                         LCD_COLOR32
22 /* Clock Defines */
23 #define V_OSCK                          26000000  /* Clock output from T2 */
24 #define V_SCLK                          (V_OSCK)
25
26 #define CONFIG_POWER_TPS65217
27
28 #define CONFIG_MACH_TYPE                3589
29 /* I2C IP block */
30 #define CONFIG_SYS_OMAP24_I2C_SPEED_PSOC        20000
31
32 /* GPIO */
33 #define CONFIG_SPL_GPIO_SUPPORT
34
35 /* MMC/SD IP block */
36 #define CONFIG_MMC
37 #define CONFIG_GENERIC_MMC
38 #define CONFIG_OMAP_HSMMC
39 #define CONFIG_CMD_MMC
40 #define CONFIG_SUPPORT_EMMC_BOOT
41 /* RAW SD card / eMMC locations. */
42 #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x300 /*addr. 0x60000 */
43 #define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS              0x200 /* 256 KB */
44 #define CONFIG_SPL_MMC_SUPPORT
45
46 #undef CONFIG_SPL_OS_BOOT
47 #ifdef CONFIG_SPL_OS_BOOT
48 #define CONFIG_SYS_SPL_ARGS_ADDR                0x80F80000
49
50 /* RAW SD card / eMMC */
51 #define CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR 0x900   /* address 0x120000 */
52 #define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR   0x80    /* address 0x10000 */
53 #define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS  0x80    /* 64KiB */
54
55 #endif /* CONFIG_SPL_OS_BOOT */
56
57 /* Always 128 KiB env size */
58 #define CONFIG_ENV_SIZE                 (128 << 10)
59
60 #ifndef CONFIG_SPL_BUILD
61 #define CONFIG_EXTRA_ENV_SETTINGS \
62         "autoload=0\0" \
63         "loadaddr=0x80100000\0" \
64         "bootfile=arimg\0" \
65         "usbboot=echo Booting from USB-Stick ...; " \
66                 "usb start; " \
67                 "fatload usb 0 ${loadaddr} ${bootfile}; " \
68                 "usb stop; " \
69                 "go ${loadaddr};\0" \
70         "netboot=echo Booting from network ...; " \
71                 "setenv autoload 0; " \
72                 "dhcp; " \
73                 "tftp ${loadaddr} arimg; " \
74                 "go ${loadaddr}\0" \
75         "usbupdate=echo Updating UBOOT from USB-Stick ...; " \
76                 "usb start; " \
77                 "fatload usb 0 0x80000000 updateubootusb.img; " \
78                 "source;\0" \
79         "netupdate=echo Updating UBOOT from Network (TFTP) ...; " \
80                 "setenv autoload 0; " \
81                 "dhcp;" \
82                 "tftp 0x80000000 updateUBOOT.img;" \
83                 "source;\0"
84 #endif /* !CONFIG_SPL_BUILD*/
85
86 #define CONFIG_BOOTCOMMAND \
87         "run usbupdate;"
88 #define CONFIG_BOOTDELAY                1 /* TODO: für release auf 0 setzen */
89
90 /* undefine command which we not need here */
91 #undef  CONFIG_BOOTM_NETBSD
92 #undef  CONFIG_BOOTM_PLAN9
93 #undef  CONFIG_BOOTM_RTEMS
94 #undef CONFIG_CMD_CRC32
95
96 /* Support both device trees and ATAGs. */
97 #define CONFIG_OF_LIBFDT
98 #define CONFIG_CMDLINE_TAG
99 #define CONFIG_SETUP_MEMORY_TAGS
100 #define CONFIG_INITRD_TAG
101 #define CONFIG_CMD_BOOTZ
102
103 /* USB configuration */
104 #define CONFIG_USB_MUSB_DSPS
105 #define CONFIG_ARCH_MISC_INIT
106 #define CONFIG_MUSB_PIO_ONLY
107 #define CONFIG_MUSB_DISABLE_BULK_COMBINE_SPLIT
108 /* attention! not only for gadget, enables also highspeed in hostmode */
109 #define CONFIG_USB_GADGET_DUALSPEED
110 #define CONFIG_MUSB_HOST
111 #define CONFIG_AM335X_USB0
112 #define CONFIG_AM335X_USB0_MODE MUSB_HOST
113 #define CONFIG_AM335X_USB1
114 #define CONFIG_AM335X_USB1_MODE MUSB_HOST
115
116 #ifdef CONFIG_MUSB_HOST
117 #define CONFIG_CMD_USB
118 #define CONFIG_USB_STORAGE
119 #endif /* CONFIG_MUSB_HOST */
120
121 #undef CONFIG_ENV_IS_NOWHERE
122 #define CONFIG_ENV_IS_IN_MMC
123 #define CONFIG_SYS_MMC_ENV_DEV          0
124 #define CONFIG_SYS_MMC_ENV_PART         2
125 #define CONFIG_ENV_OFFSET               0x40000 /* TODO: Adresse definieren */
126 #define CONFIG_ENV_OFFSET_REDUND        (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
127 #define CONFIG_SYS_REDUNDAND_ENVIRONMENT
128 /*
129  * Common filesystems support.  When we have removable storage we
130  * enabled a number of useful commands and support.
131  */
132 #if defined(CONFIG_MMC) || defined(CONFIG_USB_STORAGE)
133 #define CONFIG_DOS_PARTITION
134 #define CONFIG_CMD_FAT
135 #define CONFIG_FAT_WRITE
136 #define CONFIG_CMD_FS_GENERIC
137 #endif /* CONFIG_MMC, ... */
138
139 #endif  /* ! __CONFIG_TSERIES_H__ */