blob: d34d69778f1ba5399fa73d53d69823747cfa5dfb [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001/* SPDX-License-Identifier: GPL-2.0+ */
Hannes Petermaier94360592014-02-07 14:06:50 +01002/*
Hannes Schmelzer46dc5cb2016-06-22 12:36:14 +02003 * brxre1.h
Hannes Petermaier94360592014-02-07 14:06:50 +01004 *
5 * specific parts for B&R KWB Motherboard
6 *
Hannes Schmelzer7935f032015-05-28 15:41:12 +02007 * Copyright (C) 2013 Hannes Schmelzer <oe5hpm@oevsv.at> -
Hannes Petermaier94360592014-02-07 14:06:50 +01008 * Bernecker & Rainer Industrieelektronik GmbH - http://www.br-automation.com
Hannes Petermaier94360592014-02-07 14:06:50 +01009 */
10
Hannes Schmelzer46dc5cb2016-06-22 12:36:14 +020011#ifndef __CONFIG_BRXRE1_H__
12#define __CONFIG_BRXRE1_H__
Hannes Petermaier94360592014-02-07 14:06:50 +010013
Hannes Schmelzer27bf4412016-02-19 12:09:45 +010014#include <configs/bur_cfg_common.h>
Hannes Petermaier94360592014-02-07 14:06:50 +010015#include <configs/bur_am335x_common.h>
Simon Glassfb64e362020-05-10 11:40:09 -060016#include <linux/stringify.h>
Hannes Petermaier94360592014-02-07 14:06:50 +010017/* ------------------------------------------------------------------------- */
Hannes Petermaierc96a9b12015-02-03 13:22:39 +010018#define LCD_BPP LCD_COLOR32
Hannes Petermaier4c4398d2015-04-24 14:49:38 +020019
Hannes Schmelzer27bf4412016-02-19 12:09:45 +010020/* memory */
Hannes Schmelzer27bf4412016-02-19 12:09:45 +010021
Hannes Petermaier94360592014-02-07 14:06:50 +010022/* Clock Defines */
23#define V_OSCK 26000000 /* Clock output from T2 */
24#define V_SCLK (V_OSCK)
25
Hannes Petermaier94360592014-02-07 14:06:50 +010026#ifndef CONFIG_SPL_BUILD
Hannes Schmelzeraf4ea2a2017-06-13 14:11:33 +020027
28/* Default environment */
29#define CONFIG_EXTRA_ENV_SETTINGS \
Hannes Petermaier44799f42015-02-03 13:22:41 +010030BUR_COMMON_ENV \
Hannes Schmelzeraf4ea2a2017-06-13 14:11:33 +020031"autoload=0\0" \
32"scradr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
Hannes Petermaier73914df2015-09-29 08:43:33 +020033"bootaddr=0x80001100\0" \
34"bootdev=cpsw(0,0)\0" \
Hannes Petermaier44799f42015-02-03 13:22:41 +010035"vx_romfsbase=0x800E0000\0" \
36"vx_romfssize=0x20000\0" \
37"vx_memtop=0x8FBEF000\0" \
Hannes Schmelzeraf4ea2a2017-06-13 14:11:33 +020038"loadromfs=mmc read ${vx_romfsbase} 700 100\0" \
Hannes Petermaier44799f42015-02-03 13:22:41 +010039"loadaddr=0x80100000\0" \
Hannes Schmelzeraf4ea2a2017-06-13 14:11:33 +020040"startvx=run loadromfs; bootvx ${loadaddr}\0" \
41"b_break=0\0" \
42"b_tgts_std=mmc def net usb0\0" \
43"b_tgts_rcy=def net usb0\0" \
44"b_tgts_pme=net usb0 mmc\0" \
45"b_deftgts=if test ${b_mode} = 12; then setenv b_tgts ${b_tgts_pme};" \
46" elif test ${b_mode} = 0; then setenv b_tgts ${b_tgts_rcy};" \
47" else setenv b_tgts ${b_tgts_std}; fi\0" \
48"b_mmc=load mmc 1 ${loadaddr} arimg && run startvx\0" \
49"b_def=mmc read ${loadaddr} 800 8000; run startvx\0" \
50"b_net=tftp ${scradr} netscript.img && source ${scradr}\0" \
51"b_usb0=usb start && load usb 0 ${scradr} usbscript.img && source ${scradr}\0" \
52"b_default=run b_deftgts; for target in ${b_tgts};"\
53" do run b_${target}; if test ${b_break} = 1; then; exit; fi; done\0"
Hannes Petermaier94360592014-02-07 14:06:50 +010054#endif /* !CONFIG_SPL_BUILD*/
55
Hannes Schmelzer008c6b52019-02-06 13:25:59 +010056/* Environment */
Hannes Petermaier94360592014-02-07 14:06:50 +010057
Hannes Schmelzer46dc5cb2016-06-22 12:36:14 +020058#endif /* __CONFIG_BRXRE1_H__ */