<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>Exploring CPU Clock change on MVEBU</title>
        <description> I&amp;#039;m trying to change the CPU clock on a MVEBU based WD MyCloud Mirror Gen2.

I&amp;#039;ve studied the u-boot sources from WD (https://support-en.wd.com/app/products/product-detailweb/p/137 WDMyCloud_Mirror_GPL_v2.31.204_20191206.tar.gz), a customized version of uboot 2013.01-14t3 (github mirror https://github.com/MarvellEmbeddedProcessors/u-boot-marvell/tree/u-boot-2013.01-14t3)

On my device I&amp;#039;ve a modified uboot re-enabling save env (https://forum.doozan.com/read.php?2,35291) and now I&amp;#039;m trying to understand how-to change the cpu speed.

If I&amp;#039;m not wrong, that configuration could be saved in SatR, and could be loaded from TWSI (i2C device?). In the uboot terminal I&amp;#039;ve tried only the SatR list and SatR read command, unsuccessfully.

Looking at mvCtrlEnvLib.c, mvCtrlEnvRegs.h, mvCpu.c, cmd_sar38x.c and mvOs.h,  I&amp;#039;ve undestood that the CPU configuration is read through the call (mvCpu.c)mvCpuPclkGet -&amp;gt; (mvCtrlEnvLib.c)mvCtrlCpuDdrL2FreqGet -&amp;gt; (mvOs.h)MV_REG_READ -&amp;gt; (mvOs.h)MV_MEMIO_LE32_READ(INTER_REGS_BASE | (offset)) -&amp;gt; (mvOs.h)MV_MEMIO32_READ -&amp;gt; ((*((volatile unsigned int*)(addr))))

The frequencies are defined in mvCtrlEnvRegs.h-&amp;gt;MV_SAR_FREQ_MODES

Any help to go any further? Where is really stored the value, and how can ba changed? The TWSI must be reenabled?

