From patchwork Sun May 21 12:48:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ralph Sennhauser X-Patchwork-Id: 9739031 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3C34860328 for ; Sun, 21 May 2017 12:51:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2C7E028643 for ; Sun, 21 May 2017 12:51:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 21194286DC; Sun, 21 May 2017 12:51:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6183328643 for ; Sun, 21 May 2017 12:51:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=4hfJYWlXak2a8rovIU2m43I6Igy5xZrB6qlWRS6wLs8=; b=Rpy8chSqUhMizXhCPAv3X+TGo0 dVocqYHcjjujNZRBtTRfMYHhzw1sVfjCngXUj5tPak6lXc8peZbuUwCzgivy1myOjIsHWoLdINdLb nuWMgU3/Qy7zqgsnpHeyUXPdljgNGih7q4kldj27XFOq0gt3XDLOXp8cshZ4snAwpWItxPAABJetD WwlPaSPlYN7zF02EwhDugQzp7IpICoAaQDQ48c+J1Wql/ukplRS9/A9pmMvlYa+yICREQ6UveAUPv gUKfdHUWejxdnM8qJNE56N72xtqpfA7SA9y8Hmn9bdaXJa59iXNcYbIG3+NcXpDaptrHoOXafHkoD 6EnXewvw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dCQKb-0007jn-Bh; Sun, 21 May 2017 12:51:33 +0000 Received: from mail-vk0-x244.google.com ([2607:f8b0:400c:c05::244]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dCQJB-0004wC-Hw for linux-arm-kernel@lists.infradead.org; Sun, 21 May 2017 12:50:10 +0000 Received: by mail-vk0-x244.google.com with SMTP id x71so3908831vkd.2 for ; Sun, 21 May 2017 05:49:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=9LsXDezLGMHBGyE5UT/3defXNA7h3ibkv+zhCwOiVtc=; b=uL0FbGJhayjBC07+1N/bt8iaKH/CFMvh+TF0V6AVW4SYNgjtTt5zVMmTBj3GVTEQnQ Oo4fyCDmmILl4uqoLMf68naI6mvIUvacEoGKC4ELUQ/wSrnWMUkEwIFeR79+56Xw0Nbe aonwSEmAXdJccc9oGmbI8K/LHwZrsVsz1dcwWl4ngVQKBX9ZxuwDrbVjt1jyh6qG82Lg 5B6zHQTcxwx0qQE/KrU310Su6v5NL1p2qVBXMYglUI7kw+NIc9M/T+zu9WhevpxH9/hm hJwlq+zCr9PF4eIAv5BVT5KenBNeU3MdSJQZlNcdxPXR5l7Nq+pRXBCHR9ZU0aF7OYgY ZVdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=9LsXDezLGMHBGyE5UT/3defXNA7h3ibkv+zhCwOiVtc=; b=t7pUcvfgoe+XQ4TmeaKrJBlKzONsJoStgs6giIQLa0ohmMlzr6XZ4k4WT57aEh/oDF ubFL3K25LCw/A512NmSPy5lB9gZ4guQ9ZU/2v4lrzH3ZVSmgZ2KFYHL7TwKP8a+/3bwj N9z94GjAC55f7zwZTAV2NFPJ8X35u5krCAC7Ilfsa0RQXgj5Q9ifTlR39Gzl9vAvgy13 hmJUnDPkl0qSjmGnuE5Vnno6WPHD6c6d12yZv8am8zJz4w0SXoyRuY9X534jxa/49TGM X7WLR2ClphAvUqnLft5iZ1NnQCIs4gVg1NPoNBeGIJOOI81DllcXWK9ZYeFSb0oKzo3q 6ZpQ== X-Gm-Message-State: AODbwcB/gFiqKCpbpgeaBizVOep/+7N5Arw1EqBKYdJPKCOIzOYDlsu9 J6meZyZI/FZgVA== X-Received: by 10.31.189.149 with SMTP id n143mr5986188vkf.138.1495370984792; Sun, 21 May 2017 05:49:44 -0700 (PDT) Received: from localhost.lan ([37.209.189.139]) by smtp.googlemail.com with ESMTPSA id q17sm2803410uab.7.2017.05.21.05.49.41 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 21 May 2017 05:49:43 -0700 (PDT) From: Ralph Sennhauser To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 09/13] ARM: dts: armada-385-linksys: partition layout is board specific Date: Sun, 21 May 2017 14:48:58 +0200 Message-Id: <20170521124903.11050-10-ralph.sennhauser@gmail.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20170521124903.11050-1-ralph.sennhauser@gmail.com> References: <20170521124903.11050-1-ralph.sennhauser@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170521_055005_950905_5F39F0A4 X-CRM114-Status: GOOD ( 14.34 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Andrew Lunn , Jason Cooper , devicetree@vger.kernel.org, Russell King , linux-kernel@vger.kernel.org, Ralph Sennhauser , Rob Herring , Gregory Clement , Imre Kaloz , Sebastian Hesselbarth MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Andrew Lunn --- 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 {