summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNitin Yadav <n-yadav@ti.com>2023-02-08 17:30:17 +0530
committerPraneeth Bajjuri <praneeth@ti.com>2023-02-08 10:46:54 -0600
commit1f19b5df9035bc017bbe4faf7bec8b36aa4c9e33 (patch)
treeb8b5a044d4c807789f8693d10345d9f156b1f310
parent0db7eedd33887e67b1052704f8c6fdc56b3d7341 (diff)
configs: am62x_evm: Provide NAND configuration
Add support for AM62Q NAND card: X8 NAND EXPANSION BOARD card (PROC143E1) for AM62x LP SK board. These changes provide NAND Device configuration for AM62x LP-SK board. We are currently using raw NAND partition for tispl.bin (A53 SPL) and u-boot.img (A53 u-boot). Signed-off-by: Nitin Yadav <n-yadav@ti.com> Reviewed-by: Roger Quadros <rogerq@kernel.org>
-rw-r--r--include/configs/am62x_evm.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/include/configs/am62x_evm.h b/include/configs/am62x_evm.h
index 4ccf68c4e1..f558238e59 100644
--- a/include/configs/am62x_evm.h
+++ b/include/configs/am62x_evm.h
@@ -18,6 +18,50 @@
#define CONFIG_SYS_SDRAM_BASE1 0x880000000
#define CONFIG_SYS_BOOTM_LEN SZ_64M
+/* NAND support */
+
+/* NAND Device Configuration : MT29F8G08ADAFAH4 chip */
+#define CONFIG_SYS_NAND_PAGE_SIZE 4096
+#define CONFIG_SYS_NAND_OOBSIZE 256
+#define CONFIG_SYS_NAND_BLOCK_SIZE SZ_256K
+#define CONFIG_SYS_NAND_PAGE_COUNT (CONFIG_SYS_NAND_BLOCK_SIZE / \
+ CONFIG_SYS_NAND_PAGE_SIZE)
+#define CONFIG_SYS_NAND_5_ADDR_CYCLE
+
+/* NAND Driver config */
+#define CONFIG_SPL_NAND_INIT 1
+#define CONFIG_SYS_NAND_ONFI_DETECTION
+#define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_BCH8_CODE_HW
+#define CONFIG_SYS_NAND_BAD_BLOCK_POS NAND_LARGE_BADBLOCK_POS
+
+#define CONFIG_SYS_NAND_ECCPOS { 2, 3, 4, 5, 6, 7, 8, 9, \
+ 10, 11, 12, 13, 14, 15, 16, 17, \
+ 18, 19, 20, 21, 22, 23, 24, 25, \
+ 26, 27, 28, 29, 30, 31, 32, 33, \
+ 34, 35, 36, 37, 38, 39, 40, 41, \
+ 42, 43, 44, 45, 46, 47, 48, 49, \
+ 50, 51, 52, 53, 54, 55, 56, 57, }
+#define CONFIG_SYS_NAND_ECCSIZE 512
+#define CONFIG_SYS_NAND_ECCBYTES 14
+
+#ifdef CONFIG_SYS_K3_SPL_ATF
+#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x200000 /* tispl.bin partition */
+#else
+#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x600000 /* u-boot.img partition */
+#endif
+
+#define CONFIG_SYS_NAND_MAX_CHIPS 1
+
+#define CONFIG_SYS_MAX_NAND_DEVICE 1
+
+#define CONFIG_SYS_NAND_BASE 0x51000000
+
+#if defined(CONFIG_ENV_IS_IN_NAND)
+#define CONFIG_SYS_ENV_SECT_SIZE CONFIG_SYS_NAND_BLOCK_SIZE
+#endif
+
+/*-- end NAND config --*/
+
#ifdef CONFIG_SYS_K3_SPL_ATF
#define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "tispl.bin"
#endif