* Question on flash node on device tree source
@ 2009-09-08 12:18 Angelo
[not found] ` <859952.87558.qm-NHjxwdBWIhzyX4RqAA4FmIglqE1Y4D90QQ4Iyu8u01E@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Angelo @ 2009-09-08 12:18 UTC (permalink / raw)
To: devicetree-discuss-mnsaURCQ41sdnm+yROfE0A
[-- Attachment #1.1: Type: text/plain, Size: 2218 bytes --]
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@80000020 {
compatible = "fsl,mpc5121ads-localbus";
#address-cells = <2>;
#size-cells = <1>;
reg = <0000020 40>;
ranges = <0 0 fc000000 04000000
2 0 82000000 00008000>;
flash@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@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
[-- Attachment #1.2: Type: text/html, Size: 4400 bytes --]
[-- Attachment #2: Type: text/plain, Size: 192 bytes --]
_______________________________________________
devicetree-discuss mailing list
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
https://lists.ozlabs.org/listinfo/devicetree-discuss
^ permalink raw reply [flat|nested] 2+ messages in thread[parent not found: <859952.87558.qm-NHjxwdBWIhzyX4RqAA4FmIglqE1Y4D90QQ4Iyu8u01E@public.gmane.org>]
* Re: Question on flash node on device tree source [not found] ` <859952.87558.qm-NHjxwdBWIhzyX4RqAA4FmIglqE1Y4D90QQ4Iyu8u01E@public.gmane.org> @ 2009-09-09 4:46 ` David Gibson 0 siblings, 0 replies; 2+ messages in thread From: David Gibson @ 2009-09-09 4:46 UTC (permalink / raw) To: Angelo; +Cc: devicetree-discuss-mnsaURCQ41sdnm+yROfE0A On Tue, Sep 08, 2009 at 12:18:33PM +0000, Angelo wrote: > 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@80000020 { > compatible = "fsl,mpc5121ads-localbus"; > #address-cells = <2>; > #size-cells = <1>; > reg = <0000020 40>; > > ranges = <0 0 fc000000 04000000 > 2 0 82000000 00008000>; First thing to note is that you're still using dts-v0 syntax. You really want to change over to dts-v1 syntax. Which probably means you've based your tree on an old version of the mpc512eev dts. All the in-kernel dts files have already been converted and current versions of dtc don't support the old syntax. > flash@0,0 { > device_type = "rom"; > compatible = "direct-mapped"; Second thing to note is that you're using the old, broken flash binding. You should use the new binding described in Documentation/powerpc/dts-bindings/mtd-physmap.txt. > 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@0,0 { > device_type = "rom"; > compatible = "direct-mapped"; > probe-type = "CFI"; > reg = <0 0 1000000>; And the third thing to note is that 0x1000000 == 16MB. > #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: That would be because you told the kernel your flash was 16MB in the 'reg' property. Looks like you missed out a zero. -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-09-09 4:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-08 12:18 Question on flash node on device tree source Angelo
[not found] ` <859952.87558.qm-NHjxwdBWIhzyX4RqAA4FmIglqE1Y4D90QQ4Iyu8u01E@public.gmane.org>
2009-09-09 4:46 ` David Gibson
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox