From: Mikko Perttunen <mikko.perttunen-/1wQRMveznE@public.gmane.org>
To: Alexandre Courbot
<gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Tomeu Vizoso
<tomeu.vizoso-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
Cc: "linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Javier Martinez Canillas
<javier.martinez-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>,
Mikko Perttunen
<mperttunen-DDmLM1+adcrQT0dZR+AlfA@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>,
"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Linux Kernel Mailing List
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH v6 06/15] of: Add Tegra124 EMC bindings
Date: Mon, 02 Mar 2015 11:51:31 +0200 [thread overview]
Message-ID: <54F432A3.9090500@kapsi.fi> (raw)
In-Reply-To: <CAAVeFuL71-VZxAxzGKdn0SebhYrCkFixOiLwq6Ebbih8B+NiRA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On 03/02/2015 10:47 AM, Alexandre Courbot wrote:
> On Thu, Feb 12, 2015 at 11:06 PM, Tomeu Vizoso
> <tomeu.vizoso-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org> wrote:
>> From: Mikko Perttunen <mperttunen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
>>
>> Add binding documentation for the nvidia,tegra124-emc device tree node.
>>
>> Signed-off-by: Mikko Perttunen <mperttunen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
>> Signed-off-by: Tomeu Vizoso <tomeu.vizoso-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
>>
>> ---
>>
>> v5: * Add a short description for each of the register properties
>>
>> v4: * Remove mandatory naming of the timings subnode
>> * Remove constraint on the unit-address of the timings and timing subnodes
>> * Add some more information about nvidia,emc-configuration
>> * Make the example complete
>>
>> v2: * Specify the unit addresses for the timings and timing nodes
>> ---
>> .../bindings/memory-controllers/tegra-emc.txt | 379 +++++++++++++++++++++
>> 1 file changed, 379 insertions(+)
>> create mode 100644 Documentation/devicetree/bindings/memory-controllers/tegra-emc.txt
>>
>> diff --git a/Documentation/devicetree/bindings/memory-controllers/tegra-emc.txt b/Documentation/devicetree/bindings/memory-controllers/tegra-emc.txt
>> new file mode 100644
>> index 0000000..da923b1
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/memory-controllers/tegra-emc.txt
>> @@ -0,0 +1,379 @@
>> +NVIDIA Tegra124 SoC EMC (external memory controller)
>> +====================================================
>> +
>> +Required properties :
>> +- compatible : Should be "nvidia,tegra124-emc".
>> +- reg : physical base address and length of the controller's registers.
>> +- nvidia,memory-controller : phandle of the MC driver.
>> +
>> +The node should contain a "emc-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 "emc-timings" nodes :
>> +- nvidia,ram-code : Should contain the value of RAM_CODE this timing set is used for.
>> +
>> +Each "emc-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.
>> +
>> +Required properties for "timing" nodes :
>> +- clock-frequency : Should contain the memory clock rate in Hz.
>> +- The following properties contain EMC timing characterization values (specified in the board
>> +documentation) :
>> + - nvidia,emc-auto-cal-config : EMC_AUTO_CAL_CONFIG
>> + - nvidia,emc-auto-cal-config2 : EMC_AUTO_CAL_CONFIG2
>> + - nvidia,emc-auto-cal-config3 : EMC_AUTO_CAL_CONFIG3
>> + - nvidia,emc-auto-cal-interval : EMC_AUTO_CAL_INTERVAL
>> + - nvidia,emc-bgbias-ctl0 : EMC_BGBIAS_CTL0
>> + - nvidia,emc-cfg : EMC_CFG
>> + - nvidia,emc-cfg-2 : EMC_CFG_2
>> + - nvidia,emc-cfg-dig-dll : EMC_CFG_DIG_DLL
>> + - nvidia,emc-ctt-term-ctrl : EMC_CTT_TERM_CTRL
>> + - nvidia,emc-mode-1 : Mode Register 1
>> + - nvidia,emc-mode-2 : Mode Register 2
>> + - nvidia,emc-mode-4 : Mode Register 4
>> + - nvidia,emc-mode-reset : Mode Register 0
>> + - nvidia,emc-mrs-wait-cnt : EMC_MRS_WAIT_CNT
>> + - nvidia,emc-sel-dpd-ctrl : EMC_SEL_DPD_CTRL
>> + - nvidia,emc-xm2dqspadctrl2 : EMC_XM2DQSPADCTRL2
>> + - nvidia,emc-zcal-cnt-long : EMC_ZCAL_WAIT_CNT
>> + - nvidia,emc-zcal-interval : EMC_ZCAL_INTERVAL
>> +- nvidia,emc-configuration : EMC timing characterization data. These are the registers (see section
>> +"15.6.2 EMC Registers" in the TRM) whose values need to be specified, according to the board
>> +documentation:
>
> I'm a little bit confused by this. On the one hand, some registers are
> defined by dedicated DT properties, and on the other some are simply
> specified in the nvidia,emc-configuration array. I guess the rationale
> for this is to isolate the registers whose value may control the
> driver vs. those that simply needs to be written as-is.
>
> But in this case, why are some registers (like EMC_CFG_DIG_DLL)
> present in both lists, sometimes with different values? In the case of
> EMC_CFG_DIG_DLL, I also see that the read value of
> "nvidia,emc-cfg-dig-dll" seems to never be used anywhere in
> tegra124-emc.c. Should this property exist at all? Note that I have
> only checked this one, there might be others in the same case.
>
> Or maybe I completely misunderstood the intent here, in which case,
> please enlighten me. :)
>
Well spotted! Looks like the nvidia,emc-cfg-dig-dll property should not
be there. The list was essentially copied from the downstream kernel;
looks like there the list of variables was probably based on that of
Tegra148, where the cfg-dig-dll seems to be used. (The downstream
Tegra124 does not use it.) Should check this for the other properties as
well.
Mikko
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: Mikko Perttunen <mikko.perttunen@kapsi.fi>
To: Alexandre Courbot <gnurou@gmail.com>,
Tomeu Vizoso <tomeu.vizoso@collabora.com>
Cc: "linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>,
Javier Martinez Canillas <javier.martinez@collabora.co.uk>,
Mikko Perttunen <mperttunen@nvidia.com>,
Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Kumar Gala <galak@codeaurora.org>,
Stephen Warren <swarren@wwwdotorg.org>,
Thierry Reding <thierry.reding@gmail.com>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v6 06/15] of: Add Tegra124 EMC bindings
Date: Mon, 02 Mar 2015 11:51:31 +0200 [thread overview]
Message-ID: <54F432A3.9090500@kapsi.fi> (raw)
In-Reply-To: <CAAVeFuL71-VZxAxzGKdn0SebhYrCkFixOiLwq6Ebbih8B+NiRA@mail.gmail.com>
On 03/02/2015 10:47 AM, Alexandre Courbot wrote:
> On Thu, Feb 12, 2015 at 11:06 PM, Tomeu Vizoso
> <tomeu.vizoso@collabora.com> wrote:
>> From: Mikko Perttunen <mperttunen@nvidia.com>
>>
>> Add binding documentation for the nvidia,tegra124-emc device tree node.
>>
>> Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
>> Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
>>
>> ---
>>
>> v5: * Add a short description for each of the register properties
>>
>> v4: * Remove mandatory naming of the timings subnode
>> * Remove constraint on the unit-address of the timings and timing subnodes
>> * Add some more information about nvidia,emc-configuration
>> * Make the example complete
>>
>> v2: * Specify the unit addresses for the timings and timing nodes
>> ---
>> .../bindings/memory-controllers/tegra-emc.txt | 379 +++++++++++++++++++++
>> 1 file changed, 379 insertions(+)
>> create mode 100644 Documentation/devicetree/bindings/memory-controllers/tegra-emc.txt
>>
>> diff --git a/Documentation/devicetree/bindings/memory-controllers/tegra-emc.txt b/Documentation/devicetree/bindings/memory-controllers/tegra-emc.txt
>> new file mode 100644
>> index 0000000..da923b1
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/memory-controllers/tegra-emc.txt
>> @@ -0,0 +1,379 @@
>> +NVIDIA Tegra124 SoC EMC (external memory controller)
>> +====================================================
>> +
>> +Required properties :
>> +- compatible : Should be "nvidia,tegra124-emc".
>> +- reg : physical base address and length of the controller's registers.
>> +- nvidia,memory-controller : phandle of the MC driver.
>> +
>> +The node should contain a "emc-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 "emc-timings" nodes :
>> +- nvidia,ram-code : Should contain the value of RAM_CODE this timing set is used for.
>> +
>> +Each "emc-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.
>> +
>> +Required properties for "timing" nodes :
>> +- clock-frequency : Should contain the memory clock rate in Hz.
>> +- The following properties contain EMC timing characterization values (specified in the board
>> +documentation) :
>> + - nvidia,emc-auto-cal-config : EMC_AUTO_CAL_CONFIG
>> + - nvidia,emc-auto-cal-config2 : EMC_AUTO_CAL_CONFIG2
>> + - nvidia,emc-auto-cal-config3 : EMC_AUTO_CAL_CONFIG3
>> + - nvidia,emc-auto-cal-interval : EMC_AUTO_CAL_INTERVAL
>> + - nvidia,emc-bgbias-ctl0 : EMC_BGBIAS_CTL0
>> + - nvidia,emc-cfg : EMC_CFG
>> + - nvidia,emc-cfg-2 : EMC_CFG_2
>> + - nvidia,emc-cfg-dig-dll : EMC_CFG_DIG_DLL
>> + - nvidia,emc-ctt-term-ctrl : EMC_CTT_TERM_CTRL
>> + - nvidia,emc-mode-1 : Mode Register 1
>> + - nvidia,emc-mode-2 : Mode Register 2
>> + - nvidia,emc-mode-4 : Mode Register 4
>> + - nvidia,emc-mode-reset : Mode Register 0
>> + - nvidia,emc-mrs-wait-cnt : EMC_MRS_WAIT_CNT
>> + - nvidia,emc-sel-dpd-ctrl : EMC_SEL_DPD_CTRL
>> + - nvidia,emc-xm2dqspadctrl2 : EMC_XM2DQSPADCTRL2
>> + - nvidia,emc-zcal-cnt-long : EMC_ZCAL_WAIT_CNT
>> + - nvidia,emc-zcal-interval : EMC_ZCAL_INTERVAL
>> +- nvidia,emc-configuration : EMC timing characterization data. These are the registers (see section
>> +"15.6.2 EMC Registers" in the TRM) whose values need to be specified, according to the board
>> +documentation:
>
> I'm a little bit confused by this. On the one hand, some registers are
> defined by dedicated DT properties, and on the other some are simply
> specified in the nvidia,emc-configuration array. I guess the rationale
> for this is to isolate the registers whose value may control the
> driver vs. those that simply needs to be written as-is.
>
> But in this case, why are some registers (like EMC_CFG_DIG_DLL)
> present in both lists, sometimes with different values? In the case of
> EMC_CFG_DIG_DLL, I also see that the read value of
> "nvidia,emc-cfg-dig-dll" seems to never be used anywhere in
> tegra124-emc.c. Should this property exist at all? Note that I have
> only checked this one, there might be others in the same case.
>
> Or maybe I completely misunderstood the intent here, in which case,
> please enlighten me. :)
>
Well spotted! Looks like the nvidia,emc-cfg-dig-dll property should not
be there. The list was essentially copied from the downstream kernel;
looks like there the list of variables was probably based on that of
Tegra148, where the cfg-dig-dll seems to be used. (The downstream
Tegra124 does not use it.) Should check this for the other properties as
well.
Mikko
next prev parent reply other threads:[~2015-03-02 9:51 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-12 14:06 [PATCH v6 00/15] Tegra124 EMC (external memory controller) support Tomeu Vizoso
2015-02-12 14:06 ` Tomeu Vizoso
2015-02-12 14:06 ` Tomeu Vizoso
2015-02-12 14:06 ` [PATCH v6 01/15] clk: tegra124: Remove old emc clock Tomeu Vizoso
2015-02-12 14:06 ` [PATCH v6 02/15] of: Document long-ram-code property in nvidia,tegra20-apbmisc Tomeu Vizoso
2015-02-12 14:06 ` [PATCH v6 03/15] soc/tegra: Add ram code reader helper Tomeu Vizoso
2015-03-02 8:46 ` Alexandre Courbot
2015-03-02 9:52 ` Mikko Perttunen
2015-03-09 14:36 ` Tomeu Vizoso
2015-02-12 14:06 ` [PATCH v6 04/15] of: document new emc-timings subnode in nvidia,tegra124-car Tomeu Vizoso
2015-02-12 14:06 ` [PATCH v6 05/15] of: Document timings subnode of nvidia,tegra-mc Tomeu Vizoso
2015-02-12 14:06 ` [PATCH v6 06/15] of: Add Tegra124 EMC bindings Tomeu Vizoso
[not found] ` <1423750042-6535-7-git-send-email-tomeu.vizoso-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
2015-03-02 8:47 ` Alexandre Courbot
2015-03-02 8:47 ` Alexandre Courbot
[not found] ` <CAAVeFuL71-VZxAxzGKdn0SebhYrCkFixOiLwq6Ebbih8B+NiRA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-03-02 9:51 ` Mikko Perttunen [this message]
2015-03-02 9:51 ` Mikko Perttunen
2015-02-12 14:06 ` [PATCH v6 07/15] of: document external-memory-controller property in tegra124-car Tomeu Vizoso
2015-02-12 14:06 ` [PATCH v6 08/15] ARM: tegra: Add EMC to Tegra124 device tree Tomeu Vizoso
2015-02-12 14:06 ` Tomeu Vizoso
2015-02-12 14:06 ` [PATCH v6 09/15] ARM: tegra: Add EMC timings to Jetson TK1 " Tomeu Vizoso
2015-02-12 14:06 ` Tomeu Vizoso
2015-02-12 14:06 ` [PATCH v6 10/15] memory: tegra: Add API needed by the EMC driver Tomeu Vizoso
2015-02-12 14:06 ` [PATCH v6 11/15] memory: tegra: Add EMC (external memory controller) driver Tomeu Vizoso
2015-02-12 14:06 ` [PATCH v6 12/15] clk: Expose clk_hw_reparent to providers Tomeu Vizoso
2015-02-12 14:06 ` [PATCH v6 13/15] clk: tegra: Add EMC clock driver Tomeu Vizoso
2015-02-12 14:06 ` [PATCH v6 14/15] memory: tegra: Add debugfs entry for getting and setting the EMC rate Tomeu Vizoso
2015-02-12 14:06 ` [PATCH v6 15/15] clk: tegra: Set the EMC clock as the parent of the MC clock 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=54F432A3.9090500@kapsi.fi \
--to=mikko.perttunen-/1wqrmvezne@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=mperttunen-DDmLM1+adcrQT0dZR+AlfA@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.