blob: 99846890e0f7ed438c3998df5512ebe6bcf24fe7 [file] [log] [blame]
Hannes Petermaier94360592014-02-07 14:06:50 +01001/*
Hannes Schmelzer46dc5cb2016-06-22 12:36:14 +02002 * brxre1.h
Hannes Petermaier94360592014-02-07 14:06:50 +01003 *
4 * specific parts for B&R KWB Motherboard
5 *
Hannes Schmelzer7935f032015-05-28 15:41:12 +02006 * Copyright (C) 2013 Hannes Schmelzer <oe5hpm@oevsv.at> -
Hannes Petermaier94360592014-02-07 14:06:50 +01007 * Bernecker & Rainer Industrieelektronik GmbH - http://www.br-automation.com
8 *
9 * SPDX-License-Identifier: GPL-2.0+
10 */
11
Hannes Schmelzer46dc5cb2016-06-22 12:36:14 +020012#ifndef __CONFIG_BRXRE1_H__
13#define __CONFIG_BRXRE1_H__
Hannes Petermaier94360592014-02-07 14:06:50 +010014
Hannes Schmelzer27bf4412016-02-19 12:09:45 +010015#include <configs/bur_cfg_common.h>
Hannes Petermaier94360592014-02-07 14:06:50 +010016#include <configs/bur_am335x_common.h>
17/* ------------------------------------------------------------------------- */
Hannes Petermaierc96a9b12015-02-03 13:22:39 +010018#define CONFIG_AM335X_LCD
Hannes Petermaierc96a9b12015-02-03 13:22:39 +010019#define CONFIG_LCD_NOSTDOUT
Hannes Petermaierc96a9b12015-02-03 13:22:39 +010020#define LCD_BPP LCD_COLOR32
Hannes Petermaier4c4398d2015-04-24 14:49:38 +020021
22#define CONFIG_VIDEO_BMP_GZIP
23#define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE (1366*767*4)
Philipp Tomsich5cfa3f42017-05-05 21:48:30 +020024#define CONFIG_BMP_24BPP
Hannes Petermaier4c4398d2015-04-24 14:49:38 +020025#define CONFIG_BMP_32BPP
26
Hannes Schmelzer27bf4412016-02-19 12:09:45 +010027/* memory */
28#define CONFIG_SYS_MALLOC_LEN (5 * 1024 * 1024)
29
Hannes Petermaier94360592014-02-07 14:06:50 +010030/* Clock Defines */
31#define V_OSCK 26000000 /* Clock output from T2 */
32#define V_SCLK (V_OSCK)
33
34#define CONFIG_POWER_TPS65217
35
36#define CONFIG_MACH_TYPE 3589
37/* I2C IP block */
38#define CONFIG_SYS_OMAP24_I2C_SPEED_PSOC 20000
39
40/* GPIO */
Hannes Petermaier94360592014-02-07 14:06:50 +010041
42/* MMC/SD IP block */
Hannes Petermaier94360592014-02-07 14:06:50 +010043#define CONFIG_SUPPORT_EMMC_BOOT
Hannes Petermaier94360592014-02-07 14:06:50 +010044
Hannes Petermaier44799f42015-02-03 13:22:41 +010045/* Always 64 KiB env size */
46#define CONFIG_ENV_SIZE (64 << 10)
Hannes Petermaier94360592014-02-07 14:06:50 +010047
48#ifndef CONFIG_SPL_BUILD
49#define CONFIG_EXTRA_ENV_SETTINGS \
Hannes Petermaier44799f42015-02-03 13:22:41 +010050BUR_COMMON_ENV \
Hannes Petermaier73914df2015-09-29 08:43:33 +020051"bootaddr=0x80001100\0" \
52"bootdev=cpsw(0,0)\0" \
Hannes Petermaier44799f42015-02-03 13:22:41 +010053"vx_romfsbase=0x800E0000\0" \
54"vx_romfssize=0x20000\0" \
55"vx_memtop=0x8FBEF000\0" \
56"loadromfs=mmc read ${vx_romfsbase} 700 100\0" \
57"autoload=0\0" \
58"loadaddr=0x80100000\0" \
59"logoaddr=0x82000000\0" \
60"defaultARlen=0x8000\0" \
61"loaddefaultAR=mmc read ${loadaddr} 800 ${defaultARlen}\0" \
Hannes Petermaier73914df2015-09-29 08:43:33 +020062"defaultAR=run loadromfs; run loaddefaultAR; bootvx ${loadaddr}\0" \
Hannes Petermaier44799f42015-02-03 13:22:41 +010063"logo0=fatload mmc 0:1 ${logoaddr} SYSTEM/ADDON/Bootlogo/Bootlogo.bmp.gz && " \
64 "bmp display ${logoaddr} 0 0\0" \
65"logo1=fatload mmc 0:1 ${logoaddr} SYSTEM/BASE/Bootlogo/Bootlogo.bmp.gz && " \
66 "bmp display ${logoaddr} 0 0\0" \
67"mmcboot=echo booting AR from eMMC-flash ...; "\
68 "run logo0 || run logo1; " \
69 "run loadromfs; " \
Hannes Petermaier73914df2015-09-29 08:43:33 +020070 "fatload mmc 0:1 ${loadaddr} arimg && bootvx ${loadaddr}; " \
Hannes Petermaier44799f42015-02-03 13:22:41 +010071 "run defaultAR;\0" \
72"netboot=echo booting AR from network ...; " \
73 "run loadromfs; " \
Hannes Petermaier73914df2015-09-29 08:43:33 +020074 "tftp ${loadaddr} arimg && bootvx ${loadaddr}; " \
Hannes Petermaier44799f42015-02-03 13:22:41 +010075 "puts 'networkboot failed!';\0" \
Hannes Petermaier44799f42015-02-03 13:22:41 +010076"netscript=echo running script from network (tftp) ...; " \
77 "tftp 0x80000000 netscript.img && source; " \
78 "puts 'netscript load failed!'\0" \
79"netupdate=tftp ${loadddr} MLO && mmc write ${loadaddr} 100 100; " \
80 "tftp ${loadaddr} u-boot.img && mmc write ${loadaddr} 300 300\0" \
81"netupdatedefaultAR=echo updating defaultAR from network (tftp) ...; " \
82 "if tftp 0x80100000 arimg.bin; " \
83 "then mmc write 0x80100000 800 ${defaultARlen}; " \
84 "else setcurs 1 8; puts 'defAR update failed (tftp)!'; fi;\0" \
85"netupdateROMFS=echo updating romfs from network (tftp) ...; " \
86 "if tftp 0x80100000 romfs.bin; " \
87 "then mmc write 0x80100000 700 100; " \
88 "else setcurs 1 8; puts 'romfs update failed (tftp)!'; fi;\0"
89
Hannes Petermaier94360592014-02-07 14:06:50 +010090#endif /* !CONFIG_SPL_BUILD*/
91
92#define CONFIG_BOOTCOMMAND \
Hannes Petermaier98267732015-04-24 14:49:39 +020093 "run usbscript;"
Hannes Petermaier94360592014-02-07 14:06:50 +010094
95/* undefine command which we not need here */
Hannes Schmelzer220597d2016-02-19 12:09:46 +010096#undef CONFIG_BOOTM_NETBSD
97#undef CONFIG_BOOTM_PLAN9
98#undef CONFIG_BOOTM_RTEMS
Hannes Petermaier56379772015-02-03 13:22:40 +010099
100/* Support both device trees and ATAGs. */
Hannes Petermaier56379772015-02-03 13:22:40 +0100101#define CONFIG_CMDLINE_TAG
102#define CONFIG_SETUP_MEMORY_TAGS
103#define CONFIG_INITRD_TAG
Hannes Petermaier94360592014-02-07 14:06:50 +0100104
105/* USB configuration */
106#define CONFIG_USB_MUSB_DSPS
Paul Kocialkowskif34dfcb2015-08-04 17:04:06 +0200107#define CONFIG_USB_MUSB_PIO_ONLY
108#define CONFIG_USB_MUSB_DISABLE_BULK_COMBINE_SPLIT
Hannes Petermaier94360592014-02-07 14:06:50 +0100109#define CONFIG_AM335X_USB0
110#define CONFIG_AM335X_USB0_MODE MUSB_HOST
Hannes Petermaierc96a9b12015-02-03 13:22:39 +0100111#define CONFIG_AM335X_USB1
112#define CONFIG_AM335X_USB1_MODE MUSB_HOST
Hannes Petermaier94360592014-02-07 14:06:50 +0100113
Hannes Petermaier94360592014-02-07 14:06:50 +0100114#undef CONFIG_ENV_IS_NOWHERE
115#define CONFIG_ENV_IS_IN_MMC
Hannes Petermaier8e731ed2014-04-08 08:39:20 +0200116#define CONFIG_SYS_MMC_ENV_DEV 0
Hannes Petermaier94360592014-02-07 14:06:50 +0100117#define CONFIG_SYS_MMC_ENV_PART 2
118#define CONFIG_ENV_OFFSET 0x40000 /* TODO: Adresse definieren */
119#define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
120#define CONFIG_SYS_REDUNDAND_ENVIRONMENT
121/*
122 * Common filesystems support. When we have removable storage we
123 * enabled a number of useful commands and support.
124 */
125#if defined(CONFIG_MMC) || defined(CONFIG_USB_STORAGE)
Hannes Petermaier94360592014-02-07 14:06:50 +0100126#define CONFIG_FAT_WRITE
Hannes Petermaier94360592014-02-07 14:06:50 +0100127#endif /* CONFIG_MMC, ... */
128
Hannes Schmelzer46dc5cb2016-06-22 12:36:14 +0200129#endif /* __CONFIG_BRXRE1_H__ */