board/BuR/kwb: switch to board HW-Rev3
[oweals/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_LINUX
92 #undef  CONFIG_BOOTM_NETBSD
93 #undef  CONFIG_BOOTM_PLAN9
94 #undef  CONFIG_BOOTM_RTEMS
95
96 /* USB configuration */
97 #define CONFIG_USB_MUSB_DSPS
98 #define CONFIG_ARCH_MISC_INIT
99 #define CONFIG_MUSB_PIO_ONLY
100 #define CONFIG_MUSB_DISABLE_BULK_COMBINE_SPLIT
101 /* attention! not only for gadget, enables also highspeed in hostmode */
102 #define CONFIG_USB_GADGET_DUALSPEED
103 #define CONFIG_MUSB_HOST
104 #define CONFIG_AM335X_USB0
105 #define CONFIG_AM335X_USB0_MODE MUSB_HOST
106 #define CONFIG_AM335X_USB1
107 #define CONFIG_AM335X_USB1_MODE MUSB_HOST
108
109 #ifdef CONFIG_MUSB_HOST
110 #define CONFIG_CMD_USB
111 #define CONFIG_USB_STORAGE
112 #endif /* CONFIG_MUSB_HOST */
113
114 #undef CONFIG_ENV_IS_NOWHERE
115 #define CONFIG_ENV_IS_IN_MMC
116 #define CONFIG_SYS_MMC_ENV_DEV          0
117 #define CONFIG_SYS_MMC_ENV_PART         2
118 #define CONFIG_ENV_OFFSET               0x40000 /* TODO: Adresse definieren */
119 #define CONFIG_ENV_OFFSET_REDUND        (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
120 #define CONFIG_SYS_REDUNDAND_ENVIRONMENT
121 /*
122  * Common filesystems support.  When we have removable storage we
123  * enabled a number of useful commands and support.
124  */
125 #if defined(CONFIG_MMC) || defined(CONFIG_USB_STORAGE)
126 #define CONFIG_DOS_PARTITION
127 #define CONFIG_CMD_FAT
128 #define CONFIG_FAT_WRITE
129 #define CONFIG_CMD_FS_GENERIC
130 #endif /* CONFIG_MMC, ... */
131
132 #endif  /* ! __CONFIG_TSERIES_H__ */