Hannes Petermaier | 072cefe | 2014-02-07 14:06:50 +0100 | [diff] [blame] | 1 | /* |
Hannes Schmelzer | a4d7999 | 2016-06-22 12:36:14 +0200 | [diff] [blame] | 2 | * brxre1.h |
Hannes Petermaier | 072cefe | 2014-02-07 14:06:50 +0100 | [diff] [blame] | 3 | * |
| 4 | * specific parts for B&R KWB Motherboard |
| 5 | * |
Hannes Schmelzer | 4c302b9 | 2015-05-28 15:41:12 +0200 | [diff] [blame] | 6 | * Copyright (C) 2013 Hannes Schmelzer <oe5hpm@oevsv.at> - |
Hannes Petermaier | 072cefe | 2014-02-07 14:06:50 +0100 | [diff] [blame] | 7 | * Bernecker & Rainer Industrieelektronik GmbH - http://www.br-automation.com |
| 8 | * |
| 9 | * SPDX-License-Identifier: GPL-2.0+ |
| 10 | */ |
| 11 | |
Hannes Schmelzer | a4d7999 | 2016-06-22 12:36:14 +0200 | [diff] [blame] | 12 | #ifndef __CONFIG_BRXRE1_H__ |
| 13 | #define __CONFIG_BRXRE1_H__ |
Hannes Petermaier | 072cefe | 2014-02-07 14:06:50 +0100 | [diff] [blame] | 14 | |
Hannes Schmelzer | 3b804d9 | 2016-02-19 12:09:45 +0100 | [diff] [blame] | 15 | #include <configs/bur_cfg_common.h> |
Hannes Petermaier | 072cefe | 2014-02-07 14:06:50 +0100 | [diff] [blame] | 16 | #include <configs/bur_am335x_common.h> |
| 17 | /* ------------------------------------------------------------------------- */ |
Hannes Petermaier | cf630f2 | 2015-02-03 13:22:39 +0100 | [diff] [blame] | 18 | #define CONFIG_AM335X_LCD |
Hannes Petermaier | cf630f2 | 2015-02-03 13:22:39 +0100 | [diff] [blame] | 19 | #define LCD_BPP LCD_COLOR32 |
Hannes Petermaier | 4e2a341 | 2015-04-24 14:49:38 +0200 | [diff] [blame] | 20 | |
Hannes Schmelzer | 3b804d9 | 2016-02-19 12:09:45 +0100 | [diff] [blame] | 21 | /* memory */ |
| 22 | #define CONFIG_SYS_MALLOC_LEN (5 * 1024 * 1024) |
| 23 | |
Hannes Petermaier | 072cefe | 2014-02-07 14:06:50 +0100 | [diff] [blame] | 24 | /* Clock Defines */ |
| 25 | #define V_OSCK 26000000 /* Clock output from T2 */ |
| 26 | #define V_SCLK (V_OSCK) |
| 27 | |
| 28 | #define CONFIG_POWER_TPS65217 |
| 29 | |
| 30 | #define CONFIG_MACH_TYPE 3589 |
| 31 | /* I2C IP block */ |
| 32 | #define CONFIG_SYS_OMAP24_I2C_SPEED_PSOC 20000 |
| 33 | |
Hannes Petermaier | 072cefe | 2014-02-07 14:06:50 +0100 | [diff] [blame] | 34 | /* MMC/SD IP block */ |
Hannes Petermaier | 072cefe | 2014-02-07 14:06:50 +0100 | [diff] [blame] | 35 | #define CONFIG_SUPPORT_EMMC_BOOT |
Hannes Petermaier | 072cefe | 2014-02-07 14:06:50 +0100 | [diff] [blame] | 36 | |
Hannes Petermaier | d2eb73d | 2015-02-03 13:22:41 +0100 | [diff] [blame] | 37 | /* Always 64 KiB env size */ |
| 38 | #define CONFIG_ENV_SIZE (64 << 10) |
Hannes Petermaier | 072cefe | 2014-02-07 14:06:50 +0100 | [diff] [blame] | 39 | |
| 40 | #ifndef CONFIG_SPL_BUILD |
Hannes Schmelzer | 9210042 | 2017-06-13 14:11:33 +0200 | [diff] [blame] | 41 | |
| 42 | /* Default environment */ |
| 43 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
Hannes Petermaier | d2eb73d | 2015-02-03 13:22:41 +0100 | [diff] [blame] | 44 | BUR_COMMON_ENV \ |
Hannes Schmelzer | 9210042 | 2017-06-13 14:11:33 +0200 | [diff] [blame] | 45 | "autoload=0\0" \ |
| 46 | "scradr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \ |
Hannes Petermaier | 91931f7 | 2015-09-29 08:43:33 +0200 | [diff] [blame] | 47 | "bootaddr=0x80001100\0" \ |
| 48 | "bootdev=cpsw(0,0)\0" \ |
Hannes Petermaier | d2eb73d | 2015-02-03 13:22:41 +0100 | [diff] [blame] | 49 | "vx_romfsbase=0x800E0000\0" \ |
| 50 | "vx_romfssize=0x20000\0" \ |
| 51 | "vx_memtop=0x8FBEF000\0" \ |
Hannes Schmelzer | 9210042 | 2017-06-13 14:11:33 +0200 | [diff] [blame] | 52 | "loadromfs=mmc read ${vx_romfsbase} 700 100\0" \ |
Hannes Petermaier | d2eb73d | 2015-02-03 13:22:41 +0100 | [diff] [blame] | 53 | "loadaddr=0x80100000\0" \ |
Hannes Schmelzer | 9210042 | 2017-06-13 14:11:33 +0200 | [diff] [blame] | 54 | "startvx=run loadromfs; bootvx ${loadaddr}\0" \ |
| 55 | "b_break=0\0" \ |
| 56 | "b_tgts_std=mmc def net usb0\0" \ |
| 57 | "b_tgts_rcy=def net usb0\0" \ |
| 58 | "b_tgts_pme=net usb0 mmc\0" \ |
| 59 | "b_deftgts=if test ${b_mode} = 12; then setenv b_tgts ${b_tgts_pme};" \ |
| 60 | " elif test ${b_mode} = 0; then setenv b_tgts ${b_tgts_rcy};" \ |
| 61 | " else setenv b_tgts ${b_tgts_std}; fi\0" \ |
| 62 | "b_mmc=load mmc 1 ${loadaddr} arimg && run startvx\0" \ |
| 63 | "b_def=mmc read ${loadaddr} 800 8000; run startvx\0" \ |
| 64 | "b_net=tftp ${scradr} netscript.img && source ${scradr}\0" \ |
| 65 | "b_usb0=usb start && load usb 0 ${scradr} usbscript.img && source ${scradr}\0" \ |
| 66 | "b_default=run b_deftgts; for target in ${b_tgts};"\ |
| 67 | " 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] | 68 | #endif /* !CONFIG_SPL_BUILD*/ |
| 69 | |
Hannes Schmelzer | 9210042 | 2017-06-13 14:11:33 +0200 | [diff] [blame] | 70 | #define CONFIG_BOOTCOMMAND "mmc dev 1; run b_default" |
Hannes Petermaier | 072cefe | 2014-02-07 14:06:50 +0100 | [diff] [blame] | 71 | |
| 72 | /* undefine command which we not need here */ |
Hannes Schmelzer | 3e475ab | 2016-02-19 12:09:46 +0100 | [diff] [blame] | 73 | #undef CONFIG_BOOTM_NETBSD |
| 74 | #undef CONFIG_BOOTM_PLAN9 |
| 75 | #undef CONFIG_BOOTM_RTEMS |
Hannes Petermaier | c818456 | 2015-02-03 13:22:40 +0100 | [diff] [blame] | 76 | |
| 77 | /* Support both device trees and ATAGs. */ |
Hannes Petermaier | c818456 | 2015-02-03 13:22:40 +0100 | [diff] [blame] | 78 | #define CONFIG_CMDLINE_TAG |
| 79 | #define CONFIG_SETUP_MEMORY_TAGS |
| 80 | #define CONFIG_INITRD_TAG |
Hannes Petermaier | 072cefe | 2014-02-07 14:06:50 +0100 | [diff] [blame] | 81 | |
| 82 | /* USB configuration */ |
Paul Kocialkowski | 95de1e2 | 2015-08-04 17:04:06 +0200 | [diff] [blame] | 83 | #define CONFIG_USB_MUSB_DISABLE_BULK_COMBINE_SPLIT |
Hannes Petermaier | 072cefe | 2014-02-07 14:06:50 +0100 | [diff] [blame] | 84 | #define CONFIG_AM335X_USB0 |
| 85 | #define CONFIG_AM335X_USB0_MODE MUSB_HOST |
Hannes Petermaier | cf630f2 | 2015-02-03 13:22:39 +0100 | [diff] [blame] | 86 | #define CONFIG_AM335X_USB1 |
| 87 | #define CONFIG_AM335X_USB1_MODE MUSB_HOST |
Hannes Petermaier | 072cefe | 2014-02-07 14:06:50 +0100 | [diff] [blame] | 88 | |
Hannes Schmelzer | f687737 | 2017-06-13 14:11:29 +0200 | [diff] [blame] | 89 | #define CONFIG_SYS_MMC_ENV_DEV 1 |
Hannes Petermaier | 072cefe | 2014-02-07 14:06:50 +0100 | [diff] [blame] | 90 | #define CONFIG_SYS_MMC_ENV_PART 2 |
| 91 | #define CONFIG_ENV_OFFSET 0x40000 /* TODO: Adresse definieren */ |
| 92 | #define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE) |
| 93 | #define CONFIG_SYS_REDUNDAND_ENVIRONMENT |
Hannes Petermaier | 072cefe | 2014-02-07 14:06:50 +0100 | [diff] [blame] | 94 | |
Hannes Schmelzer | a4d7999 | 2016-06-22 12:36:14 +0200 | [diff] [blame] | 95 | #endif /* __CONFIG_BRXRE1_H__ */ |