* [PATCH 1/2] arm64: dts: marvell: mcbin: Adding SPI-NOR Flash Config
@ 2019-02-11 17:14 ` Alexander Syring
0 siblings, 0 replies; 9+ messages in thread
From: Alexander Syring @ 2019-02-11 17:14 UTC (permalink / raw)
To: Russell King
Cc: Jason Cooper, Andrew Lunn, Gregory Clement,
Sebastian Hesselbarth, Rob Herring, Mark Rutland,
linux-arm-kernel, devicetree, linux-kernel, Alexander Syring
According to U-Boot dts file enabling the SPI-NOR flash for use in
Linux
Signed-off-by: Alexander Syring <alex@asyring.de>
---
.../boot/dts/marvell/armada-8040-mcbin.dtsi | 23 +++++++++++++++----
1 file changed, 18 insertions(+), 5 deletions(-)
diff --git a/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi b/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi
index 329f8ceeebea..83994ff46e2d 100644
--- a/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi
+++ b/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi
@@ -333,11 +333,24 @@
status = "okay";
spi-flash@0 {
- compatible = "st,w25q32";
- spi-max-frequency = <50000000>;
- reg = <0>;
- };
-};
+ compatible = "st,w25q32", "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <50000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+
+ partition@0 {
+ label = "U-Boot";
+ reg = <0 0x200000>;
+ };
+ partition@400000 {
+ label = "U-Boot Env";
+ reg = <0x200000 0xce0000>;
+ };
+ };
+ };
+};
&cp1_usb3_0 {
/* CPS Lane 2 - CON7 */
--
2.20.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 1/2] arm64: dts: marvell: mcbin: Adding SPI-NOR Flash Config
@ 2019-02-11 17:14 ` Alexander Syring
0 siblings, 0 replies; 9+ messages in thread
From: Alexander Syring @ 2019-02-11 17:14 UTC (permalink / raw)
To: Russell King
Cc: Mark Rutland, Andrew Lunn, Jason Cooper, devicetree,
Gregory Clement, linux-kernel, Alexander Syring, Rob Herring,
linux-arm-kernel, Sebastian Hesselbarth
According to U-Boot dts file enabling the SPI-NOR flash for use in
Linux
Signed-off-by: Alexander Syring <alex@asyring.de>
---
.../boot/dts/marvell/armada-8040-mcbin.dtsi | 23 +++++++++++++++----
1 file changed, 18 insertions(+), 5 deletions(-)
diff --git a/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi b/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi
index 329f8ceeebea..83994ff46e2d 100644
--- a/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi
+++ b/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi
@@ -333,11 +333,24 @@
status = "okay";
spi-flash@0 {
- compatible = "st,w25q32";
- spi-max-frequency = <50000000>;
- reg = <0>;
- };
-};
+ compatible = "st,w25q32", "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <50000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+
+ partition@0 {
+ label = "U-Boot";
+ reg = <0 0x200000>;
+ };
+ partition@400000 {
+ label = "U-Boot Env";
+ reg = <0x200000 0xce0000>;
+ };
+ };
+ };
+};
&cp1_usb3_0 {
/* CPS Lane 2 - CON7 */
--
2.20.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 1/2] arm64: dts: marvell: mcbin: Adding SPI-NOR Flash Config
@ 2019-02-11 17:14 ` Alexander Syring
0 siblings, 0 replies; 9+ messages in thread
From: Alexander Syring @ 2019-02-11 17:14 UTC (permalink / raw)
To: Russell King
Cc: Mark Rutland, Andrew Lunn, Jason Cooper, devicetree,
Gregory Clement, linux-kernel, Alexander Syring, Rob Herring,
linux-arm-kernel, Sebastian Hesselbarth
According to U-Boot dts file enabling the SPI-NOR flash for use in
Linux
Signed-off-by: Alexander Syring <alex@asyring.de>
---
.../boot/dts/marvell/armada-8040-mcbin.dtsi | 23 +++++++++++++++----
1 file changed, 18 insertions(+), 5 deletions(-)
diff --git a/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi b/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi
index 329f8ceeebea..83994ff46e2d 100644
--- a/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi
+++ b/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi
@@ -333,11 +333,24 @@
status = "okay";
spi-flash@0 {
- compatible = "st,w25q32";
- spi-max-frequency = <50000000>;
- reg = <0>;
- };
-};
+ compatible = "st,w25q32", "jedec,spi-nor";
+ reg = <0>;
+ spi-max-frequency = <50000000>;
+
+ partitions {
+ compatible = "fixed-partitions";
+
+ partition@0 {
+ label = "U-Boot";
+ reg = <0 0x200000>;
+ };
+ partition@400000 {
+ label = "U-Boot Env";
+ reg = <0x200000 0xce0000>;
+ };
+ };
+ };
+};
&cp1_usb3_0 {
/* CPS Lane 2 - CON7 */
--
2.20.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] arm64: dts: marvell: mcbin: Adding SPI-NOR Flash Config
2019-02-11 17:14 ` Alexander Syring
@ 2019-02-11 17:19 ` Russell King - ARM Linux admin
-1 siblings, 0 replies; 9+ messages in thread
From: Russell King - ARM Linux admin @ 2019-02-11 17:19 UTC (permalink / raw)
To: Alexander Syring
Cc: Jason Cooper, Andrew Lunn, Gregory Clement,
Sebastian Hesselbarth, Rob Herring, Mark Rutland,
linux-arm-kernel, devicetree, linux-kernel
On Mon, Feb 11, 2019 at 06:14:01PM +0100, Alexander Syring wrote:
> According to U-Boot dts file enabling the SPI-NOR flash for use in
> Linux
Some of us already use u-boot on Macchiatobin, and have u-boot in SPI
NOR flash. The u-boot environment is stored at 0x3f0000 currently.
Merging this will break existing setups, especially when we use
u-boot-tools to access the environment from within Linux.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] arm64: dts: marvell: mcbin: Adding SPI-NOR Flash Config
@ 2019-02-11 17:19 ` Russell King - ARM Linux admin
0 siblings, 0 replies; 9+ messages in thread
From: Russell King - ARM Linux admin @ 2019-02-11 17:19 UTC (permalink / raw)
To: Alexander Syring
Cc: Mark Rutland, Andrew Lunn, Jason Cooper, devicetree,
Gregory Clement, linux-kernel, Rob Herring, linux-arm-kernel,
Sebastian Hesselbarth
On Mon, Feb 11, 2019 at 06:14:01PM +0100, Alexander Syring wrote:
> According to U-Boot dts file enabling the SPI-NOR flash for use in
> Linux
Some of us already use u-boot on Macchiatobin, and have u-boot in SPI
NOR flash. The u-boot environment is stored at 0x3f0000 currently.
Merging this will break existing setups, especially when we use
u-boot-tools to access the environment from within Linux.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] arm64: dts: marvell: mcbin: Adding SPI-NOR Flash Config
2019-02-11 17:14 ` Alexander Syring
@ 2019-02-11 17:27 ` Marc Zyngier
-1 siblings, 0 replies; 9+ messages in thread
From: Marc Zyngier @ 2019-02-11 17:27 UTC (permalink / raw)
To: Alexander Syring, Russell King
Cc: Jason Cooper, Andrew Lunn, Gregory Clement,
Sebastian Hesselbarth, Rob Herring, Mark Rutland,
linux-arm-kernel, devicetree, linux-kernel
On 11/02/2019 17:14, Alexander Syring wrote:
> According to U-Boot dts file enabling the SPI-NOR flash for use in
> Linux
>
> Signed-off-by: Alexander Syring <alex@asyring.de>
> ---
> .../boot/dts/marvell/armada-8040-mcbin.dtsi | 23 +++++++++++++++----
> 1 file changed, 18 insertions(+), 5 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi b/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi
> index 329f8ceeebea..83994ff46e2d 100644
> --- a/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi
> +++ b/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi
> @@ -333,11 +333,24 @@
> status = "okay";
>
> spi-flash@0 {
> - compatible = "st,w25q32";
> - spi-max-frequency = <50000000>;
> - reg = <0>;
> - };
> -};
> + compatible = "st,w25q32", "jedec,spi-nor";
> + reg = <0>;
> + spi-max-frequency = <50000000>;
> +
> + partitions {
> + compatible = "fixed-partitions";
> +
> + partition@0 {
> + label = "U-Boot";
> + reg = <0 0x200000>;
> + };
> + partition@400000 {
> + label = "U-Boot Env";
> + reg = <0x200000 0xce0000>;
> + };
> + };
> + };
> +};
>
> &cp1_usb3_0 {
> /* CPS Lane 2 - CON7 */
>
Really?
My mcbin SPI flash doesn't have this partitioning, and doesn't have
u-boot at all. This should be provided by the bootloader itself, and not
baked into the reference DT.
Thanks,
M.
--
Jazz is not dead. It just smells funny...
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] arm64: dts: marvell: mcbin: Adding SPI-NOR Flash Config
@ 2019-02-11 17:27 ` Marc Zyngier
0 siblings, 0 replies; 9+ messages in thread
From: Marc Zyngier @ 2019-02-11 17:27 UTC (permalink / raw)
To: Alexander Syring, Russell King
Cc: Mark Rutland, Andrew Lunn, Jason Cooper, devicetree,
Gregory Clement, linux-kernel, Rob Herring, linux-arm-kernel,
Sebastian Hesselbarth
On 11/02/2019 17:14, Alexander Syring wrote:
> According to U-Boot dts file enabling the SPI-NOR flash for use in
> Linux
>
> Signed-off-by: Alexander Syring <alex@asyring.de>
> ---
> .../boot/dts/marvell/armada-8040-mcbin.dtsi | 23 +++++++++++++++----
> 1 file changed, 18 insertions(+), 5 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi b/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi
> index 329f8ceeebea..83994ff46e2d 100644
> --- a/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi
> +++ b/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi
> @@ -333,11 +333,24 @@
> status = "okay";
>
> spi-flash@0 {
> - compatible = "st,w25q32";
> - spi-max-frequency = <50000000>;
> - reg = <0>;
> - };
> -};
> + compatible = "st,w25q32", "jedec,spi-nor";
> + reg = <0>;
> + spi-max-frequency = <50000000>;
> +
> + partitions {
> + compatible = "fixed-partitions";
> +
> + partition@0 {
> + label = "U-Boot";
> + reg = <0 0x200000>;
> + };
> + partition@400000 {
> + label = "U-Boot Env";
> + reg = <0x200000 0xce0000>;
> + };
> + };
> + };
> +};
>
> &cp1_usb3_0 {
> /* CPS Lane 2 - CON7 */
>
Really?
My mcbin SPI flash doesn't have this partitioning, and doesn't have
u-boot at all. This should be provided by the bootloader itself, and not
baked into the reference DT.
Thanks,
M.
--
Jazz is not dead. It just smells funny...
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] arm64: dts: marvell: mcbin: Adding SPI-NOR Flash Config
2019-02-11 17:27 ` Marc Zyngier
@ 2019-02-11 17:31 ` Russell King - ARM Linux admin
-1 siblings, 0 replies; 9+ messages in thread
From: Russell King - ARM Linux admin @ 2019-02-11 17:31 UTC (permalink / raw)
To: Marc Zyngier
Cc: Alexander Syring, Jason Cooper, Andrew Lunn, Gregory Clement,
Sebastian Hesselbarth, Rob Herring, Mark Rutland,
linux-arm-kernel, devicetree, linux-kernel
On Mon, Feb 11, 2019 at 05:27:37PM +0000, Marc Zyngier wrote:
> On 11/02/2019 17:14, Alexander Syring wrote:
> > According to U-Boot dts file enabling the SPI-NOR flash for use in
> > Linux
> >
> > Signed-off-by: Alexander Syring <alex@asyring.de>
> > ---
> > .../boot/dts/marvell/armada-8040-mcbin.dtsi | 23 +++++++++++++++----
> > 1 file changed, 18 insertions(+), 5 deletions(-)
> >
> > diff --git a/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi b/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi
> > index 329f8ceeebea..83994ff46e2d 100644
> > --- a/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi
> > +++ b/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi
> > @@ -333,11 +333,24 @@
> > status = "okay";
> >
> > spi-flash@0 {
> > - compatible = "st,w25q32";
> > - spi-max-frequency = <50000000>;
> > - reg = <0>;
> > - };
> > -};
> > + compatible = "st,w25q32", "jedec,spi-nor";
> > + reg = <0>;
> > + spi-max-frequency = <50000000>;
> > +
> > + partitions {
> > + compatible = "fixed-partitions";
> > +
> > + partition@0 {
> > + label = "U-Boot";
> > + reg = <0 0x200000>;
> > + };
> > + partition@400000 {
> > + label = "U-Boot Env";
> > + reg = <0x200000 0xce0000>;
> > + };
> > + };
> > + };
> > +};
> >
> > &cp1_usb3_0 {
> > /* CPS Lane 2 - CON7 */
> >
>
> Really?
>
> My mcbin SPI flash doesn't have this partitioning, and doesn't have
> u-boot at all. This should be provided by the bootloader itself, and not
> baked into the reference DT.
Exactly.
Simple solution for the above. Instead of the above, create
/etc/fw_env.config with:
/dev/mtdblock0 0x200000 0x10000
Then its possible to read and write the u-boot environment using
fw_printenv and fw_setenv. No partitions are required, and IMHO
are pointless for such a scenario.
That will allow those of us with a different SPI flash layout and
already have this in /etc/fw_env.config:
/dev/mtdblock0 0x3f0000 0x10000
to not experience any breakage.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/2] arm64: dts: marvell: mcbin: Adding SPI-NOR Flash Config
@ 2019-02-11 17:31 ` Russell King - ARM Linux admin
0 siblings, 0 replies; 9+ messages in thread
From: Russell King - ARM Linux admin @ 2019-02-11 17:31 UTC (permalink / raw)
To: Marc Zyngier
Cc: Mark Rutland, Andrew Lunn, Jason Cooper, devicetree,
Gregory Clement, Alexander Syring, linux-kernel, Rob Herring,
linux-arm-kernel, Sebastian Hesselbarth
On Mon, Feb 11, 2019 at 05:27:37PM +0000, Marc Zyngier wrote:
> On 11/02/2019 17:14, Alexander Syring wrote:
> > According to U-Boot dts file enabling the SPI-NOR flash for use in
> > Linux
> >
> > Signed-off-by: Alexander Syring <alex@asyring.de>
> > ---
> > .../boot/dts/marvell/armada-8040-mcbin.dtsi | 23 +++++++++++++++----
> > 1 file changed, 18 insertions(+), 5 deletions(-)
> >
> > diff --git a/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi b/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi
> > index 329f8ceeebea..83994ff46e2d 100644
> > --- a/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi
> > +++ b/arch/arm64/boot/dts/marvell/armada-8040-mcbin.dtsi
> > @@ -333,11 +333,24 @@
> > status = "okay";
> >
> > spi-flash@0 {
> > - compatible = "st,w25q32";
> > - spi-max-frequency = <50000000>;
> > - reg = <0>;
> > - };
> > -};
> > + compatible = "st,w25q32", "jedec,spi-nor";
> > + reg = <0>;
> > + spi-max-frequency = <50000000>;
> > +
> > + partitions {
> > + compatible = "fixed-partitions";
> > +
> > + partition@0 {
> > + label = "U-Boot";
> > + reg = <0 0x200000>;
> > + };
> > + partition@400000 {
> > + label = "U-Boot Env";
> > + reg = <0x200000 0xce0000>;
> > + };
> > + };
> > + };
> > +};
> >
> > &cp1_usb3_0 {
> > /* CPS Lane 2 - CON7 */
> >
>
> Really?
>
> My mcbin SPI flash doesn't have this partitioning, and doesn't have
> u-boot at all. This should be provided by the bootloader itself, and not
> baked into the reference DT.
Exactly.
Simple solution for the above. Instead of the above, create
/etc/fw_env.config with:
/dev/mtdblock0 0x200000 0x10000
Then its possible to read and write the u-boot environment using
fw_printenv and fw_setenv. No partitions are required, and IMHO
are pointless for such a scenario.
That will allow those of us with a different SPI flash layout and
already have this in /etc/fw_env.config:
/dev/mtdblock0 0x3f0000 0x10000
to not experience any breakage.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line in suburbia: sync at 12.1Mbps down 622kbps up
According to speedtest.net: 11.9Mbps down 500kbps up
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2019-02-11 17:36 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-11 17:14 [PATCH 1/2] arm64: dts: marvell: mcbin: Adding SPI-NOR Flash Config Alexander Syring
2019-02-11 17:14 ` Alexander Syring
2019-02-11 17:14 ` Alexander Syring
2019-02-11 17:19 ` Russell King - ARM Linux admin
2019-02-11 17:19 ` Russell King - ARM Linux admin
2019-02-11 17:27 ` Marc Zyngier
2019-02-11 17:27 ` Marc Zyngier
2019-02-11 17:31 ` Russell King - ARM Linux admin
2019-02-11 17:31 ` Russell King - ARM Linux admin
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.