* 440EP NOR Flash Mapping with DTS
@ 2017-07-17 0:31 Thomas Besemer
2017-07-17 0:58 ` Segher Boessenkool
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Besemer @ 2017-07-17 0:31 UTC (permalink / raw)
To: linuxppc-dev
[-- Attachment #1: Type: text/plain, Size: 1833 bytes --]
I'm trying to map some NOR flash in via DTS on a Yosemite
style 440EP board. I've tried a few different things, below
showing my latest attempt. During Kernel boot, it does not
appear to detect the device, as no messages are emitted.
Flash is Spansion S29GL256P, base address 0xFE000000.
DTS:
EBC0: ebc {
compatible = "ibm,ebc-440ep", "ibm,ebc-440gp", "ibm,ebc";
dcr-reg = <0x012 0x002>;
#address-cells = <2>;
#size-cells = <1>;
clock-frequency = <0>; /* Filled in by zImage */
interrupts = <0x5 0x1>;
interrupt-parent = <&UIC1>;
nor_flash@FE0000000,0 {
compatible = "amd,p29gl256p", "cfi-flash";
#bank-width = <2>;
reg = <0xFE000000 0x02000000>;
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "Kernel";
reg = <0x00000000 0x00180000>;
};
partition@180000 {
label = "OS Filesystem";
reg = <0x00180000 0x01DE0000>;
};
};
};
DTS appears to parse:
# pwd
/proc/device-tree/plb/opb/ebc
# find nor_flash@FE0000000,0/
nor_flash@FE0000000,0/
nor_flash@FE0000000,0/compatible
nor_flash@FE0000000,0/partition@0
nor_flash@FE0000000,0/partition@0/label
nor_flash@FE0000000,0/partition@0/reg
nor_flash@FE0000000,0/partition@0/name
nor_flash@FE0000000,0/#address-cells
nor_flash@FE0000000,0/#bank-width
nor_flash@FE0000000,0/#size-cells
nor_flash@FE0000000,0/reg
nor_flash@FE0000000,0/partition@180000
nor_flash@FE0000000,0/partition@180000/label
nor_flash@FE0000000,0/partition@180000/reg
nor_flash@FE0000000,0/partition@180000/name
nor_flash@FE0000000,0/name
I'm sure this is some sort of syntax error on my part.
Any suggestions?
[-- Attachment #2: Type: text/html, Size: 2349 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: 440EP NOR Flash Mapping with DTS
2017-07-17 0:31 440EP NOR Flash Mapping with DTS Thomas Besemer
@ 2017-07-17 0:58 ` Segher Boessenkool
2017-07-19 22:09 ` Thomas Besemer
0 siblings, 1 reply; 3+ messages in thread
From: Segher Boessenkool @ 2017-07-17 0:58 UTC (permalink / raw)
To: Thomas Besemer; +Cc: linuxppc-dev
On Sun, Jul 16, 2017 at 05:31:05PM -0700, Thomas Besemer wrote:
> I'm trying to map some NOR flash in via DTS on a Yosemite
> style 440EP board. I've tried a few different things, below
> showing my latest attempt. During Kernel boot, it does not
> appear to detect the device, as no messages are emitted.
>
> Flash is Spansion S29GL256P, base address 0xFE000000.
>
> EBC0: ebc {
> compatible = "ibm,ebc-440ep", "ibm,ebc-440gp", "ibm,ebc";
> dcr-reg = <0x012 0x002>;
> #address-cells = <2>;
> #size-cells = <1>;
> clock-frequency = <0>; /* Filled in by zImage */
> interrupts = <0x5 0x1>;
> interrupt-parent = <&UIC1>;
>
> nor_flash@FE0000000,0 {
@0,fe000000
> reg = <0xFE000000 0x02000000>;
reg = <0 0xfe000000 0x02000000>;
Cheers,
Segher
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: 440EP NOR Flash Mapping with DTS
2017-07-17 0:58 ` Segher Boessenkool
@ 2017-07-19 22:09 ` Thomas Besemer
0 siblings, 0 replies; 3+ messages in thread
From: Thomas Besemer @ 2017-07-19 22:09 UTC (permalink / raw)
To: Segher Boessenkool; +Cc: linuxppc-dev
On Sun, Jul 16, 2017 at 5:58 PM, Segher Boessenkool
<segher@kernel.crashing.org> wrote:
> On Sun, Jul 16, 2017 at 05:31:05PM -0700, Thomas Besemer wrote:
>> I'm trying to map some NOR flash in via DTS on a Yosemite
>> style 440EP board. I've tried a few different things, below
>> showing my latest attempt. During Kernel boot, it does not
>> appear to detect the device, as no messages are emitted.
>>
>> Flash is Spansion S29GL256P, base address 0xFE000000.
>>
>> EBC0: ebc {
>> compatible = "ibm,ebc-440ep", "ibm,ebc-440gp", "ibm,ebc";
>> dcr-reg = <0x012 0x002>;
>> #address-cells = <2>;
>> #size-cells = <1>;
>> clock-frequency = <0>; /* Filled in by zImage */
>> interrupts = <0x5 0x1>;
>> interrupt-parent = <&UIC1>;
>>
>> nor_flash@FE0000000,0 {
>
> @0,fe000000
>
>> reg = <0xFE000000 0x02000000>;
>
> reg = <0 0xfe000000 0x02000000>;
>
>
> Cheers,
>
>
> Segher
I'm still having trouble with this, and think it's a DTS syntax problem. I did
load up kernel with some printk()'s in key areas, and it was not finding the
device due to invalid ranges. I simply added 'ranges;' to the EBC entry,
it detected, but did not properly map in MTD's. Here is summary of warnings
on DTS, full DTS, and what it looks like mapped in.
I will note that I can't find many examples on this, and my syntax is not much
different than what was originally checked in. I suspect that the
'ranges' field
is wrong, but I can't find documentation on what fields represent.
Thanks.
DTB Warning:
Warning (ranges_format): /plb/opb/ebc has empty "ranges" property but
its #address-cells (2) differs from /plb/opb (1)
DTB Entry:
POB0: opb {
compatible = "ibm,opb-440ep", "ibm,opb-440gp", "ibm,opb";
#address-cells = <1>;
#size-cells = <1>;
/* Bamboo is oddball in the 44x world and doesn't use the ERPN
* bits.
*/
ranges = <0x00000000 0x00000000 0x00000000 0x80000000
0x80000000 0x00000000 0x80000000 0x80000000>;
interrupt-parent = <&UIC1>;
interrupts = <0x7 0x4>;
clock-frequency = <0>; /* Filled in by zImage */
EBC0: ebc {
compatible = "ibm,ebc-440ep", "ibm,ebc-440gp", "ibm,ebc";
dcr-reg = <0x012 0x002>;
clock-frequency = <0>; /* Filled in by zImage */
interrupts = <0x5 0x1>;
interrupt-parent = <&UIC1>;
#address-cells = <2>;
#size-cells = <1>;
ranges; /* WITHOUT THIS, CHIP NOT FOUND */
nor_flash@0,FE000000 {
compatible = "amd,s29gl256p", "cfi-flash";
bank-width = <2>;
reg = <0 0xFE000000 0x02000000>;
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "Kernel";
reg = <0x00000000 0x00180000>;
};
partition@180000 {
label = "OS Filesystem";
reg = <0x00180000 0x01DE0000>;
};
};
};
Result MTD:
# cat /proc/mtd
dev: size erasesize name
mtd0: 02000000 00020000 "fe000000.nor_flash"
#
Boot Messages:
[ 6.272519] fe000000.nor_flash: Found 1 x16 devices at 0x0 in 16-bit bank. Ma
nufacturer ID 0x000001 Chip ID 0x002201
[ 6.282969] Amd/Fujitsu Extended Query Table at 0x0040
[ 6.288094] Amd/Fujitsu Extended Query version 1.3.
[ 6.293132] number of CFI chips: 1
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-07-19 22:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-17 0:31 440EP NOR Flash Mapping with DTS Thomas Besemer
2017-07-17 0:58 ` Segher Boessenkool
2017-07-19 22:09 ` Thomas Besemer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).