*** edit ***
at https://forum.doozan.com/read.php?2,35291,136911#msg-136911 I&amp;#039;ve posted a first unsuccessful attemp. Still searching for help.</description>
        <link>https://forum.doozan.com/read.php?2,136896,136896#msg-136896</link>
        <lastBuildDate>Wed, 11 Mar 2026 08:09:08 -0500</lastBuildDate>
        <generator>Phorum 5.2.23</generator>
        <item>
            <guid>https://forum.doozan.com/read.php?2,136896,137133#msg-137133</guid>
            <title>Re: Exploring CPU Clock change on MVEBU</title>
            <link>https://forum.doozan.com/read.php?2,136896,137133#msg-137133</link>
            <description><![CDATA[ In my <b>WD MyCloud Mirror Gen2</b> I&#039;ve found an area near the cpu that appear to contain some jumpers ready to setup pull-up or pull-down resistors in the area of the MPP pins.<br />
So I&#039;ve modified the uboot to read the Sar value<br />
<br />
<pre class="bbcode">
sed -i &#039;640 i mvOsPrintf(&quot;satrVal: 0x%x\\n&quot;, satrVal);&#039; board/mv_ebu/a38x/armada_38x_family/ctrlEnv/mvCtrlEnvLib.c</pre>
<br />
and after some tries I&#039;ve mapped them as follow:<br />
<br />
<pre class="bbcode">
j1  -&gt; bit 13
j2
j3  -&gt; bit  8
j4
j5  -&gt; bit 2
j6
j7
j8
j9  -&gt; bit 3
j10 -&gt; bit 1
j11 -&gt; bit 6
j12 -&gt; bit 5
j13 -&gt; bit 4
j14 -&gt; bit 12
j15 -&gt; bit 15
j16 -&gt; bit 21
j17</pre>
<br />
I was not able to map the empty ones.<br />
<br />
The relevant bit of the Sar to configure the clock are the bit 10-14. So to change the cpu clock are useful j1 and j14.<br />
Inverting the setting of j14 on the board, the Sar switch from 0x8 to 0xC on the CPU Subsystem Clock Frequency Options bit field.<br />
Using the 2 of the 5 bits of the CPU Subsystem Clock Frequency Options field that I&#039;ve found, I can set it to 0x0, 0x8 and 0xC that translates in 666Mhz, 1333Mhz and 1600Mhz.<br />
<br />
So, finally I&#039;ve managed to clock the cpu@1600Mhz. Now I&#039;ll test it to check if it&#039;s stable.]]></description>
            <dc:creator>CyberPK</dc:creator>
            <category>Debian</category>
            <pubDate>Wed, 13 Mar 2024 10:34:01 -0500</pubDate>
        </item>
        <item>
            <guid>https://forum.doozan.com/read.php?2,136896,137107#msg-137107</guid>
            <title>Re: Exploring CPU Clock change on MVEBU</title>
            <link>https://forum.doozan.com/read.php?2,136896,137107#msg-137107</link>
            <description><![CDATA[ I&#039;ve found and read the &quot;88F6810, 88F6820, and 88F6828 ARMADA® 380, 385, and 388 High-Performance Single/Dual CPU System on Chip Hardware Specifications&quot;, and I think you&#039;re true about the hardware configuration.<br />
Compared the uboot from devices with the same cpu but different clock, and couldn&#039;t find any indication that it&#039;s setup via software.<br />
Probably, the only way to set the clock is pulling up and down some mpp.<br />
<br />
***EDIT***<br />
I&#039;ve read the marking on the cpu of my device, and I&#039;ve found the speed code is C133 = Commercial 1333Mhz, so anyway I think it isn&#039;t graded for higher clock.]]></description>
            <dc:creator>CyberPK</dc:creator>
            <category>Debian</category>
            <pubDate>Tue, 12 Mar 2024 12:19:21 -0500</pubDate>
        </item>
        <item>
            <guid>https://forum.doozan.com/read.php?2,136896,137088#msg-137088</guid>
            <title>Re: Exploring CPU Clock change on MVEBU</title>
            <link>https://forum.doozan.com/read.php?2,136896,137088#msg-137088</link>
            <description><![CDATA[ It could be useful to gather any data from the i2c bus (it&#039;s an eeprom?). Also any hires image of the board to search for an eeprom. I&#039;ll dismount mine in the next days.<br />
If anyone can activate in the dts the i2c bus and gather any useful data maybe helpful in understanding if the cpu speed and memory could me modified by software.]]></description>
            <dc:creator>CyberPK</dc:creator>
            <category>Debian</category>
            <pubDate>Mon, 11 Mar 2024 12:13:12 -0500</pubDate>
        </item>
        <item>
            <guid>https://forum.doozan.com/read.php?2,136896,137012#msg-137012</guid>
            <title>Re: Exploring CPU Clock change on MVEBU</title>
            <link>https://forum.doozan.com/read.php?2,136896,137012#msg-137012</link>
            <description><![CDATA[ I&#039;m slightly interested in this as the Kace M300 has DDR3-1333 chips on the board (4x Micron D9LLF chips) and the clock speed on the RAM side is by default set to 1066. if there&#039;s any similarities between the Armada 310 and 370 in that way it might be possible to also increase the RAM speed on the 310&#039;s memory bus for a small bump in performance. It&#039;s my understanding these were put in for a better price per chip.]]></description>
            <dc:creator>sudos</dc:creator>
            <category>Debian</category>
            <pubDate>Wed, 06 Mar 2024 22:19:15 -0600</pubDate>
        </item>
        <item>
            <guid>https://forum.doozan.com/read.php?2,136896,137005#msg-137005</guid>
            <title>Re: Exploring CPU Clock change on MVEBU</title>
            <link>https://forum.doozan.com/read.php?2,136896,137005#msg-137005</link>
            <description><![CDATA[ Poking around I found a valid i2c device (i2c0) that I&#039;ve managed to read, but cannot understand if contains any useful data. It appear to have 2 valid addresses: 0x13 and 0x64, and only 0x13 returns 256 byte of data that I cannot translate into anything useful.<br />
Any feedback?<br />
<br />
*** EDIT ***<br />
Removed the read memory, because was not useful to the topic.]]></description>
            <dc:creator>CyberPK</dc:creator>
            <category>Debian</category>
            <pubDate>Wed, 06 Mar 2024 17:07:49 -0600</pubDate>
        </item>
        <item>
            <guid>https://forum.doozan.com/read.php?2,136896,136991#msg-136991</guid>
            <title>Re: Exploring CPU Clock change on MVEBU</title>
            <link>https://forum.doozan.com/read.php?2,136896,136991#msg-136991</link>
            <description><![CDATA[ 1000001101000 Wrote:<br />
-------------------------------------------------------<br />
&gt; I spent some time looking at the clock speed of<br />
&gt; some armada-370 devices a while back. It appeared<br />
&gt; in the datasheet that the relevant values had to<br />
&gt; be set right when the CPU came up either by pull<br />
&gt; up/down resistors on certain pins or via the<br />
&gt; bootrom. I got the impression this all happened<br />
&gt; before uboot even started.<br />
<br />
Yes. The SatR registers (i.e.strapping) set this, IIRC. Boot device (SPI or NAND) are also from there. We probably need HW mods to make overclock possible.]]></description>
            <dc:creator>bodhi</dc:creator>
            <category>Debian</category>
            <pubDate>Wed, 06 Mar 2024 00:02:21 -0600</pubDate>
        </item>
        <item>
            <guid>https://forum.doozan.com/read.php?2,136896,136989#msg-136989</guid>
            <title>Re: Exploring CPU Clock change on MVEBU</title>
            <link>https://forum.doozan.com/read.php?2,136896,136989#msg-136989</link>
            <description><![CDATA[ I spent some time looking at the clock speed of some armada-370 devices a while back. It appeared in the datasheet that the relevant values had to be set right when the CPU came up either by pull up/down resistors on certain pins or via the bootrom. I got the impression this all happened before uboot even started.]]></description>
            <dc:creator>1000001101000</dc:creator>
            <category>Debian</category>
            <pubDate>Tue, 05 Mar 2024 23:23:31 -0600</pubDate>
        </item>
        <item>
            <guid>https://forum.doozan.com/read.php?2,136896,136970#msg-136970</guid>
            <title>Re: Exploring CPU Clock change on MVEBU</title>
            <link>https://forum.doozan.com/read.php?2,136896,136970#msg-136970</link>
            <description><![CDATA[ I haven&#039;t still found the solution to change the clock in uboot. Anyone known a board clocked at 1600mhz instead of the 1333 of the WD MyCloud Mirror Gen2? I&#039;ve already verified that my board has ddr3 1600 (800Mhz), so I should be safe.<br />
In the meantime I&#039;ve adapted a patch from openwrt to enable cpu frequency scaling on kernel 6.7.7<br />
<br />
Source: <a href="https://forum.openwrt.org/t/cpu-frequency-scaling-driver-for-mvebu-wrt3200acm-etc/2808/"  rel="nofollow">https://forum.openwrt.org/t/cpu-frequency-scaling-driver-for-mvebu-wrt3200acm-etc/2808/</a><br />
original patch: lore.kernel.org/linux-pm/1435903917-20486-1-git-send-email-gregory.clement@free-electrons.com/]]></description>
            <dc:creator>CyberPK</dc:creator>
            <category>Debian</category>
            <pubDate>Mon, 04 Mar 2024 17:52:19 -0600</pubDate>
        </item>
        <item>
            <guid>https://forum.doozan.com/read.php?2,136896,136896#msg-136896</guid>
            <title>Exploring CPU Clock change on MVEBU</title>
            <link>https://forum.doozan.com/read.php?2,136896,136896#msg-136896</link>
            <description><![CDATA[ I&#039;m trying to change the CPU clock on a MVEBU based WD MyCloud Mirror Gen2.<br />
<br />
I&#039;ve studied the u-boot sources from WD (https://support-en.wd.com/app/products/product-detailweb/p/137 WDMyCloud_Mirror_GPL_v2.31.204_20191206.tar.gz), a customized version of uboot 2013.01-14t3 (github mirror <a href="https://github.com/MarvellEmbeddedProcessors/u-boot-marvell/tree/u-boot-2013.01-14t3"  rel="nofollow">https://github.com/MarvellEmbeddedProcessors/u-boot-marvell/tree/u-boot-2013.01-14t3</a>)<br />
<br />
On my device I&#039;ve a modified uboot re-enabling save env (https://forum.doozan.com/read.php?2,35291) and now I&#039;m trying to understand how-to change the cpu speed.<br />
<br />
If I&#039;m not wrong, that configuration could be saved in SatR, and could be loaded from TWSI (i2C device?). In the uboot terminal I&#039;ve tried only the SatR list and SatR read command, unsuccessfully.<br />
<br />
Looking at mvCtrlEnvLib.c, mvCtrlEnvRegs.h, mvCpu.c, cmd_sar38x.c and mvOs.h,  I&#039;ve undestood that the CPU configuration is read through the call (mvCpu.c)mvCpuPclkGet -&gt; (mvCtrlEnvLib.c)mvCtrlCpuDdrL2FreqGet -&gt; (mvOs.h)MV_REG_READ -&gt; (mvOs.h)MV_MEMIO_LE32_READ(INTER_REGS_BASE | (offset)) -&gt; (mvOs.h)MV_MEMIO32_READ -&gt; ((*((volatile unsigned int*)(addr))))<br />
<br />
The frequencies are defined in mvCtrlEnvRegs.h-&gt;MV_SAR_FREQ_MODES<br />
<br />
Any help to go any further? Where is really stored the value, and how can ba changed? The TWSI must be reenabled?<br />
<br />
*** edit ***<br />
at <a href="https://forum.doozan.com/read.php?2,35291,136911#msg-136911"  rel="nofollow">https://forum.doozan.com/read.php?2,35291,136911#msg-136911</a> I&#039;ve posted a first unsuccessful attemp. Still searching for help.]]></description>
            <dc:creator>CyberPK</dc:creator>
            <category>Debian</category>
            <pubDate>Fri, 01 Mar 2024 19:10:31 -0600</pubDate>
        </item>
    </channel>
</rss>
