linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ralph Sennhauser <ralph.sennhauser@gmail.com>
To: linux-arm-kernel@lists.infradead.org
Cc: Gregory Clement <gregory.clement@free-electrons.com>,
	Imre Kaloz <kaloz@openwrt.org>,
	Jason Cooper <jason@lakedaemon.net>, Andrew Lunn <andrew@lunn.ch>,
	Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Russell King <linux@armlinux.org.uk>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	Ralph Sennhauser <ralph.sennhauser@gmail.com>
Subject: [PATCH 09/13] ARM: dts: armada-385-linksys: partition layout is board specific
Date: Sun, 21 May 2017 14:48:58 +0200	[thread overview]
Message-ID: <20170521124903.11050-10-ralph.sennhauser@gmail.com> (raw)
In-Reply-To: <20170521124903.11050-1-ralph.sennhauser@gmail.com>

Move the partition layout to individual boards. The Linksys WRT 3200 ACM
(Rango) comes with a 256MiB nand flash chip and different layout.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>

---

Dismissed alternatives:

  a) Partition layouts as fragments for use with overlay. While the only
  alternative which might be worth considering it depends on optional
  overlay support. So should be selected by the target or at least be in
  the defconfig. Also feels like the mechanism wasn't intended to be
  used like this. Also bloats the dtbS.

  b) Adding a separate node for each variant would require to delete the
  others in the individual dts, just not enabling them isn't enough.

  c) Use partition layout dtsi which can be included separately. Two more
  dtsi for now.

  d) Delete and recreate partitions / nand node for Rango.

  e) Make partitions child nodes of a partition-layout node to ease
  defining custom layouts. Somewhat big of a change
---
 arch/arm/boot/dts/armada-385-linksys-caiman.dts | 67 +++++++++++++++++++++++++
 arch/arm/boot/dts/armada-385-linksys-cobra.dts  | 67 +++++++++++++++++++++++++
 arch/arm/boot/dts/armada-385-linksys-shelby.dts | 67 +++++++++++++++++++++++++
 arch/arm/boot/dts/armada-385-linksys.dtsi       | 64 +----------------------
 4 files changed, 202 insertions(+), 63 deletions(-)

diff --git a/arch/arm/boot/dts/armada-385-linksys-caiman.dts b/arch/arm/boot/dts/armada-385-linksys-caiman.dts
index 05e854a..ee669ae 100644
--- a/arch/arm/boot/dts/armada-385-linksys-caiman.dts
+++ b/arch/arm/boot/dts/armada-385-linksys-caiman.dts
@@ -102,3 +102,70 @@
 		label = "caiman:white:sata";
 	};
 };
+
+&nand {
+	/* 128MiB */
+
+	partition@0 {
+		label = "u-boot";
+		reg = <0x0000000 0x200000>;  /* 2MiB */
+		read-only;
+	};
+
+	partition@100000 {
+		label = "u_env";
+		reg = <0x200000 0x40000>;    /* 256KiB */
+	};
+
+	partition@140000 {
+		label = "s_env";
+		reg = <0x240000 0x40000>;    /* 256KiB */
+	};
+
+	partition@900000 {
+		label = "devinfo";
+		reg = <0x900000 0x100000>;   /* 1MiB */
+		read-only;
+	};
+
+	/* kernel1 overlaps with rootfs1 by design */
+	partition@a00000 {
+		label = "kernel1";
+		reg = <0xa00000 0x2800000>;  /* 40MiB */
+	};
+
+	partition@1000000 {
+		label = "rootfs1";
+		reg = <0x1000000 0x2200000>;  /* 34MiB */
+	};
+
+	/* kernel2 overlaps with rootfs2 by design */
+	partition@3200000 {
+		label = "kernel2";
+		reg = <0x3200000 0x2800000>; /* 40MiB */
+	};
+
+	partition@3800000 {
+		label = "rootfs2";
+		reg = <0x3800000 0x2200000>; /* 34MiB */
+	};
+
+	/*
+	 * 38MiB, last MiB is for the BBT, not writable
+	 */
+	partition@5a00000 {
+		label = "syscfg";
+		reg = <0x5a00000 0x2600000>;
+	};
+
+	/*
+	 * Unused area between "s_env" and "devinfo".
+	 * Moved here because otherwise the renumbered
+	 * partitions would break the bootloader
+	 * supplied bootargs
+	 */
+	partition@180000 {
+		label = "unused_area";
+		reg = <0x280000 0x680000>;   /* 6.5MiB */
+	};
+};
diff --git a/arch/arm/boot/dts/armada-385-linksys-cobra.dts b/arch/arm/boot/dts/armada-385-linksys-cobra.dts
index 5b1662b..5169ca8 100644
--- a/arch/arm/boot/dts/armada-385-linksys-cobra.dts
+++ b/arch/arm/boot/dts/armada-385-linksys-cobra.dts
@@ -102,3 +102,70 @@
 		label = "cobra:white:sata";
 	};
 };
