SPI Mux - non gpio cs

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

SPI Mux - non gpio cs

1,370 Views
mmonto58
Contributor II

Hello all,

Im trying to set up a device tree for some custom hardware and had a mux question regarding SPI.

Ive looked at the imx6qdl-nitrogen6_max.dtsi as part of the boundary 3.14 linux release. The spi chipselects in the nitrogen and sabre boards are all tied to GPIO's however our spi CS isnt done using gpio. For example Spi 1's ss0 is on pin disp0_data23.

The current device tree sets spi CS up as:

fsl,spi-num-chiselects = <1>   (this should be ok for ours as well)

cs-gpios = GP_ECSPI1_NOR_CS

where

GP_ECSPI1_NOR_CS is a #define pointing to a gpio bank and pin.

If were using the disp0 line for the ss0 do i just define it as:

MX6QDL_PAD_DISP0_DAT23_ECSPI1_SSO   0x100b1

following the same pattern as the other muxes and get rid of the cs-gpios = ... line or is it done differently?

0 Kudos
3 Replies

808 Views
igorpadykov
NXP Employee
NXP Employee

Hi matthew

according documentation and probe function in linux/drivers/spi/spi-imx.c

linux-2.6-imx.git - Freescale i.MX Linux Tree

linux-2.6-imx.git - Freescale i.MX Linux Tree

seems implemented only option with "cs-gpios".

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

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

-----------------------------------------------------------------------------------------------------------------------

0 Kudos

808 Views
mmonto58
Contributor II

Thanks Igor,

Does that mean that I will have to ask our hardware guys to change the HW for the CS to be a GPIO?

0 Kudos

808 Views
igorpadykov
NXP Employee
NXP Employee

I believe yes, one can use that pin as gpio and use existing driver

with "cs-gpios".

Best regards

igor

0 Kudos