[PATCH 4/4] configs: am64x_evm_a53_defconfig: Enable NAND

Tom Rini trini at konsulko.com
Tue Jan 9 20:48:07 CET 2024


On Tue, Jan 09, 2024 at 01:16:27PM -0600, Nishanth Menon wrote:
> On 14:26-20240109, Roger Quadros wrote:
> > Enables configuration required for NAND in SPL and u-boot.
> > 
> > Enable MTD Driver model and MTD + UBI command line utilities.
> > 
> > Add mtdids/mtdparts for NAND as it is required for u-boot's
> > MTD subsystem commands to recognize NAND partitions.
> > 
> > Add u-boot partition location.
> > 
> > Signed-off-by: Roger Quadros <rogerq at kernel.org>
> > ---
> >  configs/am64x_evm_a53_defconfig | 32 ++++++++++++++++++++++++++++++++
> >  1 file changed, 32 insertions(+)
> > 
> > diff --git a/configs/am64x_evm_a53_defconfig b/configs/am64x_evm_a53_defconfig
> > index 05e35a8db6..e22153a958 100644
> > --- a/configs/am64x_evm_a53_defconfig
> > +++ b/configs/am64x_evm_a53_defconfig
> > @@ -66,10 +66,15 @@ CONFIG_CMD_DFU=y
> >  CONFIG_CMD_GPT=y
> >  CONFIG_CMD_I2C=y
> >  CONFIG_CMD_MMC=y
> > +CONFIG_CMD_MTD=y
> >  CONFIG_CMD_USB=y
> >  CONFIG_CMD_TIME=y
> >  CONFIG_CMD_PMIC=y
> >  CONFIG_CMD_REGULATOR=y
> > +CONFIG_CMD_MTDPARTS=y
> > +CONFIG_MTDIDS_DEFAULT="nand0=omap2-nand.0"
> > +CONFIG_MTDPARTS_DEFAULT="mtdparts=omap2-nand.0:2m(NAND.tiboot3),2m(NAND.tispl),2m(NAND.tiboot3.backup),4m(NAND.u-boot),256k(NAND.u-boot-env),256k(NAND.u-boot-env.backup),-(NAND.file-system)"
> > +CONFIG_CMD_UBI=y
> >  CONFIG_OF_CONTROL=y
> >  CONFIG_SPL_OF_CONTROL=y
> >  CONFIG_OF_LIST="k3-am642-evm k3-am642-sk"
> > @@ -107,6 +112,9 @@ CONFIG_MMC_SDHCI=y
> >  CONFIG_MMC_SDHCI_ADMA=y
> >  CONFIG_SPL_MMC_SDHCI_ADMA=y
> >  CONFIG_MMC_SDHCI_AM654=y
> > +CONFIG_MTD=y
> > +CONFIG_SPL_MTD=y
> > +CONFIG_DM_MTD=y
> >  CONFIG_DM_SPI_FLASH=y
> >  CONFIG_SPI_FLASH_SPANSION=y
> >  CONFIG_SPI_FLASH_STMICRO=y
> > @@ -161,3 +169,27 @@ CONFIG_USB_GADGET_DOWNLOAD=y
> >  CONFIG_USB_FUNCTION_MASS_STORAGE=y
> >  CONFIG_SPL_DFU=y
> >  CONFIG_FS_FAT_MAX_CLUSTSIZE=16384
> > +CONFIG_MEMORY=y
> > +CONFIG_SPL_MEMORY=y
> > +CONFIG_TI_GPMC=y
> > +CONFIG_MTD_RAW_NAND=y
> > +CONFIG_NAND_OMAP_GPMC=y
> > +CONFIG_CMD_NAND=y
> > +CONFIG_NAND_OMAP_ELM=y
> > +CONFIG_NAND_OMAP_ECCSCHEME_BCH8_CODE_HW=y
> > +CONFIG_SYS_NAND_BLOCK_SIZE=0x40000
> > +CONFIG_SYS_NAND_ONFI_DETECTION=y
> > +CONFIG_SYS_NAND_PAGE_SIZE=0x1000
> > +CONFIG_SYS_NAND_PAGE_COUNT=0x40
> > +CONFIG_SYS_NAND_OOBSIZE=0x100
> > +CONFIG_SPL_NAND_SUPPORT=y
> > +CONFIG_SPL_NAND_DRIVERS=y
> > +CONFIG_SPL_NAND_BASE=y
> > +CONFIG_SPL_NAND_IDENT=y
> > +CONFIG_SPL_NAND_ECC=y
> > +CONFIG_SYS_NAND_MAX_CHIPS=1
> > +CONFIG_SYS_MAX_NAND_DEVICE=1
> > +# CONFIG_SPL_NAND_AM33XX_BCH is not set
> > +CONFIG_SPL_MTD_SUPPORT=y
> > +CONFIG_SYS_NAND_U_BOOT_LOCATIONS=y
> > +CONFIG_SYS_NAND_U_BOOT_OFFS=0x600000
> > -- 
> > 2.34.1
> > 
> 
> Why not a config fragment?

To me, this makes sense to keep in the main config. It can be turned off
as needed, and at run time if it's not present, it's safe.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20240109/0504f190/attachment.sig>


More information about the U-Boot mailing list