How to change spidev2.1 frequency?

Hi, currently I’m working with Winbond Serial SPI NorFlash on PocketBeagle, C++.

Debian version:

root@beaglebone:~# cat /etc/issue Debian GNU/Linux 9 \n \l Debian Image 2019-08-03

I can read and write to memory connected to spidev2.1 so it works.

But I cant get reading speed from memory upper 2 megabytes/s regardless which frequency I set in my C++ code (from 30 to 100 MHz). But in the same time - reading speed on OrangePI Zero is around 5 megabytes/s with the same SPI NorFlash module.

In OrangePI it was pretty simple to add and init SPI interface with needed frequency value by adding /boot/armbienEnv.txt:

overlays=spi-spidev param_spidev_spi_bus=0 param_spidev_spi_cs=0 param_spidev_max_freq=50000000

It seems the spidev2.1 interface in PocketBeagle has already been initialized and created by some config in Debian with some predefined frequency value (near 30 MHz).
I read on this forum that SPI is used by PRU and it is needed to edit some *.dtb file, compile and flash PRU with it, but I don’t know which file must be changed, where it lays and how to flash PRU with it to change spidev2.1 frequency from default value to ~50-80 MHz.


You didn't specify your kernel version, so i can't give you more
specific directions and which branch to use..


100MHz? that’s NOT going to work…

use this repo:

git clone -b v4.14.x-ti
cd ./BeagleBoard-DeviceTrees/
nano ./src/arm/am335x-pocketbeagle.dts
sudo make install

i’ve pushed it to 50Mhz:

But, yeah…




Please keep the BeagleBoard group on CC…

What you’ve done should work.

Sorry don’t have time to actually verify what’s going on today, but maybe other members of the community will step up… (i’ve got a real job)



Will do, thanks!

Mailtrack Sender notified by
Mailtrack 18.12.19, 19:23:31

ср, 18 дек. 2019 г. в 18:58, Robert Nelson <>: