From patchwork Wed May 23 17:14:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 919210 X-Patchwork-Delegate: boris.brezillon@free-electrons.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="QO2hMduF"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Duc6mTzZ"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40rfPY1rpwz9rxs for ; Thu, 24 May 2018 03:18:57 +1000 (AEST) 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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version: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:In-Reply-To:References: List-Owner; bh=soohZ0toBD/E6TCrLp3YC7y521U3rqGPtqMBV4mQ3OQ=; b=QO2hMduFVygp29 Wqn39sXQI+Rv/mSkBO1jo7X6BnGTUfLb95OwR3Fw/sNarT0bf1iUtluLPqzejWFgLSH2fWxd/4neB 2J9s7P69jWqKocbi1pLNNjzgBzI9WAA/5h/bwWzRMccgZB0D30Eo6Zx+0aDU3i8n/UTjQryx2hRgi iPgdMB4AVC7tpEuCQ3twA6v4kFnJ13IXROvm/I7BJYWdSQqTFBh4pfVFnQTxF7haYLZKclTyXgHsG RwnEYb9co/a540FfO5/rL+jfWNMUSkwYwzZqa6XDDyflOAcW3DVrwCtZpwdIspUeYBDLplnfLlwtZ MZ//90fwpZgZHFDzIZdA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fLXPQ-0002ZD-PY; Wed, 23 May 2018 17:18:44 +0000 Received: from mail-wr0-x243.google.com ([2a00:1450:400c:c0c::243]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fLXNN-0001XB-IK for linux-mtd@lists.infradead.org; Wed, 23 May 2018 17:16:48 +0000 Received: by mail-wr0-x243.google.com with SMTP id k5-v6so15771953wrn.3 for ; Wed, 23 May 2018 10:16:26 -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:mime-version :content-transfer-encoding; bh=maCAsaauckkk2GQYKObGd7LmQkzvZq+j7hs6Iw9+l9A=; b=Duc6mTzZnLjd0aNiy4DGQVDjoL6RFO1+MitI58hja3a/E5EKw0dmlyLhQqODDysmkr CEzxaAPmUM3s6Rj3WZhNELD5t4WOY7DHj4DKKqmUS2R+TXUrfgTmTDstxfQZj82Fsibt 97h+2tBkJAKkRmFeVlvzjQxodpgN1NNKnV0LcDxRtNMJ6LLWDNz0OkrUg3GVuOleeUJh mLkg7UeV8//5BmXWRfanD7Klpd/2hvbJFg1HMuWkXoEqVErUbtAKZkaQeVqzrS66KgYT SoDtGPG/HhzxWjxsMSOyfDuX7TP+uZq9fr4G/lx3+dw0rBpORdgXlQ6p07edJmpZ+vW+ OFAw== 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:mime-version :content-transfer-encoding; bh=maCAsaauckkk2GQYKObGd7LmQkzvZq+j7hs6Iw9+l9A=; b=XiwE6yUZKMDSo6BphAsclJp4rU+uVam1vKSbBokdKxLpKbWB/K0Nbez0OHvowz0UD/ 7BxL7+PuMk0rXezlyCsBeEi90YoydXhCF92khcVk6DPPo7ABFyX+rQQM3sg2HWVW94uv srgSrgGfBp+p6/2ZA2Pidr790BJ9m4pEVA/mb1DsSKxR4oNWnlxuicHxcXqtmK8Xcevk WMkX9eLpYMTUDti/xkqeCNV7bygB1dlVUAUKtnBgCcop0O8rbCBIUiiiQkCSpyVBUc+r fhPeyyq3adfRH20Aclxkb4LH7VnaQfoEEeS0KdTRUoZ5xGAJRklkaadqBKWiRhTiPI5U plkg== X-Gm-Message-State: ALKqPwcWuQTZfI4PEJq4viTvXi7fplaefUDrvUjuPAR9JZGLGUYLZeKA WDCJWUVGDZVOQOHNzSPf7h8= X-Google-Smtp-Source: AB8JxZoDZPnqb/5Dgli4mvR5sk3rkvgT7OhXBtUMbKgMvDWlFXwn3yXCH4UzEKhoTsxWX/z2LUKHIA== X-Received: by 2002:a19:4dc5:: with SMTP id a188-v6mr2215319lfb.99.1527095784933; Wed, 23 May 2018 10:16:24 -0700 (PDT) Received: from linux-veee.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id l24-v6sm3474724lje.42.2018.05.23.10.16.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 23 May 2018 10:16:23 -0700 (PDT) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: Brian Norris , David Woodhouse , Boris Brezillon , Marek Vasut , Richard Weinberger , Rob Herring Subject: [PATCH 1/2] dt-bindings: mtd: explicitly describe nesting partitions Date: Wed, 23 May 2018 19:14:47 +0200 Message-Id: <20180523171448.26234-1-zajec5@gmail.com> X-Mailer: git-send-email 2.13.6 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180523_101637_696864_5E1BEBA9 X-CRM114-Status: GOOD ( 16.90 ) X-Spam-Score: 0.1 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2a00:1450:400c:c0c:0:0:0:243 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (zajec5[at]gmail.com) 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (zajec5[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, linux-mtd@lists.infradead.org, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= , Jonas Gorski Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Rafał Miłecki Documentation was already saying that fixed and dynamic partitioning can be mixed but was missing a clear description and examples. This commit adds a proper description of how partitions can be nested and how layout descriptions can be mixed. This addition is important for partitions that contain subpartitions. It's useful to have parent partition registered (e.g. for overwriting purposes) as well as children ones (for accessing data). It's also required when a single partition uses different partitioning method (e.g. vendor custom "firmware" partition with kernel + rootfs). Signed-off-by: Rafał Miłecki --- Another example (I couldn't put in Documentation yet) could be: flash@0 { partitions { compatible = "fixed-partitions"; #address-cells = <1>; #size-cells = <1>; partition@0 { label = "bootloader"; reg = <0x0000000 0x0100000>; read-only; }; firmware@100000 { label = "firmware"; reg = <0x0100000 0x0800000>; compatible = "brcm,trx"; }; }; }; It's probably even more realistic one, but we don't describe "brcm,trx" binding yet. The purpose of above description would be to: 1) Specify fixed partitions (they never change) 2) Tell operating system that "firmware" partition uses Broadcom's TRX format which is a container for 2 or 3 subpartitions (usually: kernel and rootfs). --- .../devicetree/bindings/mtd/partition.txt | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/Documentation/devicetree/bindings/mtd/partition.txt b/Documentation/devicetree/bindings/mtd/partition.txt index a8f382642ba9..2214167ce88a 100644 --- a/Documentation/devicetree/bindings/mtd/partition.txt +++ b/Documentation/devicetree/bindings/mtd/partition.txt @@ -14,6 +14,13 @@ method is used for a given flash device. To describe the method there should be a subnode of the flash device that is named 'partitions'. It must have a 'compatible' property, which is used to identify the method to use. +When a single partition is represented with a DT node (it depends on a used +format) it may also be described using above rules ('compatible' and optionally +some extra properties / subnodes). It allows describing more complex, +hierarchical (multi-level) layouts and should be used if there is some +significant relation between partitions or some partition internally uses +another partitioning method. + Available bindings are listed in the "partitions" subdirectory. @@ -73,6 +80,24 @@ flash@0 { uimage@100000 { reg = <0x0100000 0x200000>; }; + + calibration@200000 { + label = "calibration"; + reg = <0x0200000 0x100000>; + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "wifi0"; + reg = <0x000000 0x080000>; + }; + + partition@80000 { + label = "wifi1"; + reg = <0x080000 0x080000>; + }; + }; }; };