AnsweredAssumed Answered

Can't open device. No such a file/directory

Question asked by Rutuja Patil on Feb 26, 2020
Latest reply on Mar 2, 2020 by Rutuja Patil

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 command
spi -D /dev/spidev1.0
I get error, can't open device. No such file/directory.

I had checked /dev. It is empty.
How to test spi in loopback mode?

Outcomes