<?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 How to set CPU frequency on u-boot? in i.MX Processors</title>
    <link>https://community.nxp.com/t5/i-MX-Processors/How-to-set-CPU-frequency-on-u-boot/m-p/1400721#M185940</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;How to set&amp;nbsp;CPU frequency on u-boot?&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Our machine must keep working at 800Mhz.But I see the frequency under U-boot is 396Mhz.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;U-boot version : 2016.03&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;SOC:IMX6ULL&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 18 Jan 2022 07:05:30 GMT</pubDate>
    <dc:creator>LiLinfei</dc:creator>
    <dc:date>2022-01-18T07:05:30Z</dc:date>
    <item>
      <title>How to set CPU frequency on u-boot?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-set-CPU-frequency-on-u-boot/m-p/1400721#M185940</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;How to set&amp;nbsp;CPU frequency on u-boot?&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Our machine must keep working at 800Mhz.But I see the frequency under U-boot is 396Mhz.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;U-boot version : 2016.03&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;SOC:IMX6ULL&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Jan 2022 07:05:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-set-CPU-frequency-on-u-boot/m-p/1400721#M185940</guid>
      <dc:creator>LiLinfei</dc:creator>
      <dc:date>2022-01-18T07:05:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to set CPU frequency on u-boot?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-set-CPU-frequency-on-u-boot/m-p/1414906#M187089</link>
      <description>&lt;P&gt;you can find the cpu frequency settings in the dtsi file as below:&lt;/P&gt;
&lt;P&gt;"&lt;A href="https://source.codeaurora.org/external/imx/uboot-imx/tree/arch/arm/dts/imx6ull.dtsi?h=imx_v2019.04_4.19.35_1.1.0" target="_blank"&gt;https://source.codeaurora.org/external/imx/uboot-imx/tree/arch/arm/dts/imx6ull.dtsi?h=imx_v2019.04_4.19.35_1.1.0&lt;/A&gt;"&lt;/P&gt;</description>
      <pubDate>Thu, 17 Feb 2022 02:39:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-set-CPU-frequency-on-u-boot/m-p/1414906#M187089</guid>
      <dc:creator>joanxie</dc:creator>
      <dc:date>2022-02-17T02:39:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to set CPU frequency on u-boot?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-set-CPU-frequency-on-u-boot/m-p/1502804#M193591</link>
      <description>&lt;P&gt;How to change the default frequency in the dts file? If I set it in the uboot, does it persist when kernel boots up? Or kernel overwrite the value?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Aug 2022 21:04:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-set-CPU-frequency-on-u-boot/m-p/1502804#M193591</guid>
      <dc:creator>avijitnsec</dc:creator>
      <dc:date>2022-08-08T21:04:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to set CPU frequency on u-boot?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-set-CPU-frequency-on-u-boot/m-p/1804195#M219806</link>
      <description>&lt;P&gt;On the U-boot version U-Boot 2021.04-lf_v2021.04 write the CCM Arm Clock Root Register (CCM_CACRR) at the function get_mcu_main_clk() on the file /arch/arm/mach-imx/mx6/clock.c. The content of the function must be like this:&lt;/P&gt;&lt;P&gt;=====================================================================&lt;/P&gt;&lt;P&gt;u32 reg, freq;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;reg = __raw_readl(&amp;amp;imx_ccm-&amp;gt;cacrr);&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;reg &amp;amp;= ~MXC_CCM_CACRR_ARM_PODF_MASK;&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;&lt;STRONG&gt;__raw_writel(reg, &amp;amp;imx_ccm-&amp;gt;cacrr);&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;reg = __raw_readl(&amp;amp;imx_ccm-&amp;gt;cacrr);&lt;BR /&gt;reg &amp;amp;= MXC_CCM_CACRR_ARM_PODF_MASK;&lt;BR /&gt;reg &amp;gt;&amp;gt;= MXC_CCM_CACRR_ARM_PODF_OFFSET;&lt;BR /&gt;freq = decode_pll(PLL_SYS, MXC_HCLK);&lt;/P&gt;&lt;P&gt;return freq / (reg + 1);&lt;/P&gt;&lt;P&gt;=====================================================================&lt;/P&gt;&lt;P&gt;We are setting the register CCM_CACRR to have NO divider, like it is said in the datasheet:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="AlfTeleco_0-1707405319109.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/262549i21BB8E66A7503F6A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="AlfTeleco_0-1707405319109.png" alt="AlfTeleco_0-1707405319109.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Also boost the LDO_SOC voltage from 1.175 to 1.225 at the function /arch/arm/mach-imx/mx6/soc.c: board_postclk_init()&lt;/P&gt;&lt;P&gt;set_ldo_voltage(LDO_SOC, 1225); /* Set VDDSOC to 1.225V */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;</description>
      <pubDate>Thu, 08 Feb 2024 15:17:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-set-CPU-frequency-on-u-boot/m-p/1804195#M219806</guid>
      <dc:creator>AlfTeleco</dc:creator>
      <dc:date>2024-02-08T15:17:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to set CPU frequency on u-boot?</title>
      <link>https://community.nxp.com/t5/i-MX-Processors/How-to-set-CPU-frequency-on-u-boot/m-p/2251513#M242509</link>
      <description>&lt;P&gt;I dealt with the same issue on &lt;STRONG&gt;U-Boot 2025.10&lt;/STRONG&gt; and ended up with this solution:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;#include &amp;lt;asm/io.h&amp;gt;
#include &amp;lt;asm/arch/crm_regs.h&amp;gt;
#include &amp;lt;asm/arch/sys_proto.h&amp;gt;

int board_early_init_f(void)
{
  struct mxc_ccm_reg *imx_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR;

  /* exit if the CPU does not support 792 MHz */
  if (get_cpu_speed_grade_hz() &amp;lt; 792000000)
    return 0;

  /* increase VDD_SOC from 1.150 V to 1.175 V */
  set_ldo_voltage(LDO_SOC, 1175);

  /* increase VDD_ARM from 1.150 V to 1.225 V */
  set_ldo_voltage(LDO_ARM, 1225);

  /* increase ARM clock from 396 MHz to 792 MHz */
  writel(0, &amp;amp;imx_ccm-&amp;gt;cacrr);

  return 0;
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 30 Nov 2025 06:44:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/i-MX-Processors/How-to-set-CPU-frequency-on-u-boot/m-p/2251513#M242509</guid>
      <dc:creator>tomas-paukrt</dc:creator>
      <dc:date>2025-11-30T06:44:17Z</dc:date>
    </item>
  </channel>
</rss>

