<?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: How to change DDR3 clock speed in U-boot/U-boot SPL? in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/How-to-change-DDR3-clock-speed-in-U-boot-U-boot-SPL/m-p/1000303#M148309</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Amr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for sharing solution, in general recommended to change ddr clocks running&lt;/P&gt;&lt;P&gt;code from ocram, during boot it also can be done in plugin:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://source.codeaurora.org/external/imx/uboot-imx/tree/board/freescale/mx6ul_14x14_evk/plugin.S?h=imx_v2019.04_4.19.35_1.1.0" title="https://source.codeaurora.org/external/imx/uboot-imx/tree/board/freescale/mx6ul_14x14_evk/plugin.S?h=imx_v2019.04_4.19.35_1.1.0"&gt;plugin.S\mx6ul_14x14_evk\freescale\board - uboot-imx - i.MX U-Boot&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Jan 2020 00:52:32 GMT</pubDate>
    <dc:creator>igorpadykov</dc:creator>
    <dc:date>2020-01-14T00:52:32Z</dc:date>
    <item>
      <title>How to change DDR3 clock speed in U-boot/U-boot SPL?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-change-DDR3-clock-speed-in-U-boot-U-boot-SPL/m-p/1000301#M148307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm working with a custom board based on the&amp;nbsp;MCIMX6UL-EVK (14x14 evk), using the&amp;nbsp;iMX6UL (MCIMX6G3CVM05AB) and the same RAM chip (MT41K256M16LY-093). I've run the NXP DDR Stress Test tool on the board using the default MX6UL DDR3 script, setting MR1 to 0x0004 and the DDR freq to 400MHz, but the calibration fails. I then tried calibrating at 300MHz (see calibration result in this post), and was able to run the stress test overnight.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've been trying to compile mainline U-boot using the&amp;nbsp;mx6ul_14x14_evk_defconfig. However, I need to be able to reduce the DDR clock from the default 400Mhz down to 300MHz. Where can this be done?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Jan 2020 20:27:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-change-DDR3-clock-speed-in-U-boot-U-boot-SPL/m-p/1000301#M148307</guid>
      <dc:creator>amr</dc:creator>
      <dc:date>2020-01-11T20:27:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to change DDR3 clock speed in U-boot/U-boot SPL?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-change-DDR3-clock-speed-in-U-boot-U-boot-SPL/m-p/1000302#M148308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Managed to do it by adding the following code in board_init_f:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;/* Set the DDR clock to 297MHz as follows:
1 - Change PFD0 divider to generate 297MHz
2 - Change pre_periph2_clk_sel to source its clock from PFD0 (by default it takes it from PFD2)
See IMX6ULRM section 18.3
*/

u32 reg;

// Change PFD0 divider to 32
 reg = readl(&amp;amp;mxc_ccm-&amp;gt;analog_pfd_528);
 reg &amp;amp;= ~0x3F;
 reg |= 32U;
 writel(reg, &amp;amp;mxc_ccm-&amp;gt;analog_pfd_528);
// Toggle PFD0 clock gate
 writel(1U &amp;lt;&amp;lt; 7, &amp;amp;mxc_ccm-&amp;gt;analog_pfd_528_tog);
 writel(1U &amp;lt;&amp;lt; 7, &amp;amp;mxc_ccm-&amp;gt;analog_pfd_528_tog);

// Set PRE_PERIPH2_CLK source to PFD0
 reg = readl(&amp;amp;mxc_ccm-&amp;gt;cbcmr);
 reg &amp;amp;= ~(3U &amp;lt;&amp;lt; 21);
 reg |= (2U &amp;lt;&amp;lt; 21);
 writel(reg, &amp;amp;mxc_ccm-&amp;gt;cbcmr);

// Enable CLKO1 and CLKO2
 // CLKO1 -&amp;gt; axi_clk_roo
 // CLKO2 -&amp;gt; mmdc_clk_root
 writel(0x05 | (7U &amp;lt;&amp;lt; 4) | (1U &amp;lt;&amp;lt; 7) |
 (1U &amp;lt;&amp;lt; 16) | (7U &amp;lt;&amp;lt; 21) | (1U &amp;lt;&amp;lt; 24), &amp;amp;mxc_ccm-&amp;gt;ccosr);

iomux_v3_cfg_t const clkout_pads[] = {
 MX6_PAD_JTAG_TMS__CCM_CLKO1 | MUX_PAD_CTRL(PAD_CTL_HYS | PAD_CTL_SPEED_MED | PAD_CTL_DSE_48ohm | PAD_CTL_SRE_FAST),
 MX6_PAD_JTAG_TDO__CCM_CLKO2 | MUX_PAD_CTRL(PAD_CTL_HYS | PAD_CTL_SPEED_MED | PAD_CTL_DSE_48ohm | PAD_CTL_SRE_FAST),
 };

imx_iomux_v3_setup_multiple_pads(clkout_pads, ARRAY_SIZE(clkout_pads));&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Jan 2020 16:14:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-change-DDR3-clock-speed-in-U-boot-U-boot-SPL/m-p/1000302#M148308</guid>
      <dc:creator>amr</dc:creator>
      <dc:date>2020-01-12T16:14:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to change DDR3 clock speed in U-boot/U-boot SPL?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-change-DDR3-clock-speed-in-U-boot-U-boot-SPL/m-p/1000303#M148309</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Amr&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for sharing solution, in general recommended to change ddr clocks running&lt;/P&gt;&lt;P&gt;code from ocram, during boot it also can be done in plugin:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://source.codeaurora.org/external/imx/uboot-imx/tree/board/freescale/mx6ul_14x14_evk/plugin.S?h=imx_v2019.04_4.19.35_1.1.0" title="https://source.codeaurora.org/external/imx/uboot-imx/tree/board/freescale/mx6ul_14x14_evk/plugin.S?h=imx_v2019.04_4.19.35_1.1.0"&gt;plugin.S\mx6ul_14x14_evk\freescale\board - uboot-imx - i.MX U-Boot&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards&lt;BR /&gt;igor&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jan 2020 00:52:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-change-DDR3-clock-speed-in-U-boot-U-boot-SPL/m-p/1000303#M148309</guid>
      <dc:creator>igorpadykov</dc:creator>
      <dc:date>2020-01-14T00:52:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to change DDR3 clock speed in U-boot/U-boot SPL?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-change-DDR3-clock-speed-in-U-boot-U-boot-SPL/m-p/1000304#M148310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the information - my solution changes the DDR clock in the SPL, which runs from the OCRAM.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Feb 2020 17:46:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-change-DDR3-clock-speed-in-U-boot-U-boot-SPL/m-p/1000304#M148310</guid>
      <dc:creator>amr</dc:creator>
      <dc:date>2020-02-07T17:46:39Z</dc:date>
    </item>
  </channel>
</rss>

