devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexandre Courbot <acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
To: Tomeu Vizoso
	<tomeu.vizoso-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Javier Martinez Canillas
	<javier.martinez-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
	Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	Ian Campbell
	<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
	Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>,
	Thierry Reding
	<thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Alexandre Courbot
	<gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v3 05/13] of: Document timings subnode of nvidia,tegra-mc
Date: Thu, 6 Nov 2014 17:12:27 +0900	[thread overview]
Message-ID: <545B2D6B.9030001@nvidia.com> (raw)
In-Reply-To: <1414599796-30597-6-git-send-email-tomeu.vizoso-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>

On 10/30/2014 01:22 AM, Tomeu Vizoso wrote:
> The MC driver needs some timing-specific information to program the EMEM during
> a rate change of the EMC clock.
>
> Signed-off-by: Tomeu Vizoso <tomeu.vizoso-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
> ---
>   .../memory-controllers/nvidia,tegra-mc.txt         | 46 +++++++++++++++++++++-
>   1 file changed, 44 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/memory-controllers/nvidia,tegra-mc.txt b/Documentation/devicetree/bindings/memory-controllers/nvidia,tegra-mc.txt
> index f3db93c..8467b8c 100644
> --- a/Documentation/devicetree/bindings/memory-controllers/nvidia,tegra-mc.txt
> +++ b/Documentation/devicetree/bindings/memory-controllers/nvidia,tegra-mc.txt
> @@ -15,9 +15,26 @@ Required properties:
>   This device implements an IOMMU that complies with the generic IOMMU binding.
>   See ../iommu/iommu.txt for details.
>
> -Example:
> ---------
> +The node should contain a "timings" subnode for each supported RAM type (see
> +field RAM_CODE in register PMC_STRAPPING_OPT_A), with its unit address being its
> +RAM_CODE.
>
> +Required properties for "timings" nodes :
> +- nvidia,ram-code : Should contain the value of RAM_CODE this timing set is used
> +for.
> +
> +Each "timings" node should contain a "timing" subnode for every supported EMC
> +clock rate. The "timing" subnodes should have the clock rate in Hz as their unit
> +address.

In patch 04, a similar sub-node is named "emc-timings". Shouldn't the 
same name be used here for consistency?

Also, it seems like there is a need for timing nodes in the MC to have 
match timing nodes in the CAR. It would be nice to add that information 
in all related bindings files.

> +
> +Required properties for "timing" nodes :
> +- clock-frequency : Should contain the memory clock rate in Hz.
> +- nvidia,emem-configuration : Values to be written to the EMEM register block,
> +as specified by the board documentation.

Could you add some more information about which range of registers we 
are talking about, and whether they must all be specified or only part 
of them?

> +
> +Example SoC include file:
> +
> +/ {
>   	mc: memory-controller@0,70019000 {
>   		compatible = "nvidia,tegra124-mc";
>   		reg = <0x0 0x70019000 0x0 0x1000>;
> @@ -34,3 +51,28 @@ Example:
>   		...
>   		iommus = <&mc TEGRA_SWGROUP_SDMMC1A>;
>   	};
> +};
> +
> +Example board file:
> +
> +/ {
> +	memory-controller@0,70019000 {
> +		timings@3 {
> +			nvidia,ram-code = <3>;
> +
> +			timing@12750000 {
> +				clock-frequency = <12750000>;
> +
> +				nvidia,emem-configuration = <
> +					0x40040001 /* MC_EMEM_ARB_CFG */
> +					0x8000000a /* MC_EMEM_ARB_OUTSTANDING_REQ */
> +					0x00000001 /* MC_EMEM_ARB_TIMING_RCD */
> +					0x00000001 /* MC_EMEM_ARB_TIMING_RP */
> +					0x00000002 /* MC_EMEM_ARB_TIMING_RC */
> +					0x00000000 /* MC_EMEM_ARB_TIMING_RAS */
> +					0x00000002 /* MC_EMEM_ARB_TIMING_FAW */
> +				>;

Looking at the actual board files I suppose this example here is 
incomplete. It would be nice to make this explicit, maybe by adding 
"..." on a new line to indicate more registers are expected.

  parent reply	other threads:[~2014-11-06  8:12 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-29 16:22 [PATCH v3 00/13] Tegra124 EMC (external memory controller) support Tomeu Vizoso
2014-10-29 16:22 ` [PATCH v3 02/13] of: Document long-ram-code property in nvidia,tegra20-apbmisc Tomeu Vizoso
2014-10-29 16:22 ` [PATCH v3 04/13] of: document new emc-timings subnode in nvidia,tegra124-car Tomeu Vizoso
2014-11-06  6:37   ` Alexandre Courbot
     [not found]     ` <545B172C.4060105-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2014-11-06  9:11       ` Tomeu Vizoso
     [not found]         ` <CAAObsKBe8kigKfEs_ER+1X5fqLw3dZD69XHicEn4cVuQTyoFAw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-11-06  9:15           ` Alexandre Courbot
2014-11-06 15:12     ` Rob Herring
2014-11-07  5:31       ` Alexandre Courbot
2014-11-07 11:35         ` Mikko Perttunen
     [not found]         ` <545C5927.3010001-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2014-11-07 13:03           ` Tomeu Vizoso
     [not found]       ` <CAL_JsqKYSF3JVrXH_dkqRXQrgUU3igzvoK1C2k1Caz-4UuHX6Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-11-07 13:10         ` Tomeu Vizoso
2014-10-29 16:22 ` [PATCH v3 05/13] of: Document timings subnode of nvidia,tegra-mc Tomeu Vizoso
     [not found]   ` <1414599796-30597-6-git-send-email-tomeu.vizoso-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2014-11-06  8:12     ` Alexandre Courbot [this message]
     [not found]       ` <545B2D6B.9030001-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2014-11-06 10:32         ` Tomeu Vizoso
2014-10-29 16:22 ` [PATCH v3 06/13] of: Add Tegra124 EMC bindings Tomeu Vizoso
2014-10-29 16:22 ` [PATCH v3 07/13] ARM: tegra: Add EMC to Tegra124 device tree Tomeu Vizoso
2014-10-29 16:22 ` [PATCH v3 08/13] ARM: tegra: Add EMC timings to Jetson TK1 " Tomeu Vizoso
     [not found]   ` <1414599796-30597-9-git-send-email-tomeu.vizoso-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2014-11-06 12:21     ` Nikolaus Schulz
     [not found]       ` <20141106122149.GC3863-GNrqntRiisjPWV3K8zbkiAH8Oo8bv1DvZkel5v8DVj8@public.gmane.org>
2014-11-07 16:12         ` Tomeu Vizoso
2014-10-29 16:22 ` [PATCH v3 10/13] memory: tegra: Add EMC (external memory controller) driver Tomeu Vizoso
2014-11-06  7:56   ` Alexandre Courbot
     [not found]     ` <545B29AA.8030006-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2014-11-06 11:35       ` Mikko Perttunen
     [not found]         ` <545B5D15.6030705-/1wQRMveznE@public.gmane.org>
2014-11-07 16:16           ` Tomeu Vizoso

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=545B2D6B.9030001@nvidia.com \
    --to=acourbot-ddmlm1+adcrqt0dzr+alfa@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org \
    --cc=gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
    --cc=javier.martinez-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org \
    --cc=thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=tomeu.vizoso-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.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).