summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMarcel Ziswiler <marcel.ziswiler@toradex.com>2015-04-28 02:07:36 +0200
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2017-01-11 21:27:14 +0100
commitff464e70471c7846bd9332c2899682233a5a07aa (patch)
tree896d9cf82e6f42f3a3cc7cd3d48adda40ead77b2 /include
parent89a14c2f11e3f3eb4fcc028c6864ed5fa8bae74b (diff)
colibri_t20: migrate
Migrate Colibri T20 to U-Boot 2016.11. (cherry picked from commit 92d747bf338ceb8d6dbdd3e5e5f7f72226ce0792)
Diffstat (limited to 'include')
-rw-r--r--include/configs/colibri_t20.h105
1 files changed, 102 insertions, 3 deletions
diff --git a/include/configs/colibri_t20.h b/include/configs/colibri_t20.h
index 3c917b01506..d84850a28f8 100644
--- a/include/configs/colibri_t20.h
+++ b/include/configs/colibri_t20.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 Lucas Stach
+ * Copyright (c) 2011-2016 Toradex, Inc.
*
* Configuration settings for the Toradex Colibri T20 modules.
*
@@ -11,6 +11,7 @@
#include "tegra20-common.h"
+#undef CONFIG_SYS_DCACHE_OFF /* breaks L4T kernel boot */
#define CONFIG_ARCH_MISC_INIT
/* High-level configuration options */
@@ -23,6 +24,13 @@
#define CONFIG_MACH_TYPE MACH_TYPE_COLIBRI_T20
+#define CONFIG_INITRD_TAG
+#define CONFIG_REVISION_TAG
+#define CONFIG_SERIAL_TAG
+
+/* Make the HW version stuff available in U-Boot env */
+#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
+
/* I2C */
#define CONFIG_SYS_I2C_TEGRA
@@ -68,8 +76,9 @@
/* Environment in NAND, 64K is a bit excessive but erase block is 512K anyway */
#define CONFIG_ENV_IS_IN_NAND
#define CONFIG_ENV_OFFSET (SZ_2M)
-#undef CONFIG_ENV_SIZE /* undef size from tegra20-common.h */
+#undef CONFIG_ENV_SIZE /* undef size from tegra20-common.h */
#define CONFIG_ENV_SIZE (SZ_64K)
+#define CONFIG_ENV_RANGE (SZ_1M)
/* UBI */
#define CONFIG_CMD_UBIFS /* increases size by almost 60 KB */
@@ -81,8 +90,93 @@
/* Miscellaneous commands */
#define CONFIG_FAT_WRITE
+#undef CONFIG_IPADDR
+#define CONFIG_IPADDR 192.168.10.2
+#define CONFIG_NETMASK 255.255.255.0
+#undef CONFIG_SERVERIP
+#define CONFIG_SERVERIP 192.168.10.1
+
+#define CONFIG_BOOTCOMMAND \
+ "run ubiboot; echo; echo ubiboot failed; " \
+ "run sdboot; echo; echo sdboot failed; " \
+ "run usbboot; echo; echo usbboot failed; " \
+ "run nfsboot; echo; echo nfsboot failed"
+
+#define DFU_ALT_NAND_INFO "u-boot part 0,0;ubi part 0,3"
+
+#define NFS_BOOTCMD \
+ "nfsargs=ip=:::::eth0:on root=/dev/nfs rw\0" \
+ "nfsboot=usb start; run setup; setenv bootargs ${defargs} ${mtdparts}" \
+ " ${nfsargs} ${setupargs} ${vidargs}; echo Booting via DHCP/" \
+ "TFTP/NFS...; run nfsdtbload; dhcp ${kernel_addr_r} " \
+ "&& run fdt_fixup && bootz ${kernel_addr_r} - ${dtbparam}\0" \
+ "nfsdtbload=setenv dtbparam; tftp ${fdt_addr_r} " \
+ "${soc}-colibri-${fdt_board}.dtb " \
+ "&& setenv dtbparam ${fdt_addr_r}\0"
+
+#define SD_BOOTCMD \
+ "sdargs=ip=off root=/dev/mmcblk0p2 rw,noatime rootfstype=ext3 " \
+ "rootwait\0" \
+ "sdboot=run setup; setenv bootargs ${defargs} ${mtdparts} ${sdargs} " \
+ "${setupargs} ${vidargs}; echo Booting from SD card...; " \
+ "run sddtbload; load mmc 1:1 ${kernel_addr_r} ${boot_file} " \
+ "&& run fdt_fixup && bootz ${kernel_addr_r} - ${dtbparam}\0" \
+ "sddtbload=setenv dtbparam; load mmc 1:1 ${fdt_addr_r} " \
+ "${soc}-colibri-${fdt_board}.dtb " \
+ "&& setenv dtbparam ${fdt_addr_r}\0"
+
+#define UBI_BOOTCMD \
+ "ubiargs=ubi.mtd=ubi root=ubi0:rootfs rootfstype=ubifs " \
+ "ubi.fm_autoconvert=1\0" \
+ "ubiboot=run setup; setenv bootargs ${defargs} ${ubiargs} ${mtdparts}" \
+ " ${setupargs} ${vidargs}; echo Booting from NAND...; " \
+ "ubi part ubi && ubi read ${kernel_addr_r} kernel &&" \
+ "run ubidtbload && run fdt_fixup; " \
+ "bootz ${kernel_addr_r} - ${dtbparam}; " \
+ "bootz ${kernel_addr_r} - \0" \
+ "ubidtbload=setenv dtbparam; " \
+ "ubi read ${fdt_addr_r} dtb && " \
+ "setenv dtbparam ${fdt_addr_r}\0"
+
+#define USB_BOOTCMD \
+ "usbargs=ip=off root=/dev/sda2 rw,noatime rootfstype=ext3 " \
+ "rootwait\0" \
+ "usbboot=run setup; setenv bootargs ${defargs} ${mtdparts} " \
+ "${setupargs} ${usbargs} ${vidargs}; echo Booting from USB " \
+ "stick...; usb start && run usbdtbload; load usb 0:1 " \
+ "${kernel_addr_r} ${boot_file} && run fdt_fixup && " \
+ "bootz ${kernel_addr_r} - ${dtbparam}\0" \
+ "usbdtbload=setenv dtbparam; load usb 0:1 ${fdt_addr_r} " \
+ "${soc}-colibri-${fdt_board}.dtb " \
+ "&& setenv dtbparam ${fdt_addr_r}\0"
+
#define BOARD_EXTRA_ENV_SETTINGS \
- "mtdparts=" MTDPARTS_DEFAULT "\0"
+ "boot_file=zImage\0" \
+ "console=ttyS0\0" \
+ "defargs=vmalloc=128M usb_high_speed=1\0" \
+ "dfu_alt_info=" DFU_ALT_NAND_INFO "\0" \
+ "fdt_board=eval-v3\0" \
+ "fdt_fixup=;\0" \
+ "mtdparts=" MTDPARTS_DEFAULT "\0" \
+ NFS_BOOTCMD \
+ SD_BOOTCMD \
+ "setethupdate=if env exists ethaddr; then; else setenv ethaddr " \
+ "00:14:2d:00:00:00; fi; usb start && tftpboot ${loadaddr} " \
+ "flash_eth.img && source ${loadaddr}\0" \
+ "setsdupdate=setenv interface mmc; setenv drive 0; mmc rescan; " \
+ "load ${interface} ${drive}:1 ${loadaddr} flash_blk.img && " \
+ "source ${loadaddr}\0" \
+ "setup=setenv setupargs asix_mac=${ethaddr} " \
+ "consoleblank=0 no_console_suspend=1 console=tty1 " \
+ "console=${console},${baudrate}n8 debug_uartport=lsport,0 " \
+ "${memargs}\0" \
+ "setupdate=run setsdupdate || run setusbupdate || run setethupdate\0" \
+ "setusbupdate=usb start && setenv interface usb; setenv drive 0; " \
+ "load ${interface} ${drive}:1 ${loadaddr} flash_blk.img && " \
+ "source ${loadaddr}\0" \
+ UBI_BOOTCMD \
+ USB_BOOTCMD \
+ "vidargs=video=tegrafb0:640x480-16@60\0"
/* Increase console I/O buffer size */
#undef CONFIG_SYS_CBSIZE
@@ -99,6 +193,11 @@
#undef CONFIG_SYS_MAXARGS
#define CONFIG_SYS_MAXARGS 32
+#define CONFIG_CMD_TIME
+
+#define CONFIG_SUPPORT_RAW_INITRD
+#define CONFIG_SYS_BOOT_RAMDISK_HIGH
+
#include "tegra-common-usb-gadget.h"
#include "tegra-common-post.h"