Issue on NOR flash erase and copy

cancel
Showing results for 
Search instead for 
Did you mean: 

Issue on NOR flash erase and copy

Jump to solution
247 Views
winstonjacob
Contributor IV
We are working on an LS1021A custom board where we are using 2 NOR Flash (IS29GL256-70FLET) chips. We modified our DTS file based on this link https://community.nxp.com/t5/P-Series/cannot-erase-256MB-NOR-flash-beyond-first-139MB/m-p/370821/hig...
 
 
&ifc {
#address-cells = <2>;
#size-cells = <1>;
/* NOR Flash on board and SRAM */
ranges = <0x0 0x0 0x0 0x60000000 0x04000000

                 0x2 0x0 0x0 0x68000000 0x00080000

                 0x4 0x0 0x0 0x69000000 0x01000000>;
status = "okay";
 
nor@0,0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "cfi-flash";
reg = <0x0 0x0 0x2000000
      0x1 0x2000000 0x2000000>;
bank-width = <2>;

device-width = <1>;

 
 
Our logs look like this
================
60000000.nor: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x00009d Chip ID 0x00227e
Amd/Fujitsu Extended Query Table at 0x0040
Amd/Fujitsu Extended Query version 1.4.
number of CFI chips: 1
15 ofpart partitions found on MTD device 60000000.nor
Creating 15 MTD partitions on "60000000.nor":
0x000000000000-0x000000020000 : "Pre-Bootloader Configuration(PBLC)"
0x000000020000-0x000000040000 : "Ethernet Data"
0x000000040000-0x000000080000 : "Bootloader Environment(BLE)"
0x000000080000-0x0000000a0000 : "DTS-D"
0x0000000a0000-0x0000000c0000 : "DTS-1"
0x0000000c0000-0x0000000e0000 : "QE uCode Image"
0x0000000e0000-0x000000100000 : "DTS-2"
0x000000100000-0x000000200000 : "Bootloader Image (BLI)"
0x000000200000-0x000000600000 : "Kernel Image Default (KI-D)"
0x000000600000-0x000000a00000 : "Kernel Image1 (KI-1)"
0x000000a00000-0x000001000000 : "Kernel Image-2 (KI-2)"
0x000001000000-0x000002000000 : "Rootfs-1 (RFS-1)"
0x000000000000-0x000000600000 : "Rootfs Default (RFS-D)"
0x000000600000-0x000001600000 : "Rootfs-2 (RFS-2)"
0x000001600000-0x000001f00000 : "ADFS"
 
But when we tried to erase using the flash_eraseall command, we are getting the below log
 
root@atc-gen2:~# flash_eraseall /dev/mtd0
flash_eraseall has been replaced by `flash_erase <mtddev> 0 0`; please use it
Erasing 128 Kibyte @ 0 -- 0 % complete libmtd: error!: MEMERASE64 ioctl failed for eraseblock 0 (mtd0)
error 5 (Input/output error)
flash_erase: error!: /dev/mtd0: MTD Erase failure
error 5 (Input/output error)
Erasing 128 Kibyte @ 0 -- 100 % complete
root@atc-gen2:~# flash_eraseall /dev/mtd1
flash_eraseall has been replaced by `flash_erase <mtddev> 0 0`; please use it
Erasing 128 Kibyte @ 0 -- 0 % complete libmtd: error!: MEMERASE64 ioctl failed for eraseblock 0 (mtd1)
error 5 (Input/output error)
flash_erase: error!: /dev/mtd1: MTD Erase failure
error 5 (Input/output error)
Erasing 128 Kibyte @ 0 -- 100 % complete
 
We need to know whether our changes are proper for 2 NOR flash chips and also we need solutions to our flash_erase error.
 
Regards
Winston
0 Kudos
1 Solution
229 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please check whether you could execute erase and copy command in u-boot.

=> protect off 60000000 +$filesize && erase 60000000 +$filesize && cp.b $load_addr 60000000
$filesize

View solution in original post

0 Kudos
1 Reply
230 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please check whether you could execute erase and copy command in u-boot.

=> protect off 60000000 +$filesize && erase 60000000 +$filesize && cp.b $load_addr 60000000
$filesize

0 Kudos