From patchwork Wed Aug 27 12:42:20 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 383446 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 0AC0F14009C for ; Wed, 27 Aug 2014 22:45:19 +1000 (EST) 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 1XMcaA-00062s-8B; Wed, 27 Aug 2014 12:44:10 +0000 Received: from mail-ig0-f179.google.com ([209.85.213.179]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XMcZB-0004sD-Kr for linux-mtd@lists.infradead.org; Wed, 27 Aug 2014 12:43:10 +0000 Received: by mail-ig0-f179.google.com with SMTP id h18so289422igc.12 for ; Wed, 27 Aug 2014 05:42:49 -0700 (PDT) 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=1RgHcs3g3kCxMxaa3pGjX/tU63drpexkE2BM6EjW568=; b=BsgoZrCdQuWjxNDroEBhl4E2+kIIFJlrzEndF/8i7qnTzPqZic/UgpvQT1SPQ38WCY b1/GXd3IzEd/anoGjIHEBbMSz0sKBum0E5lCyX3SXC55cws+N0kSd+DPCirDA7ME0UsN ya4zhmep56RnLnRA1TSePnuLspXhN5hKEIbtKfMz4g99x/wDiBZEkE3c7Qt4Qxfq9d9V bZpQOMtcCE80QwGKsiAM+gbwTg3445+0iKC0qHEcgjhPC1t4CeGk3XDQxq3t3ccjJvWu /MsjC6jgy8p+ws5yzHpRsMXu1UCud+14PPJmbP3H6xWJ8/fz3DJvHRU01394eoTxwIOT 4+Rg== X-Gm-Message-State: ALoCoQkb41M3oFlTnDx4mppGXjTvWr1Xb8tJxgNl6um3IBNlGOL8Dv4ABl2fKQPVpxE+2gsdP2ZZ X-Received: by 10.50.33.16 with SMTP id n16mr29028139igi.15.1409143369442; Wed, 27 Aug 2014 05:42:49 -0700 (PDT) Received: from localhost.localdomain (host86-152-0-170.range86-152.btcentralplus.com. [86.152.0.170]) by mx.google.com with ESMTPSA id e1sm2721318igx.18.2014.08.27.05.42.46 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 27 Aug 2014 05:42:48 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/9] mtd: nand: stm_nand_bch: provide Device Tree documentation Date: Wed, 27 Aug 2014 13:42:20 +0100 Message-Id: <1409143344-22458-6-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1409143344-22458-1-git-send-email-lee.jones@linaro.org> References: <1409143344-22458-1-git-send-email-lee.jones@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140827_054309_775906_2763274F X-CRM114-Status: GOOD ( 12.05 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.213.179 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.213.179 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders 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..5872a39 --- /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 +- st,nand-banks : Subnode representing one or more "banks" of NAND + Flash, connected to an STM NAND Controller (see + description below). +- 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. + +Properties describing Bank of NAND Flash ("st,nand-banks"): + +- st,nand-csn : Chip select associated with the Bank. + +- st,nand-timing-relax : [Optional] 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) + +- partitions : [Optional] Subnode describing MTD partition map + (see mtd/partition.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"; + + bank0 { + /* NAND_BBT_USE_FLASH */ + 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>; + }; + }; + }; + };