linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: grant.likely@secretlab.ca (Grant Likely)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 7/9] arm/tegra: emc: device tree bindings
Date: Mon, 2 Jan 2012 02:00:36 -0700	[thread overview]
Message-ID: <20120102090036.GM18381@ponder.secretlab.ca> (raw)
In-Reply-To: <1324599468-12845-8-git-send-email-olof@lixom.net>

On Thu, Dec 22, 2011 at 04:17:46PM -0800, Olof Johansson wrote:
> Device tree bindings for the EMC tables on tegra.
> 
> Signed-off-by: Olof Johansson <olof@lixom.net>
> Cc: Rob Herring <robherring2@gmail.com>
> Cc: devicetree-discuss at lists.ozlabs.org

Okay by me.

Acked-by: Grant Likely <grant.likely@secretlab.ca>

> ---
>  .../devicetree/bindings/arm/tegra/emc.txt          |  100 ++++++++++++++++++++
>  arch/arm/boot/dts/tegra20.dtsi                     |    7 ++
>  2 files changed, 107 insertions(+), 0 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/arm/tegra/emc.txt
> 
> diff --git a/Documentation/devicetree/bindings/arm/tegra/emc.txt b/Documentation/devicetree/bindings/arm/tegra/emc.txt
> new file mode 100644
> index 0000000..09335f8
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/arm/tegra/emc.txt
> @@ -0,0 +1,100 @@
> +Embedded Memory Controller
> +
> +Properties:
> +- name : Should be emc
> +- #address-cells : Should be 1
> +- #size-cells : Should be 0
> +- compatible : Should contain "nvidia,tegra20-emc".
> +- reg : Offset and length of the register set for the device
> +- nvidia,use-ram-code : If present, the sub-nodes will be addressed
> +  and chosen using the ramcode board selector. If omitted, only one
> +  set of tables can be present and said tables will be used
> +  irrespective of ram-code configuration.
> +
> +Child device nodes describe the memory settings for different configurations and clock rates.
> +
> +Example:
> +
> +	emc at 7000f400 {
> +		#address-cells = < 1 >;
> +		#size-cells = < 0 >;
> +		compatible = "nvidia,tegra20-emc";
> +		reg = <0x7000f4000 0x200>;
> +	}
> +
> +
> +Embedded Memory Controller ram-code table
> +
> +If the emc node has the nvidia,use-ram-code property present, then the
> +next level of nodes below the emc table are used to specify which settings
> +apply for which ram-code settings.
> +
> +If the emc node lacks the nvidia,use-ram-code property, this level is omitted
> +and the tables are stored directly under the emc node (see below).
> +
> +Properties:
> +
> +- name : Should be emc-tables
> +- nvidia,ram-code : the binary representation of the ram-code board strappings
> +  for which this node (and children) are valid.
> +
> +
> +
> +Embedded Memory Controller configuration table
> +
> +This is a table containing the EMC register settings for the various
> +operating speeds of the memory controller. They are always located as
> +subnodes of the emc controller node.
> +
> +There are two ways of specifying which tables to use:
> +
> +* The simplest is if there is just one set of tables in the device tree,
> +  and they will always be used (based on which frequency is used).
> +  This is the preferred method, especially when firmware can fill in
> +  this information based on the specific system information and just
> +  pass it on to the kernel.
> +
> +* The slightly more complex one is when more than one memory configuration
> +  might exist on the system.  The Tegra20 platform handles this during
> +  early boot by selecting one out of possible 4 memory settings based
> +  on a 2-pin "ram code" bootstrap setting on the board. The values of
> +  these strappings can be read through a register in the SoC, and thus
> +  used to select which tables to use.
> +
> +Properties:
> +- name : Should be emc-table
> +- compatible : Should contain "nvidia,tegra20-emc-table".
> +- reg : either an opaque enumerator to tell different tables apart, or
> +  the valid frequency for which the table should be used (in kHz).
> +- clock-frequency : the clock frequency for the EMC at which this
> +  table should be used (in kHz).
> +- nvidia,emc-registers : a 46 word array of EMC registers to be programmed
> +  for operation at the 'clock-frequency' setting.
> +  The order and contents of the registers are:
> +    RC, RFC, RAS, RP, R2W, W2R, R2P, W2P, RD_RCD, WR_RCD, RRD, REXT,
> +    WDV, QUSE, QRST, QSAFE, RDV, REFRESH, BURST_REFRESH_NUM, PDEX2WR,
> +    PDEX2RD, PCHG2PDEN, ACT2PDEN, AR2PDEN, RW2PDEN, TXSR, TCKE, TFAW,
> +    TRPAB, TCLKSTABLE, TCLKSTOP, TREFBW, QUSE_EXTRA, FBIO_CFG6, ODT_WRITE,
> +    ODT_READ, FBIO_CFG5, CFG_DIG_DLL, DLL_XFORM_DQS, DLL_XFORM_QUSE,
> +    ZCAL_REF_CNT, ZCAL_WAIT_CNT, AUTO_CAL_INTERVAL, CFG_CLKTRIM_0,
> +    CFG_CLKTRIM_1, CFG_CLKTRIM_2
> +
> +		emc-table at 166000 {
> +			reg = <166000>;
> +			compatible = "nvidia,tegra20-emc-table";
> +			clock-frequency = < 166000 >;
> +			nvidia,emc-registers = < 0 0 0 0 0 0 0 0 0 0 0 0 0 0
> +						 0 0 0 0 0 0 0 0 0 0 0 0 0 0
> +						 0 0 0 0 0 0 0 0 0 0 0 0 0 0
> +						 0 0 0 0 >;
> +		};
> +
> +		emc-table at 333000 {
> +			reg = <333000>;
> +			compatible = "nvidia,tegra20-emc-table";
> +			clock-frequency = < 333000 >;
> +			nvidia,emc-registers = < 0 0 0 0 0 0 0 0 0 0 0 0 0 0
> +						 0 0 0 0 0 0 0 0 0 0 0 0 0 0
> +						 0 0 0 0 0 0 0 0 0 0 0 0 0 0
> +						 0 0 0 0 >;
> +		};
> diff --git a/arch/arm/boot/dts/tegra20.dtsi b/arch/arm/boot/dts/tegra20.dtsi
> index 3da7afd..c162241 100644
> --- a/arch/arm/boot/dts/tegra20.dtsi
> +++ b/arch/arm/boot/dts/tegra20.dtsi
> @@ -120,6 +120,13 @@
>  		interrupts = < 0 91 0x04 >;
>  	};
>  
> +	emc at 7000f400 {
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +		compatible = "nvidia,tegra20-emc";
> +		reg = <0x7000f400 0x200>;
> +	};
> +
>  	sdhci at c8000000 {
>  		compatible = "nvidia,tegra20-sdhci";
>  		reg = <0xc8000000 0x200>;
> -- 
> 1.7.8.GIT
> 
> _______________________________________________
> devicetree-discuss mailing list
> devicetree-discuss at lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/devicetree-discuss

  reply	other threads:[~2012-01-02  9:00 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-23  0:17 [PATCH 0/9] arm/tegra: fuse cleanup and emc device tree support Olof Johansson
2011-12-23  0:17 ` [PATCH 1/9] arm/tegra: Don't WARN_ON() for too early dma channel allocations Olof Johansson
2011-12-23  0:17 ` [PATCH 2/9] arm/tegra: use APB DMA for accessing APB devices Olof Johansson
2012-01-04 22:08   ` Stephen Warren
2012-01-04 23:39     ` Olof Johansson
2012-01-05  5:49   ` [PATCH v2] " Olof Johansson
2012-01-05 22:07     ` Stephen Warren
2012-01-06  1:22       ` Olof Johansson
2011-12-23  0:17 ` [PATCH 3/9] arm/tegra: fuse: use apbio dma for register access Olof Johansson
2011-12-23  0:17 ` [PATCH 4/9] arm/tegra: fuse: add functions to access chip revision Olof Johansson
2011-12-23 10:47   ` Henning Heinold
2012-01-04  3:46     ` Olof Johansson
2012-01-04 23:20   ` Stephen Warren
2012-01-04 23:36     ` Olof Johansson
2012-01-05  5:50   ` [PATCH v2] " Olof Johansson
2012-01-05 22:08     ` Stephen Warren
2011-12-23  0:17 ` [PATCH 5/9] arm/tegra: fuse: add bct strapping reading Olof Johansson
2011-12-23  0:17 ` [PATCH 6/9] arm/tegra: emc: convert tegra2_emc to a platform driver Olof Johansson
2012-01-04 23:39   ` Stephen Warren
2012-01-04 23:42     ` Olof Johansson
2012-01-05  5:56   ` [PATCH v2] " Olof Johansson
2012-01-05  6:01     ` [PATCH v3] " Olof Johansson
2012-01-05 22:14       ` Stephen Warren
2012-01-06  1:36         ` Olof Johansson
2012-01-06  1:42       ` [PATCH v4] ARM: tegra: " Olof Johansson
2012-01-06 17:17         ` Stephen Warren
2011-12-23  0:17 ` [PATCH 7/9] arm/tegra: emc: device tree bindings Olof Johansson
2012-01-02  9:00   ` Grant Likely [this message]
2012-01-06  0:01   ` Stephen Warren
2012-01-06  1:20     ` Olof Johansson
2012-01-12 20:03       ` Simon Glass
2012-01-12 20:50         ` Stephen Warren
2012-01-12 21:01           ` Simon Glass
2012-01-12 21:48   ` Simon Glass
2011-12-23  0:17 ` [PATCH 8/9] arm/tegra: seaboard: add EMC table to device tree Olof Johansson
2012-01-04 23:51   ` Stephen Warren
2012-01-04 23:55     ` Olof Johansson
2012-01-05  0:11       ` Linus Walleij
2012-01-05  5:43         ` Olof Johansson
2011-12-23  0:17 ` [PATCH 9/9] arm/tegra: emc: device tree support Olof Johansson
2012-01-05  0:27   ` Stephen Warren
2012-01-05  0:35     ` Olof Johansson
2012-01-05  6:02   ` [PATCH v2] " Olof Johansson
2012-01-05 22:35     ` Stephen Warren
2012-01-06  1:26       ` Olof Johansson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120102090036.GM18381@ponder.secretlab.ca \
    --to=grant.likely@secretlab.ca \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).