From patchwork Mon Aug 18 10:31:56 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 35484 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oi0-f71.google.com (mail-oi0-f71.google.com [209.85.218.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E89F920676 for ; Mon, 18 Aug 2014 10:34:51 +0000 (UTC) Received: by mail-oi0-f71.google.com with SMTP id e131sf29956413oig.2 for ; Mon, 18 Aug 2014 03:34:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :in-reply-to:references:cc:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:content-type:content-transfer-encoding; bh=HZu5hgrumhTDPfpWn1sHaOadbjDaWsPhO+Ljq8Ltp/g=; b=XCUv8TqQfK+vcG/fsKzABJ8LtiJgxevZiENVC+mFYwSoQnb1+nJBtYj7NRyGsh2TDd yJtBYmj2OlH1t1LVbbBLWDJyzUDnaAC0RQ624hdlZZPMo2JGTwobSo4hGSiAtTA+Wy5/ 5D5foehIxCXm7Kgc00laooHROJewjTnrPbs2Oqe/MdgFUogKoaviV/pDvX4iWdvOX7FO b4opI2M068/PoHMKGSc+wRGw0VoK9pW32IzgrPrk+zcgqeOuUrVzLhS61SnahH7rPUdH rGXSy2EiXwPdxAjuJ1kMupa/YQqYV0jZ+stBI26CIe4iI1T8t2tTH2TCyD+LmebDbPgs rAjA== X-Gm-Message-State: ALoCoQnod6lB7wpw+D/a1CbemyMND2xMyBgZqtlE5n/dC/Th8Ueqkd90veOKjh1iV6s8ZyKz2d2Y X-Received: by 10.50.43.168 with SMTP id x8mr33464336igl.4.1408358091519; Mon, 18 Aug 2014 03:34:51 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.36.148 with SMTP id p20ls2322776qgp.50.gmail; Mon, 18 Aug 2014 03:34:51 -0700 (PDT) X-Received: by 10.220.190.197 with SMTP id dj5mr24351759vcb.19.1408358091423; Mon, 18 Aug 2014 03:34:51 -0700 (PDT) Received: from mail-vc0-f174.google.com (mail-vc0-f174.google.com [209.85.220.174]) by mx.google.com with ESMTPS id ol3si5368585veb.60.2014.08.18.03.34.51 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 18 Aug 2014 03:34:51 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.174 as permitted sender) client-ip=209.85.220.174; Received: by mail-vc0-f174.google.com with SMTP id la4so5429350vcb.5 for ; Mon, 18 Aug 2014 03:34:51 -0700 (PDT) X-Received: by 10.52.28.146 with SMTP id b18mr3617vdh.55.1408358091316; Mon, 18 Aug 2014 03:34:51 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp141030vcb; Mon, 18 Aug 2014 03:34:50 -0700 (PDT) X-Received: by 10.70.53.164 with SMTP id c4mr40655691pdp.77.1408358090395; Mon, 18 Aug 2014 03:34:50 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id wb2si21099056pab.185.2014.08.18.03.34.48 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Aug 2014 03:34:49 -0700 (PDT) Received-SPF: none (google.com: linux-mtd-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; 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 1XJKFl-0000Q4-0z; Mon, 18 Aug 2014 10:33:29 +0000 Received: from mail-ig0-f178.google.com ([209.85.213.178]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XJKEx-0008Lm-M6 for linux-mtd@lists.infradead.org; Mon, 18 Aug 2014 10:32:40 +0000 Received: by mail-ig0-f178.google.com with SMTP id uq10so7313925igb.11 for ; Mon, 18 Aug 2014 03:32:18 -0700 (PDT) X-Received: by 10.42.83.81 with SMTP id g17mr35098772icl.45.1408357938803; Mon, 18 Aug 2014 03:32:18 -0700 (PDT) Received: from localhost.localdomain (host109-148-113-192.range109-148.btcentralplus.com. [109.148.113.192]) by mx.google.com with ESMTPSA id w10sm42612498igr.18.2014.08.18.03.32.16 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 18 Aug 2014 03:32:18 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 5/8] mtd: nand: stm_nand_bch: provide Device Tree documentation Date: Mon, 18 Aug 2014 11:31:56 +0100 Message-Id: <1408357919-19793-6-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1408357919-19793-1-git-send-email-lee.jones@linaro.org> References: <1408357919-19793-1-git-send-email-lee.jones@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140818_033239_764024_8D4CECEF X-CRM114-Status: GOOD ( 12.64 ) 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.178 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.213.178 listed in wl.mailspike.net] -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: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: lee.jones@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.174 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 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>; + }; + }; + }; + };