How can I reduce the clock SPI speed to around 100 kHz on the Jetson AGX Orin when using GPIO/SPI?

My LCD module can only operate with an SPI clock up to 100 kHz, but the Jetson AGX Orin is outputting around 150 kHz. How can I reduce the SPI clock to stay below the 100 kHz limit?

I’m using a Newhaven LCD display, NHD-0216K3Z-FL-GBW-V3

@ChrisB_NV Hi, Could you help me with this one?

@joseph.thomas I am checking with our software team.

Hi joseph.thomas,

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

Which SPI interface are you using for the LCD display?

Please share the result of the following command and the full device tree for further check.

$ sudo su
# cat /sys/kernel/debug/bpmp/debug/clk/spi1/rate

Yes, right now I’m checking with the Nvidia AGX Orin Developer kit.

# cat /sys/kernel/debug/bpmp/debug/clk/spi1/rate
81600000

Jetpack 6.0 L4T 36.3.0

And also this question.

You can simply use echo command to update this clock rate to meet your requirement.

Hi @KevinFFF , I’m using GPIO pins 19, 21, 23, and 24 on the Jetson AGX Orin 64GB for SPI communication. I need the SPI clock to be set to around 75 kHz for the LCD, and it must remain below 100 kHz.

Hi @KevinFFF , Is there any other way I can find out which SPI I’m using?

What do you mean about SI?

Okay, it is SPI1 in your case.

Please try to configure it and check if the clock frequency gets changed.

I’m not able to lower the clock frequency to 75khz. Using this command it’s still showing some ~3 Mhz

Hi @KevinFFF It’s not SI. I was referring to the SPI.

How do you control your LCD module through SPI?
Is there any custom SPI driver?
If so, I assume the SPI frequency could be configured there.

Hi, @KevinFFF

we are using the Newhaven LCD display NHD-0216K3Z-FL-GBW-V3. It has a dedicated driver, and its maximum clock frequency is limited to 100 kHz. According to the datasheet, this value is fixed and cannot be adjusted.

Do you mean this custom driver use fixed 100kHz but you still get 150kHz from scope currently?

I would like to know what clock frequency you got if you run the following command to update it.

# echo 100000 > /sys/kernel/debug/bpmp/debug/clk/spi1/rate