Hannes Petermaier | 072cefe | 2014-02-07 14:06:50 +0100 | [diff] [blame] | 1 | /* |
| 2 | * kwb.h |
| 3 | * |
| 4 | * specific parts for B&R KWB Motherboard |
| 5 | * |
| 6 | * Copyright (C) 2013 Hannes Petermaier <oe5hpm@oevsv.at> - |
| 7 | * Bernecker & Rainer Industrieelektronik GmbH - http://www.br-automation.com |
| 8 | * |
| 9 | * SPDX-License-Identifier: GPL-2.0+ |
| 10 | */ |
| 11 | |
| 12 | #ifndef __CONFIG_KWB_H__ |
| 13 | #define __CONFIG_KWB_H__ |
| 14 | |
| 15 | #include <configs/bur_am335x_common.h> |
| 16 | /* ------------------------------------------------------------------------- */ |
| 17 | /* Clock Defines */ |
| 18 | #define V_OSCK 26000000 /* Clock output from T2 */ |
| 19 | #define V_SCLK (V_OSCK) |
| 20 | |
| 21 | #define CONFIG_POWER_TPS65217 |
| 22 | |
| 23 | #define CONFIG_MACH_TYPE 3589 |
| 24 | /* I2C IP block */ |
| 25 | #define CONFIG_SYS_OMAP24_I2C_SPEED_PSOC 20000 |
| 26 | |
| 27 | /* GPIO */ |
| 28 | #define CONFIG_SPL_GPIO_SUPPORT |
| 29 | |
| 30 | /* MMC/SD IP block */ |
| 31 | #define CONFIG_MMC |
| 32 | #define CONFIG_GENERIC_MMC |
| 33 | #define CONFIG_OMAP_HSMMC |
| 34 | #define CONFIG_CMD_MMC |
| 35 | #define CONFIG_SUPPORT_EMMC_BOOT |
| 36 | /* RAW SD card / eMMC locations. */ |
| 37 | #define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x300 /*addr. 0x60000 */ |
| 38 | #define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS 0x200 /* 256 KB */ |
| 39 | #define CONFIG_SPL_MMC_SUPPORT |
| 40 | |
| 41 | #undef CONFIG_SPL_OS_BOOT |
| 42 | #ifdef CONFIG_SPL_OS_BOOT |
| 43 | #define CONFIG_SYS_SPL_ARGS_ADDR 0x80F80000 |
| 44 | |
| 45 | /* RAW SD card / eMMC */ |
| 46 | #define CONFIG_SYS_MMCSD_RAW_MODE_KERNEL_SECTOR 0x900 /* address 0x120000 */ |
| 47 | #define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR 0x80 /* address 0x10000 */ |
| 48 | #define CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS 0x80 /* 64KiB */ |
| 49 | |
| 50 | #endif /* CONFIG_SPL_OS_BOOT */ |
| 51 | |
| 52 | /* Always 128 KiB env size */ |
| 53 | #define CONFIG_ENV_SIZE (128 << 10) |
| 54 | |
| 55 | #ifndef CONFIG_SPL_BUILD |
| 56 | #define CONFIG_EXTRA_ENV_SETTINGS \ |
| 57 | "autoload=0\0" \ |
| 58 | "loadaddr=0x80100000\0" \ |
| 59 | "bootfile=arimg\0" \ |
| 60 | "usbboot=echo Booting from USB-Stick ...; " \ |
| 61 | "usb start; " \ |
| 62 | "fatload usb 0 ${loadaddr} ${bootfile}; " \ |
| 63 | "usb stop; " \ |
| 64 | "go ${loadaddr};\0" \ |
| 65 | "netboot=echo Booting from network ...; " \ |
| 66 | "setenv autoload 0; " \ |
| 67 | "dhcp; " \ |
| 68 | "tftp ${loadaddr} arimg; " \ |
| 69 | "go ${loadaddr}\0" \ |
| 70 | "usbupdate=echo Updating UBOOT from USB-Stick ...; " \ |
| 71 | "usb start; " \ |
| 72 | "fatload usb 0 0x80000000 updateubootusb.img; " \ |
| 73 | "source;\0" \ |
| 74 | "netupdate=echo Updating UBOOT from Network (TFTP) ...; " \ |
| 75 | "setenv autoload 0; " \ |
| 76 | "dhcp;" \ |
| 77 | "tftp 0x80000000 updateUBOOT.img;" \ |
| 78 | "source;\0" |
| 79 | #endif /* !CONFIG_SPL_BUILD*/ |
| 80 | |
| 81 | #define CONFIG_BOOTCOMMAND \ |
| 82 | "run usbupdate;" |
| 83 | #define CONFIG_BOOTDELAY 1 /* TODO: für release auf 0 setzen */ |
| 84 | |
| 85 | /* undefine command which we not need here */ |
| 86 | #undef CONFIG_BOOTM_LINUX |
| 87 | #undef CONFIG_BOOTM_NETBSD |
| 88 | #undef CONFIG_BOOTM_PLAN9 |
| 89 | #undef CONFIG_BOOTM_RTEMS |
| 90 | #undef CONFIG_GZIP |
| 91 | #undef CONFIG_ZLIB |
| 92 | #undef CONFIG_CMD_CRC32 |
| 93 | |
| 94 | /* USB configuration */ |
| 95 | #define CONFIG_USB_MUSB_DSPS |
| 96 | #define CONFIG_ARCH_MISC_INIT |
| 97 | #define CONFIG_MUSB_PIO_ONLY |
| 98 | #define CONFIG_MUSB_DISABLE_BULK_COMBINE_SPLIT |
| 99 | /* attention! not only for gadget, enables also highspeed in hostmode */ |
| 100 | #define CONFIG_USB_GADGET_DUALSPEED |
| 101 | #define CONFIG_MUSB_HOST |
| 102 | #define CONFIG_AM335X_USB0 |
| 103 | #define CONFIG_AM335X_USB0_MODE MUSB_HOST |
| 104 | |
| 105 | #ifdef CONFIG_MUSB_HOST |
| 106 | #define CONFIG_CMD_USB |
| 107 | #define CONFIG_USB_STORAGE |
| 108 | #endif /* CONFIG_MUSB_HOST */ |
| 109 | |
| 110 | #undef CONFIG_ENV_IS_NOWHERE |
| 111 | #define CONFIG_ENV_IS_IN_MMC |
Hannes Petermaier | 46c8ebc | 2014-04-08 08:39:20 +0200 | [diff] [blame] | 112 | #define CONFIG_SYS_MMC_ENV_DEV 0 |
Hannes Petermaier | 072cefe | 2014-02-07 14:06:50 +0100 | [diff] [blame] | 113 | #define CONFIG_SYS_MMC_ENV_PART 2 |
| 114 | #define CONFIG_ENV_OFFSET 0x40000 /* TODO: Adresse definieren */ |
| 115 | #define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE) |
| 116 | #define CONFIG_SYS_REDUNDAND_ENVIRONMENT |
| 117 | /* |
| 118 | * Common filesystems support. When we have removable storage we |
| 119 | * enabled a number of useful commands and support. |
| 120 | */ |
| 121 | #if defined(CONFIG_MMC) || defined(CONFIG_USB_STORAGE) |
| 122 | #define CONFIG_DOS_PARTITION |
| 123 | #define CONFIG_CMD_FAT |
| 124 | #define CONFIG_FAT_WRITE |
| 125 | #define CONFIG_CMD_FS_GENERIC |
| 126 | #endif /* CONFIG_MMC, ... */ |
| 127 | |
| 128 | #endif /* ! __CONFIG_TSERIES_H__ */ |