Hello!
I'm use i.MX6Dual proc with kernel 4.13.0. I have external device, that I control via SPI interface. I have spidev0.0 and it's work well. But I want change inactive state of data line to low. Default inactive state is high. At reference manual I was find register ECSPIx_CONFIGREG that contain DATA_CTL field, that control inactive state of data line. I try update this field in spi driver init, but it's don't work. I don't understud, at what step in kernel I must edit this field.
Can anybody help me in this question? Thank you!
Solved! Go to Solution.
Hello!
I resolved my problem. In kernel 4.13.0 (and I think in kernel 4.1.15) was use driver file spi-imx.c. i.MX6 use iMX5 initialization function. In this function I wrote:
#define MX51_ECSPI_CONFIG_DATALOW(cs) (1 << ((cs) + 16))
near other #define and include line:
cfg |= MX51_ECSPI_CONFIG_DATALOW(spi->chip_select);
in function mx51_ecspi_config. Now I have low data line in inactive state.
Hello!
I resolved my problem. In kernel 4.13.0 (and I think in kernel 4.1.15) was use driver file spi-imx.c. i.MX6 use iMX5 initialization function. In this function I wrote:
#define MX51_ECSPI_CONFIG_DATALOW(cs) (1 << ((cs) + 16))
near other #define and include line:
cfg |= MX51_ECSPI_CONFIG_DATALOW(spi->chip_select);
in function mx51_ecspi_config. Now I have low data line in inactive state.
Hi Ivan
kernel 4.13.0 is not supported by nxp, one can try with kernels from source.codeaurora.org
nxp repository, change /* Default mode/csmode for eSPI controller */ in
https://source.codeaurora.org/external/imx/linux-imx/tree/drivers/spi/spi-fsl-espi.c?h=imx_4.1.15_2....spi-fsl-espi.c\spi\drivers - linux-imx - i.MX Linux kernel
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------