Hello
To setup SPI module on imx8mm EVK Board, I modified "imx8mm-evk.dts" with sample codes getting from NXP community.
BUT it does not work.
DEBUG
There's no "spidev1.0" device under "/dev" folder.
but it displayed if typed and run "echo -ne "\x01\x02\x03" > /dev/spidev1.0".
After seeing "spidev1.0" under the folder, "/dev", I typed "./spidev_test ", built with the test code under/ "tools/spi" folder
The spi is not open and "spidev1.0" is disappeared.
the whole source codes, worked for two month, were vanished on SSD through typed wrong device name with dd command, I cannot remember other except two part like the below codes attached.
This is so urgent issue to me. help me~.
---------------- @ imx8mm-evk.dts -------------------
&ecspi2 {
#address-cells = <1>;
#size-cells = <0>;
fsl,spi-num-chipselects = <1>;
pinctrl-names = "default", "sleep";
pinctrl-0 = <&pinctrl_ecspi2>;
//pinctrl-1 = <&pinctrl_ecspi2>; //cs-gpios = <&gpio5 13 GPIO_ACTIVE_LOW>;
status = "okay";
spidev@0 {
reg = <0>;
//compatible = "spidev"; //cs. warning
//compatible = "fsl, imx7ulp-spi"; //cs
compatible = "rohm,dh2228fv";
spi-max-frequency = <1000000>;
};
};
pinctrl_ecspi2: ecspi2grp {
fsl,pins = <
MX8MM_IOMUXC_ECSPI2_SCLK_ECSPI2_SCLK 0x174 //0x082 //0x144 //0x042 //0x1c2
MX8MM_IOMUXC_ECSPI2_MOSI_ECSPI2_MOSI 0x174 //0x082 //0x144 //0x172 //0x000 //0x080
MX8MM_IOMUXC_ECSPI2_MISO_ECSPI2_MISO 0x174 //0x082 //0x172 //0x006 //0x086
>;
};
@ imx8mm.dtsi
ecspi2: spi@30830000 {
compatible = "fsl,imx8mm-ecspi", "fsl,imx51-ecspi";
#address-cells = <1>;
#size-cells = <0>;
reg = <0x30830000 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";
status = "okay"; //cs
};
Hi JunpapaCS
one can look at spidev example on
Also may be recommended to rebuild all image from scratch.
Best regards
igor