From patchwork Wed May 21 11:21:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 30537 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f69.google.com (mail-oa0-f69.google.com [209.85.219.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 50E9B20671 for ; Wed, 21 May 2014 11:23:23 +0000 (UTC) Received: by mail-oa0-f69.google.com with SMTP id i7sf8192859oag.8 for ; Wed, 21 May 2014 04:23:22 -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:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=NMmSPCaAqhu1GupFBPR6NkxpIPe3KlIGJhxBLDHwKM8=; b=Jt9cmJF/+g670vA25GxP2OF+ruvarpQjwGby01lJlomgaPIKeTQnot+01l/pMhpke3 hA4YnWKb8O2DjuTM8621z8RuYeWoNoiNWYAab//Y7SxLERdgbhrZsptjaWrCNZZDR0m2 du63MMVAwONKijvWW3Oh3ZGiV2PJGnNHEjta8klhqVmDHYwycNp2dob0zoo+FZtrvO0h hy0/fOhLJyodOSnaNDZGIOWovs5SPqxPZuFek0OIGbllvw/UAVRk54WNP0uhn6KE+9qt XZlT+72uAFMRbcM5QrwpkEIJVtPzMs5rHUSCu5mC6gXSXEoY4W+rIe/Hhm/B5jEj2hU8 yG4A== X-Gm-Message-State: ALoCoQm/KsoOs+cIvbeFjSCtdxmRYk+7Zy1slt+fARaEigPNO/eqiylx0R2NVnOkZZ2fv7ypYRHB X-Received: by 10.42.26.208 with SMTP id g16mr3041082icc.3.1400671402893; Wed, 21 May 2014 04:23:22 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.97.99 with SMTP id l90ls794238qge.13.gmail; Wed, 21 May 2014 04:23:22 -0700 (PDT) X-Received: by 10.53.13.133 with SMTP id ey5mr7783734vdd.8.1400671402767; Wed, 21 May 2014 04:23:22 -0700 (PDT) Received: from mail-ve0-f176.google.com (mail-ve0-f176.google.com [209.85.128.176]) by mx.google.com with ESMTPS id fl16si405130vec.81.2014.05.21.04.23.22 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 21 May 2014 04:23:22 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.176 as permitted sender) client-ip=209.85.128.176; Received: by mail-ve0-f176.google.com with SMTP id jz11so2260996veb.7 for ; Wed, 21 May 2014 04:23:22 -0700 (PDT) X-Received: by 10.52.103.74 with SMTP id fu10mr7871699vdb.7.1400671402681; Wed, 21 May 2014 04:23:22 -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.220.221.72 with SMTP id ib8csp104630vcb; Wed, 21 May 2014 04:23:22 -0700 (PDT) X-Received: by 10.66.66.108 with SMTP id e12mr58082163pat.35.1400671401793; Wed, 21 May 2014 04:23:21 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id yk5si16597312pac.50.2014.05.21.04.23.21; Wed, 21 May 2014 04:23:21 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752658AbaEULWj (ORCPT + 27 others); Wed, 21 May 2014 07:22:39 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:44875 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752531AbaEULWc (ORCPT ); Wed, 21 May 2014 07:22:32 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id s4LBM8Uj002413; Wed, 21 May 2014 06:22:08 -0500 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s4LBM8mf021381; Wed, 21 May 2014 06:22:08 -0500 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.174.1; Wed, 21 May 2014 06:22:07 -0500 Received: from localhost.localdomain (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s4LBLAAj018495; Wed, 21 May 2014 06:22:04 -0500 From: Roger Quadros To: , CC: , , , , , , , , , , , Roger Quadros Subject: [RFC PATCH 14/16] ARM: OMAP: gpmc: Update DT binding documentation Date: Wed, 21 May 2014 14:21:02 +0300 Message-ID: <1400671264-10702-15-git-send-email-rogerq@ti.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1400671264-10702-1-git-send-email-rogerq@ti.com> References: <1400671264-10702-1-git-send-email-rogerq@ti.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: rogerq@ti.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.176 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 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The meaning of ranges and how address mapping is done has changed. Ranges should now contain 2 ranges - GPMC I/O map. ~1GB. This map will be partitioned among the chip select (CS) nodes - GPMC register map. This is common for all the CS nodes and is shared only by the NAND controller. Chip select (CS) number is no longer specified via reg property. Instead it is specified via the gpmc,cs property in the CS node. gpmc,nand boolean property added to specify whether a NAND device is interfaced to the CS. gpmc,device-width property is made mandatory. The CS node must have a child device node for each device attached to that chip select. Properties for that child are GPMC agnostic. Signed-off-by: Roger Quadros --- Documentation/devicetree/bindings/bus/ti-gpmc.txt | 109 ++++++++++++++++------ 1 file changed, 81 insertions(+), 28 deletions(-) diff --git a/Documentation/devicetree/bindings/bus/ti-gpmc.txt b/Documentation/devicetree/bindings/bus/ti-gpmc.txt index 704be93..ca92efb 100644 --- a/Documentation/devicetree/bindings/bus/ti-gpmc.txt +++ b/Documentation/devicetree/bindings/bus/ti-gpmc.txt @@ -1,8 +1,6 @@ Device tree bindings for OMAP general purpose memory controllers (GPMC) -The actual devices are instantiated from the child nodes of a GPMC node. - -Required properties: +GPMC node - Required properties: - compatible: Should be set to one of the following: @@ -16,22 +14,39 @@ Required properties: (see the example below) - ti,hwmods: Should be set to "ti,gpmc" until the DT transition is completed. - - #address-cells: Must be set to 2 to allow memory address translation - - #size-cells: Must be set to 1 to allow CS address passing + - interrupts: Interrupt resource specifier for GPMC interrupt. + - #address-cells: Must be set to 2 to allow memory address translation. + 1 for range selection and 1 for child's resource address. + - #size-cells: Must be set to 1 to allow child's resource size. - gpmc,num-cs: The maximum number of chip-select lines that controller can support. - gpmc,num-waitpins: The maximum number of wait pins that controller can support. - - ranges: Must be set up to reflect the memory layout with four - integer values for each chip-select line in use: - - 0 - - Currently, calculated values derived from the contents - of the per-CS register GPMC_CONFIG7 (as set up by the - bootloader) are used for the physical address decoding. - As this will change in the future, filling correct - values here is a requirement. + - ranges: Should contain 2 ranges + - GPMC I/O map. ~1GB. This map will be partitioned among + the chip select (CS) nodes + - GPMC register map. This is common for all the CS nodes + and is shared only by the NAND controller. + +The GPMC node must contain Chip Select (CS) child nodes representing the +chip selects in use. + +CS node - Required properties: + + - reg: Resource specifier specifying the CS partition start address + and size. Start address must be 16MB aligned. Size has to be + one of 16MB, 32MB, 64MB, 128MB and 256MB. + - #address-cells: Must be set to 2 to allow memory address translation. + 1 for range selection and 1 for child's resource address. + - #size-cells: Must be set to 1 to allow child's resource size. + - ranges: Must be present for 1:1 address translation of child nodes. + + - gpmc,cs: Chip select number. 0 to (gpmc,num-cs - 1) + - gpmc,device-width: Total width of device(s) connected to a GPMC + chip-select in bytes. The GPMC supports 8-bit + and 16-bit devices and so this property must be + 1 or 2. + - gpmc,nand: Boolean. Must be present if CS contains NAND device child. Timing properties for child nodes. All are optional and default to 0. @@ -95,10 +110,6 @@ GPMC chip-select settings properties for child nodes. All are optional. - gpmc,burst-wrap Enables wrap bursting - gpmc,burst-read Enables read page/burst mode - gpmc,burst-write Enables write page/burst mode -- gpmc,device-width Total width of device(s) connected to a GPMC - chip-select in bytes. The GPMC supports 8-bit - and 16-bit devices and so this property must be - 1 or 2. - gpmc,mux-add-data Address and data multiplexing configuration. Valid values are 1 for address-address-data multiplexing mode and 2 for address-data @@ -114,17 +125,59 @@ GPMC chip-select settings properties for child nodes. All are optional. Example for an AM33xx board: - gpmc: gpmc@50000000 { - compatible = "ti,am3352-gpmc"; - ti,hwmods = "gpmc"; - reg = <0x50000000 0x2000>; - interrupts = <100>; +gpmc@50000000 { + compatible = "ti,am3352-gpmc"; + ti,hwmods = "gpmc"; + reg = <0x50000000 0x36b>; + interrupts = <100>; - gpmc,num-cs = <8>; - gpmc,num-waitpins = <2>; + gpmc,num-cs = <8>; + gpmc,num-waitpins = <2>; + #address-cells = <2>; + #size-cells = <1>; + + ranges = <0 0 0x00000000 0x1FFFFFFF /* GPMC I/O space 512MB */ + 1 0 0x50000000 0x36b>; /* register space */ + + cs0 { #address-cells = <2>; #size-cells = <1>; - ranges = <0 0 0x08000000 0x10000000>; /* CS0 @addr 0x8000000, size 0x10000000 */ + reg = <0 0 0x1000000>; /* CS0 partition, 16 MB */ + ranges; + + gpmc,cs = <0>; + gpmc,device-width = <2>; /* 16-bit */ + gpmc,nand; + + gpmc,cs-on-ns = <0>; + gpmc,cs-rd-off-ns = <36>; + gpmc,cs-wr-off-ns = <36>; + gpmc,adv-on-ns = <6>; + gpmc,adv-rd-off-ns = <24>; + gpmc,adv-wr-off-ns = <36>; + gpmc,oe-on-ns = <6>; + gpmc,oe-off-ns = <48>; + gpmc,we-on-ns = <6>; + gpmc,we-off-ns = <30>; + gpmc,rd-cycle-ns = <72>; + gpmc,wr-cycle-ns = <72>; + gpmc,access-ns = <54>; + gpmc,wr-access-ns = <30>; + + nand@0,0 { + compatible = "ti,omap2-nand"; + #address-cells = <1>; + #size-cells = <1>; + reg = <0 0 4 /* Nand I/O */ + 1 0 0x36b>; /* GPMC registers */ + interrupts = <20>; + + ti,nand-cs = <0>; + nand-bus-width = <16>; + ... + }; - /* child nodes go here */ }; + + /* Other CS nodes and their children if present */ +};