* [PATCH] arm: dts: Add pnor label for wspoon and romulus
@ 2016-11-11 4:02 Joel Stanley
2016-11-11 8:02 ` Cédric Le Goater
0 siblings, 1 reply; 4+ messages in thread
From: Joel Stanley @ 2016-11-11 4:02 UTC (permalink / raw)
To: openbmc; +Cc: Cyril Bur, Cédric Le Goater
This is required by userspace (pflash) to identify the PNOR.
Signed-off-by: Joel Stanley <joel@jms.id.au>
---
arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts | 1 +
arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts | 1 +
2 files changed, 2 insertions(+)
diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts b/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts
index 4c4c547fe412..c23627ec5e84 100644
--- a/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts
@@ -40,6 +40,7 @@
flash@0 {
status = "okay";
+ label = "pnor";
};
};
diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts b/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
index 7badbda288d3..75c6b68950f9 100644
--- a/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
@@ -40,6 +40,7 @@
flash@0 {
status = "okay";
+ label = "pnor";
};
};
--
2.10.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] arm: dts: Add pnor label for wspoon and romulus
2016-11-11 4:02 [PATCH] arm: dts: Add pnor label for wspoon and romulus Joel Stanley
@ 2016-11-11 8:02 ` Cédric Le Goater
2016-11-14 5:21 ` Joel Stanley
0 siblings, 1 reply; 4+ messages in thread
From: Cédric Le Goater @ 2016-11-11 8:02 UTC (permalink / raw)
To: Joel Stanley, openbmc; +Cc: Cyril Bur
On 11/11/2016 05:02 AM, Joel Stanley wrote:
> This is required by userspace (pflash) to identify the PNOR.
>
> Signed-off-by: Joel Stanley <joel@jms.id.au>
> ---
> arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts | 1 +
> arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts | 1 +
> 2 files changed, 2 insertions(+)
>
> diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts b/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts
> index 4c4c547fe412..c23627ec5e84 100644
> --- a/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts
> +++ b/arch/arm/boot/dts/aspeed-bmc-opp-romulus.dts
> @@ -40,6 +40,7 @@
>
> flash@0 {
> status = "okay";
> + label = "pnor";
> };
> };
>
> diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts b/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
> index 7badbda288d3..75c6b68950f9 100644
> --- a/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
> +++ b/arch/arm/boot/dts/aspeed-bmc-opp-witherspoon.dts
> @@ -40,6 +40,7 @@
>
> flash@0 {
> status = "okay";
> + label = "pnor";
> };
> };
>
>
So, according to :
Documentation/devicetree/bindings/mtd/jedec,spi-nor.txt
Documentation/devicetree/bindings/mtd/partitions.txt
we can not label the flash module node but we can label the
partition instead. Would a patch like below fit the need ?
Here is what we get on a palmetto and an EVB, the approach
are different.
root@palmetto:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00060000 00001000 "u-boot"
mtd1: 00020000 00001000 "u-boot-env"
mtd2: 00280000 00001000 "kernel"
mtd3: 001c0000 00001000 "initramfs"
mtd4: 01740000 00001000 "rofs"
mtd5: 00400000 00001000 "rwfs"
mtd6: 02000000 00010000 "1e630000.spi:pnor@0"
root@evb-ast2500:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00060000 00001000 "u-boot"
mtd1: 00020000 00001000 "u-boot-env"
mtd2: 00280000 00001000 "kernel"
mtd3: 001c0000 00001000 "initramfs"
mtd4: 01740000 00001000 "rofs"
mtd5: 00400000 00001000 "rwfs"
mtd6: 02000000 00010000 "pnor"
The partition definitions probably belongs to the machine dts.
And a udev rules would also fit the purpose I think.
Cheers,
C.
From 614e34a070c852f36d7f277e4fda0da1f67293c8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= <clg@kaod.org>
Date: Fri, 11 Nov 2016 08:53:45 +0100
Subject: [PATCH] ARM: dts: aspeed: remove label and use partitions
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
arch/arm/boot/dts/aspeed-bmc-opp-flash-layout.dtsi | 5 ++++-
arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts | 3 +--
arch/arm/boot/dts/aspeed-g5.dtsi | 9 +++++++++
3 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-flash-layout.dtsi b/arch/arm/boot/dts/aspeed-bmc-opp-flash-layout.dtsi
index ca8639b52f6d..be57e7b11bac 100644
--- a/arch/arm/boot/dts/aspeed-bmc-opp-flash-layout.dtsi
+++ b/arch/arm/boot/dts/aspeed-bmc-opp-flash-layout.dtsi
@@ -1,7 +1,9 @@
/* This file is the label for the bmc primary flash and its partitions */
- label = "bmc";
+
+ partitions {
#address-cells = < 1 >;
#size-cells = < 1 >;
+ compatible = "fixed-partitions";
u-boot {
reg = < 0 0x60000 >;
label = "u-boot";
@@ -26,3 +28,4 @@
reg = < 0x1c00000 0x400000 >;
label = "rwfs";
};
+ };
\ No newline at end of file
diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts b/arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts
index 0fd60c4eafad..8fe248f4d531 100644
--- a/arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts
+++ b/arch/arm/boot/dts/aspeed-bmc-opp-palmetto.dts
@@ -58,10 +58,9 @@
#address-cells = <1>;
#size-cells = <0>;
compatible = "aspeed,ast2400-smc";
- flash {
+ pnor@0 {
reg = < 0 >;
compatible = "jedec,spi-nor" ;
- label = "pnor";
};
};
};
diff --git a/arch/arm/boot/dts/aspeed-g5.dtsi b/arch/arm/boot/dts/aspeed-g5.dtsi
index be95fd42dbd7..53bb2472664e 100644
--- a/arch/arm/boot/dts/aspeed-g5.dtsi
+++ b/arch/arm/boot/dts/aspeed-g5.dtsi
@@ -62,6 +62,15 @@
reg = < 0 >;
compatible = "jedec,spi-nor";
status = "disabled";
+ partitions {
+ compatible = "fixed-partitions";
+ #address-cells = < 1 >;
+ #size-cells = < 1 >;
+ pnor@0 {
+ reg = < 0x0 0x2000000 >;
+ };
+ };
+
};
flash@1 {
reg = < 1 >;
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] arm: dts: Add pnor label for wspoon and romulus
2016-11-11 8:02 ` Cédric Le Goater
@ 2016-11-14 5:21 ` Joel Stanley
2016-11-14 12:29 ` Cédric Le Goater
0 siblings, 1 reply; 4+ messages in thread
From: Joel Stanley @ 2016-11-14 5:21 UTC (permalink / raw)
To: Cédric Le Goater; +Cc: OpenBMC Maillist, Cyril Bur
On Fri, Nov 11, 2016 at 6:32 PM, Cédric Le Goater <clg@kaod.org> wrote:
> So, according to :
>
> Documentation/devicetree/bindings/mtd/jedec,spi-nor.txt
> Documentation/devicetree/bindings/mtd/partitions.txt
>
> we can not label the flash module node but we can label the
> partition instead. Would a patch like below fit the need ?
> Here is what we get on a palmetto and an EVB, the approach
> are different.
Okay. That's annoying.
Is there a reason we can't coax the ast2400 version to call it just
'pnor' as well?
>
> root@palmetto:~# cat /proc/mtd
> dev: size erasesize name
> mtd0: 00060000 00001000 "u-boot"
> mtd1: 00020000 00001000 "u-boot-env"
> mtd2: 00280000 00001000 "kernel"
> mtd3: 001c0000 00001000 "initramfs"
> mtd4: 01740000 00001000 "rofs"
> mtd5: 00400000 00001000 "rwfs"
> mtd6: 02000000 00010000 "1e630000.spi:pnor@0"
>
> root@evb-ast2500:~# cat /proc/mtd
> dev: size erasesize name
> mtd0: 00060000 00001000 "u-boot"
> mtd1: 00020000 00001000 "u-boot-env"
> mtd2: 00280000 00001000 "kernel"
> mtd3: 001c0000 00001000 "initramfs"
> mtd4: 01740000 00001000 "rofs"
> mtd5: 00400000 00001000 "rwfs"
> mtd6: 02000000 00010000 "pnor"
>
> The partition definitions probably belongs to the machine dts.
>
> And a udev rules would also fit the purpose I think.
What would you suggest? A symlink to create a /dev/pnor node?
Cheers,
Joel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] arm: dts: Add pnor label for wspoon and romulus
2016-11-14 5:21 ` Joel Stanley
@ 2016-11-14 12:29 ` Cédric Le Goater
0 siblings, 0 replies; 4+ messages in thread
From: Cédric Le Goater @ 2016-11-14 12:29 UTC (permalink / raw)
To: Joel Stanley; +Cc: OpenBMC Maillist, Cyril Bur
On 11/14/2016 06:21 AM, Joel Stanley wrote:
> On Fri, Nov 11, 2016 at 6:32 PM, Cédric Le Goater <clg@kaod.org> wrote:
>> So, according to :
>>
>> Documentation/devicetree/bindings/mtd/jedec,spi-nor.txt
>> Documentation/devicetree/bindings/mtd/partitions.txt
>>
>> we can not label the flash module node but we can label the
>> partition instead. Would a patch like below fit the need ?
>> Here is what we get on a palmetto and an EVB, the approach
>> are different.
>
> Okay. That's annoying.
>
> Is there a reason we can't coax the ast2400 version to call it just
> 'pnor' as well?
none. that was a proposal for different solutions.
>>
>> root@palmetto:~# cat /proc/mtd
>> dev: size erasesize name
>> mtd0: 00060000 00001000 "u-boot"
>> mtd1: 00020000 00001000 "u-boot-env"
>> mtd2: 00280000 00001000 "kernel"
>> mtd3: 001c0000 00001000 "initramfs"
>> mtd4: 01740000 00001000 "rofs"
>> mtd5: 00400000 00001000 "rwfs"
>> mtd6: 02000000 00010000 "1e630000.spi:pnor@0"
we can do a strstr when parsing /proc/mtd. This is probably the
best solution to simply handle compatibility.
>> root@evb-ast2500:~# cat /proc/mtd
>> dev: size erasesize name
>> mtd0: 00060000 00001000 "u-boot"
>> mtd1: 00020000 00001000 "u-boot-env"
>> mtd2: 00280000 00001000 "kernel"
>> mtd3: 001c0000 00001000 "initramfs"
>> mtd4: 01740000 00001000 "rofs"
>> mtd5: 00400000 00001000 "rwfs"
>> mtd6: 02000000 00010000 "pnor"
The problem here is that we need to know the size of the pnor ...
>>
>> The partition definitions probably belongs to the machine dts.
>>
>> And a udev rules would also fit the purpose I think.
>
> What would you suggest? A symlink to create a /dev/pnor node?
yes. like we did for the vuart. we will need to find a udev
attribute for it. I think this is the cleanest.
Cheers,
C.
>
> Cheers,
>
> Joel
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-11-14 12:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-11 4:02 [PATCH] arm: dts: Add pnor label for wspoon and romulus Joel Stanley
2016-11-11 8:02 ` Cédric Le Goater
2016-11-14 5:21 ` Joel Stanley
2016-11-14 12:29 ` Cédric Le Goater
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.