Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Hannes Petermaier | 9436059 | 2014-02-07 14:06:50 +0100 | [diff] [blame] | 2 | /* |
Hannes Schmelzer | 46dc5cb | 2016-06-22 12:36:14 +0200 | [diff] [blame] | 3 | * brxre1.h |
Hannes Petermaier | 9436059 | 2014-02-07 14:06:50 +0100 | [diff] [blame] | 4 | * |
| 5 | * specific parts for B&R KWB Motherboard |
| 6 | * |
Hannes Schmelzer | 7935f03 | 2015-05-28 15:41:12 +0200 | [diff] [blame] | 7 | * Copyright (C) 2013 Hannes Schmelzer <oe5hpm@oevsv.at> - |
Hannes Petermaier | 9436059 | 2014-02-07 14:06:50 +0100 | [diff] [blame] | 8 | * Bernecker & Rainer Industrieelektronik GmbH - http://www.br-automation.com |
Hannes Petermaier | 9436059 | 2014-02-07 14:06:50 +0100 | [diff] [blame] | 9 | */ |
| 10 | |
Hannes Schmelzer | 46dc5cb | 2016-06-22 12:36:14 +0200 | [diff] [blame] | 11 | #ifndef __CONFIG_BRXRE1_H__ |
| 12 | #define __CONFIG_BRXRE1_H__ |
Hannes Petermaier | 9436059 | 2014-02-07 14:06:50 +0100 | [diff] [blame] | 13 | |
Hannes Schmelzer | 27bf441 | 2016-02-19 12:09:45 +0100 | [diff] [blame] | 14 | #include <configs/bur_cfg_common.h> |
Hannes Petermaier | 9436059 | 2014-02-07 14:06:50 +0100 | [diff] [blame] | 15 | #include <configs/bur_am335x_common.h> |
Simon Glass | fb64e36 | 2020-05-10 11:40:09 -0600 | [diff] [blame] | 16 | #include <linux/stringify.h> |
Hannes Petermaier | 9436059 | 2014-02-07 14:06:50 +0100 | [diff] [blame] | 17 | /* ------------------------------------------------------------------------- */ |
Dario Binacchi | 90184bc | 2020-02-22 14:05:49 +0100 | [diff] [blame] | 18 | #if !defined(CONFIG_AM335X_LCD) |
Hannes Petermaier | c96a9b1 | 2015-02-03 13:22:39 +0100 | [diff] [blame] | 19 | #define CONFIG_AM335X_LCD |
Dario Binacchi | 90184bc | 2020-02-22 14:05:49 +0100 | [diff] [blame] | 20 | #endif |
Hannes Petermaier | c96a9b1 | 2015-02-03 13:22:39 +0100 | [diff] [blame] | 21 | #define LCD_BPP LCD_COLOR32 |
Hannes Petermaier | 4c4398d | 2015-04-24 14:49:38 +0200 | [diff] [blame] | 22 | |
Hannes Schmelzer | 27bf441 | 2016-02-19 12:09:45 +0100 | [diff] [blame] | 23 | /* memory */ |
| 24 | #define CONFIG_SYS_MALLOC_LEN (5 * 1024 * 1024) |
| 25 | |
Hannes Petermaier | 9436059 | 2014-02-07 14:06:50 +0100 | [diff] [blame] | 26 | /* Clock Defines */ |
| 27 | #define V_OSCK 26000000 /* Clock output from T2 */ |
| 28 | #define V_SCLK (V_OSCK) |
| 29 | |
Hannes Petermaier | 9436059 | 2014-02-07 14:06:50 +0100 | [diff] [blame] | 30 | #define CONFIG_MACH_TYPE 3589 |
Hannes Petermaier | 9436059 | 2014-02-07 14:06:50 +0100 | [diff] [blame] | 31 | |
| 32 | #ifndef CONFIG_SPL_BUILD |
Hannes Schmelzer | af4ea2a | 2017-06-13 14:11:33 +0200 | [diff] [blame] | 33 | |
| 34 | /* Default environment */ |
| 35 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
Hannes Petermaier | 44799f4 | 2015-02-03 13:22:41 +0100 | [diff] [blame] | 36 | BUR_COMMON_ENV \ |
Hannes Schmelzer | af4ea2a | 2017-06-13 14:11:33 +0200 | [diff] [blame] | 37 | "autoload=0\0" \ |
| 38 | "scradr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ |
Hannes Petermaier | 73914df | 2015-09-29 08:43:33 +0200 | [diff] [blame] | 39 | "bootaddr=0x80001100\0" \ |
| 40 | "bootdev=cpsw(0,0)\0" \ |
Hannes Petermaier | 44799f4 | 2015-02-03 13:22:41 +0100 | [diff] [blame] | 41 | "vx_romfsbase=0x800E0000\0" \ |
| 42 | "vx_romfssize=0x20000\0" \ |
| 43 | "vx_memtop=0x8FBEF000\0" \ |
Hannes Schmelzer | af4ea2a | 2017-06-13 14:11:33 +0200 | [diff] [blame] | 44 | "loadromfs=mmc read ${vx_romfsbase} 700 100\0" \ |
Hannes Petermaier | 44799f4 | 2015-02-03 13:22:41 +0100 | [diff] [blame] | 45 | "loadaddr=0x80100000\0" \ |
Hannes Schmelzer | af4ea2a | 2017-06-13 14:11:33 +0200 | [diff] [blame] | 46 | "startvx=run loadromfs; bootvx ${loadaddr}\0" \ |
| 47 | "b_break=0\0" \ |
| 48 | "b_tgts_std=mmc def net usb0\0" \ |
| 49 | "b_tgts_rcy=def net usb0\0" \ |
| 50 | "b_tgts_pme=net usb0 mmc\0" \ |
| 51 | "b_deftgts=if test ${b_mode} = 12; then setenv b_tgts ${b_tgts_pme};" \ |
| 52 | " elif test ${b_mode} = 0; then setenv b_tgts ${b_tgts_rcy};" \ |
| 53 | " else setenv b_tgts ${b_tgts_std}; fi\0" \ |
| 54 | "b_mmc=load mmc 1 ${loadaddr} arimg && run startvx\0" \ |
| 55 | "b_def=mmc read ${loadaddr} 800 8000; run startvx\0" \ |
| 56 | "b_net=tftp ${scradr} netscript.img && source ${scradr}\0" \ |
| 57 | "b_usb0=usb start && load usb 0 ${scradr} usbscript.img && source ${scradr}\0" \ |
| 58 | "b_default=run b_deftgts; for target in ${b_tgts};"\ |
| 59 | " do run b_${target}; if test ${b_break} = 1; then; exit; fi; done\0" |
Hannes Petermaier | 9436059 | 2014-02-07 14:06:50 +0100 | [diff] [blame] | 60 | #endif /* !CONFIG_SPL_BUILD*/ |
| 61 | |
Hannes Schmelzer | af4ea2a | 2017-06-13 14:11:33 +0200 | [diff] [blame] | 62 | #define CONFIG_BOOTCOMMAND "mmc dev 1; run b_default" |
Hannes Petermaier | 9436059 | 2014-02-07 14:06:50 +0100 | [diff] [blame] | 63 | |
Hannes Petermaier | 5637977 | 2015-02-03 13:22:40 +0100 | [diff] [blame] | 64 | /* Support both device trees and ATAGs. */ |
Hannes Petermaier | 5637977 | 2015-02-03 13:22:40 +0100 | [diff] [blame] | 65 | #define CONFIG_CMDLINE_TAG |
| 66 | #define CONFIG_SETUP_MEMORY_TAGS |
| 67 | #define CONFIG_INITRD_TAG |
Hannes Petermaier | 9436059 | 2014-02-07 14:06:50 +0100 | [diff] [blame] | 68 | |
Hannes Schmelzer | 008c6b5 | 2019-02-06 13:25:59 +0100 | [diff] [blame] | 69 | /* Environment */ |
Hannes Schmelzer | d58c06d | 2017-06-13 14:11:29 +0200 | [diff] [blame] | 70 | #define CONFIG_SYS_MMC_ENV_DEV 1 |
Hannes Petermaier | 9436059 | 2014-02-07 14:06:50 +0100 | [diff] [blame] | 71 | #define CONFIG_SYS_MMC_ENV_PART 2 |
Hannes Petermaier | 9436059 | 2014-02-07 14:06:50 +0100 | [diff] [blame] | 72 | |
Hannes Schmelzer | 46dc5cb | 2016-06-22 12:36:14 +0200 | [diff] [blame] | 73 | #endif /* __CONFIG_BRXRE1_H__ */ |