i.MX6 SCLK_POL & SCLK_PHA in ECSPIx_CONFIGREG

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

i.MX6 SCLK_POL & SCLK_PHA in ECSPIx_CONFIGREG

Jump to solution
817 Views
m_c
Senior Contributor I

Customer would like set SCLK_POL & SCLK_PHA in ECSPIx_CONFIGREG. There is an function mx51_ecspi_config in kernel driver can do this. How to pass parameter (spi_imx_config->mode) to this function in correct way? By device tree or other way?

http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/tree/drivers/spi/spi-imx.c?id=kk4.4.3_2....

Labels (1)
Tags (2)
0 Kudos
1 Solution
590 Views
jamesbone
NXP TechSupport
NXP TechSupport

What version of Kernel are you using? or are you planning to use?
If a version 3.10 or latest you need to do it by device tree, if  2.6 it is your version need to it, directly in the driver instance.

You can use SPIDEV in your application.

https://www.kernel.org/doc/Documentation/spi/spidev_test.c

https://www.kernel.org/doc/Documentation/spi/spidev


Have a great day,
Jaime

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

View solution in original post

2 Replies
591 Views
jamesbone
NXP TechSupport
NXP TechSupport

What version of Kernel are you using? or are you planning to use?
If a version 3.10 or latest you need to do it by device tree, if  2.6 it is your version need to it, directly in the driver instance.

You can use SPIDEV in your application.

https://www.kernel.org/doc/Documentation/spi/spidev_test.c

https://www.kernel.org/doc/Documentation/spi/spidev


Have a great day,
Jaime

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

590 Views
m_c
Senior Contributor I

Android KK 4.4.3 2.0.0.

Customer would like to set SPI mode 3 (POL=1 & PHA=1).

0 Kudos