blob: 7309e7d4831d2401467b73d60fe781733a7b4764 [file] [log] [blame]
Tom Rini83d290c2018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Hannes Petermaier072cefe2014-02-07 14:06:50 +01002/*
Hannes Schmelzera4d79992016-06-22 12:36:14 +02003 * brxre1.h
Hannes Petermaier072cefe2014-02-07 14:06:50 +01004 *
5 * specific parts for B&R KWB Motherboard
6 *
Hannes Schmelzer4c302b92015-05-28 15:41:12 +02007 * Copyright (C) 2013 Hannes Schmelzer <oe5hpm@oevsv.at> -
Hannes Petermaier072cefe2014-02-07 14:06:50 +01008 * Bernecker & Rainer Industrieelektronik GmbH - http://www.br-automation.com
Hannes Petermaier072cefe2014-02-07 14:06:50 +01009 */
10
Hannes Schmelzera4d79992016-06-22 12:36:14 +020011#ifndef __CONFIG_BRXRE1_H__
12#define __CONFIG_BRXRE1_H__
Hannes Petermaier072cefe2014-02-07 14:06:50 +010013
Hannes Schmelzer3b804d92016-02-19 12:09:45 +010014#include <configs/bur_cfg_common.h>
Hannes Petermaier072cefe2014-02-07 14:06:50 +010015#include <configs/bur_am335x_common.h>
16/* ------------------------------------------------------------------------- */
Hannes Petermaiercf630f22015-02-03 13:22:39 +010017#define CONFIG_AM335X_LCD
Hannes Petermaiercf630f22015-02-03 13:22:39 +010018#define LCD_BPP LCD_COLOR32
Hannes Petermaier4e2a3412015-04-24 14:49:38 +020019
Hannes Schmelzer3b804d92016-02-19 12:09:45 +010020/* memory */
21#define CONFIG_SYS_MALLOC_LEN (5 * 1024 * 1024)
22
Hannes Petermaier072cefe2014-02-07 14:06:50 +010023/* Clock Defines */
24#define V_OSCK 26000000 /* Clock output from T2 */
25#define V_SCLK (V_OSCK)
26
Hannes Petermaier072cefe2014-02-07 14:06:50 +010027#define CONFIG_MACH_TYPE 3589
Hannes Petermaier072cefe2014-02-07 14:06:50 +010028
29#ifndef CONFIG_SPL_BUILD
Hannes Schmelzer92100422017-06-13 14:11:33 +020030
31/* Default environment */
32#define CONFIG_EXTRA_ENV_SETTINGS \
Hannes Petermaierd2eb73d2015-02-03 13:22:41 +010033BUR_COMMON_ENV \
Hannes Schmelzer92100422017-06-13 14:11:33 +020034"autoload=0\0" \
35"scradr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
Hannes Petermaier91931f72015-09-29 08:43:33 +020036"bootaddr=0x80001100\0" \
37"bootdev=cpsw(0,0)\0" \
Hannes Petermaierd2eb73d2015-02-03 13:22:41 +010038"vx_romfsbase=0x800E0000\0" \
39"vx_romfssize=0x20000\0" \
40"vx_memtop=0x8FBEF000\0" \
Hannes Schmelzer92100422017-06-13 14:11:33 +020041"loadromfs=mmc read ${vx_romfsbase} 700 100\0" \
Hannes Petermaierd2eb73d2015-02-03 13:22:41 +010042"loadaddr=0x80100000\0" \
Hannes Schmelzer92100422017-06-13 14:11:33 +020043"startvx=run loadromfs; bootvx ${loadaddr}\0" \
44"b_break=0\0" \
45"b_tgts_std=mmc def net usb0\0" \
46"b_tgts_rcy=def net usb0\0" \
47"b_tgts_pme=net usb0 mmc\0" \
48"b_deftgts=if test ${b_mode} = 12; then setenv b_tgts ${b_tgts_pme};" \
49" elif test ${b_mode} = 0; then setenv b_tgts ${b_tgts_rcy};" \
50" else setenv b_tgts ${b_tgts_std}; fi\0" \
51"b_mmc=load mmc 1 ${loadaddr} arimg && run startvx\0" \
52"b_def=mmc read ${loadaddr} 800 8000; run startvx\0" \
53"b_net=tftp ${scradr} netscript.img && source ${scradr}\0" \
54"b_usb0=usb start && load usb 0 ${scradr} usbscript.img && source ${scradr}\0" \
55"b_default=run b_deftgts; for target in ${b_tgts};"\
56" do run b_${target}; if test ${b_break} = 1; then; exit; fi; done\0"
Hannes Petermaier072cefe2014-02-07 14:06:50 +010057#endif /* !CONFIG_SPL_BUILD*/
58
Hannes Schmelzer92100422017-06-13 14:11:33 +020059#define CONFIG_BOOTCOMMAND "mmc dev 1; run b_default"
Hannes Petermaier072cefe2014-02-07 14:06:50 +010060
61/* undefine command which we not need here */
Hannes Schmelzer3e475ab2016-02-19 12:09:46 +010062#undef CONFIG_BOOTM_NETBSD
63#undef CONFIG_BOOTM_PLAN9
64#undef CONFIG_BOOTM_RTEMS
Hannes Petermaierc8184562015-02-03 13:22:40 +010065
66/* Support both device trees and ATAGs. */
Hannes Petermaierc8184562015-02-03 13:22:40 +010067#define CONFIG_CMDLINE_TAG
68#define CONFIG_SETUP_MEMORY_TAGS
69#define CONFIG_INITRD_TAG
Hannes Petermaier072cefe2014-02-07 14:06:50 +010070
Hannes Schmelzereaba7df2019-02-06 13:25:59 +010071/* Environment */
Hannes Schmelzerf6877372017-06-13 14:11:29 +020072#define CONFIG_SYS_MMC_ENV_DEV 1
Hannes Petermaier072cefe2014-02-07 14:06:50 +010073#define CONFIG_SYS_MMC_ENV_PART 2
Hannes Schmelzereaba7df2019-02-06 13:25:59 +010074#define CONFIG_ENV_SIZE 0x10000
Hannes Petermaier072cefe2014-02-07 14:06:50 +010075#define CONFIG_ENV_OFFSET 0x40000 /* TODO: Adresse definieren */
76#define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
77#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
Hannes Petermaier072cefe2014-02-07 14:06:50 +010078
Hannes Schmelzera4d79992016-06-22 12:36:14 +020079#endif /* __CONFIG_BRXRE1_H__ */