Skip to contentSkip to conversation

Programming the flash chip in the Dlink DNS323

DISCUSSION Rogan Dawes 1 participant 1 message Jul 20, 2010 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

Hi folks,

I am trying to add support for the DNS323 to U-Boot, but am struggling with the flash chip, a Spansion S29GL064M90TFIR4. I am unable to get it to generate the appropriate CFI responses. In fact, I cannot even get it to react to the sequence to trigger the manufacturer ID, although I can get it to show the QRY response.

This is what I get (from the u-boot command line):

DNS323B1> mw.b 0xf4000000 0xF0
DNS323B1> md.b 0xf4000000 0x40
f4000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
f4000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
f4000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
f4000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ DNS323B1> mw.b 0xf40000aa 0x98
DNS323B1> md.b 0xf4000000 0x40
f4000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
f4000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
f4000020: 51 51 52 52 59 59 02 02 00 00 40 40 00 00 00 00 QQRRYY....@@....
f4000030: 00 00 00 00 00 00 27 27 36 36 00 00 00 00 04 04 ......''66......

The apparently odd thing is that rather than "QRY" at 0x10, I get "QQRRYY" at 0x20, but the device should be in 8-bit mode, from all the info I've found (including the kernel sources).

It seems that there is support for it in the mainstream kernel, and as far as I can see, it is being detected using CFI.

Here is where it is set up:

arch/arm/mach-orion5x/dns323-setup.c

which simply defines the flash addresses and bus width:

static struct physmap_flash_data dns323_nor_flash_data = {

        .width          = 1,
        .parts          = dns323_partitions,
        .nr_parts       = ARRAY_SIZE(dns323_partitions)

};

static struct resource dns323_nor_flash_resource = {

        .flags          = IORESOURCE_MEM,
        .start          = DNS323_NOR_BOOT_BASE,
        .end            = DNS323_NOR_BOOT_BASE + DNS323_NOR_BOOT_SIZE - 1,

};

static struct platform_device dns323_nor_flash = {

        .name           = "physmap-flash",
        .id             = 0,
        .dev            = {

.platform_data = &dns323_nor_flash_data,
},
.resource = &dns323_nor_flash_resource,
.num_resources = 1,
};

Does anyone have any insight into this chip, and could help me add support for it to U-Boot?

Many thanks.

Rogan