diff mbox series

ARM: dts: armada-xp: fix Armada XP boards NAND description

Message ID 20190215153042.8973-1-thomas.petazzoni@bootlin.com (mailing list archive)
State Mainlined, archived
Commit 6fc979179c98d2591784937d5618edc3e5cd31c1
Headers show
Series ARM: dts: armada-xp: fix Armada XP boards NAND description | expand

Commit Message

Thomas Petazzoni Feb. 15, 2019, 3:30 p.m. UTC
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(-)

Comments

Gregory CLEMENT Feb. 19, 2019, 2:59 p.m. UTC | #1
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
>
diff mbox series

Patch

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>;
+						};
 					};
 				};
 			};