From: Vignesh R <vigneshr@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 1/2] ARM: am57xx_evm: Enable QSPI support
Date: Fri, 29 Jul 2016 14:22:30 +0530 [thread overview]
Message-ID: <20160729085231.12896-2-vigneshr@ti.com> (raw)
In-Reply-To: <20160729085231.12896-1-vigneshr@ti.com>
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 <vigneshr@ti.com>
---
v2: Add entries for am57xx_hs_evm_defconfig and am57xx_evm_nodt_defconfig
configs/am57xx_evm_defconfig | 5 +++++
configs/am57xx_evm_nodt_defconfig | 5 +++++
configs/am57xx_hs_evm_defconfig | 5 +++++
include/configs/am57xx_evm.h | 36 ++++++++++++++++++++++++++++++++++++
4 files changed, 51 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/configs/am57xx_evm_nodt_defconfig b/configs/am57xx_evm_nodt_defconfig
index 4c5a0de36917..f518e6fd7801 100644
--- a/configs/am57xx_evm_nodt_defconfig
+++ b/configs/am57xx_evm_nodt_defconfig
@@ -26,3 +26,8 @@ CONFIG_USB=y
CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_DWC3=y
CONFIG_OF_LIBFDT=y
+CONFIG_SPI_FLASH=y
+CONFIG_SPI_FLASH_BAR=y
+CONFIG_SPI_FLASH_SPANSION=y
+CONFIG_TI_QSPI=y
+CONFIG_CMD_SF=y
diff --git a/configs/am57xx_hs_evm_defconfig b/configs/am57xx_hs_evm_defconfig
index 2ccb332ae776..a4bfdd594e26 100644
--- a/configs/am57xx_hs_evm_defconfig
+++ b/configs/am57xx_hs_evm_defconfig
@@ -43,3 +43,8 @@ CONFIG_SPL_LOAD_FIT=y
CONFIG_SPL_FIT_IMAGE_POST_PROCESS=y
CONFIG_OF_LIST="am57xx-beagle-x15"
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 */
--
2.9.2
next prev parent reply other threads:[~2016-07-29 8:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-29 8:52 [U-Boot] [PATCH v2 0/2] AM57xx-IDK: Add QSPI support:wq Vignesh R
2016-07-29 8:52 ` Vignesh R [this message]
2016-07-29 9:19 ` [U-Boot] [PATCH v2 1/2] ARM: am57xx_evm: Enable QSPI support Mugunthan V N
2016-07-29 13:52 ` Tom Rini
2016-07-29 8:52 ` [U-Boot] [PATCH v2 2/2] ARM: dts: am57xx-idk-common: Enable support for QSPI Vignesh R
2016-07-29 9:20 ` Mugunthan V N
2016-07-29 13:52 ` Tom Rini
2016-07-29 18:36 ` [U-Boot] [PATCH v2 0/2] AM57xx-IDK: Add QSPI support:wq Jagan Teki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160729085231.12896-2-vigneshr@ti.com \
--to=vigneshr@ti.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox