R: Question on flash node on device tree source
Angelo
s104259 at yahoo.it
Wed Sep 9 17:38:34 EST 2009
Thanks for info!
Ok I have to modify some things, but anyway:
1- dts is an old version (I know that and this isn't a problem because kernel is an old version too 2.6.x)
2- The main mistake is that I'm tring to use the NAND flash, but the DTS node that i've modified refers to NOR flash.
So i think that I must modify the following part of code:
nfc at 40000000 {
compatible = "fsl,mpc5121rev2-nfc";
reg = <40000000 100000>; // 1M at 0x40000000
interrupts = <6 8>;
interrupt-parent = < &ipic >;
#address-cells = <1>;
#size-cells = <1>;
bank-width = <1>;
write-size = <800>;
spare-size = <40>;
// ADS has two Hynix 512MB Nand flash chips in a single
// stacked package .
chips = <2>;
// UBIFS works fine on large partitions so use all of it
nand at 0 {
label = "nand";
reg = <00000000 40000000>; // Entire 1G (512M + 512M)
};
// JFFS2 really doesn't do large partitions well use UBIFS instead
//nand0 at 0 {
// label = "nand0";
// reg = <00000000 02000000>; // first 32 MB of chip 0
//};
//nand1 at 20000000 {
// label = "nand1";
// reg = <20000000 02000000>; // first 32 MB of chip 1
//};
};
This part of device tree concern nand flash controller od ads5121ev board.
In your opinion kernel obtains all flash info from device tree? or I must modify some part of kernel code?
It seems like that nand flash controller could mangae two banks of nand flash:
// JFFS2 really doesn't do large partitions well use UBIFS instead
//nand0 at 0 {
// label = "nand0";
// reg = <00000000 02000000>; // first 32 MB of chip 0
//};
//nand1 at 20000000 {
// label = "nand1";
// reg = <20000000 02000000>; // first 32 MB of chip 1
//};
What do you think? It could could be an hard work!?
Thanks in advance
@s
--- Mar 8/9/09, Angelo <s104259 at yahoo.it> ha scritto:
Da: Angelo <s104259 at yahoo.it>
Oggetto: Question on flash node on device tree source
A: devicetree-discuss at ozlabs.org
Data: Martedì 8 settembre 2009, 14:18
Hi all.
I need some info about device tree blob.
I'm testing a powerpc board (very similar to mpc512xev) with the following feature:
- 256MB flash (only 1 bank)
Changes some lines of device tree source about flash
localbus at 80000020 {
compatible = "fsl,mpc5121ads-localbus";
#address-cells = <2>;
#size-cells = <1>;
reg = <0000020 40>;
ranges = <0 0 fc000000 04000000
2 0 82000000 00008000>;
flash at 0,0 {
device_type =
"rom";
compatible = "direct-mapped";
probe-type = "CFI";
reg = <0 0 4000000>;
#address-cells = <1>;
#size-cells = <1>;
bank-width = <4>;
device-width = <2>;
partitions = <00000000 00040000 // first sector is protected
00040000 03c00000 // 60 Mb for
filesystem
03c40000 00280000 // 2.5 Mb for kernel
03ec0000 00040000 // one sector for device tree
03f00000 00100000>; // one Mb for u-boot
partition-names = "protected", "filesystem", "kernel", "device-tree", "u-boot";
};
.....
with these changes:
.....
flash at 0,0 {
device_type = "rom";
compatible = "direct-mapped";
probe-type = "CFI";
reg = <0 0 1000000>;
#address-cells = <1>;
#size-cells = <1>;
bank-width = <1>;
device-width = <1>;
partitions = <300000 200000 //uimage
400000 3200000>; // fs
partition-names = "uimage",
"fs";
};
.....
The problem is that on bootstrap stage, kernel truncate the flash memory to 16MB, so i cannot access to the whole flash. kernel messages:
mtd: partition "fs" extends beyond the end of device "60000000.flash" size truncated to 0xc00000.
I'd like to know if i have to specify into the dtb file the size of flash mem. What about nand flash controller and its functionality?
If you have more info about this, please write to me.
Thanks in advance,
@s
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ozlabs.org/pipermail/devicetree-discuss/attachments/20090909/c604f4d0/attachment-0001.htm>
More information about the devicetree-discuss
mailing list