2018-05-06 21:58:06 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0+ */
|
2010-06-07 19:20:43 +00:00
|
|
|
/*
|
|
|
|
* am3517_evm.h - Default configuration for AM3517 EVM board.
|
|
|
|
*
|
|
|
|
* Author: Vaibhav Hiremath <hvaibhav@ti.com>
|
|
|
|
*
|
|
|
|
* Based on omap3_evm_config.h
|
|
|
|
*
|
|
|
|
* Copyright (C) 2010 Texas Instruments Incorporated
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __CONFIG_H
|
|
|
|
#define __CONFIG_H
|
|
|
|
|
2016-03-05 19:19:59 +00:00
|
|
|
/*
|
|
|
|
* 1MB into the SDRAM to allow for SPL's bss at the beginning of SDRAM
|
|
|
|
* 64 bytes before this address should be set aside for u-boot.img's
|
|
|
|
* header. That is 0x800FFFC0--0x80100000 should not be used for any
|
|
|
|
* other needs.
|
|
|
|
*/
|
2017-09-20 01:32:11 +00:00
|
|
|
|
2016-03-05 19:19:59 +00:00
|
|
|
#define CONFIG_SYS_SPL_MALLOC_START 0x80208000
|
|
|
|
#define CONFIG_SYS_SPL_MALLOC_SIZE 0x100000
|
|
|
|
|
2017-08-22 15:50:01 +00:00
|
|
|
#include <configs/ti_omap3_common.h>
|
2010-06-07 19:20:43 +00:00
|
|
|
|
2018-08-19 16:11:03 +00:00
|
|
|
#undef CONFIG_DM_I2C_COMPAT
|
2016-03-05 19:19:59 +00:00
|
|
|
#define CONFIG_REVISION_TAG
|
2010-06-07 19:20:43 +00:00
|
|
|
|
2016-03-05 19:19:59 +00:00
|
|
|
/* Hardware drivers */
|
2010-06-07 19:20:43 +00:00
|
|
|
|
|
|
|
/* allow to overwrite serial and ethaddr */
|
|
|
|
#define CONFIG_ENV_OVERWRITE
|
2016-03-05 19:19:59 +00:00
|
|
|
|
2010-07-09 06:13:50 +00:00
|
|
|
/*
|
|
|
|
* USB configuration
|
2015-08-04 15:04:06 +00:00
|
|
|
* Enable CONFIG_USB_MUSB_HOST for Host functionalities MSC, keyboard
|
|
|
|
* Enable CONFIG_USB_MUSB_GADGET for Device functionalities.
|
2010-07-09 06:13:50 +00:00
|
|
|
*/
|
|
|
|
|
2012-11-06 13:48:28 +00:00
|
|
|
#ifdef CONFIG_USB_MUSB_AM35X
|
2010-07-09 06:13:50 +00:00
|
|
|
|
2015-08-04 15:04:06 +00:00
|
|
|
#ifdef CONFIG_USB_MUSB_HOST
|
2010-07-09 06:13:50 +00:00
|
|
|
|
|
|
|
#ifdef CONFIG_USB_KEYBOARD
|
|
|
|
#define CONFIG_PREBOOT "usb start"
|
|
|
|
#endif /* CONFIG_USB_KEYBOARD */
|
|
|
|
|
2015-08-04 15:04:06 +00:00
|
|
|
#endif /* CONFIG_USB_MUSB_HOST */
|
2012-11-06 13:48:28 +00:00
|
|
|
|
|
|
|
#endif /* CONFIG_USB_MUSB_AM35X */
|
2010-07-09 06:13:50 +00:00
|
|
|
|
2016-03-05 19:19:59 +00:00
|
|
|
/* I2C */
|
2010-06-07 19:20:43 +00:00
|
|
|
|
2016-03-05 19:19:59 +00:00
|
|
|
/* Ethernet */
|
2011-12-06 15:49:41 +00:00
|
|
|
#define CONFIG_DRIVER_TI_EMAC_USE_RMII
|
|
|
|
#define CONFIG_BOOTP_DEFAULT
|
|
|
|
#define CONFIG_BOOTP_DNS2
|
|
|
|
#define CONFIG_BOOTP_SEND_HOSTNAME
|
|
|
|
#define CONFIG_NET_RETRY_COUNT 10
|
|
|
|
|
2016-03-05 19:19:59 +00:00
|
|
|
/* Board NAND Info. */
|
|
|
|
#ifdef CONFIG_NAND
|
|
|
|
#define CONFIG_SYS_NAND_5_ADDR_CYCLE
|
|
|
|
#define CONFIG_SYS_NAND_PAGE_COUNT 64
|
|
|
|
#define CONFIG_SYS_NAND_PAGE_SIZE 2048
|
|
|
|
#define CONFIG_SYS_NAND_OOBSIZE 64
|
|
|
|
#define CONFIG_SYS_NAND_BLOCK_SIZE (128 * 1024)
|
|
|
|
#define CONFIG_SYS_NAND_BAD_BLOCK_POS NAND_LARGE_BADBLOCK_POS
|
|
|
|
#define CONFIG_SYS_NAND_ECCPOS { 2, 3, 4, 5, 6, 7, 8, 9, 10, \
|
|
|
|
11, 12, 13, 14, 16, 17, 18, 19, 20, \
|
|
|
|
21, 22, 23, 24, 25, 26, 27, 28, 30, \
|
|
|
|
31, 32, 33, 34, 35, 36, 37, 38, 39, \
|
|
|
|
40, 41, 42, 44, 45, 46, 47, 48, 49, \
|
|
|
|
50, 51, 52, 53, 54, 55, 56 }
|
|
|
|
|
|
|
|
#define CONFIG_SYS_NAND_ECCSIZE 512
|
|
|
|
#define CONFIG_SYS_NAND_ECCBYTES 13
|
|
|
|
#define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_BCH8_CODE_HW_DETECTION_SW
|
|
|
|
#define CONFIG_SYS_NAND_MAX_OOBFREE 2
|
|
|
|
#define CONFIG_SYS_NAND_MAX_ECCPOS 56
|
|
|
|
#define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE
|
|
|
|
#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000
|
|
|
|
/* NAND block size is 128 KiB. Synchronize these values with
|
|
|
|
* corresponding Device Tree entries in Linux:
|
|
|
|
* MLO(SPL) 4 * NAND_BLOCK_SIZE = 512 KiB @ 0x000000
|
|
|
|
* U-Boot 15 * NAND_BLOCK_SIZE = 1920 KiB @ 0x080000
|
|
|
|
* U-Boot environment 2 * NAND_BLOCK_SIZE = 256 KiB @ 0x260000
|
|
|
|
* Kernel 64 * NAND_BLOCK_SIZE = 8 MiB @ 0x2A0000
|
|
|
|
* DTB 4 * NAND_BLOCK_SIZE = 512 KiB @ 0xAA0000
|
|
|
|
* RootFS Remaining Flash Space @ 0xB20000
|
|
|
|
*/
|
|
|
|
#endif /* CONFIG_NAND */
|
2010-06-07 19:20:43 +00:00
|
|
|
|
|
|
|
/* Environment information */
|
|
|
|
|
2011-10-13 13:03:48 +00:00
|
|
|
#define CONFIG_BOOTFILE "uImage"
|
2010-06-07 19:20:43 +00:00
|
|
|
|
|
|
|
#define CONFIG_EXTRA_ENV_SETTINGS \
|
|
|
|
"loadaddr=0x82000000\0" \
|
2011-07-18 08:37:35 +00:00
|
|
|
"console=ttyO2,115200n8\0" \
|
2016-02-08 02:54:47 +00:00
|
|
|
"fdtfile=am3517-evm.dtb\0" \
|
|
|
|
"fdtaddr=0x82C00000\0" \
|
|
|
|
"vram=16M\0" \
|
|
|
|
"bootenv=uEnv.txt\0" \
|
|
|
|
"cmdline=\0" \
|
|
|
|
"optargs=\0" \
|
2017-10-22 21:55:07 +00:00
|
|
|
"mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \
|
|
|
|
"mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \
|
2011-09-04 01:47:44 +00:00
|
|
|
"mmcdev=0\0" \
|
2016-02-08 02:54:47 +00:00
|
|
|
"mmcpart=1\0" \
|
|
|
|
"mmcroot=/dev/mmcblk0p2 rw\0" \
|
|
|
|
"mmcrootfstype=ext4 rootwait fixrtc\0" \
|
2010-06-07 19:20:43 +00:00
|
|
|
"mmcargs=setenv bootargs console=${console} " \
|
2016-03-05 19:19:59 +00:00
|
|
|
"${mtdparts} " \
|
2016-02-08 02:54:47 +00:00
|
|
|
"${optargs} " \
|
|
|
|
"root=${mmcroot} " \
|
|
|
|
"rootfstype=${mmcrootfstype} " \
|
|
|
|
"${cmdline}\0" \
|
2010-06-07 19:20:43 +00:00
|
|
|
"nandargs=setenv bootargs console=${console} " \
|
2016-03-05 19:19:59 +00:00
|
|
|
"${mtdparts} " \
|
|
|
|
"${optargs} " \
|
|
|
|
"root=ubi0:rootfs rw ubi.mtd=rootfs " \
|
|
|
|
"rootfstype=ubifs rootwait " \
|
|
|
|
"${cmdline}\0" \
|
2016-02-08 02:54:47 +00:00
|
|
|
"loadbootenv=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${bootenv}\0"\
|
|
|
|
"importbootenv=echo Importing environment from mmc ...; " \
|
|
|
|
"env import -t ${loadaddr} ${filesize}\0" \
|
2010-06-07 19:20:43 +00:00
|
|
|
"bootscript=echo Running bootscript from mmc ...; " \
|
|
|
|
"source ${loadaddr}\0" \
|
2016-02-08 02:54:47 +00:00
|
|
|
"loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${bootfile}\0" \
|
|
|
|
"loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdtaddr} ${fdtfile}\0" \
|
2010-06-07 19:20:43 +00:00
|
|
|
"mmcboot=echo Booting from mmc ...; " \
|
|
|
|
"run mmcargs; " \
|
2016-02-08 02:54:47 +00:00
|
|
|
"bootz ${loadaddr} - ${fdtaddr}\0" \
|
2010-06-07 19:20:43 +00:00
|
|
|
"nandboot=echo Booting from nand ...; " \
|
|
|
|
"run nandargs; " \
|
2016-03-05 19:19:59 +00:00
|
|
|
"nand read ${loadaddr} 2a0000 800000; " \
|
|
|
|
"nand read ${fdtaddr} aa0000 80000; " \
|
|
|
|
"bootm ${loadaddr} - ${fdtaddr}\0" \
|
2010-06-07 19:20:43 +00:00
|
|
|
|
|
|
|
#define CONFIG_BOOTCOMMAND \
|
2012-10-01 05:06:52 +00:00
|
|
|
"mmc dev ${mmcdev}; if mmc rescan; then " \
|
2016-02-08 02:54:47 +00:00
|
|
|
"echo SD/MMC found on device $mmcdev; " \
|
|
|
|
"if run loadbootenv; then " \
|
|
|
|
"run importbootenv; " \
|
|
|
|
"fi; " \
|
|
|
|
"echo Checking if uenvcmd is set ...; " \
|
|
|
|
"if test -n $uenvcmd; then " \
|
|
|
|
"echo Running uenvcmd ...; " \
|
|
|
|
"run uenvcmd; " \
|
|
|
|
"fi; " \
|
|
|
|
"echo Running default loadimage ...; " \
|
|
|
|
"setenv bootfile zImage; " \
|
|
|
|
"if run loadimage; then " \
|
|
|
|
"run loadfdt; " \
|
|
|
|
"run mmcboot; " \
|
2010-06-07 19:20:43 +00:00
|
|
|
"fi; " \
|
|
|
|
"else run nandboot; fi"
|
|
|
|
|
2016-03-05 19:19:59 +00:00
|
|
|
/* Miscellaneous configurable options */
|
|
|
|
|
|
|
|
/* We set the max number of command args high to avoid HUSH bugs. */
|
|
|
|
#define CONFIG_SYS_MAXARGS 64
|
|
|
|
|
2017-08-22 15:50:01 +00:00
|
|
|
/* Print Buffer Size */
|
|
|
|
#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE \
|
|
|
|
+ sizeof(CONFIG_SYS_PROMPT) + 16)
|
|
|
|
/* Boot Argument Buffer Size */
|
|
|
|
#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
|
2016-03-05 19:19:59 +00:00
|
|
|
|
2010-06-07 19:20:43 +00:00
|
|
|
/* memtest works on */
|
|
|
|
#define CONFIG_SYS_MEMTEST_START (OMAP34XX_SDRC_CS0)
|
|
|
|
#define CONFIG_SYS_MEMTEST_END (OMAP34XX_SDRC_CS0 + \
|
|
|
|
0x01F00000) /* 31MB */
|
|
|
|
|
2016-03-05 19:19:59 +00:00
|
|
|
/* Physical Memory Map */
|
|
|
|
#define CONFIG_SYS_CS0_SIZE (256 * 1024 * 1024)
|
|
|
|
#define CONFIG_SYS_INIT_RAM_ADDR 0x4020f800
|
|
|
|
#define CONFIG_SYS_INIT_RAM_SIZE 0x800
|
2010-06-07 19:20:43 +00:00
|
|
|
|
2016-03-05 19:19:59 +00:00
|
|
|
/* FLASH and environment organization */
|
2010-06-07 19:20:43 +00:00
|
|
|
|
|
|
|
/* **** PISMO SUPPORT *** */
|
|
|
|
#define CONFIG_SYS_MAX_FLASH_SECT 520 /* max number of sectors */
|
|
|
|
/* on one chip */
|
|
|
|
#define CONFIG_SYS_MAX_FLASH_BANKS 2 /* max number of flash banks */
|
|
|
|
#define CONFIG_SYS_MONITOR_LEN (256 << 10) /* Reserve 2 sectors */
|
|
|
|
|
2016-03-05 19:19:59 +00:00
|
|
|
#if defined(CONFIG_NAND)
|
2014-07-18 12:29:41 +00:00
|
|
|
#define CONFIG_SYS_FLASH_BASE NAND_BASE
|
2011-04-20 15:02:05 +00:00
|
|
|
#endif
|
2010-06-07 19:20:43 +00:00
|
|
|
|
|
|
|
/* Monitor at start of flash */
|
|
|
|
#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE
|
|
|
|
|
2011-04-20 15:02:05 +00:00
|
|
|
#define CONFIG_SYS_ENV_SECT_SIZE (128 << 10) /* 128 KiB */
|
2016-03-05 19:19:59 +00:00
|
|
|
#define CONFIG_ENV_SIZE CONFIG_SYS_ENV_SECT_SIZE
|
2017-09-05 02:08:02 +00:00
|
|
|
#define CONFIG_ENV_OFFSET 0x260000
|
|
|
|
#define CONFIG_ENV_ADDR 0x260000
|
2011-11-18 12:48:10 +00:00
|
|
|
|
|
|
|
/* Defines for SPL */
|
2017-08-22 15:50:01 +00:00
|
|
|
#undef CONFIG_SPL_TEXT_BASE
|
2016-03-05 19:19:58 +00:00
|
|
|
#define CONFIG_SPL_TEXT_BASE 0x40200000
|
2011-11-18 12:48:10 +00:00
|
|
|
|
2017-08-22 15:50:01 +00:00
|
|
|
#undef CONFIG_SPL_BSS_START_ADDR
|
2011-11-18 12:48:10 +00:00
|
|
|
#define CONFIG_SPL_BSS_START_ADDR 0x80000000
|
|
|
|
#define CONFIG_SPL_BSS_MAX_SIZE 0x80000 /* 512 KB */
|
|
|
|
|
2014-11-08 22:14:55 +00:00
|
|
|
#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1
|
2016-03-05 19:19:59 +00:00
|
|
|
#define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot.img"
|
2011-11-18 12:48:10 +00:00
|
|
|
|
2012-09-21 00:09:07 +00:00
|
|
|
#define CONFIG_SPL_NAND_BASE
|
|
|
|
#define CONFIG_SPL_NAND_DRIVERS
|
|
|
|
#define CONFIG_SPL_NAND_ECC
|
2011-11-18 12:48:10 +00:00
|
|
|
|
2010-06-07 19:20:43 +00:00
|
|
|
#endif /* __CONFIG_H */
|