Hello,
First, I would like to thanks for the replays, but I have an another questions then.
This could be related to the scheduling, is the ecspi the only thing running when you are running your test?
Yes, nothing else, just a spidev_test utility was running on the device. Is there a way to see the scheduling, or?
I made some more measurements...
spidev_test -D /dev/spidev3.0 -b 8 -s 20000000 -I 10000 -S 4096
spi mode: 0x0
bits per word: 8
max speed: 20000000 Hz (20000 kHz)
rate: tx 9660.0kbps, rx 9660.0kbps
rate: tx 10918.3kbps, rx 10918.3kbps
rate: tx 10898.6kbps, rx 10898.6kbps
rate: tx 10905.2kbps, rx 10905.2kbps
rate: tx 10911.7kbps, rx 10911.7kbps
rate: tx 10918.3kbps, rx 10918.3kbps
total: tx 40000.0KB, rx 40000.0KB
As you can see, that clock is set to 20MHz, but the real speed is about ~10Mbps. So I change the clock to 50MHz.
spidev_test -D /dev/spidev3.0 -b 8 -s 50000000 -I 10000 -S 4096
spi mode: 0x40
bits per word: 8
max speed: 50000000 Hz (50000 kHz)
rate: tx 13349.7kbps, rx 13349.7kbps
rate: tx 13382.5kbps, rx 13382.5kbps
rate: tx 13369.3kbps, rx 13369.3kbps
rate: tx 13395.6kbps, rx 13395.6kbps
total: tx 40000.0KB, rx 40000.0KB
and in this case the speed was ~13Mbps.
I'm expecting the speed about 20 or 50Mbps for these clocks. If we look at the DTB:
ecspi1: spi@30820000 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "fsl,imx8mp-ecspi", "fsl,imx6ul-ecspi";
reg = <0x30820000 0x10000>;
interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clk IMX8MP_CLK_ECSPI1_ROOT>,
<&clk IMX8MP_CLK_ECSPI1_ROOT>;
clock-names = "ipg", "per";
assigned-clock-rates = <80000000>;
assigned-clocks = <&clk IMX8MP_CLK_ECSPI1>;
assigned-clock-parents = <&clk IMX8MP_SYS_PLL1_800M>;
I don't see some kind of limitation because of clock. So what's the real bottleneck here? Is there some kind of ECSPI HW limitation, or?
I would recommend to reach our pro support they would be able to help you on that
Ok, good to know, that there is a way to get better support. Maybe I will use it in the future... .
BR,
Andy