I upgrade my TL-WR741ND with Winbond W25Q64 8Mbyte FLASH chip.
First of all I made a full backup from the original (en25f32) with Topmax EEtols2.
Then I wrote this binary to the new flash because the bootloader (U-boot).
Then I made some modification in kernel (below) :
- change the place and size of partitions
- w25q64 JEDEC signature
After that I programmed the new chip via tftp method but there was a problem:
U-Boot 1.1.4 (Mar 8 2010 - 10:29:42)
AP91 (ar7240) U-boot
DRAM:
sri
#### TAP VALUE 1 = c, 2 = d
64 MB
id read 0x100000ff
flash size 4194304, sector count = 64
Flash: 4 MB
Using default environment
BOARD IS NOT CALIBRATED!!!
Yes, I forgot the "art" partition , the place of calibration data has changed...
So I had to copy 0x010000 bytes from original flash(0x3f0000) to new flash (0x7f0000).
After that the wifi interface worked well!
The first patches:
--- a/arch/mips/ar71xx/mach-tl-wr741nd.c
+++ b/arch/mips/ar71xx/mach-tl-wr741nd.c
@@ -44,16 +44,16 @@
} , {
.name = "rootfs",
.offset = 0x160000,
- .size = 0x290000,
+ .size = 0x690000,
} , {
.name = "art",
- .offset = 0x3f0000,
+ .offset = 0x7f0000,
.size = 0x010000,
.mask_flags = MTD_WRITEABLE,
} , {
.name = "firmware",
.offset = 0x020000,
- .size = 0x3d0000,
+ .size = 0x7d0000,
}
};
#endif /* CONFIG_MTD_PARTITIONS */
and the other:
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -689,6 +689,7 @@ static struct flash_info __devinitdata m
{ "w25x80", 0xef3014, 0, 64 * 1024, 16, SECT_4K, },
{ "w25x16", 0xef3015, 0, 64 * 1024, 32, SECT_4K, },
{ "w25x32", 0xef3016, 0, 64 * 1024, 64, SECT_4K, },
+ { "w25q64", 0xef4017, 0, 64 * 1024, 128, SECT_4K, },
{ "w25x64", 0xef3017, 0, 64 * 1024, 128, SECT_4K, },
};
And the result of our work!
root@OpenWrt:~# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/root 2176 2176 0 100% /rom
tmpfs 31032 80 30952 0% /tmp
tmpfs 512 0 512 0% /dev
root 2176 2176 0 100% /tmp/root
mini_fo:/tmp/root 2176 2176 0 100% /tmp/root
/dev/mtdblock3 4612 244 4368 5% /overlay
mini_fo:/overlay 2176 2176 0 100% /
If you want to programming the flash chips you can use Sergey's programmer but some changing needed because doesnt work with this chip.
Good luck for modifications!
If you have any question don't hesitate to ask!