blob: a6369d63b8ee4fc8edff63f7282db8fd908bf776 [file] [log] [blame]
Hannes Petermaier072cefe2014-02-07 14:06:50 +01001/*
Hannes Schmelzera4d79992016-06-22 12:36:14 +02002 * brxre1.h
Hannes Petermaier072cefe2014-02-07 14:06:50 +01003 *
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
Hannes Schmelzera4d79992016-06-22 12:36:14 +020012#ifndef __CONFIG_BRXRE1_H__
13#define __CONFIG_BRXRE1_H__
Hannes Petermaier072cefe2014-02-07 14:06:50 +010014
Hannes Schmelzer3b804d92016-02-19 12:09:45 +010015#include <configs/bur_cfg_common.h>
Hannes Petermaier072cefe2014-02-07 14:06:50 +010016#include <configs/bur_am335x_common.h>
17/* ------------------------------------------------------------------------- */
Hannes Petermaiercf630f22015-02-03 13:22:39 +010018#define CONFIG_AM335X_LCD
Hannes Petermaiercf630f22015-02-03 13:22:39 +010019#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 Schmelzer3b804d92016-02-19 12:09:45 +010030/* memory */
31#define CONFIG_SYS_MALLOC_LEN (5 * 1024 * 1024)
32
Hannes Petermaier072cefe2014-02-07 14:06:50 +010033/* Clock Defines */
34#define V_OSCK 26000000 /* Clock output from T2 */
35#define V_SCLK (V_OSCK)
36
37#define CONFIG_POWER_TPS65217
38
39#define CONFIG_MACH_TYPE 3589
40/* I2C IP block */
41#define CONFIG_SYS_OMAP24_I2C_SPEED_PSOC 20000
42
43/* GPIO */
Hannes Petermaier072cefe2014-02-07 14:06:50 +010044
45/* MMC/SD IP block */
46#define CONFIG_MMC
47#define CONFIG_GENERIC_MMC
48#define CONFIG_OMAP_HSMMC
Hannes Petermaier072cefe2014-02-07 14:06:50 +010049#define CONFIG_SUPPORT_EMMC_BOOT
Hannes Petermaier072cefe2014-02-07 14:06:50 +010050
Hannes Petermaierd2eb73d2015-02-03 13:22:41 +010051/* Always 64 KiB env size */
52#define CONFIG_ENV_SIZE (64 << 10)
Hannes Petermaier072cefe2014-02-07 14:06:50 +010053
54#ifndef CONFIG_SPL_BUILD
55#define CONFIG_EXTRA_ENV_SETTINGS \
Hannes Petermaierd2eb73d2015-02-03 13:22:41 +010056BUR_COMMON_ENV \
Hannes Petermaier91931f72015-09-29 08:43:33 +020057"bootaddr=0x80001100\0" \
58"bootdev=cpsw(0,0)\0" \
Hannes Petermaierd2eb73d2015-02-03 13:22:41 +010059"vx_romfsbase=0x800E0000\0" \
60"vx_romfssize=0x20000\0" \
61"vx_memtop=0x8FBEF000\0" \
62"loadromfs=mmc read ${vx_romfsbase} 700 100\0" \
63"autoload=0\0" \
64"loadaddr=0x80100000\0" \
65"logoaddr=0x82000000\0" \
66"defaultARlen=0x8000\0" \
67"loaddefaultAR=mmc read ${loadaddr} 800 ${defaultARlen}\0" \
Hannes Petermaier91931f72015-09-29 08:43:33 +020068"defaultAR=run loadromfs; run loaddefaultAR; bootvx ${loadaddr}\0" \
Hannes Petermaierd2eb73d2015-02-03 13:22:41 +010069"logo0=fatload mmc 0:1 ${logoaddr} SYSTEM/ADDON/Bootlogo/Bootlogo.bmp.gz && " \
70 "bmp display ${logoaddr} 0 0\0" \
71"logo1=fatload mmc 0:1 ${logoaddr} SYSTEM/BASE/Bootlogo/Bootlogo.bmp.gz && " \
72 "bmp display ${logoaddr} 0 0\0" \
73"mmcboot=echo booting AR from eMMC-flash ...; "\
74 "run logo0 || run logo1; " \
75 "run loadromfs; " \
Hannes Petermaier91931f72015-09-29 08:43:33 +020076 "fatload mmc 0:1 ${loadaddr} arimg && bootvx ${loadaddr}; " \
Hannes Petermaierd2eb73d2015-02-03 13:22:41 +010077 "run defaultAR;\0" \
78"netboot=echo booting AR from network ...; " \
79 "run loadromfs; " \
Hannes Petermaier91931f72015-09-29 08:43:33 +020080 "tftp ${loadaddr} arimg && bootvx ${loadaddr}; " \
Hannes Petermaierd2eb73d2015-02-03 13:22:41 +010081 "puts 'networkboot failed!';\0" \
Hannes Petermaierd2eb73d2015-02-03 13:22:41 +010082"netscript=echo running script from network (tftp) ...; " \
83 "tftp 0x80000000 netscript.img && source; " \
84 "puts 'netscript load failed!'\0" \
85"netupdate=tftp ${loadddr} MLO && mmc write ${loadaddr} 100 100; " \
86 "tftp ${loadaddr} u-boot.img && mmc write ${loadaddr} 300 300\0" \
87"netupdatedefaultAR=echo updating defaultAR from network (tftp) ...; " \
88 "if tftp 0x80100000 arimg.bin; " \
89 "then mmc write 0x80100000 800 ${defaultARlen}; " \
90 "else setcurs 1 8; puts 'defAR update failed (tftp)!'; fi;\0" \
91"netupdateROMFS=echo updating romfs from network (tftp) ...; " \
92 "if tftp 0x80100000 romfs.bin; " \
93 "then mmc write 0x80100000 700 100; " \
94 "else setcurs 1 8; puts 'romfs update failed (tftp)!'; fi;\0"
95
Hannes Petermaier072cefe2014-02-07 14:06:50 +010096#endif /* !CONFIG_SPL_BUILD*/
97
98#define CONFIG_BOOTCOMMAND \
Hannes Petermaier5094bef2015-04-24 14:49:39 +020099 "run usbscript;"
Hannes Petermaier072cefe2014-02-07 14:06:50 +0100100
101/* undefine command which we not need here */
Hannes Schmelzer3e475ab2016-02-19 12:09:46 +0100102#undef CONFIG_BOOTM_NETBSD
103#undef CONFIG_BOOTM_PLAN9
104#undef CONFIG_BOOTM_RTEMS
Hannes Petermaierc8184562015-02-03 13:22:40 +0100105
106/* Support both device trees and ATAGs. */
Hannes Petermaierc8184562015-02-03 13:22:40 +0100107#define CONFIG_CMDLINE_TAG
108#define CONFIG_SETUP_MEMORY_TAGS
109#define CONFIG_INITRD_TAG
Hannes Petermaier072cefe2014-02-07 14:06:50 +0100110
111/* USB configuration */
112#define CONFIG_USB_MUSB_DSPS
113#define CONFIG_ARCH_MISC_INIT
Paul Kocialkowski95de1e22015-08-04 17:04:06 +0200114#define CONFIG_USB_MUSB_PIO_ONLY
115#define CONFIG_USB_MUSB_DISABLE_BULK_COMBINE_SPLIT
Hannes Petermaier072cefe2014-02-07 14:06:50 +0100116#define CONFIG_AM335X_USB0
117#define CONFIG_AM335X_USB0_MODE MUSB_HOST
Hannes Petermaiercf630f22015-02-03 13:22:39 +0100118#define CONFIG_AM335X_USB1
119#define CONFIG_AM335X_USB1_MODE MUSB_HOST
Hannes Petermaier072cefe2014-02-07 14:06:50 +0100120
Hannes Petermaier072cefe2014-02-07 14:06:50 +0100121#undef CONFIG_ENV_IS_NOWHERE
122#define CONFIG_ENV_IS_IN_MMC
Hannes Petermaier46c8ebc2014-04-08 08:39:20 +0200123#define CONFIG_SYS_MMC_ENV_DEV 0
Hannes Petermaier072cefe2014-02-07 14:06:50 +0100124#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
Hannes Petermaier072cefe2014-02-07 14:06:50 +0100134#define CONFIG_FAT_WRITE
Hannes Petermaier072cefe2014-02-07 14:06:50 +0100135#endif /* CONFIG_MMC, ... */
136
Hannes Schmelzera4d79992016-06-22 12:36:14 +0200137#endif /* __CONFIG_BRXRE1_H__ */