In my board, i use two NAND in CS0, and CS2 chip select. But, u-boot detected only one NAND on CS0.
I have a question, u-boot automatically polls the device at the CSn, or this is where you need to set?
no, it not detects automatically, it is necessary to modify
sources for such usage.
Note: If this post answers your question, please click the Correct Answer button. Thank you!
What is the file I need to set CS2?
I set pad
In the spirit of tradition, I'll answer my questions..))
In order to connect two NAND devices, you need to set CONFIG_SYS_MAX_NAND_DEVICE 2
in mx6sabre_common.h file.
Hi. I no full resolve this problem. After kernel boot i see only one NND flash. So, need to configure kernel settings.
I read chapter 30.4.1 Multiple NAND Support in reference manual:
"A DMA channel will
signify the NAND chip select it wants to access by writing its chip select value in the
GPMI_CTRL0[CS] field and setting the GPMI_CTRL1[DECOUPLE_CS] to 1. This
option is useful if software chooses to use only one DMA channel to access all the
attached NAND devices. "
I find settings in dts file
So, i set pin CS2.
But, where to set the values of registers?
log in kernel boot:
nand: device found, Manufacturer ID: 0x01, Chip ID: 0xf1
nand: AMD/Spansion S34ML01G1
nand: 128MiB, SLC, page size: 2048, OOB size: 64
gpmi-nand 112000.gpmi-nand: mode:4 ,failed in set feature.
Bad block table found at page 65472, version 0x01
Bad block table found at page 65408, version 0x01
gpmi-nand 112000.gpmi-nand: driver registered.
There is standard procedure how to add a new NAND flash to the BSP:
1. Use the NAND-flash-analysis spreadsheet to
capture ID bytes, timings, and dimensions of the
2. Add these parameters into the BSP source code.
• MTD standard table is checked first by MTD
• Freescale BSP extended table is checked second
• For the NAND to be recognized, it must have an
entry in both tables.
I add chip ids list in nand_ids.c
i not found nand_device_info.c file in drivers/mtd/nand/. Version BSP - 3.10.53_1.1.0
in u-boot i see two nand 128MB.
NAND: 256 MiB
In kernel (after add ids list):
nand: AMD/Spansion S34ML01G100TFI00 1G 3.3V 8-bit
After boot linux i see only one nand - mtdblock0
root@imx6solosabreauto:~# cat /proc/partitions
major minor #blocks name
31 0 131072 mtdblock0
179 0 3872256 mmcblk2
179 1 8192 mmcblk2p1
179 2 65536 mmcblk2p2
I do not even know what to do. U-boot sees two devices, so you can eliminate the hardware problem.
suggest post this to meta-fsl-arm mailing list, so that someone familiar with Yocto
nand problems could try to assist you.
I think it is too early to send in Yocto
Answer me one question - Freescale processor tested with two NAND IC(no die)? I use official relise, which, as I understand it was tested.
it was a mistake to think that the u-boot correctly detects NAND IC on CS2.
In both cases(u-boot, kernel), processor not drive CS2 pin. I not find any documentation, any phrases, which would concern settings multiple NAND support in official BSP from Freescale.
I would have understood it if I would not need the settings and all IC would be detected automatically. but it is not!
I just killed it ...
I set CONFIG_SYS_MAX_NAND_DEVICE to 4 and u-boot shows 512MB size. Now everything is clear - it just multiplies the size of the first NAND on CONFIG_SYS_MAX_NAND_DEVICE.
igorpadykov wrote: There is standard procedure how to add a new NAND flash to the BSP: 1. Use the NAND-flash-analysis spreadsheet tocapture ID bytes, timings, and dimensions of theNAND flash2. Add these parameters into the BSP source code.• MTD standard table is checked first by MTDdrivers/mtd/nand/nand_ids.c• Freescale BSP extended table is checked seconddrivers/mtd/nand/nand_device_info.c• For the NAND to be recognized, it must have anentry in both tables. Best regardsigor
igorpadykov is there any standard procedure for adding new NOR flash to BSP too?
P.S: I am using T1042 reference design and using same part no. for NOR flash as used in reference design board.
Retrieving data ...