linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: dts: armada-xp: fix Armada XP boards NAND description
@ 2019-02-15 15:30 Thomas Petazzoni
  2019-02-19 14:59 ` Gregory CLEMENT
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Petazzoni @ 2019-02-15 15:30 UTC (permalink / raw)
  To: Jason Cooper, Andrew Lunn, Sebastian Hesselbarth, Gregory Clement
  Cc: Thomas Petazzoni, linux-arm-kernel, Miquel Raynal

Commit 3b79919946cd2cf4dac47842afc9a893acec4ed7 ("ARM: dts:
armada-370-xp: update NAND node with new bindings") updated some
Marvell Armada DT description to use the new NAND controller bindings,
but did it incorrectly for a number of boards: armada-xp-gp,
armada-xp-db and armada-xp-lenovo-ix4-300d. Due to this, the NAND is
no longer detected on those platforms.

This commit fixes that by properly using the new NAND DT binding. This
commit was runtime-tested on Armada XP GP, the two other platforms are
only compile-tested.

Fixes: 3b79919946cd2 ("ARM: dts: armada-370-xp: update NAND node with new bindings")
Cc: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 arch/arm/boot/dts/armada-xp-db.dts            | 46 +++++-----
 arch/arm/boot/dts/armada-xp-gp.dts            | 13 +--
 .../boot/dts/armada-xp-lenovo-ix4-300d.dts    | 85 ++++++++++---------
 3 files changed, 76 insertions(+), 68 deletions(-)

diff --git a/arch/arm/boot/dts/armada-xp-db.dts b/arch/arm/boot/dts/armada-xp-db.dts
index f3ac7483afed..5d04dc68cf57 100644
--- a/arch/arm/boot/dts/armada-xp-db.dts
+++ b/arch/arm/boot/dts/armada-xp-db.dts
@@ -144,30 +144,32 @@
 				status = "okay";
 			};
 
-			nand@d0000 {
+			nand-controller@d0000 {
 				status = "okay";
-				label = "pxa3xx_nand-0";
-				num-cs = <1>;
-				marvell,nand-keep-config;
-				nand-on-flash-bbt;
-
-				partitions {
-					compatible = "fixed-partitions";
-					#address-cells = <1>;
-					#size-cells = <1>;
-
-					partition@0 {
-						label = "U-Boot";
-						reg = <0 0x800000>;
-					};
-					partition@800000 {
-						label = "Linux";
-						reg = <0x800000 0x800000>;
-					};
-					partition@1000000 {
-						label = "Filesystem";
-						reg = <0x1000000 0x3f000000>;
 
+				nand@0 {
+					reg = <0>;
+					label = "pxa3xx_nand-0";
+					nand-rb = <0>;
+					nand-on-flash-bbt;
+
+					partitions {
+						compatible = "fixed-partitions";
+						#address-cells = <1>;
+						#size-cells = <1>;
+
+						partition@0 {
+							label = "U-Boot";
+							reg = <0 0x800000>;
+						};
+						partition@800000 {
+							label = "Linux";
+							reg = <0x800000 0x800000>;
+						};
+						partition@1000000 {
+							label = "Filesystem";
+							reg = <0x1000000 0x3f000000>;
+						};
 					};
 				};
 			};
diff --git a/arch/arm/boot/dts/armada-xp-gp.dts b/arch/arm/boot/dts/armada-xp-gp.dts
index 1139e9469a83..b4cca507cf13 100644
--- a/arch/arm/boot/dts/armada-xp-gp.dts
+++ b/arch/arm/boot/dts/armada-xp-gp.dts
@@ -160,12 +160,15 @@
 				status = "okay";
 			};
 
-			nand@d0000 {
+			nand-controller@d0000 {
 				status = "okay";
-				label = "pxa3xx_nand-0";
-				num-cs = <1>;
-				marvell,nand-keep-config;
-				nand-on-flash-bbt;
+
+				nand@0 {
+					reg = <0>;
+					label = "pxa3xx_nand-0";
+					nand-rb = <0>;
+					nand-on-flash-bbt;
+				};
 			};
 		};
 
diff --git a/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts b/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts
index bbbb38888bb8..87dcb502f72d 100644
--- a/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts
+++ b/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts
@@ -81,49 +81,52 @@
 
 			};
 
-			nand@d0000 {
+			nand-controller@d0000 {
 				status = "okay";
-				label = "pxa3xx_nand-0";
-				num-cs = <1>;
-				marvell,nand-keep-config;
-				nand-on-flash-bbt;
-
-				partitions {
-					compatible = "fixed-partitions";
-					#address-cells = <1>;
-					#size-cells = <1>;
-
-					partition@0 {
-						label = "u-boot";
-						reg = <0x00000000 0x000e0000>;
-						read-only;
-					};
-
-					partition@e0000 {
-						label = "u-boot-env";
-						reg = <0x000e0000 0x00020000>;
-						read-only;
-					};
-
-					partition@100000 {
-						label = "u-boot-env2";
-						reg = <0x00100000 0x00020000>;
-						read-only;
-					};
-
-					partition@120000 {
-						label = "zImage";
-						reg = <0x00120000 0x00400000>;
-					};
-
-					partition@520000 {
-						label = "initrd";
-						reg = <0x00520000 0x00400000>;
-					};
 
-					partition@e00000 {
-						label = "boot";
-						reg = <0x00e00000 0x3f200000>;
+				nand@0 {
+					reg = <0>;
+					label = "pxa3xx_nand-0";
+					nand-rb = <0>;
+					nand-on-flash-bbt;
+
+					partitions {
+						compatible = "fixed-partitions";
+						#address-cells = <1>;
+						#size-cells = <1>;
+
+						partition@0 {
+							label = "u-boot";
+							reg = <0x00000000 0x000e0000>;
+							read-only;
+						};
+
+						partition@e0000 {
+							label = "u-boot-env";
+							reg = <0x000e0000 0x00020000>;
+							read-only;
+						};
+
+						partition@100000 {
+							label = "u-boot-env2";
+							reg = <0x00100000 0x00020000>;
+							read-only;
+						};
+
+						partition@120000 {
+							label = "zImage";
+							reg = <0x00120000 0x00400000>;
+						};
+
+						partition@520000 {
+							label = "initrd";
+							reg = <0x00520000 0x00400000>;
+						};
+
+						partition@e00000 {
+							label = "boot";
+							reg = <0x00e00000 0x3f200000>;
+						};
 					};
 				};
 			};
-- 
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] 2+ messages in thread

* Re: [PATCH] ARM: dts: armada-xp: fix Armada XP boards NAND description
  2019-02-15 15:30 [PATCH] ARM: dts: armada-xp: fix Armada XP boards NAND description Thomas Petazzoni
@ 2019-02-19 14:59 ` Gregory CLEMENT
  0 siblings, 0 replies; 2+ messages in thread
