From patchwork Thu Sep 8 18:33:24 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hilman X-Patchwork-Id: 9321919 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F4092607D3 for ; Thu, 8 Sep 2016 18:35:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E205C299A1 for ; Thu, 8 Sep 2016 18:35:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D2DF4299BA; Thu, 8 Sep 2016 18:35:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 1F6D4299A1 for ; Thu, 8 Sep 2016 18:35:41 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bi492-0007j2-F5; Thu, 08 Sep 2016 18:33:52 +0000 Received: from mail-it0-x234.google.com ([2607:f8b0:4001:c0b::234]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bi48x-0007fm-5k for linux-arm-kernel@lists.infradead.org; Thu, 08 Sep 2016 18:33:48 +0000 Received: by mail-it0-x234.google.com with SMTP id i184so272765666itf.1 for ; Thu, 08 Sep 2016 11:33:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=lM7cEjUzAmbhYkywPHZ2R0jUBW0q+Vyw+riy5LONtc4=; b=wymPVgFbjLEvxZtWLlcXcvqS6TUMXJWEQ1eObGUouhdNQdt3npsyuA/7vcWAVcCJFU pkVIhpPgKzzsj1gwceDWQ6ZGBKGCz6KmOuO8SfaBAUXQLOf9x/8n9yHSD33sPhNEfQV3 APPgmQdXHdlxEqR70Lm1zQcpz6SUKfN0dh+ZZaChGQ+7LL82AOTHjHi04Flsssw5SlBC LvXkpdkjmZDleKtb999yv1aECHttEIvGQ8IeEW/mhZ9vZ2Pza8uVfbAAehjTUnSMCNkB QIRSZf45qsNygt3MlUvDXEiRI/yUOU9aVR4vKpWT7Sun5mTfQaaB0T+YoXgq5oxauwD4 OQ1g== 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:mime-version :content-transfer-encoding; bh=lM7cEjUzAmbhYkywPHZ2R0jUBW0q+Vyw+riy5LONtc4=; b=M/BNkjZY1MZ9wvB/Ih5NWkkeV4an4eLEIZHlM1seZHwPd3aggTew5letHy3Lje2ljw sPO0freJ7pelXiTYBbG2vsGzINLyD0AxQYvy8VGL8R82oKRq3yh62q/f3uwQAXERn1Md zLOWrcRohwWkXYmT8FHhvYbLWKez7dIxDwqNmF9gNxvXlVCeeP1RZNY2145gqsU0tcPY dD55Y/SD+mLL4HuC97Bx374WMIsaFGVvWeXdxuvroZ4gDX5jQlpT88MdwZtKvfQNc5WF 5740Dfjdm/AoC0uNJacR7BjyU4i2fGJTu+5TP/iyQPIu98UG+gMfeIx6g9KP/NAaUcW4 tO4w== X-Gm-Message-State: AE9vXwMYzyFr5aMCiDnzXyPN0vy8h+/TZhTUTPB+mrnTAtl78PaT2n43cdYF41M7TqBRE0dq X-Received: by 10.157.12.100 with SMTP id 91mr1199977otr.12.1473359605780; Thu, 08 Sep 2016 11:33:25 -0700 (PDT) Received: from localhost (c-98-203-232-209.hsd1.wa.comcast.net. [98.203.232.209]) by smtp.gmail.com with ESMTPSA id h17sm233918ioi.8.2016.09.08.11.33.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Sep 2016 11:33:25 -0700 (PDT) From: Kevin Hilman To: Sekhar Nori Subject: [PATCH v2] ARM: dts: da850-lcdk: Add NAND to DT Date: Thu, 8 Sep 2016 11:33:24 -0700 Message-Id: <20160908183324.32389-1-khilman@baylibre.com> X-Mailer: git-send-email 2.9.3 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160908_113347_317890_D71F8BE4 X-CRM114-Status: GOOD ( 13.50 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: karl.beldan@gmail.com, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Karl Beldan This adds DT support for the NAND connected to the SoC AEMIF. Passed torture hashing a 40MB file on top of UBIFS using subpages. Signed-off-by: Karl Beldan [khilman: add back default partitions from an earlier patch] Signed-off-by: Kevin Hilman --- Applies on Sekhar's v4.9/dts branch. Sekhar, feel free to edit the comment text for the partitions as you see fit. arch/arm/boot/dts/da850-lcdk.dts | 83 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) diff --git a/arch/arm/boot/dts/da850-lcdk.dts b/arch/arm/boot/dts/da850-lcdk.dts index 7563260e95d1..7b8ab21fed6c 100644 --- a/arch/arm/boot/dts/da850-lcdk.dts +++ b/arch/arm/boot/dts/da850-lcdk.dts @@ -63,6 +63,27 @@ 0x04 0x00000110 0x00000ff0 >; }; + + nand_pins: nand_pins { + pinctrl-single,bits = < + /* EMA_WAIT[0], EMA_OE, EMA_WE, EMA_CS[3] */ + 0x1c 0x10110010 0xf0ff00f0 + /* + * EMA_D[0], EMA_D[1], EMA_D[2], + * EMA_D[3], EMA_D[4], EMA_D[5], + * EMA_D[6], EMA_D[7] + */ + 0x24 0x11111111 0xffffffff + /* + * EMA_D[8], EMA_D[9], EMA_D[10], + * EMA_D[11], EMA_D[12], EMA_D[13], + * EMA_D[14], EMA_D[15] + */ + 0x20 0x11111111 0xffffffff + /* EMA_A[1], EMA_A[2] */ + 0x30 0x01100000 0x0ff00000 + >; + }; }; &serial2 { @@ -136,3 +157,65 @@ tx-num-evt = <32>; rx-num-evt = <32>; }; + +&aemif { + pinctrl-names = "default"; + pinctrl-0 = <&nand_pins>; + status = "okay"; + cs3 { + #address-cells = <2>; + #size-cells = <1>; + clock-ranges; + ranges; + + ti,cs-chipselect = <3>; + + nand@2000000,0 { + compatible = "ti,davinci-nand"; + #address-cells = <1>; + #size-cells = <1>; + reg = <0 0x02000000 0x02000000 + 1 0x00000000 0x00008000>; + + ti,davinci-chipselect = <1>; + ti,davinci-mask-ale = <0>; + ti,davinci-mask-cle = <0>; + ti,davinci-mask-chipsel = <0>; + + ti,davinci-nand-buswidth = <16>; + ti,davinci-ecc-mode = "hw"; + ti,davinci-ecc-bits = <4>; + ti,davinci-nand-use-bbt; + + /* + * The OMAP-L132/L138 Bootloader doc SPRAB41E reads: + * "To boot from NAND Flash, the AIS should be written + * to NAND block 1 (NAND block 0 is not used by default)". + * The same doc mentions that for ROM "Silicon Revision 2.1", + * "Updated NAND boot mode to offer boot from block 0 or block 1". + * However the limitaion is left here by default for compatibility + * with older silicon and because it needs new boot pin settings + * not possible in stock LCDK. + */ + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot env"; + reg = <0 0x020000>; + }; + partition@0x020000 { + /* The LCDK defaults to booting from this partition */ + label = "u-boot"; + reg = <0x020000 0x080000>; + }; + partition@0x0a0000 { + label = "free space"; + reg = <0x0a0000 0>; + }; + }; + }; + }; +};