* Spansion S25FL128-Flash and MTD
@ 2009-08-05 7:16 EXTERNAL Lange Matthias (AA-DGW/ENG1)
2009-08-05 7:45 ` Benjamin Krill
2009-08-05 14:59 ` EXTERNAL Lange Matthias (AA-DGW/ENG1)
0 siblings, 2 replies; 4+ messages in thread
From: EXTERNAL Lange Matthias (AA-DGW/ENG1) @ 2009-08-05 7:16 UTC (permalink / raw)
To: linuxppc-dev@ozlabs•org
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) i=
s 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 flas=
h as follows:
SPI_Flash: xps-spi@83400000 {
compatible =3D "xlnx,xps-spi-2.00.b";
interrupt-parent =3D <&int_ctrl>;
interrupts =3D < 3 2 >;
reg =3D < 0x83400000 0x10000 >;
xlnx,family =3D "virtex4";
xlnx,fifo-exist =3D <0x0>;
xlnx,num-offchip-ss-bits =3D <0x1>;
xlnx,num-ss-bits =3D <0x1>;
xlnx,sck-ratio =3D <0x20>;
#address-cells =3D <1>;
#size-cells =3D <1>;
nor_flash@0,1000000 {
compatible =3D "amd,s25sl12800", "jedec-flash";
reg =3D <0x0 0x1000000>;
spi-max-frequency =3D <25000000>;
bank-width =3D <1>;
device-width =3D <1>;
#address-cells =3D <1>;
#size-cells =3D <1>;
rootfs@800000 {
label =3D "rootfs";
reg =3D <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=3D=
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.
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: Spansion S25FL128-Flash and MTD
2009-08-05 7:16 Spansion S25FL128-Flash and MTD EXTERNAL Lange Matthias (AA-DGW/ENG1)
@ 2009-08-05 7:45 ` Benjamin Krill
2009-08-05 8:14 ` EXTERNAL Lange Matthias (AA-DGW/ENG1)
2009-08-05 14:59 ` EXTERNAL Lange Matthias (AA-DGW/ENG1)
1 sibling, 1 reply; 4+ messages in thread
From: Benjamin Krill @ 2009-08-05 7:45 UTC (permalink / raw)
To: EXTERNAL Lange Matthias (AA-DGW/ENG1); +Cc: linuxppc-dev@ozlabs•org
Hi,
> #address-cells = <1>;
> #size-cells = <1>;
> rootfs@800000 {
The partition must be called
partition@...
> label = "rootfs";
> reg = <0x800000 0x800000>;
> };
> };
>};
cheers
ben
^ permalink raw reply [flat|nested] 4+ messages in thread* RE: Spansion S25FL128-Flash and MTD
2009-08-05 7:45 ` Benjamin Krill
@ 2009-08-05 8:14 ` EXTERNAL Lange Matthias (AA-DGW/ENG1)
0 siblings, 0 replies; 4+ messages in thread
From: EXTERNAL Lange Matthias (AA-DGW/ENG1) @ 2009-08-05 8:14 UTC (permalink / raw)
To: Benjamin Krill; +Cc: linuxppc-dev@ozlabs•org
> Hi,
>
> > #address-cells =3D <1>;
> > #size-cells =3D <1>;
> > rootfs@800000 {
>
> The partition must be called
> partition@...
>
Thanks, though that didn't solve my problem. The naming seems to be a bug i=
n booting-without-of.txt where the example in section "CFI or JEDEC memory-=
mapped NOR flash" uses "firmware" as the node name.
Regards,
Matthias.
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: Spansion S25FL128-Flash and MTD
2009-08-05 7:16 Spansion S25FL128-Flash and MTD EXTERNAL Lange Matthias (AA-DGW/ENG1)
2009-08-05 7:45 ` Benjamin Krill
@ 2009-08-05 14:59 ` EXTERNAL Lange Matthias (AA-DGW/ENG1)
1 sibling, 0 replies; 4+ messages in thread
From: EXTERNAL Lange Matthias (AA-DGW/ENG1) @ 2009-08-05 14:59 UTC (permalink / raw)
To: linuxppc-dev@ozlabs•org
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 devi=
ce tree as follows
partition@0 {
label =3D "firmware";
reg =3D <0x0 0x800000>;
};
partition@800000 {
label =3D "rootfs";
reg =3D <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=3Dbeissbarth.com@lists•ozlab
> s.org
> [mailto:linuxppc-dev-bounces+matthias.lange=3Dbeissbarth.com@lis
ts.ozlabs.org] On Behalf Of EXTERNAL Lange Matthias (AA-DGW/ENG1)
> Sent: Wednesday, August 05, 2009 9:17 AM
> To: linuxppc-dev@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@83400000 {
> compatible =3D "xlnx,xps-spi-2.00.b";
> interrupt-parent =3D <&int_ctrl>;
> interrupts =3D < 3 2 >;
> reg =3D < 0x83400000 0x10000 >;
> xlnx,family =3D "virtex4";
> xlnx,fifo-exist =3D <0x0>;
> xlnx,num-offchip-ss-bits =3D <0x1>;
> xlnx,num-ss-bits =3D <0x1>;
> xlnx,sck-ratio =3D <0x20>;
> #address-cells =3D <1>;
> #size-cells =3D <1>;
> nor_flash@0,1000000 {
> compatible =3D "amd,s25sl12800", "jedec-flash";
> reg =3D <0x0 0x1000000>;
> spi-max-frequency =3D <25000000>;
> bank-width =3D <1>;
> device-width =3D <1>;
> #address-cells =3D <1>;
> #size-cells =3D <1>;
> rootfs@800000 {
> label =3D "rootfs";
> reg =3D <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=3D17
> ...
>
> 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@lists•ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-08-05 14:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-05 7:16 Spansion S25FL128-Flash and MTD EXTERNAL Lange Matthias (AA-DGW/ENG1)
2009-08-05 7:45 ` Benjamin Krill
2009-08-05 8:14 ` EXTERNAL Lange Matthias (AA-DGW/ENG1)
2009-08-05 14:59 ` EXTERNAL Lange Matthias (AA-DGW/ENG1)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox