davinci: omapl138_lcdk: add SPL NAND boot support
Subsystems (2)
cover davinci: omapl138_lcdk: add SPL NAND boot support
The default AIS image generated contains the SPL, but the latter is not able to load u-boot because the NAND configuration is missing. This series adds SPL NAND boot support and results in the AIS image that is generated able to boot from NAND.
Fabien Parent (6):
NAND: davinci: add support for NAND chips with 16 bits bus
davinci: omapl138_lcdk: use correct define for 16 bit NAND chips
davinci: omapl138_lcdk: use correct name for CONFIG_SYS_NAND_MASK_CLE
davinci: omapl138_lcdk: use correct name for CONFIG_SYS_NAND_MASK_ALE
davinci: omapl138_lck: remove obsolete define
davinci: omapl138_lcdk: add NAND SPL boot support
board/davinci/da8xxevm/README.omapl138-lcdk | 28 ------------------------ configs/omapl138_lcdk_defconfig | 3 +++ drivers/mtd/nand/davinci_nand.c | 3 +++ include/configs/omapl138_lcdk.h | 34 +++++++++++++++++++++++++---- scripts/config_whitelist.txt | 3 --- 5 files changed, 36 insertions(+), 35 deletions(-) delete mode 100644 board/davinci/da8xxevm/README.omapl138-lcdk
Signature · 1 line
2.10.2
PATCH 1/6 NAND: davinci: add support for NAND chips with 16 bits bus
The OMAPL138-LCD board uses a NAND chip with a 16 bits bus. Add support into the davinci driver for 16 bit bus NAND chips.
--- drivers/mtd/nand/davinci_nand.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/mtd/nand/davinci_nand.c +3 -0
@@ -799,6 +799,9 @@ void davinci_nand_init(struct nand_chip *nand)#ifdef CONFIG_SYS_NAND_NO_SUBPAGE_WRITE nand->options |=NAND_NO_SUBPAGE_WRITE ;#endif +#ifdef CONFIG_SYS_NAND_BUSWIDTH_16BIT + nand->options |=NAND_BUSWIDTH_16 ; +#endif #ifdef CONFIG_SYS_NAND_HW_ECC nand->ecc.mode =NAND_ECC_HW ; nand->ecc.size =512 ;
Signature · 1 line
2.10.2
PATCH 1/6 NAND: davinci: add support for NAND chips with 16 bits bus
Quoted 4 lines · Fabien Parent
The OMAPL138-LCD board uses a NAND chip with a 16 bits bus. Add support into the davinci driver for 16 bit bus NAND chips.
Signed-off-by Fabien Parent <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161129/659afbb9/attachment.sig>
PATCH 1/6 NAND: davinci: add support for NAND chips with 16 bits bus
In reply to Fabien ParentQuoted 5 lines · Fabien Parent
The OMAPL138-LCD board uses a NAND chip with a 16 bits bus. Add support into the davinci driver for 16 bit bus NAND chips.
Signed-off-by Fabien Parent <[email protected]>Reviewed-by Tom Rini <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161203/23e0aa92/attachment.sig>
PATCH 2/6 davinci: omapl138_lcdk: use correct define for 16 bit NAND chips
In reply to Fabien ParentThe omapl138_lcdk header defines CONFIG_SYS_NAND_BUSWIDTH_16_BIT while the correct name is CONFIG_SYS_NAND_BUSWIDTH_16BIT.
While renaming the only occurrence of CONFIG_SYS_NAND_BUSWIDTH_16_BIT, let's also remove it from the config_whitelist.txt file.
--- include/configs/omapl138_lcdk.h | 2 +- scripts/config_whitelist.txt | 1 - 2 files changed, 1 insertion(+), 2 deletions(-)
include/configs/omapl138_lcdk.h +1 -1
@@ -124,7 +124,7 @@#define CONFIG_SYS_NAND_USE_FLASH_BBT #define CONFIG_SYS_NAND_4BIT_HW_ECC_OOBFIRST #define CONFIG_SYS_NAND_PAGE_2K -#define CONFIG_SYS_NAND_BUSWIDTH_16_BIT +#define CONFIG_SYS_NAND_BUSWIDTH_16BIT #define CONFIG_SYS_NAND_CS 3#define CONFIG_SYS_NAND_BASE DAVINCI_ASYNC_EMIF_DATA_CE3_BASE#define CONFIG_SYS_CLE_MASK 0x10
scripts/config_whitelist.txt +0 -1
@@ -6654,7 +6654,6 @@ CONFIG_SYS_NAND_BLOCK_SIZE CONFIG_SYS_NAND_BOOT CONFIG_SYS_NAND_BR_PRELIM CONFIG_SYS_NAND_BUSWIDTH_16 -CONFIG_SYS_NAND_BUSWIDTH_16_BIT CONFIG_SYS_NAND_CE CONFIG_SYS_NAND_CLE CONFIG_SYS_NAND_CS
Signature · 1 line
2.10.2
PATCH 2/6 davinci: omapl138_lcdk: use correct define for 16 bit NAND chips
Quoted 6 lines · Fabien Parent
The
omapl138_lcdkheader definesCONFIG_SYS_NAND_BUSWIDTH_16_BITwhile the correct name isCONFIG_SYS_NAND_BUSWIDTH_16BIT.
While renaming the only occurrence ofCONFIG_SYS_NAND_BUSWIDTH_16_BIT, let's also remove it from the config_whitelist.txt file.Signed-off-by Fabien Parent <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161129/3c103cdb/attachment.sig>
PATCH 2/6 davinci: omapl138_lcdk: use correct define for 16 bit NAND chips
In reply to Fabien ParentQuoted 7 lines · Fabien Parent
The
omapl138_lcdkheader definesCONFIG_SYS_NAND_BUSWIDTH_16_BITwhile the correct name isCONFIG_SYS_NAND_BUSWIDTH_16BIT.
While renaming the only occurrence ofCONFIG_SYS_NAND_BUSWIDTH_16_BIT, let's also remove it from the config_whitelist.txt file.Signed-off-by Fabien Parent <[email protected]>Reviewed-by Tom Rini <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161203/efd0fd5a/attachment.sig>
PATCH 3/6 davinci: omapl138_lcdk: use correct name for CONFIG_SYS_NAND_MASK_CLE
In reply to Fabien ParentCONFIG_SYS_CLE_MASK is not used anywhere. It has probably been renamed to CONFIG_SYS_NAND_MASK_CLE. Rename it and remove the former from the config_whitelist.txt file.
--- include/configs/omapl138_lcdk.h | 2 +- scripts/config_whitelist.txt | 1 - 2 files changed, 1 insertion(+), 2 deletions(-)
include/configs/omapl138_lcdk.h +1 -1
@@ -127,7 +127,7 @@#define CONFIG_SYS_NAND_BUSWIDTH_16BIT #define CONFIG_SYS_NAND_CS 3#define CONFIG_SYS_NAND_BASE DAVINCI_ASYNC_EMIF_DATA_CE3_BASE -#define CONFIG_SYS_CLE_MASK 0x10 +#define CONFIG_SYS_NAND_MASK_CLE 0x10#define CONFIG_SYS_ALE_MASK 0x8#undef CONFIG_SYS_NAND_HW_ECC#define CONFIG_SYS_MAX_NAND_DEVICE 1/* Max number of NAND devices */
scripts/config_whitelist.txt +0 -1
@@ -4569,7 +4569,6 @@ CONFIG_SYS_CF_INTC_REG1 CONFIG_SYS_CF_SIZE CONFIG_SYS_CH7301_I2C CONFIG_SYS_CKEN -CONFIG_SYS_CLE_MASK CONFIG_SYS_CLK CONFIG_SYS_CLKDIV_CPU CONFIG_SYS_CLKDIV_HSB
Signature · 1 line
2.10.2
PATCH 3/6 davinci: omapl138_lcdk: use correct name for CONFIG_SYS_NAND_MASK_CLE
Quoted 5 lines · Fabien Parent
CONFIG_SYS_CLE_MASKis not used anywhere. It has probably been renamed toCONFIG_SYS_NAND_MASK_CLE. Rename it and remove the former from the config_whitelist.txt file.Signed-off-by Fabien Parent <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161129/bcfef76f/attachment.sig>
PATCH 3/6 davinci: omapl138_lcdk: use correct name for CONFIG_SYS_NAND_MASK_CLE
In reply to Fabien ParentQuoted 6 lines · Fabien Parent
CONFIG_SYS_CLE_MASKis not used anywhere. It has probably been renamed toCONFIG_SYS_NAND_MASK_CLE. Rename it and remove the former from the config_whitelist.txt file.Signed-off-by Fabien Parent <[email protected]>Reviewed-by Tom Rini <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161203/cd857460/attachment.sig>
PATCH 4/6 davinci: omapl138_lcdk: use correct name for CONFIG_SYS_NAND_MASK_ALE
In reply to Fabien ParentCONFIG_SYS_ALE_MASK is not used anywhere. It has probably been renamed to CONFIG_SYS_NAND_MASK_ALE. Rename it and remove the former from the config_whitelist.txt file.
--- include/configs/omapl138_lcdk.h | 2 +- scripts/config_whitelist.txt | 1 - 2 files changed, 1 insertion(+), 2 deletions(-)
include/configs/omapl138_lcdk.h +1 -1
@@ -128,7 +128,7 @@#define CONFIG_SYS_NAND_CS 3#define CONFIG_SYS_NAND_BASE DAVINCI_ASYNC_EMIF_DATA_CE3_BASE#define CONFIG_SYS_NAND_MASK_CLE 0x10 -#define CONFIG_SYS_ALE_MASK 0x8 +#define CONFIG_SYS_NAND_MASK_ALE 0x8#undef CONFIG_SYS_NAND_HW_ECC#define CONFIG_SYS_MAX_NAND_DEVICE 1/* Max number of NAND devices */ #define NAND_MAX_CHIPS 1
scripts/config_whitelist.txt +0 -1
@@ -4402,7 +4402,6 @@ CONFIG_SYS_ACR_RPTCNT CONFIG_SYS_ADDRESS_MAP_A CONFIG_SYS_ADV7611_I2C CONFIG_SYS_AHB_BASE -CONFIG_SYS_ALE_MASK CONFIG_SYS_ALLOC_DPRAM CONFIG_SYS_ALT_BOOT CONFIG_SYS_ALT_FLASH
Signature · 1 line
2.10.2
PATCH 4/6 davinci: omapl138_lcdk: use correct name for CONFIG_SYS_NAND_MASK_ALE
Quoted 5 lines · Fabien Parent
CONFIG_SYS_ALE_MASKis not used anywhere. It has probably been renamed toCONFIG_SYS_NAND_MASK_ALE. Rename it and remove the former from the config_whitelist.txt file.Signed-off-by Fabien Parent <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161129/eb77d29d/attachment.sig>
PATCH 4/6 davinci: omapl138_lcdk: use correct name for CONFIG_SYS_NAND_MASK_ALE
In reply to Fabien ParentQuoted 6 lines · Fabien Parent
CONFIG_SYS_ALE_MASKis not used anywhere. It has probably been renamed toCONFIG_SYS_NAND_MASK_ALE. Rename it and remove the former from the config_whitelist.txt file.Signed-off-by Fabien Parent <[email protected]>Reviewed-by Tom Rini <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161203/c099cd9c/attachment.sig>
PATCH 5/6 davinci: omapl138_lck: remove obsolete define
In reply to Fabien ParentNAND_MAX_CHIPS is not used anymore and has been replaced by CONFIG_SYS_MAX_NAND_DEVICE. There is no need to keep the former define.
--- include/configs/omapl138_lcdk.h | 1 - 1 file changed, 1 deletion(-)
include/configs/omapl138_lcdk.h +0 -1
@@ -131,7 +131,6 @@#define CONFIG_SYS_NAND_MASK_ALE 0x8#undef CONFIG_SYS_NAND_HW_ECC#define CONFIG_SYS_MAX_NAND_DEVICE 1/* Max number of NAND devices */ -#define NAND_MAX_CHIPS 1#endif #ifdef CONFIG_SYS_USE_NOR
Signature · 1 line
2.10.2
PATCH 5/6 davinci: omapl138_lck: remove obsolete define
Quoted 5 lines · Fabien Parent
NAND_MAX_CHIPSis not used anymore and has been replaced byCONFIG_SYS_MAX_NAND_DEVICE. There is no need to keep the former define.Signed-off-by Fabien Parent <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161129/87b4202c/attachment.sig>
PATCH 5/6 davinci: omapl138_lck: remove obsolete define
In reply to Fabien ParentQuoted 6 lines · Fabien Parent
NAND_MAX_CHIPSis not used anymore and has been replaced byCONFIG_SYS_MAX_NAND_DEVICE. There is no need to keep the former define.Signed-off-by Fabien Parent <[email protected]>Reviewed-by Tom Rini <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161203/007bd4be/attachment.sig>
PATCH 6/6 davinci: omapl138_lcdk: add NAND SPL boot support
In reply to Fabien ParentNAND SPL boot was missing. Add it. The README specific to omapl138-lcdk is also removed because its content does not apply anymore, i.e. the generated AIS image can be flashed directly to the NAND without using any external tool to create and bootable AIS image.
--- board/davinci/da8xxevm/README.omapl138-lcdk | 28 ---------------------------- configs/omapl138_lcdk_defconfig | 3 +++ include/configs/omapl138_lcdk.h | 27 +++++++++++++++++++++++++++ 3 files changed, 30 insertions(+), 28 deletions(-) delete mode 100644 board/davinci/da8xxevm/README.omapl138-lcdk
board/davinci/da8xxevm/README.omapl138-lcdk deleted +0 -28
@@ -1,28 +0,0 @@ -Summary -======= -This README assumes you have read README.da850. It contains some additional -information specific to building the omapl138-lcdk. The AIS file as generated -by the build is, currently, not useable due to differences in the flash -available on this board, as compared to the da850evm boards. - -Flash Differences -================= -Refer to the discussion in [1] for more detail - basically the da850evm uses -SPI flash whereas the lcdk uses NAND flash to store the bootloader, and -the support isn't there in the SPL code. - -It should be possible to add the support in the SPL code should someone be -sufficiently motivated. - -Using the built image -===================== -The output image to use is u-boot.bin. This needs to be converted to an -AIS file as described in [1] and then flashed using the utitilty linked to -there and also described in README.da850. You _may_ be able to write using -u-boot itself, but the commands in README.da850 won't work as they write to -SPI rather than NAND. - -Links -===== -[1] - http://e2e.ti.com/support/dsp/omap_applications_processors/f/42/t/386829
configs/omapl138_lcdk_defconfig +3 -0
@@ -3,6 +3,7 @@ CONFIG_ARCH_DAVINCI=y CONFIG_TARGET_OMAPL138_LCDK=y CONFIG_SPL_LIBCOMMON_SUPPORT=y CONFIG_SPL_LIBGENERIC_SUPPORT=y +CONFIG_SPL_NAND_SUPPORT=y CONFIG_SPL_SERIAL_SUPPORT=y CONFIG_BOOTDELAY=3 CONFIG_VERSION_VARIABLE=y
@@ -22,6 +23,8 @@ CONFIG_CMD_PING=y CONFIG_CMD_EXT2=y CONFIG_CMD_FAT=y CONFIG_CMD_UBI=y +CONFIG_SYS_NAND_U_BOOT_LOCATIONS=y +CONFIG_SYS_NAND_U_BOOT_OFFS=0x28000 CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_STMICRO=y CONFIG_SPI_FLASH_WINBOND=y
include/configs/omapl138_lcdk.h +27 -0
@@ -131,6 +131,33 @@#define CONFIG_SYS_NAND_MASK_ALE 0x8#undef CONFIG_SYS_NAND_HW_ECC#define CONFIG_SYS_MAX_NAND_DEVICE 1/* Max number of NAND devices */ +#define CONFIG_SYS_NAND_HW_ECC_OOBFIRST +#define CONFIG_SYS_NAND_5_ADDR_CYCLE +#define CONFIG_SYS_NAND_PAGE_SIZE (2 << 10) +#define CONFIG_SYS_NAND_BLOCK_SIZE (128 << 10) +#define CONFIG_SYS_NAND_U_BOOT_SIZE 0x200/*0x60000*/ +#define CONFIG_SYS_NAND_U_BOOT_DST 0xc1080000 +#define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_NAND_U_BOOT_DST +#define CONFIG_SYS_NAND_U_BOOT_RELOC_SP (CONFIG_SYS_NAND_U_BOOT_DST - \ + CONFIG_SYS_NAND_U_BOOT_SIZE - \ + CONFIG_SYS_MALLOC_LEN - \ + GENERATED_GBL_DATA_SIZE) +#define CONFIG_SYS_NAND_ECCPOS { \ + 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, 58, \ + 59, 60, 61, 62, 63 } +#define CONFIG_SYS_NAND_PAGE_COUNT 64 +#define CONFIG_SYS_NAND_BAD_BLOCK_POS 0 +#define CONFIG_SYS_NAND_ECCSIZE 512 +#define CONFIG_SYS_NAND_ECCBYTES 10 +#define CONFIG_SYS_NAND_OOBSIZE 64 +#define CONFIG_SPL_NAND_BASE +#define CONFIG_SPL_NAND_DRIVERS +#define CONFIG_SPL_NAND_ECC +#define CONFIG_SPL_NAND_SIMPLE +#define CONFIG_SPL_NAND_LOAD #endif #ifdef CONFIG_SYS_USE_NOR
Signature · 1 line
2.10.2
PATCH 6/6 davinci: omapl138_lcdk: add NAND SPL boot support
Quoted 6 lines · Fabien Parent
NAND SPL boot was missing. Add it. The README specific to omapl138-lcdk is also removed because its content does not apply anymore, i.e. the generated AIS image can be flashed directly to the NAND without using any external tool to create and bootable AIS image.
Signed-off-by Fabien Parent <[email protected]>
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161129/d4fb6746/attachment.sig>
PATCH 6/6 davinci: omapl138_lcdk: add NAND SPL boot support
In reply to Fabien ParentQuoted 7 lines · Fabien Parent
NAND SPL boot was missing. Add it. The README specific to omapl138-lcdk is also removed because its content does not apply anymore, i.e. the generated AIS image can be flashed directly to the NAND without using any external tool to create and bootable AIS image.
Signed-off-by Fabien Parent <[email protected]>Reviewed-by Tom Rini <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161203/aa13fc24/attachment.sig>
cover davinci: omapl138_lcdk: add SPL NAND boot support
In reply to Fabien ParentQuoted 13 lines · Fabien Parent
The default AIS image generated contains the SPL, but the latter is not able to load u-boot because the NAND configuration is missing. This series adds SPL NAND boot support and results in the AIS image that is generated able to boot from NAND.
Fabien Parent (6):
NAND: davinci: add support for NAND chips with 16 bits bus
davinci:omapl138_lcdk: use correct define for 16 bit NAND chips
davinci:omapl138_lcdk: use correct name forCONFIG_SYS_NAND_MASK_CLE
davinci:omapl138_lcdk: use correct name forCONFIG_SYS_NAND_MASK_ALE
davinci:omapl138_lck: remove obsolete define
davinci:omapl138_lcdk: add NAND SPL boot support
Quoted 7 lines
board/davinci/da8xxevm/README.omapl138-lcdk | 28 ------------------------ configs/omapl138_lcdk_defconfig | 3 +++ drivers/mtd/nand/davinci_nand.c | 3 +++ include/configs/omapl138_lcdk.h | 34 +++++++++++++++++++++++++---- scripts/config_whitelist.txt | 3 --- 5 files changed, 36 insertions(+), 35 deletions(-) delete mode 100644 board/davinci/da8xxevm/README.omapl138-lcdk
Everything looks good, so I've reviewed-by'd it. But it also shows a number of things which should be converted to Kconfig (I stumbled onto in looking at why you didn't set SYS_NAND_BUSWIDTH_16BIT via defconfig). Do you have time to move the davinci NAND driver to Kconfig while in here? Thanks!
Quoted 4 lines
Signature · 2 lines
-- 2.10.2
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20161129/f92fef40/attachment.sig>