From patchwork Wed May 25 21:26:46 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Moritz Fischer X-Patchwork-Id: 626460 X-Patchwork-Delegate: computersforpeace@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:1868:205::9]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3rFQQ56ylhz9sdm for ; Thu, 26 May 2016 07:29:01 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=ettus-com.20150623.gappssmtp.com header.i=@ettus-com.20150623.gappssmtp.com header.b=xUzNKKCI; dkim-atps=neutral Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1b5gKp-0006Ph-8t; Wed, 25 May 2016 21:27:23 +0000 Received: from mail-pa0-x22a.google.com ([2607:f8b0:400e:c03::22a]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1b5gKl-0006N1-F6 for linux-mtd@lists.infradead.org; Wed, 25 May 2016 21:27:20 +0000 Received: by mail-pa0-x22a.google.com with SMTP id xk12so21419960pac.0 for ; Wed, 25 May 2016 14:26:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ettus-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=/fyVlwJqAn0PEgXAlMolOCbeiP98jrOb/0joRxFcJTo=; b=xUzNKKCIYXM99Eh6pTwj/IToDs6HlCRCreQE6gXrhvk+37KlPHddKdXdows1n9lARk /AShKmFc7TumA9T5dJkJIN4G/yYd56vpykxEuJwbyGmheYbgWKKpFKOWykXFDhbxt12X KOvNZv12CWy/FScs2qbcFtRIM4Xx6afgQ+YA3FJ9btUhEnVCmFpJIaDyPkMRhG6cGJ1r 05bST5LPDRzWXofRoAAtEq47FM56S7Oa8tx4TKpp0isRpAXxoCeEvlG7xkifEvxPtfrU Vz0OYKY/zv+CzPjRN/oblWVOn7YDYPMR1xh5s8qOG2EQbjtAMmnNHknvDrVbs0QWzBfC fYLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=/fyVlwJqAn0PEgXAlMolOCbeiP98jrOb/0joRxFcJTo=; b=G4nxSTEhR/hbsvQZK1ADHVHExdQ8TAuxR92H4+vYq/+1CPyWsGbzbWSkLxEqEDKQSn HS+GzBjACdTH9+Ov5HViGbINRWRnuEae9qdcBKD5VAobzXbOTNk4KVh4+y2q/8Ofdx4v 8GKdJYXkO8TF2e7qsuz54OLrg0qOadfHe/VAzUcWVx1ceWyiZhnyfz5bc8Xa6KkK2C+T 92xvBVKS1sEsYaggKonaG/LQohnrY4/0VmKPwO6Q1KG6gFM/gq2BhkxFVd9Wpcb8We4f g9ZyA5QGoVEZTcEqYocLyYSRYbPSvGe3A+ajcgdsjmpeCR/uVcw9pEFWpKnDwIfrEeKM MoiQ== X-Gm-Message-State: ALyK8tK4B/hlQ9qwK0fYNTX54BSCyv/ppAB+r1wQIi976dqTP8lc61dtkwJJcihQ3V85a2eV X-Received: by 10.66.66.234 with SMTP id i10mr9186585pat.114.1464211618436; Wed, 25 May 2016 14:26:58 -0700 (PDT) Received: from tyrael.amer.corp.natinst.com (207-114-172-147.static.twtelecom.net. [207.114.172.147]) by smtp.gmail.com with ESMTPSA id h77sm608340pfh.95.2016.05.25.14.26.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 May 2016 14:26:57 -0700 (PDT) From: Moritz Fischer To: dwmw2@infradead.org Subject: [RFC/PATCH 1/2] doc: bindings: Add bindings documentation for mtd otp nvmem Date: Wed, 25 May 2016 14:26:46 -0700 Message-Id: <1464211607-8843-2-git-send-email-moritz.fischer@ettus.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1464211607-8843-1-git-send-email-moritz.fischer@ettus.com> References: <1464211607-8843-1-git-send-email-moritz.fischer@ettus.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160525_142719_541561_4DA11EA6 X-CRM114-Status: GOOD ( 13.21 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2607:f8b0:400e:c03:0:0:0:22a listed in] [list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 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.20 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, Moritz Fischer , pawel.moll@arm.com, ijc+devicetree@hellion.org.uk, boris.brezillon@free-electrons.com, linux-kernel@vger.kernel.org, robh+dt@kernel.org, linux-mtd@lists.infradead.org, galak@codeaurora.org, computersforpeace@gmail.com MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org This commit adds documentation describing the bindings for exposing mtd flash otp regions as nvmem providers via devicetree. Signed-off-by: Moritz Fischer --- .../devicetree/bindings/mtd/otp-nvmem.txt | 62 ++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 Documentation/devicetree/bindings/mtd/otp-nvmem.txt diff --git a/Documentation/devicetree/bindings/mtd/otp-nvmem.txt b/Documentation/devicetree/bindings/mtd/otp-nvmem.txt new file mode 100644 index 0000000..a83a7da --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/otp-nvmem.txt @@ -0,0 +1,62 @@ +Representing OTP regions in devicetree + +OTP regions can be represented by sub-nodes of an mtd device. + +The partition table should be a subnode of the mtd node and should be names +'otp-partitions'. This node should have the following property: + +- compatible: (required) must be 'fixed-partitions' + +OTP regions are then defined in subnodes of the partitions node. + +Required properties for OTP regions: +- reg: The region's offset and size within the mtd device + +Optional properties: +- label: The label / name for this region. If ommited, the label is taken + from the node name (excluding the unit address). + +Example: + +flash@0 { + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "uboot-spl"; + reg = <0x0 0xe0000>; + }; + partition@1 { + label = "uboot-env"; + reg = <0xe0000 0x20000>; + }; + partition@2 { + label = "uboot"; + reg = <0x100000 0x100000>; + }; + }; + + otp-partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + region@0 { + label = "factory-data"; + reg = <0x0 0x40>; + + #address-cells = <0x1>; + #size-cells = <0x1>; + + product: nvmem@0 { + reg = <0x0 0x2>; + }; + + revision: nvmem@3 { + reg = <0x3 0x2>; + }; + }; + }; +}