From: Faiz Abbas <faiz_abbas@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2 4/4] configs: ti_omap5_common: Add NAND environment settings
Date: Wed, 27 Feb 2019 13:29:38 +0530 [thread overview]
Message-ID: <20190227075938.7180-5-faiz_abbas@ti.com> (raw)
In-Reply-To: <20190227075938.7180-1-faiz_abbas@ti.com>
Now that NAND is supported on DRA71x include various NAND environment
settings
Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
---
configs/dra7xx_evm_defconfig | 4 +++-
configs/dra7xx_hs_evm_defconfig | 4 +++-
include/configs/dra7xx_evm.h | 2 +-
include/configs/ti_omap5_common.h | 3 ++-
include/environment/ti/nand.h | 26 ++++++++++++++++++++++++++
5 files changed, 35 insertions(+), 4 deletions(-)
create mode 100644 include/environment/ti/nand.h
diff --git a/configs/dra7xx_evm_defconfig b/configs/dra7xx_evm_defconfig
index d71d989c4c..68eab7184e 100644
--- a/configs/dra7xx_evm_defconfig
+++ b/configs/dra7xx_evm_defconfig
@@ -23,13 +23,15 @@ CONFIG_BOARD_EARLY_INIT_F=y
CONFIG_SPL_SYS_MALLOC_SIMPLE=y
CONFIG_SPL_SEPARATE_BSS=y
CONFIG_SPL_DMA_SUPPORT=y
-# CONFIG_SPL_NAND_SUPPORT is not set
CONFIG_SPL_OS_BOOT=y
CONFIG_SPL_SPI_LOAD=y
CONFIG_CMD_SPL=y
# CONFIG_CMD_FLASH is not set
CONFIG_CMD_NAND=y
# CONFIG_CMD_SETEXPR is not set
+CONFIG_CMD_MTDPARTS=y
+CONFIG_MTDIDS_DEFAULT="nand0=nand.0"
+CONFIG_MTDPARTS_DEFAULT="mtdparts=nand.0:256k(NAND.SPL),256k(NAND.SPL.backup1),256k(NAND.SPL.backup2),256k(NAND.SPL.backup3),256k(NAND.u-boot-spl-os),2m(NAND.u-boot),128k(NAND.u-boot-env),128k(NAND.u-boot-env.backup1),8m(NAND.kernel),-(NAND.file-system)"
CONFIG_OF_CONTROL=y
CONFIG_SPL_OF_CONTROL=y
CONFIG_DEFAULT_DEVICE_TREE="dra7-evm"
diff --git a/configs/dra7xx_hs_evm_defconfig b/configs/dra7xx_hs_evm_defconfig
index 4642da3c01..076c800332 100644
--- a/configs/dra7xx_hs_evm_defconfig
+++ b/configs/dra7xx_hs_evm_defconfig
@@ -33,7 +33,9 @@ CONFIG_SPL_DMA_SUPPORT=y
CONFIG_SPL_SPI_LOAD=y
# CONFIG_CMD_FLASH is not set
CONFIG_CMD_NAND=y
-# CONFIG_CMD_SETEXPR is not set
+CONFIG_CMD_MTDPARTS=y
+CONFIG_MTDIDS_DEFAULT="nand0=nand.0"
+CONFIG_MTDPARTS_DEFAULT="mtdparts=nand.0:256k(NAND.SPL),256k(NAND.SPL.backup1),256k(NAND.SPL.backup2),256k(NAND.SPL.backup3),256k(NAND.u-boot-spl-os),2m(NAND.u-boot),128k(NAND.u-boot-env),128k(NAND.u-boot-env.backup1),8m(NAND.kernel),-(NAND.file-system)"
CONFIG_OF_CONTROL=y
CONFIG_SPL_OF_CONTROL=y
CONFIG_DEFAULT_DEVICE_TREE="dra7-evm"
diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h
index f36a9c3e08..955d315608 100644
--- a/include/configs/dra7xx_evm.h
+++ b/include/configs/dra7xx_evm.h
@@ -136,7 +136,7 @@
50, 51, 52, 53, 54, 55, 56, 57, }
#define CONFIG_SYS_NAND_ECCSIZE 512
#define CONFIG_SYS_NAND_ECCBYTES 14
-#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x000c0000
+#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x00140000
/* NAND: SPL related configs */
/* NAND: SPL falcon mode configs */
#ifdef CONFIG_SPL_OS_BOOT
diff --git a/include/configs/ti_omap5_common.h b/include/configs/ti_omap5_common.h
index ba57c40182..7c08e47d3d 100644
--- a/include/configs/ti_omap5_common.h
+++ b/include/configs/ti_omap5_common.h
@@ -56,6 +56,7 @@
#include <environment/ti/boot.h>
#include <environment/ti/mmc.h>
+#include <environment/ti/nand.h>
#define CONFIG_EXTRA_ENV_SETTINGS \
DEFAULT_LINUX_BOOT_ENV \
@@ -65,6 +66,7 @@
DEFAULT_FDT_TI_ARGS \
DFUARGS \
NETARGS \
+ NANDARGS \
/*
* SPL related defines. The Public RAM memory map the ROM defines the
@@ -100,7 +102,6 @@
#define CONFIG_SYS_SPL_ARGS_ADDR (CONFIG_SYS_SDRAM_BASE + \
(128 << 20))
-
#ifdef CONFIG_SPL_BUILD
#undef CONFIG_TIMER
#endif
diff --git a/include/environment/ti/nand.h b/include/environment/ti/nand.h
new file mode 100644
index 0000000000..f838cb3ed1
--- /dev/null
+++ b/include/environment/ti/nand.h
@@ -0,0 +1,26 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com
+ *
+ * Environment variable definitions for NAND on TI boards.
+ */
+
+#ifdef CONFIG_NAND
+#define NANDARGS \
+ "mtdids=" CONFIG_MTDIDS_DEFAULT "\0" \
+ "mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \
+ "nandargs=setenv bootargs console=${console} " \
+ "${optargs} " \
+ "root=${nandroot} " \
+ "rootfstype=${nandrootfstype}\0" \
+ "nandroot=ubi0:rootfs rw ubi.mtd=NAND.file-system,2048\0" \
+ "nandrootfstype=ubifs rootwait=1\0" \
+ "nandboot=echo Booting from nand ...; " \
+ "run nandargs; " \
+ "nand read ${fdtaddr} NAND.u-boot-spl-os; " \
+ "nand read ${loadaddr} NAND.kernel; " \
+ "bootz ${loadaddr} - ${fdtaddr}\0"
+#else
+#define NANDARGS ""
+#endif
+
--
2.19.2
next prev parent reply other threads:[~2019-02-27 7:59 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-27 7:59 [U-Boot] [PATCH v2 0/4] Add Support for NAND in dra71x-evm Faiz Abbas
2019-02-27 7:59 ` [U-Boot] [PATCH v2 1/4] board: ti: dra71: Add pinmux settings for NAND on DRA71x EVM Faiz Abbas
2019-04-12 16:30 ` [U-Boot] [U-Boot, v2, " Tom Rini
2019-02-27 7:59 ` [U-Boot] [PATCH v2 2/4] arm: dra7: Allow NAND to be enabled " Faiz Abbas
2019-04-12 16:30 ` [U-Boot] [U-Boot, v2, " Tom Rini
2019-02-27 7:59 ` [U-Boot] [PATCH v2 3/4] configs: dra71x-evm: Add Support for NAND Faiz Abbas
2019-04-12 16:30 ` [U-Boot] [U-Boot, v2, " Tom Rini
2019-02-27 7:59 ` Faiz Abbas [this message]
2019-02-27 18:55 ` [U-Boot] [PATCH v2 4/4] configs: ti_omap5_common: Add NAND environment settings Tom Rini
2019-04-12 16:30 ` [U-Boot] [U-Boot, v2, " Tom Rini
2019-03-13 15:05 ` [U-Boot] [PATCH v2 0/4] Add Support for NAND in dra71x-evm Faiz Abbas
2019-03-13 16:01 ` Tom Rini
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=20190227075938.7180-5-faiz_abbas@ti.com \
--to=faiz_abbas@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