arjun.a
rename files
6c7b14a
Ticket Name: Linux/TDA2P-ACD: NAND Flash Configiration in U-boot for TDA2p device
Query Text:
Part Number: TDA2P-ACD Other Parts Discussed in Thread: TDA2 Tool/software: Linux Hello, We have a custom board with TDA2P SoC and running Linux on A15. There is NAND flash( MX30LF1G18A) connected to TDA and want to access it from U-boot. We have configured the NAND driver in U-boot and also added the gpmc node to the dts file and enabled the pinmux config. When we run the code we see U-Boot log and code hangs at NAND probing. Here is the Uboot log : U-Boot SPL 2016.05-00010-g9551b3d-dirty (Aug 06 2018 - 12:42:11) DRA762-GP ES1.0 board_init ********spl_boot_device******no pinctrl for hs200_1_8v no pinctrl for ddr_1_8v *** Warning - MMC init failed, using default environment i2c_write: error waiting for data ACK (status=0x116) i2c_write: error waiting for data ACK (status=0x116) ********spl_boot_device******Trying to boot from spl MMC1 reading dra7-ipu2-fw.lzop spl_load_file_fat: error reading file dra7-ipu2-fw.lzop, err - -1 spl: error reading image dra7-ipu2-fw.lzop, err - -1 Error loading remotecore IPU2!,Continuing with boot ... reading dra7-dsp1-fw.lzop spl_load_file_fat: error reading file dra7-dsp1-fw.lzop, err - -1 spl: error reading image dra7-dsp1-fw.lzop, err - -1 Error loading remotecore DSP1!,Continuing with boot ... reading dra7-dsp2-fw.lzop spl_load_file_fat: error reading file dra7-dsp2-fw.lzop, err - -1 spl: error reading image dra7-dsp2-fw.lzop, err - -1 Error loading remotecore DSP2!,Continuing with boot ... reading dra7-ipu1-fw.lzop spl_load_file_fat: error reading file dra7-ipu1-fw.lzop, err - -1 spl: error reading image dra7-ipu1-fw.lzop, err - -1 Error loading remotecore IPU1!,Continuing with boot ... spl: falcon_args_file not set in environment, falling back to default reading single-stage-boot.dtb spl_load_image_fat_os: error reading image single-stage-boot.dtb, err - -1 reading u-boot.img reading u-boot.img reading u-boot.img reading u-boot.img U-Boot 2016.05-00010-g9551b3d-dirty (Aug 06 2018 - 12:42:11 +0530) CPU : DRA762-GP ES1.0 Model: TI DRA762 EVM Board: DRA74x EVM REV DRAM: 512 MiB NAND: DTS config for GPMC: &gpmc { /* * For the existing IOdelay configuration via U-Boot we don't * support NAND on dra72-evm. Keep it disabled. Enabling it * requires a different configuration by U-Boot. */ status = "okay"; ranges = <0 0 0x08000000 0x01000000>; /* minimum GPMC partition = 16MB */ nand@0,0 { /* To use NAND, DIP switch SW5 must be set like so: * SW5.1 (NAND_SELn) = ON (LOW) * SW5.9 (GPMC_WPN) = OFF (HIGH) */ compatible = "ti,am3352-gpmc"; reg = <0 0 4>; /* device IO registers */ rb-gpios = <&gpmc 0 GPIO_ACTIVE_HIGH>; /* gpmc_wait0 pin */ /* device IO registers */ ti,nand-ecc-opt = "bch8"; ti,elm-id = <&elm>; nand-bus-width = <8>; gpmc,device-width = <1>; gpmc,sync-clk-ps = <0>; gpmc,cs-on-ns = <0>; gpmc,cs-rd-off-ns = <80>; gpmc,cs-wr-off-ns = <80>; gpmc,adv-on-ns = <6>; gpmc,adv-rd-off-ns = <60>; gpmc,adv-wr-off-ns = <60>; gpmc,we-on-ns = <10>; gpmc,we-off-ns = <50>; gpmc,oe-on-ns = <4>; gpmc,oe-off-ns = <54>; gpmc,access-ns = <40>; gpmc,wr-access-ns = <80>; gpmc,rd-cycle-ns = <80>; gpmc,wr-cycle-ns = <80>; gpmc,wait-on-read = "true"; gpmc,wait-on-write = "true"; gpmc,bus-turnaround-ns = <0>; gpmc,cycle2cycle-delay-ns = <0>; gpmc,clk-activation-ns = <0>; gpmc,wait-monitoring-ns = <0>; gpmc,wr-data-mux-bus-ns = <0>; /* MTD partition table */ /* All SPL-* partitions are sized to minimal length * which can be independently programmable. For * NAND flash this is equal to size of erase-block */ #address-cells = <1>; #size-cells = <1>; partition@0 { label = "NAND.SPL"; reg = <0x00000000 0x000020000>; }; partition@1 { label = "NAND.SPL.backup1"; reg = <0x00020000 0x00020000>; }; partition@2 { label = "NAND.SPL.backup2"; reg = <0x00040000 0x00020000>; }; partition@3 { label = "NAND.SPL.backup3"; reg = <0x00060000 0x00020000>; }; partition@4 { label = "NAND.u-boot-spl-os"; reg = <0x00080000 0x00040000>; }; partition@5 { label = "NAND.u-boot"; reg = <0x000c0000 0x00100000>; }; partition@6 { label = "NAND.u-boot-env"; reg = <0x001c0000 0x00020000>; }; partition@7 { label = "NAND.u-boot-env.backup1"; reg = <0x001e0000 0x00020000>; }; partition@8 { label = "NAND.kernel"; reg = <0x00200000 0x00800000>; }; partition@9 { label = "NAND.file-system"; reg = <0x00a00000 0x0f600000>; }; }; }; Please let us know if we are missing anything. Regards, SwapniL B
Responses:
Swapnil We have a similar post for NAND support on DRA7/TDA2 - e2e.ti.com/.../2481352 In essence, we validate boot from QSPI, eMMC/SD as part of our regular releases - we used to support NAND in the past, but most customers ended up choosing QSPI flash for boot media instead. we also had to contend with pin mux conflicts (in enabling NAND pins) on the TI EVM: hence we dropped support for NAND in our SDK releases Is there a strong reason for choosing NAND over eMMC
Hi Srirama, We are working on board bring up activity for customer board. So we need support to enable the Nand flash. Regards, Swapnil
Swapnil Does NAND support need to be enabled both in uboot(especially if it is your boot media) and also from the kernel(root filesystem from NAND - UBIFS based) We had enabled NAND boot support on DRA71x - and you can refer to patches in uboot, kenel as a reference
Hi Sriram, Thanks for providing the patches. We have successfully enable the Nand flash from uboot. Regards, Swapnil