From patchwork Wed Nov 5 16:59:49 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 407105 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-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 171B71400B8 for ; Thu, 6 Nov 2014 04:07:28 +1100 (AEDT) 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 1Xm42D-0007gp-IN; Wed, 05 Nov 2014 17:06:17 +0000 Received: from merlin.infradead.org ([2001:4978:20e::2]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Xm3xD-0003At-9j for linux-mtd@bombadil.infradead.org; Wed, 05 Nov 2014 17:01:07 +0000 Received: from mail-ie0-f174.google.com ([209.85.223.174]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Xm3x8-0003Z5-34 for linux-mtd@lists.infradead.org; Wed, 05 Nov 2014 17:01:05 +0000 Received: by mail-ie0-f174.google.com with SMTP id x19so1080360ier.5 for ; Wed, 05 Nov 2014 09:00:37 -0800 (PST) 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=ZzN9Rx/JcBBrGUtJ2UqR3cza743OiUn21zNTtrxfM+U=; b=RjpOb+5OP/6hZtkgzmvUcK1/vAAmr5xRaI5IfUrX/y2Os+QsEvBMvC4SInNmelKoBx 2QIEYyhk8oBcP80KVzLjxISrP+MvHLvyW/iUB6b5COmVbCaVIdnGnlc39YlHFNtCMHic f0J7gQaCnobtsl5rPwjK02FRJTGigOmwWhzbocphFnS8B3v96PoXjvHjkkLI+x4OKUx3 /gcYZf64dhB1qnt9L7Mz/BWrVycLoDIzxiui+erZ7+tZfQoOekCndjZ5gZwbRzTCtjI2 sMGtJKWB6khC/C7HOrmYQ+jWT/ktnHTuOdHJTDzm6VFSjl/8Ca2b3mo7EMmwyPrN2sgr StHg== X-Gm-Message-State: ALoCoQm5z2CJv6s0o8xIQ7HeK7lYOZJBvPRnBWwActQNLBHbW6RJ0+Odqf/Us4PzTGuak5aU1tFs X-Received: by 10.51.16.36 with SMTP id ft4mr32936124igd.19.1415206837013; Wed, 05 Nov 2014 09:00:37 -0800 (PST) Received: from localhost.localdomain (host86-129-140-59.range86-129.btcentralplus.com. [86.129.140.59]) by mx.google.com with ESMTPSA id rj6sm6663489igc.0.2014.11.05.09.00.34 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 05 Nov 2014 09:00:36 -0800 (PST) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v4 07/11] mtd: nand: stm_nand_bch: provide Device Tree documentation Date: Wed, 5 Nov 2014 16:59:49 +0000 Message-Id: <1415206793-25670-8-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1415206793-25670-1-git-send-email-lee.jones@linaro.org> References: <1415206793-25670-1-git-send-email-lee.jones@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141105_120102_180468_2B774C00 X-CRM114-Status: GOOD ( 12.71 ) X-Spam-Score: -2.6 (--) X-Spam-Report: SpamAssassin version 3.4.0 on merlin.infradead.org summary: Content analysis details: (-2.6 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [209.85.223.174 listed in wl.mailspike.net] -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.223.174 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: devicetree@vger.kernel.org, kernel@stlinux.com, pekon@pek-sem.com, linux-mtd@lists.infradead.org, computersforpeace@gmail.com, lee.jones@linaro.org X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org This is where we describe the different new and generic options used by the ST BCH driver. Cc: devicetree@vger.kernel.org Reviewed-by: Pekon Gupta Signed-off-by: Lee Jones --- Documentation/devicetree/bindings/mtd/stm-nand.txt | 74 ++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 Documentation/devicetree/bindings/mtd/stm-nand.txt diff --git a/Documentation/devicetree/bindings/mtd/stm-nand.txt b/Documentation/devicetree/bindings/mtd/stm-nand.txt new file mode 100644 index 0000000..9b87cde --- /dev/null +++ b/Documentation/devicetree/bindings/mtd/stm-nand.txt @@ -0,0 +1,74 @@ +STM BCH NAND Support +-------------------- + +Required properties: + +- compatible : Should be "st,nand-bch" +- reg : Should contain register's location and length +- reg-names : "emi_nand" - NAND Controller register map + "emiss" - External Memory Interface Subsystem base +- interrupts : Interrupt number +- interrupt-names : "nand_irq" - NAND Controller IRQ + +Optional properties: + +- nand-ecc-strength : Generic NAND property (See mtd/nand.txt) + Options are; 0, 18 or 30. If not present, the driver + will choose the strongest scheme compatible if the + OOB size. + +Required sub-node: + +- bank : Subnode representing one of NAND Flash, connected + to an STM NAND Controller (see description below). + There should be one of these per connect bank. + +Optional sub-node properies: + +- nand-chip-select : Generic NAND property (See mtd/nand.txt) +- st,nand-timing-relax : Number of IP clock cycles by which to "relax" timing + configuration. Required on some boards to accommodate + board-level limitations. Applies to ONFI timing mode + configuration. +- nand-on-flash-bbt : Generic NAND property (See mtd/nand.txt) + +Note, during initialisation, the NAND Controller timing registers are configured +according to one of the following methods, in order of precedence: + + 1. Configuration based on ONFI timing mode, as advertised by the + device during ONFI-probing (ONFI-compliant NAND only). + + 2. Use reset/safe timing values + +Example: + + nand@fe901000 { + compatible = "st,nand-bch"; + reg = <0xfe901000 0x1000>, <0xfef00800 0x0800>; + reg-names = "emi_nand", "emiss"; + interrupts = <0 139 0x0>; + interrupt-names = "nand_irq"; + nand-ecc-strength = <30>; + + status = "okay"; + + bank { + nand-on-flash-bbt; + st,nand-csn = <0>; + + partitions { + #address-cells = <1>; + #size-cells = <1>; + + partition@0{ + label = "NANDFlash1"; + reg = <0x00000000 0x00800000>; + }; + + partition@800000{ + label = "NANDFlash2"; + reg = <0x00800000 0x0f800000>; + }; + }; + }; + };