+
+&nand {
+	/* 128MiB */
+
+	partition@0 {
+		label = "u-boot";
+		reg = <0x0000000 0x200000>;  /* 2MiB */
+		read-only;
+	};
+
+	partition@100000 {
+		label = "u_env";
+		reg = <0x200000 0x40000>;    /* 256KiB */
+	};
+
+	partition@140000 {
+		label = "s_env";
+		reg = <0x240000 0x40000>;    /* 256KiB */
+	};
+
+	partition@900000 {
+		label = "devinfo";
+		reg = <0x900000 0x100000>;   /* 1MiB */
+		read-only;
+	};
+
+	/* kernel1 overlaps with rootfs1 by design */
+	partition@a00000 {
+		label = "kernel1";
+		reg = <0xa00000 0x2800000>;  /* 40MiB */
+	};
+
+	partition@1000000 {
+		label = "rootfs1";
+		reg = <0x1000000 0x2200000>;  /* 34MiB */
+	};
+
+	/* kernel2 overlaps with rootfs2 by design */
+	partition@3200000 {
+		label = "kernel2";
+		reg = <0x3200000 0x2800000>; /* 40MiB */
+	};
+
+	partition@3800000 {
+		label = "rootfs2";
+		reg = <0x3800000 0x2200000>; /* 34MiB */
+	};
+
+	/*
+	 * 38MiB, last MiB is for the BBT, not writable
+	 */
+	partition@5a00000 {
+		label = "syscfg";
+		reg = <0x5a00000 0x2600000>;
+	};
+
+	/*
+	 * Unused area between "s_env" and "devinfo".
+	 * Moved here because otherwise the renumbered
+	 * partitions would break the bootloader
+	 * supplied bootargs
+	 */
+	partition@180000 {
+		label = "unused_area";
+		reg = <0x280000 0x680000>;   /* 6.5MiB */
+	};
+};
diff --git a/arch/arm/boot/dts/armada-385-linksys-shelby.dts b/arch/arm/boot/dts/armada-385-linksys-shelby.dts
index a909371..94aa35b 100644
--- a/arch/arm/boot/dts/armada-385-linksys-shelby.dts
+++ b/arch/arm/boot/dts/armada-385-linksys-shelby.dts
@@ -102,3 +102,70 @@
 		label = "shelby:white:sata";
 	};
 };
