<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.somlabs.com/index.php?action=history&amp;feed=atom&amp;title=Changing_CPU_frequency_in_iMX93_processors</id>
	<title>Changing CPU frequency in iMX93 processors - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.somlabs.com/index.php?action=history&amp;feed=atom&amp;title=Changing_CPU_frequency_in_iMX93_processors"/>
	<link rel="alternate" type="text/html" href="https://wiki.somlabs.com/index.php?title=Changing_CPU_frequency_in_iMX93_processors&amp;action=history"/>
	<updated>2026-04-24T17:05:37Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.42.3</generator>
	<entry>
		<id>https://wiki.somlabs.com/index.php?title=Changing_CPU_frequency_in_iMX93_processors&amp;diff=4311&amp;oldid=prev</id>
		<title>KrzysztofChojnowski: Created page with &quot;{{PageHeader|Changing the CPU frequency in iMX93 processors}} __toc__  In iMX93 processors a number of core operating modes can be defined in order to select proper frequency and power consumption. This tutorial presents how to add additional modes to the default list and force the kernel driver to use the required one. It was prepared for the Yocto Scarthgap version with meta-somlabs layer.  There are four available operation modes:  {| class=&quot;wikitable&quot; |- ! Mode !! De...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.somlabs.com/index.php?title=Changing_CPU_frequency_in_iMX93_processors&amp;diff=4311&amp;oldid=prev"/>
		<updated>2025-01-22T11:21:57Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{PageHeader|Changing the CPU frequency in iMX93 processors}} __toc__  In iMX93 processors a number of core operating modes can be defined in order to select proper frequency and power consumption. This tutorial presents how to add additional modes to the default list and force the kernel driver to use the required one. It was prepared for the Yocto Scarthgap version with meta-somlabs layer.  There are four available operation modes:  {| class=&amp;quot;wikitable&amp;quot; |- ! Mode !! De...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{PageHeader|Changing the CPU frequency in iMX93 processors}} __toc__&lt;br /&gt;
&lt;br /&gt;
In iMX93 processors a number of core operating modes can be defined in order to select proper frequency and power consumption. This tutorial presents how to add additional modes to the default list and force the kernel driver to use the required one. It was prepared for the Yocto Scarthgap version with meta-somlabs layer.&lt;br /&gt;
&lt;br /&gt;
There are four available operation modes:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Mode !! Description&lt;br /&gt;
|-&lt;br /&gt;
| 0 || OD mode (1700 MHz) with DDR 3733 MTS&lt;br /&gt;
|-&lt;br /&gt;
| 1 || ND mode (1400 MHz) with DDR 1866 MTS&lt;br /&gt;
|-&lt;br /&gt;
| 2 || LD mode (900 MHz) with DDR 1866 MTS&lt;br /&gt;
|-&lt;br /&gt;
| 3 || LD mode (900 MHz) with DDR 625 MTS&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The current mode can be changed by writing the mode number 0-4 to &amp;#039;&amp;#039;/sys/devices/platform/imx93-lpm/mode&amp;#039;&amp;#039; file. The same file can be read to obtain currently enabled mode.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root@visionsom-imx93:~# echo 1 &amp;gt; /sys/devices/platform/imx93-lpm/mode&lt;br /&gt;
root@visionsom-imx93:~# cat /sys/devices/platform/imx93-lpm/mode&lt;br /&gt;
System is in ND mode with DDR 1866 MTS!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The current core clock can be read from the &amp;#039;&amp;#039;/sys/kernel/debug/clk/a55_core/clk_rate&amp;#039;&amp;#039; file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
root@visionsom-imx93:~# cat /sys/kernel/debug/clk/a55_core/clk_rate&lt;br /&gt;
1400000000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Adding LD modes ==&lt;br /&gt;
&lt;br /&gt;
By default only OD and ND modes are available in the kernel driver. To enable the LD modes the following change has to be made in the &amp;#039;&amp;#039;visionsom-imx93.dtsi&amp;#039;&amp;#039; file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
--- a/arch/arm64/boot/dts/freescale/visionsom-imx93.dtsi&lt;br /&gt;
+++ b/arch/arm64/boot/dts/freescale/visionsom-imx93.dtsi&lt;br /&gt;
@@ -163,6 +163,7 @@ &amp;amp;lcdif {&lt;br /&gt;
 &lt;br /&gt;
 &amp;amp;lpm {&lt;br /&gt;
        soc-supply = &amp;lt;&amp;amp;buck1&amp;gt;;&lt;br /&gt;
+        ld-mode-enabled;&lt;br /&gt;
        status = &amp;quot;okay&amp;quot;;&lt;br /&gt;
 };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Verifying core frequency ==&lt;br /&gt;
&lt;br /&gt;
Setting the core frequency can be easily tested using simple empty loop script:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo 0 &amp;gt; /sys/devices/platform/imx93-lpm/mode&lt;br /&gt;
time bash -c &amp;quot;for i in {1..1000000}; do :; done&amp;quot;&lt;br /&gt;
&lt;br /&gt;
real    0m8.158s&lt;br /&gt;
user    0m7.795s&lt;br /&gt;
sys     0m0.289s&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo 1 &amp;gt; /sys/devices/platform/imx93-lpm/mode&lt;br /&gt;
time bash -c &amp;quot;for i in {1..1000000}; do :; done&amp;quot;&lt;br /&gt;
&lt;br /&gt;
real    0m10.100s&lt;br /&gt;
user    0m9.634s&lt;br /&gt;
sys     0m0.390s&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo 2 &amp;gt; /sys/devices/platform/imx93-lpm/mode&lt;br /&gt;
time bash -c &amp;quot;for i in {1..1000000}; do :; done&amp;quot;&lt;br /&gt;
&lt;br /&gt;
real    0m15.358s&lt;br /&gt;
user    0m14.726s&lt;br /&gt;
sys     0m0.506s&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
echo 3 &amp;gt; /sys/devices/platform/imx93-lpm/mode&lt;br /&gt;
time bash -c &amp;quot;for i in {1..1000000}; do :; done&amp;quot;&lt;br /&gt;
&lt;br /&gt;
real    0m16.292s&lt;br /&gt;
user    0m15.394s&lt;br /&gt;
sys     0m0.691s&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>KrzysztofChojnowski</name></author>
	</entry>
</feed>