I have a device that needs to put into SPI mode by the following procedure:
- Poll CSPI_ready
- When CSPI_ready goes high enable SS
- Send at least 16 clock cycles
I have my device hooked up against the standard configuration:
pinctrl_ecspi1: ecspi1grp {
fsl,pins = <
MX6QDL_PAD_EIM_D18__ECSPI1_MOSI 0x0b0b0
MX6QDL_PAD_EIM_D17__ECSPI1_MISO 0x0b0b0
MX6QDL_PAD_EIM_D16__ECSPI1_SCLK 0x0b0b0
MX6QDL_PAD_GPIO_19__ECSPI1_RDY 0x0b0b0
MX6QDL_PAD_EIM_EB2__GPIO2_IO30 0x0b0b0 /* SPI CS0 */
MX6QDL_PAD_EIM_D19__GPIO3_IO19 0x0b0b0 /* SPI CS1 */
>;
};
I want to poll the CSPI_Ready line and then just send some garbage data when it goes high.
This doesn't seem to be a possibility with the regular spider.h provided functions - to which I am able to find examples. I have CONFIG_SPI_IMX enabled in my Linux config but I am unable to find any examples what-so-ever on how to make use of these functions. I've tried reading through the source code but I can't make sense of it.
1. Is there any example of ANYTHING with this out there? Even the most trivial example would go a long way in helping me, I believe.
2. Is it possible to poll the CSPI_Ready pin while not transferring any data?