From patchwork Wed Sep 26 06:39:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda Delgado X-Patchwork-Id: 974874 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="nMHqt2ug"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="D/aSQ+Zg"; 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 42KpHG1k2cz9s2P for ; Wed, 26 Sep 2018 16:40:58 +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: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=WPQ2GEB59wQgaDCu7F6wN/bP/EP2sDhd/J9ttsSw3f8=; b=nMHqt2ugXEcEui YZALfYgQVb6drP2YjsrRdMN0UheQic0K8AAFwSrNvnZHaMSeT0zMC+Ct+JSfw9RQxnNnZVwMZC96F 9Pgj5bephPkznTy4+Vb46jdHAc/nh6Fn8Z1VpXdYt1VnK9x65/BeW2K2fxGRsBLoZ/v17nrfrCIyW XyTtNY8bt50pswoDK+A7rdYj5y18Gh3h9vCHPB28mGOlvb1vMv8sDM5w1D6jQyVIawbW7ZroRwttx 8nNHSkDFGk9+Iqcx66mfdtQJf8AQYy8A3P53dw2Ryw0PqQX02IX42ZMCbIsMsV9+LAkOB08QYkprC xZqW9jJLkK0hpFHB60pw==; 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 1g53V8-0005FX-7m; Wed, 26 Sep 2018 06:40:46 +0000 Received: from mail-ed1-x541.google.com ([2a00:1450:4864:20::541]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1g53Ul-0003zw-Eh for linux-mtd@lists.infradead.org; Wed, 26 Sep 2018 06:40:24 +0000 Received: by mail-ed1-x541.google.com with SMTP id t11-v6so846351edq.11 for ; Tue, 25 Sep 2018 23:39:53 -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 :mime-version:content-transfer-encoding; bh=0NrBlGW63g/c8j9QosRK90oCvMIoSzXsbV8LTC28K7o=; b=D/aSQ+Zgbr6Ni7qNPNoXk1vjgSCaWTte2u07Za06wWymqOvRdbjHu3mRmRXlWGpJ8c PSFK0d0Rm/V8pzu4zgzxDYPa+zPPP8TraikqhpywVdlnY/T0xfxfbgeUxn6jkCH37GSC 3zTlqxXl7c2s8d/dEtB/+0rltO5t4QD8gZ2qEaYGx/jUgUT7aGiKH7ITiJ3zcRt3Q7kA LbhWQNC+YkZMyEj8G3krh8Bdgcrv46XuZN3MF4GqUn5L/axd1ypQ8geUI023qSOPha78 NzIxx2uV0M5/tzsNdWvJBkwhywDT4Wj/rYTzUbD8WjzBtF5mmQ+HbZTDGSTTDnonumto 52kw== 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:mime-version:content-transfer-encoding; bh=0NrBlGW63g/c8j9QosRK90oCvMIoSzXsbV8LTC28K7o=; b=IGc1X+nhFKOCNaHTtRJwXEnAGoRFqeY1b8BJct6FSiG2X2SqvxPQbICO20dpYeIpIc CfdnlyBHtykS7fq/xFwlMyKzkdShw+vs23dQa7YZWixNvefC9Vj0ZPDmlOoG1G7gl5tJ wfL6SruHSMx771NvCJhHgzMdfEezJE19q00nXEVsRmU8Qa2if8jExc49T1t5Wv/E6PEK 7FQ/eYQCHVJF3jT40eZ8aR91PF+SztgSQdl1avUDeXbRpxJhze8Fyhh30lajI/MxM8za fMuXc6ESkCN320/zhTTAV7jTeHTYNJsbgJ4X7GROQKsNuL6WqwvCTHX7ADpjxcpMjSkn owVA== X-Gm-Message-State: ABuFfojJvLbIbrQOHgCZifLsuHJHc/4XE5ZyPo7EHMypkpuFH8tJVzUM OF7fNJtjg+MwfVW/qGrH9tk= X-Google-Smtp-Source: ACcGV63i1gevzojTlC4zU10jiY/Qb39hhPoZ7PvW4sJLNOQJ6IvJ5z4STY6UqcPRyvFqS/ph23JPzw== X-Received: by 2002:a50:b519:: with SMTP id y25-v6mr7372406edd.24.1537943991692; Tue, 25 Sep 2018 23:39:51 -0700 (PDT) Received: from piling.lan (80-62-116-106-mobile.dk.customer.tdc.net. [80.62.116.106]) by smtp.gmail.com with ESMTPSA id g20-v6sm6830804edm.36.2018.09.25.23.39.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Sep 2018 23:39:49 -0700 (PDT) From: Ricardo Ribalda Delgado To: robh@kernel.org, David Woodhouse , Brian Norris , Boris Brezillon , Marek Vasut , Richard Weinberger , Zhouyang Jia , linux-mtd@lists.infradead.org, open list , devicetree@vger.kernel.org Subject: [PATCH v3 8/8] dt-binding: mtd: Document gpio-addr-flash Date: Wed, 26 Sep 2018 08:39:34 +0200 Message-Id: <20180926063934.9229-1-ricardo.ribalda@gmail.com> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180925204813.GA6450@bogus> References: <20180925204813.GA6450@bogus> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180925_234023_534707_8D275556 X-CRM114-Status: GOOD ( 17.55 ) 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:4864:20:0:0:0:541 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (ricardo.ribalda[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: Ricardo Ribalda Delgado Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Add documentation for gpio-addr-flash. This binding allow creating flash devices that are paged using GPIOs. Cc: devicetree@vger.kernel.org Signed-off-by: Ricardo Ribalda Delgado Reviewed-by: Rob Herring --- Changelog v3: - Changes suggested by Rob Herring (Thanks!) - Add gpio description - Improve partition .../bindings/mtd/gpio-addr-flash.txt | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 Documentation/devicetree/bindings/mtd/gpio-addr-flash.txt diff --git a/Documentation/devicetree/bindings/mtd/gpio-addr-flash.txt b/Documentation/devicetree/bindings/mtd/gpio-addr-flash.txt new file mode 100644 index 000000000000..5006a26e1753 --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/gpio-addr-flash.txt @@ -0,0 +1,54 @@ +Memory Mapped flash with some address lines addressed using GPIOs + +Handle the case where a flash device is mostly addressed using physical +line and supplemented by GPIOs. This way you can hook up say a 8MiB flash +to a 2MiB memory range and use the GPIOs to select a particular range. + + - compatible : "cfi-gpio-addr-flash" + - reg : Address range of the mtd chip that is memory mapped, this is, + on the previous example 2MiB. + - bank-width : Width (in bytes) of the bank. Equal to the + device width times the number of interleaved chips. + - gpios: List of GPIO specifiers that will be used to address the MSBs address + lines. The order goes from LSB to MSB. + - probe-type : (optional) "cfi_probe", "jedec_probe". How the mtd chip + is going to be probed. If omitted, assumed to be equal to "cfi_probe". + - #address-cells, #size-cells : Must be present if the device has + sub-nodes representing partitions (see below). In this case + both #address-cells and #size-cells must be equal to 1. + +The device tree may optionally contain sub-nodes describing partitions of the +address space. Check partition.txt for more details. + +Example: + + flash@300000 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "cfi-gpio-addr-flash"; + bank-width = <2>; + reg = < 0x00300000 0x00200000 >; + gpios = <&gpio_0 3 0>, <&gpio_0 4 0>; + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + reg = < 0x0 0x200000 >; + label = "Golden Bitstream"; + }; + partition@200000 { + reg = < 0x200000 0x200000 >; + label = "User Bitstream"; + }; + partition@400000 { + reg = < 0x400000 0x200000 >; + label = "V4L Controls"; + }; + partition@600000 { + reg = < 0x600000 0x200000 >; + label = "Production Data"; + }; + } + } ;