Hi
I am planning to connect 2 IMX7D boards through SPI.
I refereed below link. which is for imx6 espi as salve with 3.0.35_4.1.0 kernel
i.MX6 ESPI slave mode support patch based on rel_imx_3.0.35_4.1.0
But i am using new 4.1.15 kernel . i tried to search similar files for imx7d . but couldn't find it.
when i configure slave master i just changed imx7d-sdb.dts and got it running .
Could any one please tell me what to do with newer kernel ?
Thank you
Chandini
Hi Chandini
please try patch on
[PATCH v2 8/8] spi: imx: Add support for SPI Slave mode for imx53 and imx6 chips | Linux | Kernel
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Igor,
Could you please share SPI-SLAVE patch for Linux_4.9.11?
Best regards
Solanki Deven
did you make it work well. can you share your work? thank you. I did like my upper post. do not work well.
igorpadykov I'm trying to get SPI slave working on 4.1.15. Lots of the patch that you suggested can be applied but plenty of it can't.
Do you know if anyone has updated this?
please check i.MX7 eCSPI driver discussion on
spi drivers for Colibri imx7 dual - Toradex Community
Best regards
igor
Hi Igor
I apply patch successfully by solving few compilation errors.and build zimage
but i have few questions.
1. Do i need to change anything in imx7d-sdb.dts ?
2. Do i need to add any configuration ?
currently i am enabling just below 2 options :
Device Drivers > SPI Support > Utilities for Bitbanging SPI masters.
Device Drivers > SPI Support > Freescale i.MX SPI controllers.
3. once i got spi slave working. how device looks like in board? i mean ,is it something similar master SPI[ ex: spidev2.0 ] ?
i copied zimage to sdcard but i could not see any device . i have attached my 2 files what i have changed.
I got below link which talk about 8 patchs for spi-slave support . it includes link the one which you suggested me . is it helpful ?
Thank you
Chandini
hi
I used your patch for board imx7: https://www.arrow.com/en/products/pico-pi-imx7-amazon/technexion which is ecspi3. it can pass the compilation
and I modified the device tree as following in file imx7s.dtsi:
...
ecspi3: ecspi@30840000 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "fsl,imx7d-ecspi", "fsl,imx51-ecspi";
reg = <0x30840000 0x10000>;
interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
fsl,spi-num-chipselects = <1>;
fsl,spi-slave-mode;
clocks = <&clks IMX7D_ECSPI3_ROOT_CLK>,
<&clks IMX7D_ECSPI3_ROOT_CLK>;
clock-names = "ipg", "per";
dmas = <&sdma 4 4 0>, <&sdma 5 4 0>;
dma-names = "rx", "tx";
status = "okay";
spidev@0 {
compatible = "spidev";
reg = <0>;
spi-max-frequency = <20000000>;
};
};
...
but the spi slave can not works well. I used the spidev-test/spidev_test.c at master · rm-hull/spidev-test · GitHub to test it.
I
cat /proc/interrupts | grep spi
52: 1 0 GPCV2 33 Edge 30840000.ecspi
only 1 interrupt happened. I think if input continuously, It should be many interrupts happened.
Did you make it work well?
what i missed?
thank you for your reply to : jin@fortresstechnology.com