+
+&nand {
+	/* 128MiB */
+
+	partition@0 {
+		label = "u-boot";
+		reg = <0x0000000 0x200000>;  /* 2MiB */
+		read-only;
+	};
+
+	partition@100000 {
+		label = "u_env";
+		reg = <0x200000 0x40000>;    /* 256KiB */
+	};
+
+	partition@140000 {
+		label = "s_env";
+		reg = <0x240000 0x40000>;    /* 256KiB */
+	};
+
+	partition@900000 {
+		label = "devinfo";
+		reg = <0x900000 0x100000>;   /* 1MiB */
+		read-only;
+	};
+
+	/* kernel1 overlaps with rootfs1 by design */
+	partition@a00000 {
+		label = "kernel1";
+		reg = <0xa00000 0x2800000>;  /* 40MiB */
+	};
+
+	partition@1000000 {
+		label = "rootfs1";
+		reg = <0x1000000 0x2200000>;  /* 34MiB */
+	};
+
+	/* kernel2 overlaps with rootfs2 by design */
+	partition@3200000 {
+		label = "kernel2";
+		reg = <0x3200000 0x2800000>; /* 40MiB */
+	};
+
+	partition@3800000 {
+		label = "rootfs2";
+		reg = <0x3800000 0x2200000>; /* 34MiB */
+	};
+
+	/*
+	 * 38MiB, last MiB is for the BBT, not writable
+	 */
+	partition@5a00000 {
+		label = "syscfg";
+		reg = <0x5a00000 0x2600000>;
+	};
+
+	/*
+	 * Unused area between "s_env" and "devinfo".
+	 * Moved here because otherwise the renumbered
+	 * partitions would break the bootloader
+	 * supplied bootargs
+	 */
+	partition@180000 {
+		label = "unused_area";
+		reg = <0x280000 0x680000>;   /* 6.5MiB */
+	};
+};
diff --git a/arch/arm/boot/dts/armada-385-linksys.dtsi b/arch/arm/boot/dts/armada-385-linksys.dtsi
index 4049eaf..485abff 100644
--- a/arch/arm/boot/dts/armada-385-linksys.dtsi
+++ b/arch/arm/boot/dts/armada-385-linksys.dtsi
@@ -172,74 +172,12 @@
 };
 
 &nand {
+	/* 128MiB or 256MiB */
 	status = "okay";
 	num-cs = <1>;
 	marvell,nand-keep-config;
 	marvell,nand-enable-arbiter;
 	nand-on-flash-bbt;
-
-	partition@0 {
-		label = "u-boot";
-		reg = <0x0000000 0x200000>;  /* 2MiB */
-		read-only;
-	};
-
-	partition@100000 {
-		label = "u_env";
-		reg = <0x200000 0x40000>;    /* 256KiB */
-	};
-
-	partition@140000 {
-		label = "s_env";
-		reg = <0x240000 0x40000>;    /* 256KiB */
-	};
-
-	partition@900000 {
-		label = "devinfo";
-		reg = <0x900000 0x100000>;   /* 1MiB */
-		read-only;
-	};
-
-	/* kernel1 overlaps with rootfs1 by design */
-	partition@a00000 {
-		label = "kernel1";
-		reg = <0xa00000 0x2800000>;  /* 40MiB */
-	};
-
-	partition@1000000 {
-		label = "rootfs1";
-		reg = <0x1000000 0x2200000>;  /* 34MiB */
-	};
-
-	/* kernel2 overlaps with rootfs2 by design */
-	partition@3200000 {
-		label = "kernel2";
-		reg = <0x3200000 0x2800000>; /* 40MiB */
-	};
-
-	partition@3800000 {
-		label = "rootfs2";
-		reg = <0x3800000 0x2200000>; /* 34MiB */
-	};
-
-	/*
-	 * 38MiB, last MiB is for the BBT, not writable
-	 */
-	partition@5a00000 {
-		label = "syscfg";
-		reg = <0x5a00000 0x2600000>;
-	};
-
-	/*
-	 * Unused area between "s_env" and "devinfo".
-	 * Moved here because otherwise the renumbered
-	 * partitions would break the bootloader
-	 * supplied bootargs
-	 */
-	partition@180000 {
-		label = "unused_area";
-		reg = <0x280000 0x680000>;   /* 6.5MiB */
-	};
 };
 
 &mdio {
-- 
2.10.2

  parent reply	other threads:[~2017-05-21 12:50 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-21 12:48 [PATCH 00/13] Linksys WRT3200ACM (Rango) support Ralph Sennhauser
2017-05-21 12:48 ` [PATCH 01/13] ARM: dts: armada-385-linksys: flatten dtsi Ralph Sennhauser
2017-05-21 12:48 ` [PATCH 02/13] ARM: dts: armada-385-linksys: label nodes Ralph Sennhauser
2017-05-22 14:49   ` Andrew Lunn
2017-05-21 12:48 ` [PATCH 03/13] ARM: dts: armada-385-linksys: flatten dependants Ralph Sennhauser
2017-05-22 14:51   ` Andrew Lunn
2017-05-21 12:48 ` [PATCH 04/13] ARM: dts: armada-385-linksys: drop redundant properties in dependants Ralph Sennhauser
2017-05-22 14:52   ` Andrew Lunn
2017-05-21 12:48 ` [PATCH 05/13] ARM: dts: armada-385-linksys: bm pools by label order Ralph Sennhauser
2017-05-21 12:48 ` [PATCH 06/13] ARM: dts: armada-385-linksys: usb3 label cleanup Ralph Sennhauser
2017-05-22 14:55   ` Andrew Lunn
2017-05-22 18:13     ` Ralph Sennhauser
2017-05-21 12:48 ` [PATCH 07/13] ARM: dts: armada-385-linksys: drop leagcy DSA bindings Ralph Sennhauser
2017-05-22 14:55   ` Andrew Lunn
2017-05-21 12:48 ` [PATCH 08/13] ARM: dts: armada-385-linksys: use binary unit prefixes Ralph Sennhauser
2017-05-22 15:00   ` Andrew Lunn
2017-05-22 18:24     ` Ralph Sennhauser
2017-05-23  8:33       ` Ralph Sennhauser
2017-05-23 12:02         ` Andrew Lunn
2017-05-21 12:48 ` Ralph Sennhauser [this message]
2017-05-23 12:04   ` [PATCH 09/13] ARM: dts: armada-385-linksys: partition layout is board specific Andrew Lunn
2017-05-21 12:48 ` [PATCH 10/13] ARM: dts: armada-385-linksys: group pins in pinctrl Ralph Sennhauser
2017-05-23 12:06   ` Andrew Lunn
2017-05-21 12:49 ` [PATCH 11/13] ARM: dts: armada-385-linksys: fixup button node names Ralph Sennhauser
2017-05-23 12:07   ` Andrew Lunn
2017-05-21 12:49 ` [PATCH 12/13] clk: mvebu: add support for 1866MHz variants Ralph Sennhauser
2017-05-23 12:15   ` Andrew Lunn
2017-05-23 19:55     ` Ralph Sennhauser
2017-05-21 12:49 ` [PATCH 13/13] ARM: dts: mvebu: add support for Linksys WRT3200ACM (Rango) Ralph Sennhauser
2017-05-23 12:18   ` Andrew Lunn
2017-05-23 12:25   ` Andrew Lunn
2017-05-23 20:04     ` Ralph Sennhauser
2017-05-22 18:42 ` [PATCH 00/13] Linksys WRT3200ACM (Rango) support Imre Kaloz
2017-05-23 15:22 ` Gregory CLEMENT
2017-05-23 16:11   ` Ralph Sennhauser

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170521124903.11050-10-ralph.sennhauser@gmail.com \
    --to=ralph.sennhauser@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=devicetree@vger.kernel.org \
    --cc=gregory.clement@free-electrons.com \
    --cc=jason@lakedaemon.net \
    --cc=kaloz@openwrt.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=mark.rutland@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=sebastian.hesselbarth@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).