+#define CONFIG_SYS_NAND_BUSWIDTH_16BIT
+#define CONFIG_SYS_NAND_5_ADDR_CYCLE
+#define CONFIG_SYS_NAND_PAGE_COUNT 64
+#define CONFIG_SYS_NAND_PAGE_SIZE 2048
+#define CONFIG_SYS_NAND_OOBSIZE 64
+#define CONFIG_SYS_NAND_BLOCK_SIZE (128 * 1024)
+#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, 16, 17, 18, 19, 20, \
+ 21, 22, 23, 24, 25, 26, 27, 28, 30, \
+ 31, 32, 33, 34, 35, 36, 37, 38, 39, \
+ 40, 41, 42, 44, 45, 46, 47, 48, 49, \
+ 50, 51, 52, 53, 54, 55, 56 }
+
+#define CONFIG_SYS_NAND_ECCSIZE 512
+#define CONFIG_SYS_NAND_ECCBYTES 13
+#define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_BCH8_CODE_HW_DETECTION_SW
+#define CONFIG_SYS_NAND_MAX_OOBFREE 2
+#define CONFIG_SYS_NAND_MAX_ECCPOS 56
+#define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE
+#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000
+#define CONFIG_MTD_PARTITIONS /* required for UBI partition support */
+#define CONFIG_MTD_DEVICE /* needed for mtdparts commands */
+/* NAND block size is 128 KiB. Synchronize these values with
+ * corresponding Device Tree entries in Linux:
+ * MLO(SPL) 4 * NAND_BLOCK_SIZE = 512 KiB @ 0x000000
+ * U-Boot 15 * NAND_BLOCK_SIZE = 1920 KiB @ 0x080000
+ * U-Boot environment 2 * NAND_BLOCK_SIZE = 256 KiB @ 0x260000
+ * Kernel 64 * NAND_BLOCK_SIZE = 8 MiB @ 0x2A0000
+ * DTB 4 * NAND_BLOCK_SIZE = 512 KiB @ 0xAA0000
+ * RootFS Remaining Flash Space @ 0xB20000
+ */
+#define MTDIDS_DEFAULT "nand0=omap2-nand.0"
+#define MTDPARTS_DEFAULT "mtdparts=omap2-nand.0:" \
+ "512k(MLO)," \
+ "1920k(u-boot)," \
+ "256k(u-boot-env)," \
+ "8m(kernel)," \
+ "512k(dtb)," \
+ "-(rootfs)"
+#else
+#define MTDIDS_DEFAULT
+#define MTDPARTS_DEFAULT
+#endif /* CONFIG_NAND */