Spansion S25FL128-Flash and MTD

EXTERNAL Lange Matthias (AA-DGW/ENG1) Matthias.Lange at
Wed Aug 5 17:16:58 EST 2009


I am trying to get a MTD running on my embedded PowerPC board. I am using a Xilinx Virtex4 with an embedded PowerPC 405. In the FPGA there is a Xilinx SPI controller implemented to which a Spansion S25FL128 SPI-flash (16MB) is connected.

The problem is that with my setup the flash chips gets not detected and the MTD partitions won't be setup.

In the kernel config I have configured the following options:

In the device drivers section:
[x] SPI support
        [x] Xilinx SPI controller
[x] Memory Technology Device (MTD) support
        [x] MTD partitioning support
        [x] Flash partition map based on OF description
        RAM/ROM/Flash chip drivers
                [x] Detect non-CFI AMD/JEDEC-compatible flash chips
        Self-contained MTD device drivers
                [x] Support most SPI Flash chips (AT26DF, M25P, W25X, ...)

As filesystem I have configured JFFS2.

In my device tree I have declared the SPI controller and the connected flash as follows:

SPI_Flash: xps-spi at 83400000 {
        compatible = "xlnx,xps-spi-2.00.b";
        interrupt-parent = <&int_ctrl>;
        interrupts = < 3 2 >;
        reg = < 0x83400000 0x10000 >;
        xlnx,family = "virtex4";
        xlnx,fifo-exist = <0x0>;
        xlnx,num-offchip-ss-bits = <0x1>;
        xlnx,num-ss-bits = <0x1>;
        xlnx,sck-ratio = <0x20>;
        #address-cells = <1>;
        #size-cells = <1>;
        nor_flash at 0,1000000 {
                compatible = "amd,s25sl12800", "jedec-flash";
                reg = <0x0 0x1000000>;
                spi-max-frequency = <25000000>;
                bank-width = <1>;
                device-width = <1>;
                #address-cells = <1>;
                #size-cells = <1>;
                rootfs at 800000 {
                        label = "rootfs";
                        reg = <0x800000 0x800000>;

When the kernel boots I can see from the console that the drivers for JFFS2 and the SPI controller get successfully loaded:

JFFS2 version 2.2. (NAND) (c) 2001-2006 Red Hat, Inc.
xilinx-xps-spi 83400000.xps-spi: at 0x83400000 mapped to 0xC9060000, irq=17

While debugging the boot process I couldn't see any calls to jedec_probe() resp. m25p_probe() from m25p80.c which to my understanding should be called in result to a successfull match of my compatible property (jedec-flash).

The question is: What am I missing? Is there a problem with my device tree definition? What else am I doing wrong?

Any help is appreciated. Regards,

More information about the Linuxppc-dev mailing list