Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Hannes Petermaier | 072cefe | 2014-02-07 14:06:50 +0100 | [diff] [blame] | 2 | /* |
Hannes Schmelzer | a4d7999 | 2016-06-22 12:36:14 +0200 | [diff] [blame] | 3 | * brxre1.h |
Hannes Petermaier | 072cefe | 2014-02-07 14:06:50 +0100 | [diff] [blame] | 4 | * |
| 5 | * specific parts for B&R KWB Motherboard |
| 6 | * |
Hannes Schmelzer | 4c302b9 | 2015-05-28 15:41:12 +0200 | [diff] [blame] | 7 | * Copyright (C) 2013 Hannes Schmelzer <oe5hpm@oevsv.at> - |
Hannes Petermaier | 072cefe | 2014-02-07 14:06:50 +0100 | [diff] [blame] | 8 | * Bernecker & Rainer Industrieelektronik GmbH - http://www.br-automation.com |
Hannes Petermaier | 072cefe | 2014-02-07 14:06:50 +0100 | [diff] [blame] | 9 | */ |
| 10 | |
Hannes Schmelzer | a4d7999 | 2016-06-22 12:36:14 +0200 | [diff] [blame] | 11 | #ifndef __CONFIG_BRXRE1_H__ |
| 12 | #define __CONFIG_BRXRE1_H__ |
Hannes Petermaier | 072cefe | 2014-02-07 14:06:50 +0100 | [diff] [blame] | 13 | |
Hannes Schmelzer | 3b804d9 | 2016-02-19 12:09:45 +0100 | [diff] [blame] | 14 | #include <configs/bur_cfg_common.h> |
Hannes Petermaier | 072cefe | 2014-02-07 14:06:50 +0100 | [diff] [blame] | 15 | #include <configs/bur_am335x_common.h> |
Simon Glass | 1af3c7f | 2020-05-10 11:40:09 -0600 | [diff] [blame] | 16 | #include <linux/stringify.h> |
Hannes Schmelzer | 3b804d9 | 2016-02-19 12:09:45 +0100 | [diff] [blame] | 17 | |
Hannes Petermaier | 072cefe | 2014-02-07 14:06:50 +0100 | [diff] [blame] | 18 | /* Clock Defines */ |
| 19 | #define V_OSCK 26000000 /* Clock output from T2 */ |
| 20 | #define V_SCLK (V_OSCK) |
| 21 | |
Hannes Schmelzer | 9210042 | 2017-06-13 14:11:33 +0200 | [diff] [blame] | 22 | /* Default environment */ |
Tom Rini | 0613c36 | 2022-12-04 10:03:50 -0500 | [diff] [blame] | 23 | #define CFG_EXTRA_ENV_SETTINGS \ |
Hannes Petermaier | d2eb73d | 2015-02-03 13:22:41 +0100 | [diff] [blame] | 24 | BUR_COMMON_ENV \ |
Hannes Schmelzer | 9210042 | 2017-06-13 14:11:33 +0200 | [diff] [blame] | 25 | "scradr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ |
Hannes Petermaier | 91931f7 | 2015-09-29 08:43:33 +0200 | [diff] [blame] | 26 | "bootaddr=0x80001100\0" \ |
| 27 | "bootdev=cpsw(0,0)\0" \ |
Hannes Petermaier | d2eb73d | 2015-02-03 13:22:41 +0100 | [diff] [blame] | 28 | "vx_romfsbase=0x800E0000\0" \ |
| 29 | "vx_romfssize=0x20000\0" \ |
| 30 | "vx_memtop=0x8FBEF000\0" \ |
Hannes Schmelzer | 9210042 | 2017-06-13 14:11:33 +0200 | [diff] [blame] | 31 | "loadromfs=mmc read ${vx_romfsbase} 700 100\0" \ |
Hannes Petermaier | d2eb73d | 2015-02-03 13:22:41 +0100 | [diff] [blame] | 32 | "loadaddr=0x80100000\0" \ |
Hannes Schmelzer | 9210042 | 2017-06-13 14:11:33 +0200 | [diff] [blame] | 33 | "startvx=run loadromfs; bootvx ${loadaddr}\0" \ |
| 34 | "b_break=0\0" \ |
| 35 | "b_tgts_std=mmc def net usb0\0" \ |
| 36 | "b_tgts_rcy=def net usb0\0" \ |
| 37 | "b_tgts_pme=net usb0 mmc\0" \ |
| 38 | "b_deftgts=if test ${b_mode} = 12; then setenv b_tgts ${b_tgts_pme};" \ |
| 39 | " elif test ${b_mode} = 0; then setenv b_tgts ${b_tgts_rcy};" \ |
| 40 | " else setenv b_tgts ${b_tgts_std}; fi\0" \ |
| 41 | "b_mmc=load mmc 1 ${loadaddr} arimg && run startvx\0" \ |
| 42 | "b_def=mmc read ${loadaddr} 800 8000; run startvx\0" \ |
| 43 | "b_net=tftp ${scradr} netscript.img && source ${scradr}\0" \ |
| 44 | "b_usb0=usb start && load usb 0 ${scradr} usbscript.img && source ${scradr}\0" \ |
| 45 | "b_default=run b_deftgts; for target in ${b_tgts};"\ |
| 46 | " do run b_${target}; if test ${b_break} = 1; then; exit; fi; done\0" |
Hannes Petermaier | 072cefe | 2014-02-07 14:06:50 +0100 | [diff] [blame] | 47 | |
Hannes Schmelzer | eaba7df | 2019-02-06 13:25:59 +0100 | [diff] [blame] | 48 | /* Environment */ |
Hannes Petermaier | 072cefe | 2014-02-07 14:06:50 +0100 | [diff] [blame] | 49 | |
Hannes Schmelzer | a4d7999 | 2016-06-22 12:36:14 +0200 | [diff] [blame] | 50 | #endif /* __CONFIG_BRXRE1_H__ */ |