From patchwork Fri Jul 29 06:33:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Raghavendra, Vignesh" X-Patchwork-Id: 654003 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 3s0zTt3PGqz9t0X for ; Fri, 29 Jul 2016 16:34:26 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 574A6A772A; Fri, 29 Jul 2016 08:34:24 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lfm07RU81UPa; Fri, 29 Jul 2016 08:34:24 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id DFFCBA7631; Fri, 29 Jul 2016 08:34:22 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 81F44A751E for ; Fri, 29 Jul 2016 08:34:15 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JUTDq7AX2xLW for ; Fri, 29 Jul 2016 08:34:15 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from arroyo.ext.ti.com (arroyo.ext.ti.com [198.47.19.12]) by theia.denx.de (Postfix) with ESMTPS id 0E16AA74FB for ; Fri, 29 Jul 2016 08:34:11 +0200 (CEST) Received: from dflxv15.itg.ti.com ([128.247.5.124]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id u6T6Y8d1011001; Fri, 29 Jul 2016 01:34:08 -0500 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id u6T6Y8JG018166; Fri, 29 Jul 2016 01:34:08 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.294.0; Fri, 29 Jul 2016 01:34:07 -0500 Received: from uda0132425.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id u6T6Y3iO029719; Fri, 29 Jul 2016 01:34:06 -0500 From: Vignesh R To: Tom Rini Date: Fri, 29 Jul 2016 12:03:46 +0530 Message-ID: <20160729063347.17626-2-vigneshr@ti.com> X-Mailer: git-send-email 2.9.2 In-Reply-To: <20160729063347.17626-1-vigneshr@ti.com> References: <20160729063347.17626-1-vigneshr@ti.com> MIME-Version: 1.0 Cc: Jagan Teki , u-boot@lists.denx.de Subject: [U-Boot] [PATCH 1/2] ARM: am57xx_evm: Enable QSPI support X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" AM571x IDK and AM572x IDK EVMs have spansion s25fl256s QSPI flash on the board connected to TI QSPI IP over CS0. Therefore enable QSPI support. Signed-off-by: Vignesh R Reviewed-by: Mugunthan V N --- configs/am57xx_evm_defconfig | 5 +++++ include/configs/am57xx_evm.h | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+) diff --git a/configs/am57xx_evm_defconfig b/configs/am57xx_evm_defconfig index 8a8a4c9090b0..c95f45aca8b5 100644 --- a/configs/am57xx_evm_defconfig +++ b/configs/am57xx_evm_defconfig @@ -41,3 +41,8 @@ CONFIG_SPL_OF_LIBFDT=y CONFIG_SPL_LOAD_FIT=y CONFIG_OF_LIST="am57xx-beagle-x15 am572x-idk" CONFIG_DM_I2C=y +CONFIG_DM_SPI=y +CONFIG_DM_SPI_FLASH=y +CONFIG_SPI_FLASH_SPANSION=y +CONFIG_TI_QSPI=y +CONFIG_CMD_SF=y diff --git a/include/configs/am57xx_evm.h b/include/configs/am57xx_evm.h index 2db199db33b7..083886ba262f 100644 --- a/include/configs/am57xx_evm.h +++ b/include/configs/am57xx_evm.h @@ -86,4 +86,40 @@ #define CONFIG_EEPROM_CHIP_ADDRESS 0x50 #define CONFIG_EEPROM_BUS_ADDRESS 0 +/* + * Default to using SPI for environment, etc. + * 0x000000 - 0x040000 : QSPI.SPL (256KiB) + * 0x040000 - 0x140000 : QSPI.u-boot (1MiB) + * 0x140000 - 0x1C0000 : QSPI.u-boot-spl-os (512KiB) + * 0x1C0000 - 0x1D0000 : QSPI.u-boot-env (64KiB) + * 0x1D0000 - 0x1E0000 : QSPI.u-boot-env.backup1 (64KiB) + * 0x1E0000 - 0x9E0000 : QSPI.kernel (8MiB) + * 0x9E0000 - 0x2000000 : USERLAND + */ +#define CONFIG_SYS_SPI_KERNEL_OFFS 0x1E0000 +#define CONFIG_SYS_SPI_ARGS_OFFS 0x140000 +#define CONFIG_SYS_SPI_ARGS_SIZE 0x80000 + +#ifdef CONFIG_SPL_BUILD +#undef CONFIG_DM_SPI +#undef CONFIG_DM_SPI_FLASH +#undef CONFIG_SPL_MAX_SIZE +#define CONFIG_SPL_MAX_SIZE (256 << 10) /* 256 KiB */ +#endif + +/* SPI SPL */ +#define CONFIG_SPL_SPI_SUPPORT +#define CONFIG_SPL_DMA_SUPPORT +#define CONFIG_TI_EDMA3 +#define CONFIG_SPL_SPI_LOAD +#define CONFIG_SPL_SPI_FLASH_SUPPORT +#define CONFIG_SYS_SPI_U_BOOT_OFFS 0x40000 + +/* SPI */ +#undef CONFIG_OMAP3_SPI +#define CONFIG_TI_SPI_MMAP +#define CONFIG_SF_DEFAULT_SPEED 76800000 +#define CONFIG_SF_DEFAULT_MODE SPI_MODE_0 +#define CONFIG_QSPI_QUAD_SUPPORT + #endif /* __CONFIG_AM57XX_EVM_H */