From patchwork Tue Aug 16 22:33:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karl Beldan X-Patchwork-Id: 9284887 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 90139607FD for ; Tue, 16 Aug 2016 22:35:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7E5AD28786 for ; Tue, 16 Aug 2016 22:35:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 72F3D28798; Tue, 16 Aug 2016 22:35:25 +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 1BBEE28786 for ; Tue, 16 Aug 2016 22:35:25 +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 1bZmvv-0003Lj-MF; Tue, 16 Aug 2016 22:34:07 +0000 Received: from mail-wm0-x232.google.com ([2a00:1450:400c:c09::232]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bZmv8-0002t5-CC for linux-arm-kernel@lists.infradead.org; Tue, 16 Aug 2016 22:33:19 +0000 Received: by mail-wm0-x232.google.com with SMTP id o80so197701818wme.1 for ; Tue, 16 Aug 2016 15:32:58 -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:in-reply-to:references; bh=WuidpfljRdASom5EtPQAYEXqfAGknutXv/Lb1yX77OQ=; b=zSD2X5DCinaxS9nE2PTJRoH41rQFxp47e1F34J4DSz9DxKUZeSa1t3h1zoWtNc7zSI YG6ZH/cknn6K/7LPSpHJS2aIvrFpuoUv5MsnorXmV6yrq2ZZGixNmb/nWtLNGIrH2mVP K3G4PFeVrKJ+UoQ3wv5IaTWTy7cxgIiZ3mdA5EHPf6qOly7ZSeglIPS9zoImBbOeRCq2 CfK2cT9wF33bTazg2Dr9EYMkij4VipIqyeW/G6JcdICg5cGhp5NeP7bcoksUpUdxX/W/ 7uX5aqF1nuMWmDMh74abUDe/eNf4ttIJJrl+cbBGgkeXg8CMo5z7Arax435WXchyKRyq U7TA== 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=WuidpfljRdASom5EtPQAYEXqfAGknutXv/Lb1yX77OQ=; b=KgWNIl6RXu0gM+DoxQ5hPor0KfM49DmYHL/0+MNEDZiMAUq/+XbE/BQm/6E4uisbB/ IaUGyYJkkq9nnEDxJzCO2WLM9Jl2HEcwHvbngJ3ZiQ9ieolmhBfMK50EZOrFQy1jKDMm tVXB+/NGJxv1Xd3FQbrYKNaLO2GWiJZxriXjGn7s7kJsSYvDE4d2Qn2qaM5SueE1aYGw mjzGh9VYE7YOG0uABkLs0tNME3ZvpN9WCSdmv2MhZjXCldFOEiSRWb/0sxCfZxaF+hfM Lu1qYTb0MANlimjzA7zOa8lIkZYKWA4sa5IXqKNkfYF7KeQBLIC/Z6vWuhbAGdoLwRKI EZOQ== X-Gm-Message-State: AEkoouuoELeJ+vLltn+QkNdpAO0K3glpZjUqSt4JiTi1Jq7tLmAX0pHEnYbO+VEKV6WrTKKP X-Received: by 10.194.101.225 with SMTP id fj1mr43368624wjb.57.1471386776687; Tue, 16 Aug 2016 15:32:56 -0700 (PDT) Received: from localhost.localdomain (ppp-seco11pa2-46-193-138-19.wb.wifirst.net. [46.193.138.19]) by smtp.gmail.com with ESMTPSA id bw9sm28647696wjc.33.2016.08.16.15.32.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Aug 2016 15:32:56 -0700 (PDT) From: Karl Beldan To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 3/4] ARM: dts: da850, da850-evm: Add an aemif node and use it for the NAND Date: Tue, 16 Aug 2016 22:33:37 +0000 Message-Id: <20160816223338.20776-4-kbeldan@baylibre.com> X-Mailer: git-send-email 2.9.2 In-Reply-To: <20160816223338.20776-1-kbeldan@baylibre.com> References: <20160816223338.20776-1-kbeldan@baylibre.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160816_153318_611589_CD2B7DB3 X-CRM114-Status: GOOD ( 13.55 ) 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: Mark Rutland , Karl Beldan , Kevin Hilman , Sekhar Nori , Russell King , Rob Herring , Karl Beldan MIME-Version: 1.0 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 Currently the davinci da8xx boards use the mach-davinci aemif code. Instantiating an aemif node into the DT allows to use the ti-aemif memory driver and is another step to better DT support. This change adds an aemif node in the dtsi while retiring the nand_cs3 node. The NAND is now instantiated in the dts as a subnode of the aemif one along with its pins. Signed-off-by: Karl Beldan --- arch/arm/boot/dts/da850-evm.dts | 49 ++++++++++++++++++++++++++++++++++++----- arch/arm/boot/dts/da850.dtsi | 35 +++++++---------------------- 2 files changed, 52 insertions(+), 32 deletions(-) diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts index 1a15db8..eedcc59 100644 --- a/arch/arm/boot/dts/da850-evm.dts +++ b/arch/arm/boot/dts/da850-evm.dts @@ -29,6 +29,20 @@ 0x04 0x00011000 0x000ff000 >; }; + nand_pins: nand_pins { + pinctrl-single,bits = < + /* EMA_WAIT[0], EMA_OE, EMA_WE, EMA_CS[4], EMA_CS[3] */ + 0x1c 0x10110110 0xf0ff0ff0 + /* + * 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_A[1], EMA_A[2] */ + 0x30 0x01100000 0x0ff00000 + >; + }; }; serial0: serial@42000 { status = "okay"; @@ -131,11 +145,6 @@ status = "okay"; }; }; - nand_cs3@62000000 { - status = "okay"; - pinctrl-names = "default"; - pinctrl-0 = <&nand_cs3_pins>; - }; vbat: fixedregulator@0 { compatible = "regulator-fixed"; regulator-name = "vbat"; @@ -250,3 +259,33 @@ &edma1 { ti,edma-reserved-slot-ranges = <32 90>; }; + +&aemif { + pinctrl-names = "default"; + pinctrl-0 = <&nand_pins>; + status = "ok"; + 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-ecc-mode = "hw"; + ti,davinci-ecc-bits = <4>; + ti,davinci-nand-use-bbt; + }; + }; +}; diff --git a/arch/arm/boot/dts/da850.dtsi b/arch/arm/boot/dts/da850.dtsi index bc10e7e..9ba018f 100644 --- a/arch/arm/boot/dts/da850.dtsi +++ b/arch/arm/boot/dts/da850.dtsi @@ -77,22 +77,6 @@ 0x10 0x00220000 0x00ff0000 >; }; - nand_cs3_pins: pinmux_nand_pins { - pinctrl-single,bits = < - /* EMA_OE, EMA_WE */ - 0x1c 0x00110000 0x00ff0000 - /* EMA_CS[4],EMA_CS[3]*/ - 0x1c 0x00000110 0x00000ff0 - /* - * 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_A[1], EMA_A[2] */ - 0x30 0x01100000 0x0ff00000 - >; - }; i2c0_pins: pinmux_i2c0_pins { pinctrl-single,bits = < /* I2C0_SDA,I2C0_SCL */ @@ -411,17 +395,14 @@ dma-names = "tx", "rx"; }; }; - nand_cs3@62000000 { - compatible = "ti,davinci-nand"; - reg = <0x62000000 0x807ff - 0x68000000 0x8000>; - ti,davinci-chipselect = <1>; - ti,davinci-mask-ale = <0>; - ti,davinci-mask-cle = <0>; - ti,davinci-mask-chipsel = <0>; - ti,davinci-ecc-mode = "hw"; - ti,davinci-ecc-bits = <4>; - ti,davinci-nand-use-bbt; + aemif: aemif@68000000 { + compatible = "ti,da850-aemif"; + #address-cells = <2>; + #size-cells = <1>; + + reg = <0x68000000 0x00008000>; + ranges = <0 0 0x60000000 0x08000000 + 1 0 0x68000000 0x00008000>; status = "disabled"; }; };