blob: 96f2e9d39b442b10dd9ed09bfca0ac5361b7bbf9 [file] [log] [blame]
Hannes Petermaier072cefe2014-02-07 14:06:50 +01001/*
2 * kwb.h
3 *
4 * specific parts for B&R KWB Motherboard
5 *
Hannes Schmelzer4c302b92015-05-28 15:41:12 +02006 * Copyright (C) 2013 Hannes Schmelzer <oe5hpm@oevsv.at> -
Hannes Petermaier072cefe2014-02-07 14:06:50 +01007 * 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/* ------------------------------------------------------------------------- */
Hannes Petermaiercf630f22015-02-03 13:22:39 +010017#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
Hannes Petermaier4e2a3412015-04-24 14:49:38 +020022
23#define CONFIG_VIDEO_BMP_GZIP
24#define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE (1366*767*4)
25#define CONFIG_CMD_UNZIP
26#define CONFIG_CMD_BMP
27#define CONFIG_BMP_24BMP
28#define CONFIG_BMP_32BPP
29
Hannes Petermaier072cefe2014-02-07 14:06:50 +010030/* Clock Defines */
31#define V_OSCK 26000000 /* Clock output from T2 */
32#define V_SCLK (V_OSCK)
33
34#define CONFIG_POWER_TPS65217
35
36#define CONFIG_MACH_TYPE 3589
37/* I2C IP block */
38#define CONFIG_SYS_OMAP24_I2C_SPEED_PSOC 20000
39
40/* GPIO */
41#define CONFIG_SPL_GPIO_SUPPORT
42
43/* MMC/SD IP block */
44#define CONFIG_MMC
45#define CONFIG_GENERIC_MMC
46#define CONFIG_OMAP_HSMMC
47#define CONFIG_CMD_MMC
48#define CONFIG_SUPPORT_EMMC_BOOT
49/* RAW SD card / eMMC locations. */
50#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x300 /*addr. 0x60000 */
51#define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS 0x200 /* 256 KB */
52#define CONFIG_SPL_MMC_SUPPORT
53
Hannes Petermaierd2eb73d2015-02-03 13:22:41 +010054/* Always 64 KiB env size */
55#define CONFIG_ENV_SIZE (64 << 10)
Hannes Petermaier072cefe2014-02-07 14:06:50 +010056
57#ifndef CONFIG_SPL_BUILD
58#define CONFIG_EXTRA_ENV_SETTINGS \
Hannes Petermaierd2eb73d2015-02-03 13:22:41 +010059BUR_COMMON_ENV \
60"vx_romfsbase=0x800E0000\0" \
61"vx_romfssize=0x20000\0" \
62"vx_memtop=0x8FBEF000\0" \
63"loadromfs=mmc read ${vx_romfsbase} 700 100\0" \
64"autoload=0\0" \
65"loadaddr=0x80100000\0" \
66"logoaddr=0x82000000\0" \
67"defaultARlen=0x8000\0" \
68"loaddefaultAR=mmc read ${loadaddr} 800 ${defaultARlen}\0" \
69"defaultAR=run loadromfs; run loaddefaultAR; go ${loadaddr}\0" \
70"logo0=fatload mmc 0:1 ${logoaddr} SYSTEM/ADDON/Bootlogo/Bootlogo.bmp.gz && " \
71 "bmp display ${logoaddr} 0 0\0" \
72"logo1=fatload mmc 0:1 ${logoaddr} SYSTEM/BASE/Bootlogo/Bootlogo.bmp.gz && " \
73 "bmp display ${logoaddr} 0 0\0" \
74"mmcboot=echo booting AR from eMMC-flash ...; "\
75 "run logo0 || run logo1; " \
76 "run loadromfs; " \
77 "fatload mmc 0:1 ${loadaddr} arimg && go ${loadaddr}; " \
78 "run defaultAR;\0" \
79"netboot=echo booting AR from network ...; " \
80 "run loadromfs; " \
81 "tftp ${loadaddr} arimg && go ${loadaddr}; " \
82 "puts 'networkboot failed!';\0" \
Hannes Petermaierd2eb73d2015-02-03 13:22:41 +010083"netscript=echo running script from network (tftp) ...; " \
84 "tftp 0x80000000 netscript.img && source; " \
85 "puts 'netscript load failed!'\0" \
86"netupdate=tftp ${loadddr} MLO && mmc write ${loadaddr} 100 100; " \
87 "tftp ${loadaddr} u-boot.img && mmc write ${loadaddr} 300 300\0" \
88"netupdatedefaultAR=echo updating defaultAR from network (tftp) ...; " \
89 "if tftp 0x80100000 arimg.bin; " \
90 "then mmc write 0x80100000 800 ${defaultARlen}; " \
91 "else setcurs 1 8; puts 'defAR update failed (tftp)!'; fi;\0" \
92"netupdateROMFS=echo updating romfs from network (tftp) ...; " \
93 "if tftp 0x80100000 romfs.bin; " \
94 "then mmc write 0x80100000 700 100; " \
95 "else setcurs 1 8; puts 'romfs update failed (tftp)!'; fi;\0"
96
Hannes Petermaier072cefe2014-02-07 14:06:50 +010097#endif /* !CONFIG_SPL_BUILD*/
98
99#define CONFIG_BOOTCOMMAND \
Hannes Petermaier5094bef2015-04-24 14:49:39 +0200100 "run usbscript;"
Hannes Petermaierd2eb73d2015-02-03 13:22:41 +0100101#define CONFIG_BOOTDELAY 0
Hannes Petermaier072cefe2014-02-07 14:06:50 +0100102
103/* undefine command which we not need here */
Hannes Petermaier072cefe2014-02-07 14:06:50 +0100104#undef CONFIG_BOOTM_NETBSD
105#undef CONFIG_BOOTM_PLAN9
106#undef CONFIG_BOOTM_RTEMS
Hannes Petermaierc8184562015-02-03 13:22:40 +0100107#undef CONFIG_CMD_CRC32
108
109/* Support both device trees and ATAGs. */
110#define CONFIG_OF_LIBFDT
111#define CONFIG_CMDLINE_TAG
112#define CONFIG_SETUP_MEMORY_TAGS
113#define CONFIG_INITRD_TAG
114#define CONFIG_CMD_BOOTZ
Hannes Petermaier072cefe2014-02-07 14:06:50 +0100115
116/* USB configuration */
117#define CONFIG_USB_MUSB_DSPS
118#define CONFIG_ARCH_MISC_INIT
Paul Kocialkowski95de1e22015-08-04 17:04:06 +0200119#define CONFIG_USB_MUSB_PIO_ONLY
120#define CONFIG_USB_MUSB_DISABLE_BULK_COMBINE_SPLIT
Hannes Petermaier072cefe2014-02-07 14:06:50 +0100121/* attention! not only for gadget, enables also highspeed in hostmode */
122#define CONFIG_USB_GADGET_DUALSPEED
Paul Kocialkowski95de1e22015-08-04 17:04:06 +0200123#define CONFIG_USB_MUSB_HOST
Hannes Petermaier072cefe2014-02-07 14:06:50 +0100124#define CONFIG_AM335X_USB0
125#define CONFIG_AM335X_USB0_MODE MUSB_HOST
Hannes Petermaiercf630f22015-02-03 13:22:39 +0100126#define CONFIG_AM335X_USB1
127#define CONFIG_AM335X_USB1_MODE MUSB_HOST
Hannes Petermaier072cefe2014-02-07 14:06:50 +0100128
Paul Kocialkowski95de1e22015-08-04 17:04:06 +0200129#ifdef CONFIG_USB_MUSB_HOST
Hannes Petermaier072cefe2014-02-07 14:06:50 +0100130#define CONFIG_CMD_USB
131#define CONFIG_USB_STORAGE
Paul Kocialkowski95de1e22015-08-04 17:04:06 +0200132#endif /* CONFIG_USB_MUSB_HOST */
Hannes Petermaier072cefe2014-02-07 14:06:50 +0100133
134#undef CONFIG_ENV_IS_NOWHERE
135#define CONFIG_ENV_IS_IN_MMC
Hannes Petermaier46c8ebc2014-04-08 08:39:20 +0200136#define CONFIG_SYS_MMC_ENV_DEV 0
Hannes Petermaier072cefe2014-02-07 14:06:50 +0100137#define CONFIG_SYS_MMC_ENV_PART 2
138#define CONFIG_ENV_OFFSET 0x40000 /* TODO: Adresse definieren */
139#define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
140#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
141/*
142 * Common filesystems support. When we have removable storage we
143 * enabled a number of useful commands and support.
144 */
145#if defined(CONFIG_MMC) || defined(CONFIG_USB_STORAGE)
146#define CONFIG_DOS_PARTITION
147#define CONFIG_CMD_FAT
148#define CONFIG_FAT_WRITE
149#define CONFIG_CMD_FS_GENERIC
150#endif /* CONFIG_MMC, ... */
151
152#endif /* ! __CONFIG_TSERIES_H__ */