Spansion S25FL128-Flash and MTD
EXTERNAL Lange Matthias (AA-DGW/ENG1)
Matthias.Lange at beissbarth.com
Thu Aug 6 00:59:29 EST 2009
I solved part of my problem. The flash now gets detected during boot up. I had to change the compatible property from ""amd,s25sl12800", "jedec-flash"" to ""amd,m25p80", "jedec-flash"".
What remains is creating the mtd partitions which are specified in the device tree as follows
partition at 0 {
label = "firmware";
reg = <0x0 0x800000>;
};
partition at 800000 {
label = "rootfs";
reg = <0x800000 0x800000>;
};
During boot no partitions are created and "cat /proc/mtd" just gives me
dev: size erasesize name
mtd0: 01000000 00010000 "spi32766.0"
Any ideas?
Regards,
Matthias.
> -----Original Message-----
> From:
> linuxppc-dev-bounces+matthias.lange=beissbarth.com at lists.ozlab
> s.org
> [mailto:linuxppc-dev-bounces+matthias.lange=beissbarth.com at lis
ts.ozlabs.org] On Behalf Of EXTERNAL Lange Matthias (AA-DGW/ENG1)
> Sent: Wednesday, August 05, 2009 9:17 AM
> To: linuxppc-dev at ozlabs.org
> Subject: Spansion S25FL128-Flash and MTD
>
> Hi,
>
> 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,
> Matthias.
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev at lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
>
More information about the Linuxppc-dev
mailing list