am43xx_evm: Add qspiboot target
Subsystems (2)
PATCH v2 1/2 am43xx_evm: Add qspiboot target
From: Sourav Poddar <[email protected]>
The ePOS EVM and EVM SK have QSPI as an option to boot. Add a qspiboot target that utilizes QSPI for env and so forth as an example of best practices. As QSPI is booted from directly we need to chang CONFIG_SYS_TEXT_BASE.
Note that on ePOS EVM the QSPI and NAND are mutually exclusive choices we need to handle that elsewhere, once NAND support is also added.
--- arch/arm/cpu/armv7/am33xx/board.c | 2 +- board/ti/am43xx/Makefile | 2 +- board/ti/am43xx/board.c | 2 +- boards.cfg | 1 + include/configs/am43xx_evm.h | 31 ++++++++++++++++++++++++++++--- include/configs/ti_armv7_common.h | 2 +- 6 files changed, 33 insertions(+), 7 deletions(-)
arch/arm/cpu/armv7/am33xx/board.c +1 -1
@@ -224,7 +224,7 @@ void s_init(void)set_uart_mux_conf ();setup_clocks_for_console ();uart_soft_reset (); -#ifdef CONFIG_NOR_BOOT +#if defined(CONFIG_NOR_BOOT ) || defined(CONFIG_QSPI_BOOT ) gd->baudrate =CONFIG_BAUDRATE ;serial_init (); gd->have_console =1 ;
board/ti/am43xx/Makefile +1 -1
@@ -6,7 +6,7 @@ # SPDX-License-Identifier: GPL-2.0+ # -ifdef CONFIG_SPL_BUILD +ifeq ($(CONFIG_SKIP_LOWLEVEL_INIT),) obj-y := mux.o endif
board/ti/am43xx/board.c +1 -1
@@ -70,7 +70,7 @@ static int read_eeprom(struct am43xx_board_id *header)return 0 ; } -#ifdef CONFIG_SPL_BUILD +#ifndef CONFIG_SKIP_LOWLEVEL_INIT #define NUM_OPPS 6
boards.cfg +1 -0
@@ -276,6 +276,7 @@ Active arm armv7 am33xx ti am335x Active arm armv7 am33xx ti am335x am335x_evm_uart5 am335x_evm:SERIAL6,CONS_INDEX=6,NAND Tom Rini <[email protected]> Active arm armv7 am33xx ti am335x am335x_evm_usbspl am335x_evm:SERIAL1,CONS_INDEX=1,NAND,SPL_USBETH_SUPPORT Tom Rini <[email protected]> Active arm armv7 am33xx ti am43xx am43xx_evm am43xx_evm:SERIAL1,CONS_INDEX=1 Lokesh Vutla <[email protected]> +Active arm armv7 am33xx ti am43xx am43xx_evm_qspiboot am43xx_evm:SERIAL1,CONS_INDEX=1,QSPI,QSPI_BOOT Lokesh Vutla <[email protected]> Active arm armv7 am33xx ti ti814x ti814x_evm - Matt Porter <[email protected]> Active arm armv7 am33xx ti ti816x ti816x_evm - - Active arm armv7 at91 atmel sama5d3_xplained sama5d3_xplained_mmc sama5d3_xplained:SAMA5D3,SYS_USE_MMC Bo Shen <[email protected]>
include/configs/am43xx_evm.h +28 -3
@@ -48,15 +48,15 @@* Since SPL did pll and ddr initialization for us, * we don't need to do it twice. */ -#if !defined(CONFIG_SPL_BUILD ) && !defined(CONFIG_NOR_BOOT ) +#if !defined(CONFIG_SPL_BUILD ) && !defined(CONFIG_QSPI_BOOT )#define CONFIG_SKIP_LOWLEVEL_INIT #endif /* Now bring in the rest of the common code. */ #include <configs/ti_armv7_common.h> -/* Always 128 KiB env size */ -#define CONFIG_ENV_SIZE (128 << 10) +/* Always 64 KiB env size */ +#define CONFIG_ENV_SIZE (64 << 10)#define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
@@ -86,6 +86,30 @@#define CONFIG_OMAP_USB_PHY #define CONFIG_AM437X_USB2PHY2_HOST +#ifdef CONFIG_QSPI_BOOT +#define CONFIG_SYS_TEXT_BASE 0x30000000 +#undef CONFIG_ENV_IS_NOWHERE +#define CONFIG_ENV_IS_IN_SPI_FLASH +#define CONFIG_SYS_REDUNDAND_ENVIRONMENT +#define CONFIG_ENV_SPI_MAX_HZ CONFIG_SF_DEFAULT_SPEED +#define CONFIG_ENV_SECT_SIZE (64 << 10)/* 64 KB sectors */ +#define CONFIG_ENV_OFFSET 0x110000 +#define CONFIG_ENV_OFFSET_REDUND 0x120000 +#ifdef MTDIDS_DEFAULT +#undef MTDIDS_DEFAULT +#endif +#ifdef MTDPARTS_DEFAULT +#undef MTDPARTS_DEFAULT +#endif +#define MTDPARTS_DEFAULT "mtdparts=qspi.0:512k(QSPI.u-boot)," \ + "512k(QSPI.u-boot.backup)," \ + "512k(QSPI.u-boot-spl-os)," \ + "64k(QSPI.u-boot-env)," \ + "64k(QSPI.u-boot-env.backup)," \ + "8m(QSPI.kernel)," \ + "-(QSPI.file-system)" +#endif +/* SPI */ #undef CONFIG_OMAP3_SPI#define CONFIG_TI_QSPI
@@ -94,6 +118,7 @@#define CONFIG_CMD_SF #define CONFIG_CMD_SPI #define CONFIG_TI_SPI_MMAP +#define CONFIG_SPI_FLASH_BAR #define CONFIG_QSPI_SEL_GPIO 48#define CONFIG_SF_DEFAULT_SPEED 48000000#define CONFIG_DEFAULT_SPI_MODE SPI_MODE_3
include/configs/ti_armv7_common.h +1 -1
@@ -196,7 +196,7 @@* under common/spl/. Given our generally common memory map, we set a * number of related defaults and sizes here. */ -#ifndef CONFIG_NOR_BOOT +#if !defined(CONFIG_NOR_BOOT ) && !defined(CONFIG_QSPI_BOOT )#define CONFIG_SPL #define CONFIG_SPL_FRAMEWORK #define CONFIG_SPL_OS_BOOT
Signature · 1 line
1.7.9.5
PATCH v2 1/2 am43xx_evm: Add qspiboot target
Quoted 7 lines · Tom Rini
From: Sourav Poddar <[email protected]>
The ePOS EVM and EVM SK have QSPI as an option to boot. Add a qspiboot target that utilizes QSPI for env and so forth as an example of best practices. As QSPI is booted from directly we need to chang
CONFIG_SYS_TEXT_BASE.
Quoted 5 lines
Note that on ePOS EVM the QSPI and NAND are mutually exclusive choices we need to handle that elsewhere, once NAND support is also added.
Signed-off-by Sourav Poddar <[email protected]>Signed-off-by Tom Rini <[email protected]>
Applied to u-boot-ti/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140606/7433cc9d/attachment.pgp>
PATCH v2 2/2 ti: qspi: populate slave device to set flash quad bit.
In reply to Tom RiniFrom: Sourav Poddar <[email protected]>
The patch populates the slave data which will be used by flash driver to set the flash quad enable bit.
--- drivers/spi/ti_qspi.c | 1 + 1 file changed, 1 insertion(+)
drivers/spi/ti_qspi.c +1 -0
@@ -106,6 +106,7 @@ static void ti_spi_setup_spi_register(struct ti_qspi_slave *qslave) slave->memory_map = (void *)MMAP_START_ADDR_DRA ;#else slave->memory_map = (void *)MMAP_START_ADDR_AM43x; + slave->op_mode_rx =8 ;#endif memval |= QSPI_CMD_READ | QSPI_SETUP0_NUM_A_BYTES |
Signature · 1 line
1.7.9.5
PATCH v2 2/2 ti: qspi: populate slave device to set flash quad bit.
Quoted 6 lines · Tom Rini
From: Sourav Poddar <[email protected]>
The patch populates the slave data which will be used by flash driver to set the flash quad enable bit.
Signed-off-by Sourav Poddar <[email protected]>
Applied to u-boot-ti/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140606/25fcdbfa/attachment.pgp>