Hi, I'm using the imx8mm board with linux-fslc 6.1.27 kernel.
I activated on device tree and in kernel the ecspi1. As the goal is to drive an eeprom, I've also configured kernel and device tree with at25 driver.
When using the SPI, I see that the master ( imx8mm) is sending correct data on the MOSI line as expected. But, when i disconnected the device from the spi, I see that some signals are sending through the MISO line from the master. When I add back the spi device, we can see some signals with a voltage line of 1,50/1,70V instead of 3.3V or 0V and only with sclk pulses. By the way, the data in miso line aren't the same as the one sent into Mosi line.
I'm wondering which parameter allow the imx8mm to send things on the MISO Line.
Any suggestion?
Thanks in advance !
Hello @c_guerr ,
I hope you are doing well.
->This may happen due to multiple reasons.
->Please make sure to check the slave device is connected to the master correctly.
->Please also make sure to check the configurations set for the slave devices.
->Please check on the oscilloscope that the signal on the MISO line was seen when the device got detected.
->Please check the device tree configuration and kernel configurations made for the spi slave device, make sure the slave device is enabled.
->Please make sure the clock frequency & data format are being used.
-For more detail refer to this doc.
Documentation/spi/spi-summary
->Please refer to the device tree location given below for the device tree configuration reference.
https://source.codeaurora.org/external/imx/linux-imx/tree/arch/arm64/boot/dts/freescale/fsl-imx8mn-d...
I hope it helps!
Thanks & Regards,
Sanket Parekh
Hi ! Thank you for the reply
->Please make sure to check the slave device is connected to the master correctly.
The slave have been checked various time by me and hardware team so we are ok with it.
->Please also make sure to check the configurations set for the slave devices.
The slave is CPOL = 1 CPHA = 1 as stated in his datasheet so seems correct.
->Please check on the oscilloscope that the signal on the MISO line was seen when the device got detected.
The problem is that the signal on MISO is a bid weird as stated. When linked to the output of the slave, i got sometimes signal of ~1.65V instead of 3.30V. SO i tried to disconnect the slave to check the miso line and yes, the IMX8MM sends thing on this line ( or maybe some hardware recommendation to do ? ).
->Please check the device tree configuration and kernel configurations made for the spi slave device, make sure the slave device is enabled.
I've put CONFIG_SPI, CONFIG_SPI_IMX to yes according the datasheet of the IMX8MM. Everything is ok in this side. For the device tree, i've see the dt-bindings and seems correct and similar to other device tree.
->Please make sure the clock frequency & data format are being used
Clock frequency is good as the CPHA / CPOL according datasheet of the slave device.
Hi @c_guerr,
I hope you are doing well.
Please provide me with a schematic and MISO waveform for further debugging.
Please also provide a device tree file with the pinctrl property.
It is recommended to use linux-imx (lf-6.1.y) instead of h linux-fslc.
Thanks & Regards,
Sanket Parekh
I won't be available in this subject from now to next week.
What I can say is that it is a 32 Mbit SPI EEPROM Page m92p32 ( I don't have yet a schematic, it's still a proof of concept).
Here the pinctrl:
pinctrl_ecspi1: ecspi1grp {
fsl,pins = <
MX8MM_IOMUXC_ECSPI1_MISO_ECSPI1_MISO 0x80
MX8MM_IOMUXC_ECSPI1_MOSI_ECSPI1_MOSI 0x80
MX8MM_IOMUXC_ECSPI1_SCLK_ECSPI1_SCLK 0x80
MX8MM_IOMUXC_ECSPI1_SS0_GPIO5_IO9 0x00
>;
};
I will try with the linux-imx.
Any argument about using linux-imx? As far as I remember, I see that things from the linux vanilla are more updated on the linux-fslc than the linux-imx. I may be wrong.
Hi @c_guerr,
I hope you are doing well.
One could try changing the drive strength of ecspi external signals.
as done in imx8mm-evk.dtsi
Please refer to 8.2.5.277 Pad Control Register (IOMUXC_SW_PAD_CTL_PAD_ECSPI1_MISO) in RM.
Any argument about using linux-imx?
[Ans]: NXP recommends & supports linux-imx.
Please refer to i.MX Linux Release Notes for more information.
Thanks & Regards,
Sanket Parekh