<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: DDR dimm_params ATF LS1028ARDB in Layerscape</title>
    <link>https://community.nxp.com/t5/Layerscape/DDR-dimm-params-ATF-LS1028ARDB/m-p/1985897#M15042</link>
    <description>&lt;DIV id="bodyDisplay_1e98ca42ca34be_20667" class="lia-message-body lia-component-message-view-widget-body lia-component-body-signature-highlight-escalation lia-component-message-view-widget-body-signature-highlight-escalation"&gt;
&lt;DIV class="lia-message-body-content"&gt;
&lt;P&gt;HI &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/227048"&gt;@pb3&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Just to let you know that I am working on your question.&lt;/P&gt;
&lt;P&gt;When I have any update I will let you know&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
    <pubDate>Fri, 01 Nov 2024 02:45:41 GMT</pubDate>
    <dc:creator>SebastianG</dc:creator>
    <dc:date>2024-11-01T02:45:41Z</dc:date>
    <item>
      <title>DDR dimm_params ATF LS1028ARDB</title>
      <link>https://community.nxp.com/t5/Layerscape/DDR-dimm-params-ATF-LS1028ARDB/m-p/1985566#M15039</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi, I'm trying to understand how the DDR is configured on LS1028ARDB platform so that to know how this can be done on a custom board, and although it does not seem too much complicated I'm not sure about few parameters in ATF source code used for this purpose.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the code:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;static const struct rc_timing rcz[] = {
	{
		1600, // speed_bin 
		8,  // clk_adj
		5 // wrlvl
	},
	{}
};

static const struct board_timing ram[] = {
	{
		0x1f, // rc 
		rcz, 
		0x1020200, //add1
		0x00000003 //add2
	},
};

int ddr_board_options(struct ddr_info *priv)
{
	int ret;
	struct memctl_opt *popts = &amp;amp;priv-&amp;gt;opt;

	ret = cal_board_params(priv, ram, ARRAY_SIZE(ram));
	if (ret != 0) {
		return ret;
	}

	popts-&amp;gt;bstopre = U(0x40); /* precharge value */
	popts-&amp;gt;half_strength_drive_en = 1;
	popts-&amp;gt;cpo_sample = U(0x46);
	popts-&amp;gt;ddr_cdr1 = DDR_CDR1_DHC_EN |
			  DDR_CDR1_ODT(DDR_CDR_ODT_80ohm);
	popts-&amp;gt;ddr_cdr2 = DDR_CDR2_ODT(DDR_CDR_ODT_80ohm) |
			  DDR_CDR2_VREF_OVRD(70); /* Vref = 70% */

	popts-&amp;gt;addr_hash = 1; /* address hashing */
	return 0;
}

/* DDR model number:  MT40A1G8SA-075:E */
struct dimm_params ddr_raw_timing = {
	.n_ranks = U(1),
	.rank_density = ULL(4294967296),
	.capacity = ULL(4294967296),
	.primary_sdram_width = U(32),
	.ec_sdram_width = U(4),
	.rdimm = U(0),
	.mirrored_dimm = U(0),
	.n_row_addr = U(16),
	.n_col_addr = U(10),
	.bank_group_bits = U(2),
	.edc_config = U(2),
	.burst_lengths_bitmask = U(0x0c),
	.tckmin_x_ps = 750,
	.tckmax_ps = 1900,
	.caslat_x = U(0x0001FFE00),
	.taa_ps = 13500,
	.trcd_ps = 13500,
	.trp_ps = 13500,
	.tras_ps = 32000,
	.trc_ps = 45500,
	.twr_ps = 15000,
	.trfc1_ps = 350000,
	.trfc2_ps = 260000,
	.trfc4_ps = 160000,
	.tfaw_ps = 21000,
	.trrds_ps = 3000,
	.trrdl_ps = 4900,
	.tccdl_ps = 5000,
	.refresh_rate_ps = U(7800000),
	.dq_mapping[0] = U(0x16),
	.dq_mapping[1] = U(0x36),
	.dq_mapping[2] = U(0x16),
	.dq_mapping[3] = U(0x36),
	.dq_mapping[4] = U(0x16),
	.dq_mapping[5] = U(0x36),
	.dq_mapping[6] = U(0x16),
	.dq_mapping[7] = U(0x36),
	.dq_mapping[8] = U(0x16),
	.dq_mapping[9] = U(0x0),
	.dq_mapping[10] = U(0x0),
	.dq_mapping[11] = U(0x0),
	.dq_mapping[12] = U(0x0),
	.dq_mapping[13] = U(0x0),
	.dq_mapping[14] = U(0x0),
	.dq_mapping[15] = U(0x0),
	.dq_mapping[16] = U(0x0),
	.dq_mapping[17] = U(0x0),
	.dq_mapping_ors = U(0),
	.rc = U(0x1f),
};&lt;/LI-CODE&gt;&lt;P&gt;I would be grateful if somebody could help me to understand:&lt;/P&gt;&lt;P&gt;- dimm_params-&amp;gt;rc - what's its purpose and why is it the same as board_timing-&amp;gt;rc?&lt;/P&gt;&lt;P&gt;- board_timing-&amp;gt;add1 and board_timing-&amp;gt;add2 - what's the purpose of these two and how to decide what value should be set here?&lt;/P&gt;&lt;P&gt;And yes, I'm aware that probably CodeWarrior is capable of generating appropriate code, however first I would like to understand what this code actually does.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Oct 2024 13:24:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/DDR-dimm-params-ATF-LS1028ARDB/m-p/1985566#M15039</guid>
      <dc:creator>pb3</dc:creator>
      <dc:date>2024-10-31T13:24:50Z</dc:date>
    </item>
    <item>
      <title>Re: DDR dimm_params ATF LS1028ARDB</title>
      <link>https://community.nxp.com/t5/Layerscape/DDR-dimm-params-ATF-LS1028ARDB/m-p/1985897#M15042</link>
      <description>&lt;DIV id="bodyDisplay_1e98ca42ca34be_20667" class="lia-message-body lia-component-message-view-widget-body lia-component-body-signature-highlight-escalation lia-component-message-view-widget-body-signature-highlight-escalation"&gt;
&lt;DIV class="lia-message-body-content"&gt;
&lt;P&gt;HI &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/227048"&gt;@pb3&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Just to let you know that I am working on your question.&lt;/P&gt;
&lt;P&gt;When I have any update I will let you know&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Fri, 01 Nov 2024 02:45:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/DDR-dimm-params-ATF-LS1028ARDB/m-p/1985897#M15042</guid>
      <dc:creator>SebastianG</dc:creator>
      <dc:date>2024-11-01T02:45:41Z</dc:date>
    </item>
    <item>
      <title>Re: DDR dimm_params ATF LS1028ARDB</title>
      <link>https://community.nxp.com/t5/Layerscape/DDR-dimm-params-ATF-LS1028ARDB/m-p/1987291#M15050</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/227048"&gt;@pb3&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Regarding to the question "- board_timing-&amp;gt;add1 and board_timing-&amp;gt;add2 - what's the purpose of these two and how to decide what value should be set here?",&lt;/P&gt;
&lt;P&gt;This values are determinated for the values specified on the following images:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ADD1 &amp;amp; ADD2 properties.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/308467i0B0EA6437C16F10C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ADD1 &amp;amp; ADD2 properties.png" alt="ADD1 &amp;amp; ADD2 properties.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ADD1 &amp;amp; ADD2 registers.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/308468i207D29DFF17F9FDA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ADD1 &amp;amp; ADD2 registers.png" alt="ADD1 &amp;amp; ADD2 registers.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;As you mention before this values can be taken in codewarrior trought validation tool (Centering the clock test) with Codewarrior TAP (Debugger).&lt;/P&gt;
&lt;P&gt;The purpose of this values are set the delay to write levelling start time for DQS [1 to 8].&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Mon, 04 Nov 2024 19:57:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Layerscape/DDR-dimm-params-ATF-LS1028ARDB/m-p/1987291#M15050</guid>
      <dc:creator>SebastianG</dc:creator>
      <dc:date>2024-11-04T19:57:38Z</dc:date>
    </item>
  </channel>
</rss>

