I wanted to perform a SPI loopback test on ECSPI3 of the IMX6ULLEVK board to make sure my devicetree is correct and the SPI is working. I can see the /dev/spidev2.0 and I have shorted the MISO and MOSI on the IMX6ULLEVK's arduino header J1703, and when I run the spidev_test I am not receiving the string which I am sending as below
root@xxxx~# spidev_test -D /dev/spidev2.0 -v -p "Hello World"
spi mode: 0x0
bits per word: 8
max speed: 500000 Hz (500 kHz)
TX | 48 65 6C 6C 6F 20 57 6F 72 6C 64 __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ |Hello World|
RX | FF FF FF FF FF FF FF FF FF FF FF __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ |...........|
and my devicetree for the corresponding is below
&iomuxc {
pinctrl_ecspi3: ecspi3grp {
fsl,pins = <
MX6UL_PAD_UART2_RTS_B__ECSPI3_MISO 0x100b1
MX6UL_PAD_UART2_CTS_B__ECSPI3_MOSI 0x100b1
MX6UL_PAD_UART2_RX_DATA__ECSPI3_SCLK 0x100b1
MX6UL_PAD_UART2_TX_DATA__ECSPI3_SS0 0x100b1
>;
};
};
&ecspi3 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ecspi3>;
status = "okay";
fsl,spi-num-chipselects = <1>;
spidev@0 {
reg = <0>;
compatible = "rohm,dh2228fv";
spi-max-frequency = <20000000>;
};
};
when I generate the iomux value for the ecspi3 using the nxpconfig tool, the values were
MX6UL_PAD_UART2_CTS_B__ECSPI3_MOSI 0x000010B0
MX6UL_PAD_UART2_RTS_B__ECSPI3_MISO 0x000010B0
MX6UL_PAD_UART2_RX_DATA__ECSPI3_SCLK 0x000010B0
MX6UL_PAD_UART2_TX_DATA__ECSPI3_SS0 0x000010B0
I tried changing to the PAD values to 0x000010B0, still FF FF FF on the loopback test. Can someone lead me whether something is wrong or missing?
Info: Using linux-imx 5.15.71 kernel
Thanks in advance!!!