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 CONFIG_LCD_NOSTDOUT |
| 20 | #define CONFIG_SYS_WHITE_ON_BLACK |
| 21 | #define LCD_BPP LCD_COLOR32 |
Hannes Petermaier | 4e2a341 | 2015-04-24 14:49:38 +0200 | [diff] [blame] | 22 | |
| 23 | #define CONFIG_VIDEO_BMP_GZIP |
| 24 | #define CONFIG_SYS_VIDEO_LOGO_MAX_SIZE (1366*767*4) |
Hannes Petermaier | 4e2a341 | 2015-04-24 14:49:38 +0200 | [diff] [blame] | 25 | #define CONFIG_CMD_BMP |
| 26 | #define CONFIG_BMP_24BMP |
| 27 | #define CONFIG_BMP_32BPP |
| 28 | |
Hannes Schmelzer | 3b804d9 | 2016-02-19 12:09:45 +0100 | [diff] [blame] | 29 | /* memory */ |
| 30 | #define CONFIG_SYS_MALLOC_LEN (5 * 1024 * 1024) |
| 31 | |
Hannes Petermaier | 072cefe | 2014-02-07 14:06:50 +0100 | [diff] [blame] | 32 | /* Clock Defines */ |
| 33 | #define V_OSCK 26000000 /* Clock output from T2 */ |
| 34 | #define V_SCLK (V_OSCK) |
| 35 | |
| 36 | #define CONFIG_POWER_TPS65217 |
| 37 | |
| 38 | #define CONFIG_MACH_TYPE 3589 |
| 39 | /* I2C IP block */ |
| 40 | #define CONFIG_SYS_OMAP24_I2C_SPEED_PSOC 20000 |
| 41 | |
| 42 | /* GPIO */ |
Hannes Petermaier | 072cefe | 2014-02-07 14:06:50 +0100 | [diff] [blame] | 43 | |
| 44 | /* MMC/SD IP block */ |
Hannes Petermaier | 072cefe | 2014-02-07 14:06:50 +0100 | [diff] [blame] | 45 | #define CONFIG_SUPPORT_EMMC_BOOT |
Hannes Petermaier | 072cefe | 2014-02-07 14:06:50 +0100 | [diff] [blame] | 46 | |
Hannes Petermaier | d2eb73d | 2015-02-03 13:22:41 +0100 | [diff] [blame] | 47 | /* Always 64 KiB env size */ |
| 48 | #define CONFIG_ENV_SIZE (64 << 10) |
Hannes Petermaier | 072cefe | 2014-02-07 14:06:50 +0100 | [diff] [blame] | 49 | |
| 50 | #ifndef CONFIG_SPL_BUILD |
| 51 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
Hannes Petermaier | d2eb73d | 2015-02-03 13:22:41 +0100 | [diff] [blame] | 52 | BUR_COMMON_ENV \ |
Hannes Petermaier | 91931f7 | 2015-09-29 08:43:33 +0200 | [diff] [blame] | 53 | "bootaddr=0x80001100\0" \ |
| 54 | "bootdev=cpsw(0,0)\0" \ |
Hannes Petermaier | d2eb73d | 2015-02-03 13:22:41 +0100 | [diff] [blame] | 55 | "vx_romfsbase=0x800E0000\0" \ |
| 56 | "vx_romfssize=0x20000\0" \ |
| 57 | "vx_memtop=0x8FBEF000\0" \ |
| 58 | "loadromfs=mmc read ${vx_romfsbase} 700 100\0" \ |
| 59 | "autoload=0\0" \ |
| 60 | "loadaddr=0x80100000\0" \ |
| 61 | "logoaddr=0x82000000\0" \ |
| 62 | "defaultARlen=0x8000\0" \ |
| 63 | "loaddefaultAR=mmc read ${loadaddr} 800 ${defaultARlen}\0" \ |
Hannes Petermaier | 91931f7 | 2015-09-29 08:43:33 +0200 | [diff] [blame] | 64 | "defaultAR=run loadromfs; run loaddefaultAR; bootvx ${loadaddr}\0" \ |
Hannes Petermaier | d2eb73d | 2015-02-03 13:22:41 +0100 | [diff] [blame] | 65 | "logo0=fatload mmc 0:1 ${logoaddr} SYSTEM/ADDON/Bootlogo/Bootlogo.bmp.gz && " \ |
| 66 | "bmp display ${logoaddr} 0 0\0" \ |
| 67 | "logo1=fatload mmc 0:1 ${logoaddr} SYSTEM/BASE/Bootlogo/Bootlogo.bmp.gz && " \ |
| 68 | "bmp display ${logoaddr} 0 0\0" \ |
| 69 | "mmcboot=echo booting AR from eMMC-flash ...; "\ |
| 70 | "run logo0 || run logo1; " \ |
| 71 | "run loadromfs; " \ |
Hannes Petermaier | 91931f7 | 2015-09-29 08:43:33 +0200 | [diff] [blame] | 72 | "fatload mmc 0:1 ${loadaddr} arimg && bootvx ${loadaddr}; " \ |
Hannes Petermaier | d2eb73d | 2015-02-03 13:22:41 +0100 | [diff] [blame] | 73 | "run defaultAR;\0" \ |
| 74 | "netboot=echo booting AR from network ...; " \ |
| 75 | "run loadromfs; " \ |
Hannes Petermaier | 91931f7 | 2015-09-29 08:43:33 +0200 | [diff] [blame] | 76 | "tftp ${loadaddr} arimg && bootvx ${loadaddr}; " \ |
Hannes Petermaier | d2eb73d | 2015-02-03 13:22:41 +0100 | [diff] [blame] | 77 | "puts 'networkboot failed!';\0" \ |
Hannes Petermaier | d2eb73d | 2015-02-03 13:22:41 +0100 | [diff] [blame] | 78 | "netscript=echo running script from network (tftp) ...; " \ |
| 79 | "tftp 0x80000000 netscript.img && source; " \ |
| 80 | "puts 'netscript load failed!'\0" \ |
| 81 | "netupdate=tftp ${loadddr} MLO && mmc write ${loadaddr} 100 100; " \ |
| 82 | "tftp ${loadaddr} u-boot.img && mmc write ${loadaddr} 300 300\0" \ |
| 83 | "netupdatedefaultAR=echo updating defaultAR from network (tftp) ...; " \ |
| 84 | "if tftp 0x80100000 arimg.bin; " \ |
| 85 | "then mmc write 0x80100000 800 ${defaultARlen}; " \ |
| 86 | "else setcurs 1 8; puts 'defAR update failed (tftp)!'; fi;\0" \ |
| 87 | "netupdateROMFS=echo updating romfs from network (tftp) ...; " \ |
| 88 | "if tftp 0x80100000 romfs.bin; " \ |
| 89 | "then mmc write 0x80100000 700 100; " \ |
| 90 | "else setcurs 1 8; puts 'romfs update failed (tftp)!'; fi;\0" |
| 91 | |
Hannes Petermaier | 072cefe | 2014-02-07 14:06:50 +0100 | [diff] [blame] | 92 | #endif /* !CONFIG_SPL_BUILD*/ |
| 93 | |
| 94 | #define CONFIG_BOOTCOMMAND \ |
Hannes Petermaier | 5094bef | 2015-04-24 14:49:39 +0200 | [diff] [blame] | 95 | "run usbscript;" |
Hannes Petermaier | 072cefe | 2014-02-07 14:06:50 +0100 | [diff] [blame] | 96 | |
| 97 | /* undefine command which we not need here */ |
Hannes Schmelzer | 3e475ab | 2016-02-19 12:09:46 +0100 | [diff] [blame] | 98 | #undef CONFIG_BOOTM_NETBSD |
| 99 | #undef CONFIG_BOOTM_PLAN9 |
| 100 | #undef CONFIG_BOOTM_RTEMS |
Hannes Petermaier | c818456 | 2015-02-03 13:22:40 +0100 | [diff] [blame] | 101 | |
| 102 | /* Support both device trees and ATAGs. */ |
Hannes Petermaier | c818456 | 2015-02-03 13:22:40 +0100 | [diff] [blame] | 103 | #define CONFIG_CMDLINE_TAG |
| 104 | #define CONFIG_SETUP_MEMORY_TAGS |
| 105 | #define CONFIG_INITRD_TAG |
Hannes Petermaier | 072cefe | 2014-02-07 14:06:50 +0100 | [diff] [blame] | 106 | |
| 107 | /* USB configuration */ |
| 108 | #define CONFIG_USB_MUSB_DSPS |
Paul Kocialkowski | 95de1e2 | 2015-08-04 17:04:06 +0200 | [diff] [blame] | 109 | #define CONFIG_USB_MUSB_PIO_ONLY |
| 110 | #define CONFIG_USB_MUSB_DISABLE_BULK_COMBINE_SPLIT |
Hannes Petermaier | 072cefe | 2014-02-07 14:06:50 +0100 | [diff] [blame] | 111 | #define CONFIG_AM335X_USB0 |
| 112 | #define CONFIG_AM335X_USB0_MODE MUSB_HOST |
Hannes Petermaier | cf630f2 | 2015-02-03 13:22:39 +0100 | [diff] [blame] | 113 | #define CONFIG_AM335X_USB1 |
| 114 | #define CONFIG_AM335X_USB1_MODE MUSB_HOST |
Hannes Petermaier | 072cefe | 2014-02-07 14:06:50 +0100 | [diff] [blame] | 115 | |
Hannes Petermaier | 072cefe | 2014-02-07 14:06:50 +0100 | [diff] [blame] | 116 | #undef CONFIG_ENV_IS_NOWHERE |
| 117 | #define CONFIG_ENV_IS_IN_MMC |
Hannes Petermaier | 46c8ebc | 2014-04-08 08:39:20 +0200 | [diff] [blame] | 118 | #define CONFIG_SYS_MMC_ENV_DEV 0 |
Hannes Petermaier | 072cefe | 2014-02-07 14:06:50 +0100 | [diff] [blame] | 119 | #define CONFIG_SYS_MMC_ENV_PART 2 |
| 120 | #define CONFIG_ENV_OFFSET 0x40000 /* TODO: Adresse definieren */ |
| 121 | #define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE) |
| 122 | #define CONFIG_SYS_REDUNDAND_ENVIRONMENT |
| 123 | /* |
| 124 | * Common filesystems support. When we have removable storage we |
| 125 | * enabled a number of useful commands and support. |
| 126 | */ |
| 127 | #if defined(CONFIG_MMC) || defined(CONFIG_USB_STORAGE) |
Hannes Petermaier | 072cefe | 2014-02-07 14:06:50 +0100 | [diff] [blame] | 128 | #define CONFIG_FAT_WRITE |
Hannes Petermaier | 072cefe | 2014-02-07 14:06:50 +0100 | [diff] [blame] | 129 | #endif /* CONFIG_MMC, ... */ |
| 130 | |
Hannes Schmelzer | a4d7999 | 2016-06-22 12:36:14 +0200 | [diff] [blame] | 131 | #endif /* __CONFIG_BRXRE1_H__ */ |