I am working on imx8mmevk. I have configured for ecspi2 "fsl-imx8mm.dtsi" as :
ecspi2: ecspi@30830000 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "fsl,imx8mm-ecspi", "fsl,imx51-ecspi";
reg = <0x0 0x30830000 0x0 0x10000>;
clocks = <&clk IMX8MM_CLK_ECSPI2_ROOT>,
<&clk IMX8MM_CLK_ECSPI2_ROOT>;
clock-names = "ipg", "per";
status = "disabled";
};
Configuration for "fsl-imx8mm-evk.dts" are as follow:
&ecspi2 { fsl,spi-num-chipselects = <1>; cs-gpios = <0>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_ecspi2>; status = "okay";spi@0 {compatible = "spidev";
reg = <0>; spi-cs-high; spi-max-frequency = <10000000>; status = "okay"; }; };At application I had written code for spi loopback mode, where I had called device static const char *device = "/dev/spidev1.0"; When I flash code on imx8mmevk, run commandspi -D /dev/spidev1.0I get error, can't open device. No such file/directory. I had checked /dev. It is empty. How to test spi in loopback mode?
Hi Rutuja
one can look at attached escpi2 dts example,
For application one can reuse ecspi unit test:
mxc_spi_test1.c\mxc_spi_test\test - imx-test - i.MX Driver Test Application Software
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hello,
I had same modification. I had added dts patch & defconfig in .bbapend file. Still I am unable to find spidev in /dev.