How to configure clock frequency by editing .dts files?

Hi, we are bit banging GPIO pins for communication to another piece of hardware and have found that the speed of the Jetson Orin Nano is currently not fast enough. From simply toggling the pins using direct register access we are able to achieve an output from 0 to 1 in about 2 us, but we need about 300 ns.

We saw from this post that someone was able to do it, but since we are newer to developing in Linux and with Jetson boards, we aren’t sure how to get there. I have the dtb file from sys/kernel/debug/bpmp/debug and have edited it but am just not sure how to cp the contents over to the current dtb file or point to the new file and make the changes go into effect. How would I do this?

Thanks

Hello @tommy.le,

A couple of questions, so we make sure we are on the same page.

Have you already been able to get clock speeds you want but you need a way to make them persist by making it default into your DTB? Or do yo need to find a way to get those clock speeds ?

regards,
Andrew

Hey @proventusnova,

I currently need to find a way to get those clock speeds.

Hi tommy.le,

Are you using the devkit or custom board for Orin Nano?
What’s your Jetpack version in use?

DRA should work for your use case to toggle GPIO faster than just using sysfs or gpiod tool.
May I know what’s your use case to get 300ns?

It is the BPMP-DTB which should be modified in your BSP package before flash.
Do you have the flash log for further check which BPMP DTB is used in your case?

I am using devkit and Jetpack 6.0

I am interfacing with WS2812b and would like to avoid using other peripherals besides GPIO.

I do not right now. Do I need a Linux host PC or VM to get this? Do you have steps on how I can produce the flash log?

Any concern to just use SPI interface to control your LED module?
There’s SPI interface available to be used on the devkit.

Please get a standalone Ubuntu host PC and use SDK Manager to flash the devkit and the flash log could be exported after it has been flashed done.

We are possibly using the SPI interface to communicate with other devices so wanted to stay away from it.

And I will post the flash log once I get it

There are 2 SPI interfaces on Orin Nano.
You can also use CS pin to control multiple SPI devices on same SPI interface.

okay~

We are having issues with getting an Ubuntu host PC and have decided to just use the SPI interface. Thanks for your help!