Tool/software:
Hi engineers of ti,
we are currently using the SOC model TDA4VE, when we use the SPI of TDA4, we found that the actual clock rate is much slower than the rate configured in the device tree. When we use the TDA4 SPI, we find that the actual clock rate is much slower than the rate configured in the device tree. 24MHZ is configured in the device tree, but the actual measured clock rate is only about 8M; 15MHZ is configured in the device tree, but the actual measured clock rate is only about 5M, the following are the configurations of the device tree and the corresponding clock rate measurement results:
&main_spi2{ status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&myspi2_pins_default>; dmas = <&main_udmap 0xc608>, <&main_udmap 0x4608>; dma-names = "tx0", "rx0"; /*default: ti,pindir-d0-in-d1-out */ /*ti,pindir-d0-out-d1-in; */ spidev@0{ compatible = "rohm,dh2228fv"; reg = <0>;//0-spidev1.0,3-spidev1.3 spi-max-frequency = <24000000>; //spi-max-frequency = <15000000>; spi-cpol = <0>; //1-89501,0-89541 spi-cpha = <0>; //1-89501,0-89541 }; };
&main_spi2{ status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&myspi2_pins_default>; dmas = <&main_udmap 0xc608>, <&main_udmap 0x4608>; dma-names = "tx0", "rx0"; /*default: ti,pindir-d0-in-d1-out */ /*ti,pindir-d0-out-d1-in; */ spidev@0{ compatible = "rohm,dh2228fv"; reg = <0>;//0-spidev1.0,3-spidev1.3 //spi-max-frequency = <24000000>; spi-max-frequency = <15000000>; spi-cpol = <0>; //1-89501,0-89541 spi-cpha = <0>; //1-89501,0-89541 }; };