blob: 1e8426fdb59845074df7dea440245f6fff25ed9a [file] [log] [blame]
Hannes Petermaier94360592014-02-07 14:06:50 +01001/*
Hannes Schmelzer46dc5cb2016-06-22 12:36:14 +02002 * brxre1.h
Hannes Petermaier94360592014-02-07 14:06:50 +01003 *
4 * specific parts for B&R KWB Motherboard
5 *
Hannes Schmelzer7935f032015-05-28 15:41:12 +02006 * Copyright (C) 2013 Hannes Schmelzer <oe5hpm@oevsv.at> -
Hannes Petermaier94360592014-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 Schmelzer46dc5cb2016-06-22 12:36:14 +020012#ifndef __CONFIG_BRXRE1_H__
13#define __CONFIG_BRXRE1_H__
Hannes Petermaier94360592014-02-07 14:06:50 +010014
Hannes Schmelzer27bf4412016-02-19 12:09:45 +010015#include <configs/bur_cfg_common.h>
Hannes Petermaier94360592014-02-07 14:06:50 +010016#include <configs/bur_am335x_common.h>
17/* ------------------------------------------------------------------------- */
Hannes Petermaierc96a9b12015-02-03 13:22:39 +010018#define CONFIG_AM335X_LCD
19#define CONFIG_LCD
20#define CONFIG_LCD_NOSTDOUT
21#define CONFIG_SYS_WHITE_ON_BLACK
22#define LCD_BPP LCD_COLOR32
Hannes Petermaier4c4398d2015-04-24 14:49:38 +020023
24#define CONFIG_VIDEO_BMP_GZIP
25#define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE (1366*767*4)
26#define CONFIG_CMD_UNZIP
27#define CONFIG_CMD_BMP
28#define CONFIG_BMP_24BMP
29#define CONFIG_BMP_32BPP
30
Hannes Schmelzer27bf4412016-02-19 12:09:45 +010031/* memory */
32#define CONFIG_SYS_MALLOC_LEN (5 * 1024 * 1024)
33
Hannes Petermaier94360592014-02-07 14:06:50 +010034/* Clock Defines */
35#define V_OSCK 26000000 /* Clock output from T2 */
36#define V_SCLK (V_OSCK)
37
38#define CONFIG_POWER_TPS65217
39
40#define CONFIG_MACH_TYPE 3589
41/* I2C IP block */
42#define CONFIG_SYS_OMAP24_I2C_SPEED_PSOC 20000
43
44/* GPIO */
Hannes Petermaier94360592014-02-07 14:06:50 +010045
46/* MMC/SD IP block */
47#define CONFIG_MMC
48#define CONFIG_GENERIC_MMC
49#define CONFIG_OMAP_HSMMC
Hannes Petermaier94360592014-02-07 14:06:50 +010050#define CONFIG_SUPPORT_EMMC_BOOT
51/* RAW SD card / eMMC locations. */
52#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x300 /*addr. 0x60000 */
53#define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS 0x200 /* 256 KB */
Hannes Petermaier94360592014-02-07 14:06:50 +010054
Hannes Petermaier44799f42015-02-03 13:22:41 +010055/* Always 64 KiB env size */
56#define CONFIG_ENV_SIZE (64 << 10)
Hannes Petermaier94360592014-02-07 14:06:50 +010057
58#ifndef CONFIG_SPL_BUILD
59#define CONFIG_EXTRA_ENV_SETTINGS \
Hannes Petermaier44799f42015-02-03 13:22:41 +010060BUR_COMMON_ENV \
Hannes Petermaier73914df2015-09-29 08:43:33 +020061"bootaddr=0x80001100\0" \
62"bootdev=cpsw(0,0)\0" \
Hannes Petermaier44799f42015-02-03 13:22:41 +010063"vx_romfsbase=0x800E0000\0" \
64"vx_romfssize=0x20000\0" \
65"vx_memtop=0x8FBEF000\0" \
66"loadromfs=mmc read ${vx_romfsbase} 700 100\0" \
67"autoload=0\0" \
68"loadaddr=0x80100000\0" \
69"logoaddr=0x82000000\0" \
70"defaultARlen=0x8000\0" \
71"loaddefaultAR=mmc read ${loadaddr} 800 ${defaultARlen}\0" \
Hannes Petermaier73914df2015-09-29 08:43:33 +020072"defaultAR=run loadromfs; run loaddefaultAR; bootvx ${loadaddr}\0" \
Hannes Petermaier44799f42015-02-03 13:22:41 +010073"logo0=fatload mmc 0:1 ${logoaddr} SYSTEM/ADDON/Bootlogo/Bootlogo.bmp.gz && " \
74 "bmp display ${logoaddr} 0 0\0" \
75"logo1=fatload mmc 0:1 ${logoaddr} SYSTEM/BASE/Bootlogo/Bootlogo.bmp.gz && " \
76 "bmp display ${logoaddr} 0 0\0" \
77"mmcboot=echo booting AR from eMMC-flash ...; "\
78 "run logo0 || run logo1; " \
79 "run loadromfs; " \
Hannes Petermaier73914df2015-09-29 08:43:33 +020080 "fatload mmc 0:1 ${loadaddr} arimg && bootvx ${loadaddr}; " \
Hannes Petermaier44799f42015-02-03 13:22:41 +010081 "run defaultAR;\0" \
82"netboot=echo booting AR from network ...; " \
83 "run loadromfs; " \
Hannes Petermaier73914df2015-09-29 08:43:33 +020084 "tftp ${loadaddr} arimg && bootvx ${loadaddr}; " \
Hannes Petermaier44799f42015-02-03 13:22:41 +010085 "puts 'networkboot failed!';\0" \
Hannes Petermaier44799f42015-02-03 13:22:41 +010086"netscript=echo running script from network (tftp) ...; " \
87 "tftp 0x80000000 netscript.img && source; " \
88 "puts 'netscript load failed!'\0" \
89"netupdate=tftp ${loadddr} MLO && mmc write ${loadaddr} 100 100; " \
90 "tftp ${loadaddr} u-boot.img && mmc write ${loadaddr} 300 300\0" \
91"netupdatedefaultAR=echo updating defaultAR from network (tftp) ...; " \
92 "if tftp 0x80100000 arimg.bin; " \
93 "then mmc write 0x80100000 800 ${defaultARlen}; " \
94 "else setcurs 1 8; puts 'defAR update failed (tftp)!'; fi;\0" \
95"netupdateROMFS=echo updating romfs from network (tftp) ...; " \
96 "if tftp 0x80100000 romfs.bin; " \
97 "then mmc write 0x80100000 700 100; " \
98 "else setcurs 1 8; puts 'romfs update failed (tftp)!'; fi;\0"
99
Hannes Petermaier94360592014-02-07 14:06:50 +0100100#endif /* !CONFIG_SPL_BUILD*/
101
102#define CONFIG_BOOTCOMMAND \
Hannes Petermaier98267732015-04-24 14:49:39 +0200103 "run usbscript;"
Hannes Petermaier94360592014-02-07 14:06:50 +0100104
105/* undefine command which we not need here */
Hannes Schmelzer220597d2016-02-19 12:09:46 +0100106#undef CONFIG_BOOTM_NETBSD
107#undef CONFIG_BOOTM_PLAN9
108#undef CONFIG_BOOTM_RTEMS
Hannes Petermaier56379772015-02-03 13:22:40 +0100109
110/* Support both device trees and ATAGs. */
Hannes Petermaier56379772015-02-03 13:22:40 +0100111#define CONFIG_CMDLINE_TAG
112#define CONFIG_SETUP_MEMORY_TAGS
113#define CONFIG_INITRD_TAG
Hannes Petermaier94360592014-02-07 14:06:50 +0100114
115/* USB configuration */
116#define CONFIG_USB_MUSB_DSPS
117#define CONFIG_ARCH_MISC_INIT
Paul Kocialkowskif34dfcb2015-08-04 17:04:06 +0200118#define CONFIG_USB_MUSB_PIO_ONLY
119#define CONFIG_USB_MUSB_DISABLE_BULK_COMBINE_SPLIT
Hannes Petermaier94360592014-02-07 14:06:50 +0100120#define CONFIG_AM335X_USB0
121#define CONFIG_AM335X_USB0_MODE MUSB_HOST
Hannes Petermaierc96a9b12015-02-03 13:22:39 +0100122#define CONFIG_AM335X_USB1
123#define CONFIG_AM335X_USB1_MODE MUSB_HOST
Hannes Petermaier94360592014-02-07 14:06:50 +0100124
Hannes Petermaier94360592014-02-07 14:06:50 +0100125#undef CONFIG_ENV_IS_NOWHERE
126#define CONFIG_ENV_IS_IN_MMC
Hannes Petermaier8e731ed2014-04-08 08:39:20 +0200127#define CONFIG_SYS_MMC_ENV_DEV 0
Hannes Petermaier94360592014-02-07 14:06:50 +0100128#define CONFIG_SYS_MMC_ENV_PART 2
129#define CONFIG_ENV_OFFSET 0x40000 /* TODO: Adresse definieren */
130#define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
131#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
132/*
133 * Common filesystems support. When we have removable storage we
134 * enabled a number of useful commands and support.
135 */
136#if defined(CONFIG_MMC) || defined(CONFIG_USB_STORAGE)
137#define CONFIG_DOS_PARTITION
Hannes Petermaier94360592014-02-07 14:06:50 +0100138#define CONFIG_FAT_WRITE
Hannes Petermaier94360592014-02-07 14:06:50 +0100139#endif /* CONFIG_MMC, ... */
140
Hannes Schmelzer46dc5cb2016-06-22 12:36:14 +0200141#endif /* __CONFIG_BRXRE1_H__ */