From 046c76a6c0af77952a1ec5ab576d12f93ed52641 Mon Sep 17 00:00:00 2001 From: Tom Warren Date: Tue, 15 May 2012 14:38:03 -0700 Subject: spi: Tegra2: Seaboard: enable SPI/UART corruption fix Signed-off-by: Tom Warren --- include/configs/seaboard.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/configs/seaboard.h') diff --git a/include/configs/seaboard.h b/include/configs/seaboard.h index 46d42281b78..889bdfff383 100644 --- a/include/configs/seaboard.h +++ b/include/configs/seaboard.h @@ -52,6 +52,15 @@ /* On Seaboard: GPIO_PI3 = Port I = 8, bit = 3 */ #define CONFIG_UART_DISABLE_GPIO GPIO_PI3 +/* + * On Seaboard, SPIFLASH is muxed with UART4. The next 5 defines are + * needed to work around that design error. + */ +#define CONFIG_SPI_UART_SWITCH +#define CONFIG_SPI_CORRUPTS_UART NV_PA_APB_UARTD_BASE +#define CONFIG_SPI_CORRUPTS_UART_NR 3 +#define CONFIG_SPI_CORRUPTS_UART_DLY 2500 +#undef CONFIG_CMDLINE_EDITING /* avoid NUL in input buffer */ #define CONFIG_MACH_TYPE MACH_TYPE_SEABOARD #define CONFIG_SYS_BOARD_ODMDATA 0x300d8011 /* lp1, 1GB */ -- cgit v1.2.3 From 07a84b7b1905f5b7464ad5746507306733eae964 Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Wed, 16 May 2012 06:20:59 +0000 Subject: tegra: remove some cruft from CONFIG_EXTRA_ENV_SETTINGS console isn't used by anything, and the kernel should be set appropriately by whatever script is booting the kernel, not imposed by the bootloader. mem might be useful, but the current value is pretty bogus, since it includes nvmem options that make no sense for an upstream kernel, and equally should not be required for any downstream kernel. Either way, this is also best left to the kernel boot script. smpflag isn't used by anything, and again was probably intended to be a kernel command-line option better set by the kernel boot script. Signed-off-by: Stephen Warren Signed-off-by: Tom Warren --- include/configs/seaboard.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include/configs/seaboard.h') diff --git a/include/configs/seaboard.h b/include/configs/seaboard.h index 889bdfff383..c346366ae06 100644 --- a/include/configs/seaboard.h +++ b/include/configs/seaboard.h @@ -41,7 +41,6 @@ #define CONFIG_OF_SEPARATE /* High-level configuration options */ -#define TEGRA2_SYSMEM "mem=384M@0M nvmem=128M@384M mem=512M@512M" #define V_PROMPT "Tegra2 (SeaBoard) # " #define CONFIG_TEGRA2_BOARD_STRING "NVIDIA Seaboard" -- cgit v1.2.3 From bea2674ccde5a495710adef62ebd5a294752f59d Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Wed, 16 May 2012 06:21:00 +0000 Subject: tegra: flesh out bootcmd This implements a useful bootcmd for Tegra. The boot order is: * If USB enabled, USB storage * Internal MMC (SD card or eMMC) * If networking is enabled, BOOTP/TFTP When booting from USB or MMC, the boot script is assumed to be in partition 1 (although this may be overridden via the rootpart variable), both ext2 and FAT filesystems are supported, the boot script may exist in either / or /boot, and the boot script may be named boot.scr.uimg or boot.scr. When booting over the network, it is assumed that boot.scr.uimg exists on the TFTP server. There is less flexibility here since those setting up network booting are expected to need less hand-holding. In all cases, it is expected that the initial file loaded is a U-Boot image containing a script that will load the kernel, load any required initrd, load any required DTB, and finally bootm the kernel. Signed-off-by: Stephen Warren Signed-off-by: Tom Warren --- include/configs/seaboard.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/configs/seaboard.h') diff --git a/include/configs/seaboard.h b/include/configs/seaboard.h index c346366ae06..d02a11e03cb 100644 --- a/include/configs/seaboard.h +++ b/include/configs/seaboard.h @@ -116,4 +116,7 @@ #define TEGRA2_DEVICE_SETTINGS "stdin=serial,tegra-kbc\0" \ "stdout=serial\0" \ "stderr=serial\0" + +#include "tegra2-common-post.h" + #endif /* __CONFIG_H */ -- cgit v1.2.3 From defd5e497960b870d11bffbfd952ec3eaf2dd20e Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Wed, 16 May 2012 06:36:12 +0000 Subject: tegra: seaboard: add support for USB networking Signed-off-by: Stephen Warren Signed-off-by: Tom Warren --- include/configs/seaboard.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/configs/seaboard.h') diff --git a/include/configs/seaboard.h b/include/configs/seaboard.h index d02a11e03cb..643af81a1b8 100644 --- a/include/configs/seaboard.h +++ b/include/configs/seaboard.h @@ -108,6 +108,15 @@ #define CONFIG_USB_STORAGE #define CONFIG_CMD_USB +/* USB networking support */ +#define CONFIG_USB_HOST_ETHER +#define CONFIG_USB_ETHER_SMSC95XX +#define CONFIG_USB_ETHER_ASIX + +/* General networking support */ +#define CONFIG_CMD_NET +#define CONFIG_CMD_DHCP + /* Enable keyboard */ #define CONFIG_TEGRA2_KEYBOARD #define CONFIG_KEYBOARD -- cgit v1.2.3 From 59f8ac65f823fa02c73606860480b0e16febc68d Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Wed, 23 May 2012 07:29:29 +0000 Subject: tegra: remove CONFIG_USB_ETHER_SMSC95XX from boards without it The SMSC95xx series may exist either directly on a main board, or as a USB to Ethernet dongle. However, dongles containing these chips are very rare. Hence, remove this config option, except on Harmony where such a chip is actually present on the board. The asix option remains, since it's a popular chip, and I actively use a dongle containing this. Signed-off-by: Stephen Warren Signed-off-by: Tom Warren Acked-by: Igor Grinberg --- include/configs/seaboard.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include/configs/seaboard.h') diff --git a/include/configs/seaboard.h b/include/configs/seaboard.h index 643af81a1b8..f46740e53a1 100644 --- a/include/configs/seaboard.h +++ b/include/configs/seaboard.h @@ -110,7 +110,6 @@ /* USB networking support */ #define CONFIG_USB_HOST_ETHER -#define CONFIG_USB_ETHER_SMSC95XX #define CONFIG_USB_ETHER_ASIX /* General networking support */ -- cgit v1.2.3 From edffa63d3d6e76991998789f9fcbaa483731ca65 Mon Sep 17 00:00:00 2001 From: Tom Warren Date: Tue, 22 May 2012 07:33:47 +0000 Subject: spi: tegra2: rename tegra2_spi.* to tegra_spi.* In anticipation of Tegra3 support, start removing/renaming Tegra2-specific files. No functional changes (yet). Also updated copyright to 2012. Signed-off-by: Tom Warren --- include/configs/seaboard.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/configs/seaboard.h') diff --git a/include/configs/seaboard.h b/include/configs/seaboard.h index f46740e53a1..db11d8a308c 100644 --- a/include/configs/seaboard.h +++ b/include/configs/seaboard.h @@ -67,7 +67,7 @@ #define CONFIG_BOARD_EARLY_INIT_F /* SPI */ -#define CONFIG_TEGRA2_SPI +#define CONFIG_TEGRA_SPI #define CONFIG_SPI_FLASH #define CONFIG_SPI_FLASH_WINBOND #define CONFIG_SF_DEFAULT_MODE SPI_MODE_0 -- cgit v1.2.3 From 3f82d89d3de76acf86279815a7752f7c04d043a2 Mon Sep 17 00:00:00 2001 From: Tom Warren Date: Tue, 22 May 2012 11:44:48 +0000 Subject: mmc: tegra2: rename tegra2_mmc.* to tegra_mmc.* In anticipation of Tegra3 support, continue removing/renaming Tegra2-specific files. No functional changes (yet). Updated copyrights to 2012. Signed-off-by: Tom Warren --- include/configs/seaboard.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/configs/seaboard.h') diff --git a/include/configs/seaboard.h b/include/configs/seaboard.h index db11d8a308c..cae6e2347ec 100644 --- a/include/configs/seaboard.h +++ b/include/configs/seaboard.h @@ -86,7 +86,7 @@ /* SD/MMC */ #define CONFIG_MMC #define CONFIG_GENERIC_MMC -#define CONFIG_TEGRA2_MMC +#define CONFIG_TEGRA_MMC #define CONFIG_CMD_MMC #define CONFIG_DOS_PARTITION -- cgit v1.2.3 From f9f2f12e2cace3685ea0dbb6b6d78789fb75f043 Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Thu, 24 May 2012 11:38:39 +0000 Subject: tegra: seaboard: disable SPI, move environment to eMMC The SPI hardware on Seaboard is too broken to use; it is muxed with the console UART and requires evil interactions between the SPI and UART drivers to work even partially. The current code in U-Boot is not sufficient to make this work correctly; auto boot is aborted due to corruption in the UART RX channel interrupting it. Instead, move the environment to eMMC, at the end of the second boot sector. This should not conflict with any other eMMC usage, irrespective of whether the board boots from SPI, NAND, or eMMC: if U-Boot is stored in eMMC, it will be stored well below this location. The kernel only uses the general area of the eMMC once booted, not the boot sectors. Boards that are derivatives of Seaboard don't have the muxing issue, and should/could have a separate U-Boot configuration file that does enable SPI if desired. Alternatively, the environment could be stored in NAND flash, but we currently have no driver for that controller. Signed-off-by: Stephen Warren Cc: Simon Glass Signed-off-by: Tom Warren --- include/configs/seaboard.h | 29 ++++------------------------- 1 file changed, 4 insertions(+), 25 deletions(-) (limited to 'include/configs/seaboard.h') diff --git a/include/configs/seaboard.h b/include/configs/seaboard.h index cae6e2347ec..537ab0e71cd 100644 --- a/include/configs/seaboard.h +++ b/include/configs/seaboard.h @@ -51,30 +51,12 @@ /* On Seaboard: GPIO_PI3 = Port I = 8, bit = 3 */ #define CONFIG_UART_DISABLE_GPIO GPIO_PI3 -/* - * On Seaboard, SPIFLASH is muxed with UART4. The next 5 defines are - * needed to work around that design error. - */ -#define CONFIG_SPI_UART_SWITCH -#define CONFIG_SPI_CORRUPTS_UART NV_PA_APB_UARTD_BASE -#define CONFIG_SPI_CORRUPTS_UART_NR 3 -#define CONFIG_SPI_CORRUPTS_UART_DLY 2500 -#undef CONFIG_CMDLINE_EDITING /* avoid NUL in input buffer */ #define CONFIG_MACH_TYPE MACH_TYPE_SEABOARD #define CONFIG_SYS_BOARD_ODMDATA 0x300d8011 /* lp1, 1GB */ #define CONFIG_BOARD_EARLY_INIT_F -/* SPI */ -#define CONFIG_TEGRA_SPI -#define CONFIG_SPI_FLASH -#define CONFIG_SPI_FLASH_WINBOND -#define CONFIG_SF_DEFAULT_MODE SPI_MODE_0 -#define CONFIG_CMD_SPI -#define CONFIG_CMD_SF -#define CONFIG_SPI_FLASH_SIZE (4 << 20) - /* I2C */ #define CONFIG_TEGRA_I2C #define CONFIG_SYS_I2C_INIT_BOARD @@ -94,13 +76,10 @@ #define CONFIG_CMD_EXT2 #define CONFIG_CMD_FAT -/* Environment in SPI */ -#define CONFIG_ENV_IS_IN_SPI_FLASH -#define CONFIG_ENV_SPI_MAX_HZ 48000000 -#define CONFIG_ENV_SPI_MODE SPI_MODE_0 - -#define CONFIG_ENV_SECT_SIZE CONFIG_ENV_SIZE -#define CONFIG_ENV_OFFSET (CONFIG_SPI_FLASH_SIZE - CONFIG_ENV_SECT_SIZE) +/* Environment in eMMC, at the end of 2nd "boot sector" */ +#define CONFIG_ENV_IS_IN_MMC +#define CONFIG_ENV_OFFSET ((2 * 512 * 1024) - CONFIG_ENV_SIZE) +#define CONFIG_SYS_MMC_ENV_DEV 0 /* USB Host support */ #define CONFIG_USB_EHCI -- cgit v1.2.3 From 76e350b7a3c568c8d27cf72f98036ec3ddb64f31 Mon Sep 17 00:00:00 2001 From: Tom Warren Date: Wed, 30 May 2012 14:06:09 -0700 Subject: arm: Tegra: Use ODMDATA from BCT in IRAM Walk the BIT and BCT to find the ODMDATA word in the CustomerData field and put it into Scratch20 reg for use by kernel, etc. Built all Tegra builds OK; Booted on Seaboard and saw ODMDATA in PMC scratch20 was the same as the value in my burn-u-boot.sh file (0x300D8011). NOTE: All flash utilities will have to specify the odmdata (nvflash --odmdata n) on the command line or via a cfg file, or built in to their BCT. Signed-off-by: Tom Warren Acked-by: Stephen Warren --- include/configs/seaboard.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include/configs/seaboard.h') diff --git a/include/configs/seaboard.h b/include/configs/seaboard.h index 537ab0e71cd..f661583fed6 100644 --- a/include/configs/seaboard.h +++ b/include/configs/seaboard.h @@ -53,7 +53,6 @@ #define CONFIG_UART_DISABLE_GPIO GPIO_PI3 #define CONFIG_MACH_TYPE MACH_TYPE_SEABOARD -#define CONFIG_SYS_BOARD_ODMDATA 0x300d8011 /* lp1, 1GB */ #define CONFIG_BOARD_EARLY_INIT_F -- cgit v1.2.3