From patchwork Mon Nov 11 17:09:01 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Khoronzhuk X-Patchwork-Id: 3168591 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9BDD99F522 for ; Mon, 11 Nov 2013 17:10:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AE7F42037D for ; Mon, 11 Nov 2013 17:10:04 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A22142020A for ; Mon, 11 Nov 2013 17:10:02 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vfuzs-0003SH-AS; Mon, 11 Nov 2013 17:09:56 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vfuzp-0006oz-J7; Mon, 11 Nov 2013 17:09:53 +0000 Received: from devils.ext.ti.com ([198.47.26.153]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vfuza-0006lr-U8; Mon, 11 Nov 2013 17:09:50 +0000 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id rABH929K020831; Mon, 11 Nov 2013 11:09:02 -0600 Received: from DNCE71.ent.ti.com (dnce71.ent.ti.com [137.167.131.20]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id rABH92UU030923; Mon, 11 Nov 2013 11:09:02 -0600 Received: from DNCE04.ent.ti.com ([fe80::50a2:cda3:1471:a76]) by DNCE71.ent.ti.com ([fe80::7d60:3983:a688:ea7d%20]) with mapi id 14.02.0342.003; Mon, 11 Nov 2013 18:09:01 +0100 From: "Khoronzhuk, Ivan" To: "Shilimkar, Santosh" , Rob Landley , Russell King Subject: [PATCH 08/12] memory: davinci-aemif: add bindings for AEMIF driver Thread-Topic: [PATCH 08/12] memory: davinci-aemif: add bindings for AEMIF driver Thread-Index: AQHO3vrnEwWyai241kWFFb7gvFtHU5ogQu4K Date: Mon, 11 Nov 2013 17:09:01 +0000 Message-ID: <4F5844B3A985794BA902E12C070812375F8D3A@DNCE04.ent.ti.com> References: <1384187188-5776-1-git-send-email-ivan.khoronzhuk@ti.com>, <1384187188-5776-9-git-send-email-ivan.khoronzhuk@ti.com> In-Reply-To: <1384187188-5776-9-git-send-email-ivan.khoronzhuk@ti.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [157.170.170.56] x-exclaimer-md-config: f9c360f5-3d1e-4c3c-8703-f45bf52eff6b MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131111_120948_043319_FD973D6B X-CRM114-Status: GOOD ( 13.24 ) X-Spam-Score: -6.9 (------) Cc: Mark Rutland , "devicetree@vger.kernel.org" , "Strashko, Grygorii" , Pawel Moll , Stephen Warren , Ian Campbell , Kumar Gala , Rob Herring , "linux-kernel@vger.kernel.org" , "linux-mtd@lists.infradead.org" , "linux-arm-kernel@lists.infradead.org" X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add bindings for AEMIF controller drivers/memory/davinici-aemif.c Signed-off-by: Ivan Khoronzhuk --- .../bindings/memory-controllers/davinci-aemif.txt | 198 ++++++++++++++++++++ 1 file changed, 198 insertions(+) create mode 100644 Documentation/devicetree/bindings/memory-controllers/davinci-aemif.txt -- 1.7.9.5 diff --git a/Documentation/devicetree/bindings/memory-controllers/davinci-aemif.txt b/Documentation/devicetree/bindings/memory-controllers/davinci-aemif.txt new file mode 100644 index 0000000..5e5319a --- /dev/null +++ b/Documentation/devicetree/bindings/memory-controllers/davinci-aemif.txt @@ -0,0 +1,198 @@ +* Device tree bindings for Texas instruments Davinci/Keystone AEMIF controller + +Th Async External Memory Interface (EMIF16/AEMIF) controller is intended to +provide a glue-less interface to a variety of asynchronous memory devices like +ASRA M, NOR and NAND memory. A total of 256M bytes of any of these memories +can be accessed at any given time via four chip selects with 64M byte access +per chip select. Synchronous memories such as DDR1 SD RAM, SDR SDRAM +and Mobile SDR are not supported. + +Documentation: +Davinci DM646x - http://www.ti.com/lit/ug/sprueq7c/sprueq7c.pdf +OMAP-L138 - http://www.ti.com/lit/ug/spruh77a/spruh77a.pdf +Kestone - http://www.ti.com/lit/ug/sprugz3a/sprugz3a.pdf + +Required properties: + +- compatible: "ti,davinci-aemif" + "ti,keystone-aemif" + "ti,omap-L138-aemif" + +- #address-cells: Must be 2. The first cell is the memory partition + number. The 0 partition is for chip selects. And the + second cell is the offset into the partition, for the 0 + partition it corresponds to chip select offset. + +- #size-cells: Must be set to 1. + +- reg: contains offset/length value for AEMIF control registers + space. + +- ranges: Must be set up to reflect the memory layout for 4 + chipselects and for AEMIF control range. + +- clocks: phandle reference to the controller clock. Required only + if clock tree data present in device tree. + See clock-bindings.txt + +- clock-names: clock name. It has to be "aemif". Required only if clock + tree data present in device tree, in another case don't + use it. + See clock-bindings.txt + +- clock-ranges: Empty property indicating that child nodes can inherit + named clocks. Required only if clock tree data present + in device tree. + See clock-bindings.txt + + +Child chip-select (cs) nodes contain the memory devices nodes connected to +such as NOR (e.g. cfi-flash) and NAND (ti,davinci-nand, see davinci-nand.txt). +There might be board specific devices like FPGAs. + +Required child cs node properties: + +- compatible: "ti,davinci-cs" + +- #address-cells: Must be 2. The first cell is the memory partition + number. The 0 partition is for chip selects. And the + second cell is the offset into the partition, for the 0 + partition it corresponds to chip select offset. + +- #size-cells: Must be 1. + +- ranges: Empty property indicating that child nodes can inherit + memory layout. + +- clock-ranges: Empty property indicating that child nodes can inherit + named clocks. Required only if clock tree data present + in device tree. + +Optional child cs node properties: + + +- ti,bus-width: width of the asynchronous device's data bus + 8 or 16 if not preset 8 + +- ti,davinci-cs-ss: enable/disable select strobe mode + In select strobe mode chip select behaves as + the strobe and is active only during the strobe + period. If present then enable. + +- ti,davinci-cs-ew: enable/disable extended wait mode + if set, the controller monitors the EMIFWAIT pin + mapped to that chip select to determine if the + device wants to extend the strobe period. If + present then enable. + +- ti,davinci-cs-ta: minimum turn around time, ns + Time between the end of one asynchronous memory + access and the start of another asynchronous + memory access. This delay is not incurred + between a read followed by read or a write + followed by a write to same chip select. + +- ti,davinci-cs-rsetup: read setup width, ns + Time between the beginning of a memory cycle + and the activation of read strobe. + Minimum value is 1 (0 treated as 1). + +- ti,davinci-cs-rstobe: read strobe width, ns + Time between the activation and deactivation of + the read strobe. + Minimum value is 1 (0 treated as 1). + +- ti,davinci-cs-rhold: read hold width, ns + Time between the deactivation of the read + strobe and the end of the cycle (which may be + either an address change or the deactivation of + the chip select signal. + Minimum value is 1 (0 treated as 1). + +- ti,davinci-cs-wsetup: write setup width, ns + Time between the beginning of a memory cycle + and the activation of write strobe. + Minimum value is 1 (0 treated as 1). + +- ti,davinci-cs-wstrobe: write strobe width, ns + Time between the activation and deactivation of + the write strobe. + Minimum value is 1 (0 treated as 1). + +- ti,davinci-cs-whold: write hold width, ns + Time between the deactivation of the write + strobe and the end of the cycle (which may be + either an address change or the deactivation of + the chip select signal. + Minimum value is 1 (0 treated as 1). + +If any of the above parameters are absent, current parameter value will be taken +from the corresponding HW reg. + +The name for cs node must be in format csN, where N is the cs number. +For compatibles "ti,davinci-aemif" and "ti,keystone-aemif" N = [0-3]. +For compatible "ti,omap-L138-aemif" N = [2-5]. + +Example for aemif, davinci nand and nor flash chip select shown below. + +memory-controller@21000A00 { + compatible = "ti,keystone-aemif"; + #address-cells = <2>; + #size-cells = <1>; + clocks = <&clkaemif 0>; + clock-names = "aemif"; + clock-ranges; + reg = <0x2100A00 0x00000100>; + ranges = <0 0 0x70000000 0x10000000 + 1 0 0x21000A00 0x0000100>; + + nand:cs2 { + compatible = "ti,davinci-cs"; + #address-cells = <2>; + #size-cells = <1>; + clock-ranges; + ranges; + + /* all timings in nanoseconds */ + ti,davinci-cs-ta = <0>; + ti,davinci-cs-rhold = <7>; + ti,davinci-cs-rstrobe = <42>; + ti,davinci-cs-rsetup = <14>; + ti,davinci-cs-whold = <7>; + ti,davinci-cs-wstrobe = <42>; + ti,davinci-cs-wsetup = <14>; + + nand@0,0x8000000 { + compatible = "ti,davinci-nand"; + reg = <0 0x8000000 0x4000000 + 1 0x0000000 0x0000100>; + + .. see davinci-nand.txt + }; + }; + + nor:cs0 { + compatible = "ti,davinci-cs"; + #address-cells = <2>; + #size-cells = <1>; + clock-ranges; + ranges; + + /* all timings in nanoseconds */ + ti,davinci-cs-ta = <0>; + ti,davinci-cs-rhold = <8>; + ti,davinci-cs-rstrobe = <40>; + ti,davinci-cs-rsetup = <14>; + ti,davinci-cs-whold = <7>; + ti,davinci-cs-wstrobe = <40>; + ti,davinci-cs-wsetup = <14>; + ti,davinci-cs-asize = <1>; + + flash@0,0x0000000 { + compatible = "cfi-flash"; + reg = <0 0x0000000 0x4000000>; + + ... + }; + }; +};