How to change the speed of TX2 SPI

Gooddays everyone,When I use spi0 on TX2, (the numbers on the core board are E3, E4, F3, F4). The transmission frequency of SPI is always lower than 1MHz. When I try to use a higher rate, IOCTL () will not report an error, but the actual transmission rate will not increase. My device tree file is as follows:

spi@c260000 {
		compatible = "nvidia,tegra186-spi";
		reg = <0x0 0xc260000 0x0 0x10000>;
		interrupts = <0x0 0x25 0x4>;
		nvidia,dma-request-selector = <0x19 0x10>;
		#address-cells = <0x1>;
		#size-cells = <0x0>;
		#stream-id-cells = <0x1>;
		dmas = <0x19 0x10 0x19 0x10>;
		dma-names = "rx", "tx";
		nvidia,clk-parents = "pll_p", "osc";
		spi-max-frequency = <0xb71b00>;
		clocks = <0xd 0xde 0xd 0x10d 0xd 0x264>;
		clock-names = "spi", "pll_p", "osc";
		resets = <0xd 0x29>;
		reset-names = "spi";
		status = "okay";
		linux,phandle = <0x81>;
		phandle = <0x81>;

		spi@0 {
			compatible = "spidev";
			reg = <0x0>;
			spi-max-frequency = <0x1312d00>;
			nvidia,enable-hw-based-cs;
			nvidia,cs-setup-clk-count = <0x1e>;
			nvidia,cs-hold-clk-count = <0x1e>;
			nvidia,rx-clk-tap-delay = <0x1f>;
			nvidia,tx-clk-tap-delau = <0x0>;
		};
	};

I would appreciate it if you could help me out.
image
image

Have you try to modify the spi-max-frequency to try?

I’m sorry, when I modify XXX in the device tree, the software part of the application layer attempts a new SPI rate (IOCTL (FD, SPI_ uioc_ Umessage (1), & tr;) is still unable to change the actual transmission speed of the SPI. Do you only need to pay attention to the device tree file when setting the SPI frequency? We look forward to your reply

I tried to use wirte function instead of ioctrl function, but still can’t improve the speed of SPI. Do you have any related documents or posts to help me track the register information. thanks

Please enable the dev_dbg print to check.

echo -n "file drivers/spi/spi-tegra114.c +p" > /sys/kernel/debug/dynamic_debug/control.
echo 8 > /sys/kernel/debug/tracing
echo 8 > /proc/sys/kernel/printk

And also check below clock rate

cat /sys/kernel/debug/clk/clk_summary
cat /sys/kernel/debug/clk/spi*/ clk_rate