blob: f78a4e10a993d837c5ff920b9e6e34136646c71d [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>
16/* ------------------------------------------------------------------------- */
Hannes Petermaierc96a9b12015-02-03 13:22:39 +010017#define CONFIG_AM335X_LCD
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 */
21#define CONFIG_SYS_MALLOC_LEN (5 * 1024 * 1024)
22
Hannes Petermaier94360592014-02-07 14:06:50 +010023/* Clock Defines */
24#define V_OSCK 26000000 /* Clock output from T2 */
25#define V_SCLK (V_OSCK)
26
27#define CONFIG_POWER_TPS65217
28
29#define CONFIG_MACH_TYPE 3589
30/* I2C IP block */
31#define CONFIG_SYS_OMAP24_I2C_SPEED_PSOC 20000
32
Hannes Petermaier94360592014-02-07 14:06:50 +010033/* MMC/SD IP block */
Hannes Petermaier94360592014-02-07 14:06:50 +010034#define CONFIG_SUPPORT_EMMC_BOOT
Hannes Petermaier94360592014-02-07 14:06:50 +010035
Hannes Petermaier44799f42015-02-03 13:22:41 +010036/* Always 64 KiB env size */
37#define CONFIG_ENV_SIZE (64 << 10)
Hannes Petermaier94360592014-02-07 14:06:50 +010038
39#ifndef CONFIG_SPL_BUILD
Hannes Schmelzeraf4ea2a2017-06-13 14:11:33 +020040
41/* Default environment */
42#define CONFIG_EXTRA_ENV_SETTINGS \
Hannes Petermaier44799f42015-02-03 13:22:41 +010043BUR_COMMON_ENV \
Hannes Schmelzeraf4ea2a2017-06-13 14:11:33 +020044"autoload=0\0" \
45"scradr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
Hannes Petermaier73914df2015-09-29 08:43:33 +020046"bootaddr=0x80001100\0" \
47"bootdev=cpsw(0,0)\0" \
Hannes Petermaier44799f42015-02-03 13:22:41 +010048"vx_romfsbase=0x800E0000\0" \
49"vx_romfssize=0x20000\0" \
50"vx_memtop=0x8FBEF000\0" \
Hannes Schmelzeraf4ea2a2017-06-13 14:11:33 +020051"loadromfs=mmc read ${vx_romfsbase} 700 100\0" \
Hannes Petermaier44799f42015-02-03 13:22:41 +010052"loadaddr=0x80100000\0" \
Hannes Schmelzeraf4ea2a2017-06-13 14:11:33 +020053"startvx=run loadromfs; bootvx ${loadaddr}\0" \
54"b_break=0\0" \
55"b_tgts_std=mmc def net usb0\0" \
56"b_tgts_rcy=def net usb0\0" \
57"b_tgts_pme=net usb0 mmc\0" \
58"b_deftgts=if test ${b_mode} = 12; then setenv b_tgts ${b_tgts_pme};" \
59" elif test ${b_mode} = 0; then setenv b_tgts ${b_tgts_rcy};" \
60" else setenv b_tgts ${b_tgts_std}; fi\0" \
61"b_mmc=load mmc 1 ${loadaddr} arimg && run startvx\0" \
62"b_def=mmc read ${loadaddr} 800 8000; run startvx\0" \
63"b_net=tftp ${scradr} netscript.img && source ${scradr}\0" \
64"b_usb0=usb start && load usb 0 ${scradr} usbscript.img && source ${scradr}\0" \
65"b_default=run b_deftgts; for target in ${b_tgts};"\
66" do run b_${target}; if test ${b_break} = 1; then; exit; fi; done\0"
Hannes Petermaier94360592014-02-07 14:06:50 +010067#endif /* !CONFIG_SPL_BUILD*/
68
Hannes Schmelzeraf4ea2a2017-06-13 14:11:33 +020069#define CONFIG_BOOTCOMMAND "mmc dev 1; run b_default"
Hannes Petermaier94360592014-02-07 14:06:50 +010070
71/* undefine command which we not need here */
Hannes Schmelzer220597d2016-02-19 12:09:46 +010072#undef CONFIG_BOOTM_NETBSD
73#undef CONFIG_BOOTM_PLAN9
74#undef CONFIG_BOOTM_RTEMS
Hannes Petermaier56379772015-02-03 13:22:40 +010075
76/* Support both device trees and ATAGs. */
Hannes Petermaier56379772015-02-03 13:22:40 +010077#define CONFIG_CMDLINE_TAG
78#define CONFIG_SETUP_MEMORY_TAGS
79#define CONFIG_INITRD_TAG
Hannes Petermaier94360592014-02-07 14:06:50 +010080
81/* USB configuration */
Paul Kocialkowskif34dfcb2015-08-04 17:04:06 +020082#define CONFIG_USB_MUSB_DISABLE_BULK_COMBINE_SPLIT
Hannes Petermaier94360592014-02-07 14:06:50 +010083#define CONFIG_AM335X_USB0
84#define CONFIG_AM335X_USB0_MODE MUSB_HOST
Hannes Petermaierc96a9b12015-02-03 13:22:39 +010085#define CONFIG_AM335X_USB1
86#define CONFIG_AM335X_USB1_MODE MUSB_HOST
Hannes Petermaier94360592014-02-07 14:06:50 +010087
Hannes Schmelzerd58c06d2017-06-13 14:11:29 +020088#define CONFIG_SYS_MMC_ENV_DEV 1
Hannes Petermaier94360592014-02-07 14:06:50 +010089#define CONFIG_SYS_MMC_ENV_PART 2
90#define CONFIG_ENV_OFFSET 0x40000 /* TODO: Adresse definieren */
91#define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
92#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
Hannes Petermaier94360592014-02-07 14:06:50 +010093
Hannes Schmelzer46dc5cb2016-06-22 12:36:14 +020094#endif /* __CONFIG_BRXRE1_H__ */