ecspi2 probed but spidev module is not present in /dev

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

ecspi2 probed but spidev module is not present in /dev

1,006 Views
rutuja_patil
Contributor II

For imx8mmevk, I have edited

1. dts file as 

&ecspi2 {
fsl,spi-num-chipselects = <1>;
cs-gpios = <0>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ecspi2>;
status = "okay";
spidev@0x00 {
compatible = "spidev";
spi-max-frequency = <10000000>;
spi-cs-high;
reg = <0>;
};
};

pinctrl_ecspi2: ecspi2grp {
fsl,pins = <
MX8MM_IOMUXC_ECSPI2_MISO_ECSPI2_MISO 0x00000116
MX8MM_IOMUXC_ECSPI2_MOSI_ECSPI2_MOSI 0x00000116
MX8MM_IOMUXC_ECSPI2_SCLK_ECSPI2_SCLK 0x00001916
MX8MM_IOMUXC_ECSPI2_SS0_ECSPI2_SS0 0x00000116
>;
};

2. dsti file is 

ecspi2: ecspi@30830000 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "fsl,imx8mm-ecspi", "fsl,imx51-ecspi";
reg = <0x0 0x30830000 0x0 0x10000>;
interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clk IMX8MM_CLK_ECSPI2_ROOT>,
<&clk IMX8MM_CLK_ECSPI2_ROOT>;
clock-names = "ipg", "per";
dmas = <&sdma1 2 7 1>, <&sdma1 3 7 2>;
dma-names = "rx", "tx";

status = "disabled";
};

3. defconfig through menuconfig is 

CONFIG_SPI=y
CONFIG_SPI_MASTER=m
CONFIG_SPI_BITBANG=y
CONFIG_SPI_GPIO=y
CONFIG_SPI_IMX=y
CONFIG_SPI_SPIDEV=y
CONFIG_SND_SPI=y
CONFIG_SND_SOC_I2C_AND_SPI=y

4. dts patch is added in kernel.bbappend file

When I check on board, with command dmesg | grep spi

It shows,


[ 1.275849] fsl-flexspi 30bb0000.flexspi: mt25qu256 (16384 Kbytes)
[ 1.288721] spi_imx 30830000.ecspi: probed

When I check in /dev 

spidev is not present.

After few seconds it shows message

[ 62.550971] imx-sdma 302c0000.dma-controller: external firmware not found, using ROM firmware
[ 62.551253] imx-sdma 30bd0000.dma-controller: external firmware not found, using ROM firmware
[ 62.551337] imx-sdma 302b0000.dma-controller: external firmware not found, using ROM firmware

while same command dmesg | grep spi returns nothing.

Please check attached file for detail.

How to configure spidev module?

Tags (3)
0 Kudos
1 Reply

893 Views
igorpadykov
NXP Employee
NXP Employee

Hi Rutuja 

for i.MX8M spidev one can try steps described on

Accessing SPI Devices in Linux 

http://variwiki.com/index.php?title=DART-MX8M_SPI 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos