profile picture

BeagleBoard xM @ 1 GHz

July 24, 2013 - beagleboard old

Over the past couple of days, I’ve been reading on the beagleboard.org boards about the upcoming 3.11-rc2 kernel and the new features it brings for the OMAP SoCs. For the Beagleboard xM, one of the more important new features is the ti-abb-regulator (adaptive body bias) driver, which allows an OMAP SoC to adjust its core voltage dynamically. Combined with the smart reflex class 3 driver (which has been in the kernel since 3.6), the Beagleboard xM can achieve safe and stable operation at 1 GHz – finally. Its been a long time coming considering the last time 1 GHz was supported was kernel 3.0.28 back in early 2012. The process of enabling 1 GHz operating comes in 4 parts.

First, since the TI abb driver bindings are for the device tree based boot only, we need to bring in some resources for the device tree. The abb driver requires a reference to the system clock, as in hardware that what drives it. I began to code one up myself, and then looking for information on that, I stumbled into a post from April 2013 containing such a driver. So I pulled that resource in which provides the ability to bring in the OMAP clocks references into the device tree.

Second, we dive into the device tree. We now need to add the system clock binding to our definition of the omap3 CPU. I just created references to the required clock for the system clock, and then according to this post one needs to add a reference to the CPU dpll1 clock for the cpu frequency driver.

Third, we need to modify the power management startup for the omap processor. By default, it will only load a cpu-freq driver when performing a non-dts based boot. This is a problem. So we tell the power management driver to always initialize the cpu-freq system and modify the initialize function to load the legacy cpu-freq driver when performing a non-dts boot and to load the new cpu0-cpufreq SoC generic driver if performing a dts based boot.

Fourth, we need to add the abb bindings for the beagleboard xm into omap3-beagle-xm.dts. This consists of two modifications, 1) adding the ti-abb-regulator driver and 2) adding the frequency and core voltage values for OPP1G, the 1 GHz operating point of the OMAP36xx/OMAP37xx CPUs. After this modification, the beagleboard xM can boot supporting 1 GHz under the device tree based boot.

Screenshot

Screenshot

These patches have been merged into the v3.11.x branch, so to build a kernel, checkout the v3.11.x branch

nathaniel@Sedenion:~> git clone https://github.com/RobertCNelson/armv7-multiplatform.git

nathaniel@Sedenion:~> git checkout origin/v3.11.x -b v3.11.x

and then follow the standard build instructions provided in the README.

After you build the kernel, you need to modify the uEnv.txt file to enable the dts based boot. At the bottom of uEnv.txt, comment out this line

uenvcmd=run boot_classic; run device_args; bootz 0x80300000 0x81600000:${initrd_size}

and uncomment this line.

uenvcmd=run boot_ftd; run device_args; bootz 0x80300000 0x81600000:${initrd_size} 0x815f0000

When I was messing around, the bootloader seemed to fail to detect the dtb to use for the current board, so you can force it by adding this line at the beginning of the file

 fdtfile=omap3-beagle-xm.dtb

There is still an annoying issue currently, not with the operating frequency, but with the USB ports on the board. The sprz319 erratum patch has not yet been ported to 3.11 yet, so until I finish that, not stable usb ports. It probably will take a few hours, but it shouldn’t be so hard. Happy coding!

Edit: I have ported the sprz319 erratum patch to the BeagleBoard xM. Make sure to uncomment it in patch.sh before running build_kernel.sh. It is disabled by default because it breaks support for the older Beagleboard (not xM) series.

Edit: This patch is still working for the kernel 3.13.x development branch!