From: Gregory CLEMENT @ 2019-02-19 14:59 UTC (permalink / raw)
  To: Thomas Petazzoni, Jason Cooper, Andrew Lunn,
	Sebastian Hesselbarth
  Cc: Thomas Petazzoni, linux-arm-kernel, Miquel Raynal

Hi Thomas,
 
 On ven., févr. 15 2019, Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:

> Commit 3b79919946cd2cf4dac47842afc9a893acec4ed7 ("ARM: dts:
> armada-370-xp: update NAND node with new bindings") updated some
> Marvell Armada DT description to use the new NAND controller bindings,
> but did it incorrectly for a number of boards: armada-xp-gp,
> armada-xp-db and armada-xp-lenovo-ix4-300d. Due to this, the NAND is
> no longer detected on those platforms.
>
> This commit fixes that by properly using the new NAND DT binding. This
> commit was runtime-tested on Armada XP GP, the two other platforms are
> only compile-tested.
>
> Fixes: 3b79919946cd2 ("ARM: dts: armada-370-xp: update NAND node with new bindings")
> Cc: Miquel Raynal <miquel.raynal@bootlin.com>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>

Applied on mvebu/fixes

Thanks,

Gregory
> ---
>  arch/arm/boot/dts/armada-xp-db.dts            | 46 +++++-----
>  arch/arm/boot/dts/armada-xp-gp.dts            | 13 +--
>  .../boot/dts/armada-xp-lenovo-ix4-300d.dts    | 85 ++++++++++---------
>  3 files changed, 76 insertions(+), 68 deletions(-)
>
> diff --git a/arch/arm/boot/dts/armada-xp-db.dts b/arch/arm/boot/dts/armada-xp-db.dts
> index f3ac7483afed..5d04dc68cf57 100644
> --- a/arch/arm/boot/dts/armada-xp-db.dts
> +++ b/arch/arm/boot/dts/armada-xp-db.dts
> @@ -144,30 +144,32 @@
>  				status = "okay";
>  			};
>  
> -			nand@d0000 {
> +			nand-controller@d0000 {
>  				status = "okay";
> -				label = "pxa3xx_nand-0";
> -				num-cs = <1>;
> -				marvell,nand-keep-config;
> -				nand-on-flash-bbt;
> -
> -				partitions {
> -					compatible = "fixed-partitions";
> -					#address-cells = <1>;
> -					#size-cells = <1>;
> -
> -					partition@0 {
> -						label = "U-Boot";
> -						reg = <0 0x800000>;
> -					};
> -					partition@800000 {
> -						label = "Linux";
> -						reg = <0x800000 0x800000>;
> -					};
> -					partition@1000000 {
> -						label = "Filesystem";
> -						reg = <0x1000000 0x3f000000>;
>  
> +				nand@0 {
> +					reg = <0>;
> +					label = "pxa3xx_nand-0";
> +					nand-rb = <0>;
> +					nand-on-flash-bbt;
> +
> +					partitions {
> +						compatible = "fixed-partitions";
> +						#address-cells = <1>;
> +						#size-cells = <1>;
> +
> +						partition@0 {
> +							label = "U-Boot";
> +							reg = <0 0x800000>;
> +						};
> +						partition@800000 {
> +							label = "Linux";
> +							reg = <0x800000 0x800000>;
> +						};
> +						partition@1000000 {
> +							label = "Filesystem";
> +							reg = <0x1000000 0x3f000000>;
> +						};
>  					};
>  				};
>  			};
> diff --git a/arch/arm/boot/dts/armada-xp-gp.dts b/arch/arm/boot/dts/armada-xp-gp.dts
> index 1139e9469a83..b4cca507cf13 100644
> --- a/arch/arm/boot/dts/armada-xp-gp.dts
> +++ b/arch/arm/boot/dts/armada-xp-gp.dts
> @@ -160,12 +160,15 @@
>  				status = "okay";
>  			};
>  
> -			nand@d0000 {
> +			nand-controller@d0000 {
>  				status = "okay";
> -				label = "pxa3xx_nand-0";
> -				num-cs = <1>;
> -				marvell,nand-keep-config;
> -				nand-on-flash-bbt;
> +
> +				nand@0 {
> +					reg = <0>;
> +					label = "pxa3xx_nand-0";
> +					nand-rb = <0>;
> +					nand-on-flash-bbt;
> +				};
>  			};
>  		};
>  
> diff --git a/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts b/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts
> index bbbb38888bb8..87dcb502f72d 100644
> --- a/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts
> +++ b/arch/arm/boot/dts/armada-xp-lenovo-ix4-300d.dts
> @@ -81,49 +81,52 @@
>  
>  			};
>  
> -			nand@d0000 {
> +			nand-controller@d0000 {
>  				status = "okay";
> -				label = "pxa3xx_nand-0";
> -				num-cs = <1>;
> -				marvell,nand-keep-config;
> -				nand-on-flash-bbt;
> -
> -				partitions {
> -					compatible = "fixed-partitions";
> -					#address-cells = <1>;
> -					#size-cells = <1>;
> -
> -					partition@0 {
> -						label = "u-boot";
> -						reg = <0x00000000 0x000e0000>;
> -						read-only;
> -					};
> -
> -					partition@e0000 {
> -						label = "u-boot-env";
> -						reg = <0x000e0000 0x00020000>;
> -						read-only;
> -					};
> -
> -					partition@100000 {
> -						label = "u-boot-env2";
> -						reg = <0x00100000 0x00020000>;
> -						read-only;
> -					};
> -
> -					partition@120000 {
> -						label = "zImage";
> -						reg = <0x00120000 0x00400000>;
> -					};
> -
> -					partition@520000 {
> -						label = "initrd";
> -						reg = <0x00520000 0x00400000>;
> -					};
>  
> -					partition@e00000 {
> -						label = "boot";
> -						reg = <0x00e00000 0x3f200000>;
> +				nand@0 {
> +					reg = <0>;
> +					label = "pxa3xx_nand-0";
> +					nand-rb = <0>;
> +					nand-on-flash-bbt;
> +
> +					partitions {
> +						compatible = "fixed-partitions";
> +						#address-cells = <1>;
> +						#size-cells = <1>;
> +
> +						partition@0 {
> +							label = "u-boot";
> +							reg = <0x00000000 0x000e0000>;
> +							read-only;
> +						};
> +
> +						partition@e0000 {
> +							label = "u-boot-env";
> +							reg = <0x000e0000 0x00020000>;
> +							read-only;
> +						};
> +
> +						partition@100000 {
> +							label = "u-boot-env2";
> +							reg = <0x00100000 0x00020000>;
> +							read-only;
> +						};
> +
> +						partition@120000 {
> +							label = "zImage";
> +							reg = <0x00120000 0x00400000>;
> +						};
> +
> +						partition@520000 {
> +							label = "initrd";
> +							reg = <0x00520000 0x00400000>;
> +						};
> +
> +						partition@e00000 {
> +							label = "boot";
> +							reg = <0x00e00000 0x3f200000>;
> +						};
>  					};
>  				};
>  			};
> -- 
> 2.20.1
>

-- 
Gregory Clement, Bootlin
Embedded Linux and Kernel engineering
http://bootlin.com

_______________________________________________
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] 2+ messages in thread

end of thread, other threads:[~2019-02-19 15:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-15 15:30 [PATCH] ARM: dts: armada-xp: fix Armada XP boards NAND description Thomas Petazzoni
2019-02-19 14:59 ` Gregory CLEMENT

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).