Hello,
I've bought a 8MMINID4-EVK and want to test a NAND Flash. The only part number that I found in the schematic is MT29F64G08CBABBWP-12IT:B (SPF-35104_B1.pdf). It's a "NAND Flash MLC 64G 8GX8 TSOP". Using the example_kernel_nand.uuu script with: imx-boot-imx8mmddr4evk-nand.bin-flash_ddr4_evk, Image-imx8mmevk.bin, imx8mm-ddr4-evk.dtb, fsl-image-mfgtool-initramfs-imx_mfgtools.cpio.gz.u-boot. I get:
Found New UDC: ci_hdrc.0
ci_hdrc.0 0
ffs.utp0
[ 3.827324] file system registered
[ 3.840490] Mass Storage Function, version: 2009/09/11
[ 3.845818] LUN: removable file: (no medium)
run utp at /dev/usb-utp0/ep0
.
uuu fastboot client 1.0.0 [built [ 3.855595] read descriptors
Nov 7 2019 19:25:07]
Start init[ 3.861405] read strings
usb
write string
Start handle command
[ 4.809858] imx-drm 32c00000.bus:display-subsystem: [drm] Cannot find any crtc or sizes
uuc /dev/utp
uuc 0.6 [built Nov 7 2019 19:25:07]
UTP: Waiting for /dev/utp to appear
run shell cmd: cat /proc/mtd
run shell cmd: cat /proc/mtd | while read dev size erase name; do mtd=${dev:3}; mtd=${mtd%:}; name=${name%\"}; name=${name#\"}; echo export $name=$mtd >> /tmp/mtd.sh; done;
run shell cmd: chmod 777 /tmp/mtd.sh
[ 5.720168] Console: switching to colour frame buffer device 240x67
[ 5.775206] imx-drm 32c00000.bus:display-subsystem: [drm] fb0: imx-drmdrmfb frame buffer device
run shell cmd: mount -t debugfs debugfs /sys/kernel/debug
run shell cmd: source /tmp/mtd.sh; flash_erase /dev/mtd${nandboot} 0 0
WOpen:/tmp/boot
run shell cmd: source /tmp/mtd.sh; cd /tmp; if [[ ! `cat /sys/devices/soc0/soc_id` =~ .*MX8(Q|DXL|MN|MP).* ]]; then pad="-x"; fi; kobs-ng init $pad -v --chip_0_device_path=/dev/mtd${nandboot} /tmp/boot
run shell cmd: if [[ `cat /tmp/mtd.sh` = *"nandfit"* ]]; then source /tmp/mtd.sh; flash_erase /dev/mtd${nandfit} 0 0; dd if=/tmp/boot of=/tmp/fit; nandwrite -p /dev/mtd${nandfit} -p /tmp/fit; fi
6973+1 records in
6973+1 records out
3570256 bytes (3.6 MB, 3.4 MiB) copied, 0.030494 s, 117 MB/s
run shell cmd: source /tmp/mtd.sh; flash_erase /dev/mtd${nandkernel} 0 0
WOpen:/tmp/img
run shell cmd: source /tmp/mtd.sh; nandwrite -p /dev/mtd${nandkernel} -p /tmp/img
[ 9.002154] random: crng init done
run shell cmd: source /tmp/mtd.sh; flash_erase /dev/mtd${nanddtb} 0 0
WOpen:/tmp/dtb
run shell cmd: source /tmp/mtd.sh; nandwrite -p /dev/mtd${nanddtb} -p /tmp/dtb
run shell cmd: source /tmp/mtd.sh; flash_erase /dev/mtd${nandrootfs} 0 0
run shell cmd: source /tmp/mtd.sh; ubiattach /dev/ubi_ctrl -m ${nandrootfs}
[ 19.769106] ubi: refuse attaching mtd5 - MLC NAND is not supported
ubiattach: error!: cannot attach mtd5
error 22 (Invalid argument)
As I can understand reading the driver (https://source.codeaurora.org/external/imx/linux-imx/tree/drivers/mtd/ubi/build.c?h=lf-5.10.y) the MLC NAND are not supported by the linux kernel. I was wondering that this part number is in the schematic and I want to ask which NAND flash can I test with the socket of the EVK?
Which version of BSP are you using? Have you install the Nand in your board?
I'm using Release - Linux 5.10.9_1.0.0 March 2021.
The NAND with part number MT29F64G08CBABBWP-12IT:B is installed in the TSOP48 socket.
I have double confirmed and you also see that the MLC nand is not supported in kernel and only support the SLC, so here you only can use the SLC nand, can not use the MLC nand.
Both UBI and UBIFS have been designed for SLC NAND and NOR flashes