From 1cbdf2d7e1fc40ef0dcacf7ef03bbdc9b0a6382e Mon Sep 17 00:00:00 2001 From: Thierry Reding Date: Mon, 4 Jun 2012 20:02:25 +0000 Subject: tegra: medcom: Add device tree support Device tree support is required for working USB host support, which in turn enables ethernet support. Signed-off-by: Thierry Reding Acked-by: Stephen Warren Signed-off-by: Tom Warren --- include/configs/medcom.h | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'include/configs') diff --git a/include/configs/medcom.h b/include/configs/medcom.h index bdea7c9..c84db03 100644 --- a/include/configs/medcom.h +++ b/include/configs/medcom.h @@ -1,7 +1,7 @@ /* * (C) Copyright 2010,2011 * NVIDIA Corporation - * (C) Copyright 2011 + * (C) Copyright 2011-2012 * Avionic Design GmbH * * See file CREDITS for list of people who contributed to this @@ -28,6 +28,11 @@ #include "tegra2-common.h" +/* Enable fdt support for Medcom. Flash the image in u-boot-dtb.bin */ +#define CONFIG_DEFAULT_DEVICE_TREE tegra2-medcom +#define CONFIG_OF_CONTROL +#define CONFIG_OF_SEPARATE + /* High-level configuration options */ #define V_PROMPT "Tegra2 (Medcom) # " #define CONFIG_TEGRA2_BOARD_STRING "Avionic Design Medcom" @@ -47,6 +52,20 @@ #define CONFIG_TEGRA_MMC #define CONFIG_CMD_MMC +/* USB host support */ +#define CONFIG_USB_EHCI +#define CONFIG_USB_EHCI_TEGRA +#define CONFIG_USB_STORAGE +#define CONFIG_CMD_USB + +/* USB networking support */ +#define CONFIG_USB_HOST_ETHER +#define CONFIG_USB_ETHER_SMSC95XX + +/* General networking support */ +#define CONFIG_CMD_NET +#define CONFIG_CMD_DHCP + #define CONFIG_DOS_PARTITION #define CONFIG_EFI_PARTITION #define CONFIG_CMD_EXT2 -- cgit v1.1 From a7dafd7b1a980d0518473b02574307b153ccddb5 Mon Sep 17 00:00:00 2001 From: Thierry Reding Date: Mon, 4 Jun 2012 20:02:26 +0000 Subject: tegra: plutux: Add device tree support Device tree support is required for working USB host support, which in turn enables ethernet support. Signed-off-by: Thierry Reding Acked-by: Stephen Warren Signed-off-by: Tom Warren --- include/configs/plutux.h | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'include/configs') diff --git a/include/configs/plutux.h b/include/configs/plutux.h index 6397eb1..9870590 100644 --- a/include/configs/plutux.h +++ b/include/configs/plutux.h @@ -1,7 +1,7 @@ /* * (C) Copyright 2010,2011 * NVIDIA Corporation - * (C) Copyright 2011 + * (C) Copyright 2011-2012 * Avionic Design GmbH * * See file CREDITS for list of people who contributed to this @@ -28,6 +28,11 @@ #include "tegra2-common.h" +/* Enable fdt support for Plutux. Flash the image in u-boot-dtb.bin */ +#define CONFIG_DEFAULT_DEVICE_TREE tegra2-plutux +#define CONFIG_OF_CONTROL +#define CONFIG_OF_SEPARATE + /* High-level configuration options */ #define V_PROMPT "Tegra2 (Plutux) # " #define CONFIG_TEGRA2_BOARD_STRING "Avionic Design Plutux" @@ -47,6 +52,20 @@ #define CONFIG_TEGRA_MMC #define CONFIG_CMD_MMC +/* USB host support */ +#define CONFIG_USB_EHCI +#define CONFIG_USB_EHCI_TEGRA +#define CONFIG_USB_STORAGE +#define CONFIG_CMD_USB + +/* USB networking support */ +#define CONFIG_USB_HOST_ETHER +#define CONFIG_USB_ETHER_SMSC95XX + +/* General networking support */ +#define CONFIG_CMD_NET +#define CONFIG_CMD_DHCP + #define CONFIG_DOS_PARTITION #define CONFIG_EFI_PARTITION #define CONFIG_CMD_EXT2 -- cgit v1.1 From d70575b6d0d53492c0920b9a3d4479964909dc9b Mon Sep 17 00:00:00 2001 From: Thierry Reding Date: Mon, 4 Jun 2012 20:02:30 +0000 Subject: tegra: Add Tamonten Evaluation Carrier support The Tamonten Evaluation Carrier is an evaluation board for the Tamonten processor board. More information is available here: http://www.avionic-design.de/en/products/nvidia-tegra-tamonten-system-en/nvidia-tegra-tamonten-evboard-en.html Signed-off-by: Thierry Reding Acked-by: Stephen Warren Signed-off-by: Tom Warren --- include/configs/tec.h | 82 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 include/configs/tec.h (limited to 'include/configs') diff --git a/include/configs/tec.h b/include/configs/tec.h new file mode 100644 index 0000000..3d0a788 --- /dev/null +++ b/include/configs/tec.h @@ -0,0 +1,82 @@ +/* + * (C) Copyright 2010,2011 + * NVIDIA Corporation + * (C) Copyright 2011-2012 + * Avionic Design GmbH + * + * See file CREDITS for list of people who contributed to this + * project. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + */ + +#ifndef __CONFIG_H +#define __CONFIG_H + +#include "tegra2-common.h" + +/* Enable fdt support for TEC. Flash the image in u-boot-dtb.bin */ +#define CONFIG_DEFAULT_DEVICE_TREE tegra2-tec +#define CONFIG_OF_CONTROL +#define CONFIG_OF_SEPARATE + +/* High-level configuration options */ +#define V_PROMPT "Tegra2 (TEC) # " +#define CONFIG_TEGRA2_BOARD_STRING "Avionic Design Tamonten Evaluation Carrier" +#define CONFIG_SYS_BOARD_ODMDATA 0x2b0d8011 + +/* Board-specific serial config */ +#define CONFIG_SERIAL_MULTI +#define CONFIG_TEGRA2_ENABLE_UARTD /* UARTD: debug UART */ +#define CONFIG_SYS_NS16550_COM1 NV_PA_APB_UARTD_BASE + +#define CONFIG_BOARD_EARLY_INIT_F + +#define CONFIG_ENV_IS_NOWHERE + +/* SD/MMC */ +#define CONFIG_MMC +#define CONFIG_GENERIC_MMC +#define CONFIG_TEGRA_MMC +#define CONFIG_CMD_MMC + +/* USB host support */ +#define CONFIG_USB_EHCI +#define CONFIG_USB_EHCI_TEGRA +#define CONFIG_USB_STORAGE +#define CONFIG_CMD_USB + +/* USB networking support */ +#define CONFIG_USB_HOST_ETHER +#define CONFIG_USB_ETHER_SMSC95XX + +/* General networking support */ +#define CONFIG_CMD_NET +#define CONFIG_CMD_DHCP + +#define CONFIG_DOS_PARTITION +#define CONFIG_EFI_PARTITION +#define CONFIG_CMD_EXT2 +#define CONFIG_CMD_FAT + +#define CONFIG_FIT + +#define CONFIG_BOOTCOMMAND \ + "mmc rescan;" \ + "ext2load mmc 0 0x17000000 /boot/uImage;" \ + "bootm" + +#endif /* __CONFIG_H */ -- cgit v1.1 From 0a7bec7f991950da90c6ee6bc59f322abebccbb7 Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Tue, 22 May 2012 09:21:55 +0000 Subject: tegra: enable CONFIG_ENV_VARS_UBOOT_CONFIG So that all Tegra boards define environment variables that describe themselves. Signed-off-by: Stephen Warren Acked-by: Simon Glass Signed-off-by: Tom Warren --- include/configs/tegra2-common.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/configs') diff --git a/include/configs/tegra2-common.h b/include/configs/tegra2-common.h index 94e1aa6..20f294e 100644 --- a/include/configs/tegra2-common.h +++ b/include/configs/tegra2-common.h @@ -68,6 +68,7 @@ #endif /* Environment */ +#define CONFIG_ENV_VARS_UBOOT_CONFIG #define CONFIG_ENV_SIZE 0x2000 /* Total Size Environment */ /* -- cgit v1.1 From 9cd3f3adf03bdbc5ea4514f00e2cfacfb1ae5bed Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Mon, 4 Jun 2012 09:23:55 +0000 Subject: tegra: add enterrcm command Tegra's boot ROM supports a mode whereby code may be downloaded and flash programmed over a USB connection. On dev boards, this is typically entered by holding down a "force recovery" button and resetting the CPU. However, not all boards have such a button (one example is the Compulab Trimslice), so a method to enter RCM from software is useful. This change implements the command "enterrcm" to do this, and enables it for all Tegra boards by default. Even on boards other than Trimslice, controlling this over a UART may be useful, e.g. to allow simple remote control without the need for mechanical button actuators, or hooking up relays/... to the button. Signed-off-by: Stephen Warren Signed-off-by: Tom Warren --- include/configs/tegra2-common.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/configs') diff --git a/include/configs/tegra2-common.h b/include/configs/tegra2-common.h index 20f294e..f61fb5a 100644 --- a/include/configs/tegra2-common.h +++ b/include/configs/tegra2-common.h @@ -193,4 +193,5 @@ #define CONFIG_TEGRA_GPIO #define CONFIG_CMD_GPIO +#define CONFIG_CMD_ENTERRCM #endif /* __TEGRA2_COMMON_H */ -- cgit v1.1 From 03cddf28ebbaf402cdac495b71d7fb1bc5fa252f Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Mon, 4 Jun 2012 10:59:22 +0000 Subject: tegra: bootcmd enhancements Place the list of searched boot devices, file-system types, boot file locations/prefixes, and boot script names into variables. This allows the user to override them directly (e.g. to change boot order, or select the specific values they use) without having to edit the main bootcmd and script_boot variables. The default boot order is changed from USB, MMC, DHCP to MMC, USB, DHCP. This speeds up the typical MMC boot case. People who want USB boot can now edit variable boot_targets appropriately. Also, reformat BOOTCMDS_COMMON to fit within 80 columns. Potential future enhancements might be: * Allow boards to specify which of bootcmd_mmc0/... should be defined, based on the HW they contain. * Allow boards to influence the order that the boot targets are added into the boot_targets variable. Signed-off-by: Stephen Warren Signed-off-by: Tom Warren --- include/configs/tegra2-common-post.h | 82 +++++++++++++++++++++++------------- 1 file changed, 52 insertions(+), 30 deletions(-) (limited to 'include/configs') diff --git a/include/configs/tegra2-common-post.h b/include/configs/tegra2-common-post.h index 0484a52..85b037c 100644 --- a/include/configs/tegra2-common-post.h +++ b/include/configs/tegra2-common-post.h @@ -31,15 +31,15 @@ #else #ifdef CONFIG_CMD_EXT2 -#define BOOTCMD_FS_EXT2 "ext2 " +#define BOOT_FSTYPE_EXT2 "ext2 " #else -#define BOOTCMD_FS_EXT2 "" +#define BOOT_FSTYPE_EXT2 "" #endif #ifdef CONFIG_CMD_FAT -#define BOOTCMD_FS_FAT "fat" +#define BOOT_FSTYPE_FAT "fat" #else -#define BOOTCMD_FS_FAT "" +#define BOOT_FSTYPE_FAT "" #endif #ifdef CONFIG_CMD_MMC @@ -47,15 +47,14 @@ "mmc_boot=" \ "setenv devtype mmc; " \ "if mmc dev ${devnum}; then " \ - "run script_boot; " \ + "run scan_boot; " \ "fi\0" \ - "mmc0_boot=setenv devnum 0; run mmc_boot;\0" \ - "mmc1_boot=setenv devnum 1; run mmc_boot;\0" \ - "bootcmd_mmc=run mmc1_boot; run mmc0_boot\0" -#define BOOTCMD_MMC "run bootcmd_mmc; " + "bootcmd_mmc0=setenv devnum 0; run mmc_boot;\0" \ + "bootcmd_mmc1=setenv devnum 1; run mmc_boot;\0" +#define BOOT_TARGETS_MMC "mmc1 mmc0" #else #define BOOTCMDS_MMC "" -#define BOOTCMD_MMC "" +#define BOOT_TARGETS_MMC "" #endif #ifdef CONFIG_CMD_USB @@ -63,15 +62,14 @@ "usb_boot=" \ "setenv devtype usb; " \ "if usb dev ${devnum}; then " \ - "run script_boot; " \ + "run scan_boot; " \ "fi\0" \ - "usb0_boot=setenv devnum 0; run usb_boot;\0" \ - "bootcmd_usb=run usb0_boot\0" -#define BOOTCMD_USB "run bootcmd_usb; " + "bootcmd_usb0=setenv devnum 0; run usb_boot;\0" +#define BOOT_TARGETS_USB "usb0" #define BOOTCMD_INIT_USB "usb start 0; " #else #define BOOTCMDS_USB "" -#define BOOTCMD_USB "" +#define BOOT_TARGETS_USB "" #define BOOTCMD_INIT_USB "" #endif @@ -81,32 +79,56 @@ "if dhcp ${scriptaddr} boot.scr.uimg; then "\ "source ${scriptaddr}; " \ "fi\0" -#define BOOTCMD_DHCP "run bootcmd_dhcp; " +#define BOOT_TARGETS_DHCP "dhcp" #else #define BOOTCMDS_DHCP "" -#define BOOTCMD_DHCP "" +#define BOOT_TARGETS_DHCP "" #endif #define BOOTCMDS_COMMON \ "scriptaddr=0x400000\0" \ + \ "rootpart=1\0" \ - "script_boot=" \ - "for fs in " BOOTCMD_FS_EXT2 BOOTCMD_FS_FAT "; do " \ - "for prefix in / /boot/; do " \ - "for script in boot.scr.uimg boot.scr; do " \ - "echo Scanning ${devtype} ${devnum}:${rootpart} ${fs} ${prefix}${script} ...; " \ - "if ${fs}load ${devtype} ${devnum}:${rootpart} ${scriptaddr} ${prefix}${script}; then " \ - "echo ${script} found! Executing ...;" \ - "source ${scriptaddr};" \ - "fi; " \ - "done; " \ - "done; " \ - "done;\0" \ + \ + "script_boot=" \ + "if ${fs}load ${devtype} ${devnum}:${rootpart} " \ + "${scriptaddr} ${prefix}${script}; then " \ + "echo ${script} found! Executing ...;" \ + "source ${scriptaddr};" \ + "fi;\0" \ + \ + "scan_boot=" \ + "echo Scanning ${devtype} ${devnum}...; " \ + "for fs in ${boot_fstypes}; do " \ + "for prefix in ${boot_prefixes}; do " \ + "for script in ${boot_scripts}; do " \ + "run script_boot; " \ + "done; " \ + "done; " \ + "done;\0" \ + \ + "boot_targets=" \ + BOOT_TARGETS_MMC " " \ + BOOT_TARGETS_USB " " \ + BOOT_TARGETS_DHCP " " \ + "\0" \ + \ + "boot_fstypes=" \ + BOOT_FSTYPE_EXT2 " " \ + BOOT_FSTYPE_FAT " " \ + "\0" \ + \ + "boot_prefixes=/ /boot/\0" \ + \ + "boot_scripts=boot.scr.uimg boot.scr\0" \ + \ BOOTCMDS_MMC \ BOOTCMDS_USB \ BOOTCMDS_DHCP -#define CONFIG_BOOTCOMMAND BOOTCMD_INIT_USB BOOTCMD_USB BOOTCMD_MMC BOOTCMD_DHCP +#define CONFIG_BOOTCOMMAND \ + BOOTCMD_INIT_USB \ + "for target in ${boot_targets}; do run bootcmd_${target}; done" #endif -- cgit v1.1 From f78d348cb8a4f5f69a80f914e84eabd8663783a3 Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Mon, 4 Jun 2012 10:59:23 +0000 Subject: tegra: bootcmd: start USB only when needed Instead of initializing USB as soon as bootcmd is executed, defer it until the first boot device that (potentially in the case of network) uses USB is scanned. This avoids initializing USB when booting from MMC, so speeds that up. Signed-off-by: Stephen Warren Signed-off-by: Tom Warren --- include/configs/tegra2-common-post.h | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'include/configs') diff --git a/include/configs/tegra2-common-post.h b/include/configs/tegra2-common-post.h index 85b037c..80d9c35 100644 --- a/include/configs/tegra2-common-post.h +++ b/include/configs/tegra2-common-post.h @@ -58,24 +58,33 @@ #endif #ifdef CONFIG_CMD_USB +#define BOOTCMD_INIT_USB "run usb_init; " #define BOOTCMDS_USB \ + "usb_init=" \ + "if ${usb_need_init}; then " \ + "set usb_need_init false; " \ + "usb start 0; " \ + "fi\0" \ + \ "usb_boot=" \ "setenv devtype usb; " \ + BOOTCMD_INIT_USB \ "if usb dev ${devnum}; then " \ "run scan_boot; " \ "fi\0" \ + \ "bootcmd_usb0=setenv devnum 0; run usb_boot;\0" #define BOOT_TARGETS_USB "usb0" -#define BOOTCMD_INIT_USB "usb start 0; " #else +#define BOOTCMD_INIT_USB "" #define BOOTCMDS_USB "" #define BOOT_TARGETS_USB "" -#define BOOTCMD_INIT_USB "" #endif #ifdef CONFIG_CMD_DHCP #define BOOTCMDS_DHCP \ "bootcmd_dhcp=" \ + BOOTCMD_INIT_USB \ "if dhcp ${scriptaddr} boot.scr.uimg; then "\ "source ${scriptaddr}; " \ "fi\0" @@ -127,7 +136,6 @@ BOOTCMDS_DHCP #define CONFIG_BOOTCOMMAND \ - BOOTCMD_INIT_USB \ "for target in ${boot_targets}; do run bootcmd_${target}; done" #endif -- cgit v1.1 From dd8ab953444798a5a34360f962bbbc42ba835af9 Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Wed, 13 Jun 2012 09:55:11 +0000 Subject: tegra: enable bootz command bootz is just like bootm, except that it can boot a raw zImage, without requiring it to be wrapped inside a uImage. Signed-off-by: Stephen Warren Signed-off-by: Tom Warren --- include/configs/tegra2-common.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/configs') diff --git a/include/configs/tegra2-common.h b/include/configs/tegra2-common.h index f61fb5a..6807762 100644 --- a/include/configs/tegra2-common.h +++ b/include/configs/tegra2-common.h @@ -194,4 +194,5 @@ #define CONFIG_TEGRA_GPIO #define CONFIG_CMD_GPIO #define CONFIG_CMD_ENTERRCM +#define CONFIG_CMD_BOOTZ #endif /* __TEGRA2_COMMON_H */ -- cgit v1.1 From 63905f1616fc2f827e986d8e82a5a2b69f4a0e6a Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Wed, 13 Jun 2012 09:55:12 +0000 Subject: tegra: define fdt_load/fdt_high variables These variables act like loadaddr, but for a device tree image. Defining them in the environment allows boot scripts to be identical on Tegra20 and Tegra30, which have different memory base addresses, and hence need different values for these variables. Signed-off-by: Stephen Warren Signed-off-by: Tom Warren --- include/configs/tegra2-common-post.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/configs') diff --git a/include/configs/tegra2-common-post.h b/include/configs/tegra2-common-post.h index 80d9c35..c21fc28 100644 --- a/include/configs/tegra2-common-post.h +++ b/include/configs/tegra2-common-post.h @@ -142,6 +142,8 @@ #define CONFIG_EXTRA_ENV_SETTINGS \ TEGRA2_DEVICE_SETTINGS \ + "fdt_load=0x01000000\0" \ + "fdt_high=01100000\0" \ BOOTCMDS_COMMON #endif /* __TEGRA2_COMMON_POST_H */ -- cgit v1.1