I am using imx6 module. I want to have a total of 5 SPI slaves. I having the organization as (4+1) 4 SPI Slaves controlled by one line and the other slave by different SPI line. I can see the different SPI devices in Linux using the command ’ ls /dev | grep “spidev” '. I am facing problem when I test the SPI lines using a Oscilloscope. I can see the MISO, MOSI and SCLK working but not the CS line.
The CS line never goes high or low.
Here is the SPI definition in the device tree files
imx6qdl-colibri.dtsi
&ecspi4 {
fsl,spi-num-chipselects = <4>;
cs-gpio = <0>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ecspi4 &pinctrl_spi_cs1 &pinctrl_spi_cs0 &pinctrl_spi_cs2 &pinctrl_spi_cs3>;
status = "okay";
};
&ecspi1 {
fsl,spi-num-chipselects = <1>;
cs-gpio = <0>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ecspi1 &pinctrl_spi1_cs1 >;
status = "okay";
};
pinctrl_spi_cs1: spi_cs1 {
fsl,pins = <
MX6QDL_PAD_EIM_A25__ECSPI4_SS1 PAD_CTRL_NO /* SPI 4 cs 1*/
>;
};
pinctrl_spi_cs0: spi_cs0 {
fsl,pins = <
MX6QDL_PAD_EIM_D20__ECSPI4_SS0 PAD_CTRL_HYS_PD /* SPI 4 cs 0*/
>;
};
pinctrl_spi_cs2: spi_cs2 {
fsl,pins = <
MX6QDL_PAD_EIM_D24__ECSPI4_SS2 PAD_CTRL_HYS_PD /* SPI 4 cs 2*/
>;
};
pinctrl_spi_cs3: spi_cs3 {
fsl,pins = <
MX6QDL_PAD_EIM_D25__ECSPI4_SS3 PAD_CTRL_HYS_PD /* SPI 4 cs 3*/
>;
};
pinctrl_spi1_cs1: spi1_cs1 {
fsl,pins = <
MX6QDL_PAD_DISP0_DAT23__ECSPI1_SS0 PAD_CTRL_NO /* SPI 1 cs 0*/
>;
};
Carrier Board Level device tree
> /* Colibri SPI */ &ecspi4 {
> status = "okay";
> mcp258x0: mcp258x@1 {
> compatible = "microchip,mcp2515";
> reg = <0>;
> clocks = <&clk16m>;
> interrupt-parent = <&gpio3>;
> interrupts = <27 0x2>;
> spi-max-frequency = <10000000>;
> status = "disabled";
> };
>
> spidev0: spidev@1 {
> compatible = "spidev";
> reg = <0>;
> spi-max-frequency = <23000000>;
> };
> spidev1: spidev@2 {
> compatible = "spidev";
> reg = <1>;
> spi-max-frequency = <23000000>;
> };
> spidev2: spidev@3 {
> compatible = "spidev";
> reg = <2>;
> spi-max-frequency = <23000000>;
> };
> spidev3: spidev@4 {
> compatible = "spidev";
> reg = <3>;
> spi-max-frequency = <23000000>;
> }; };
> &ecspi1 {
> status = "okay";
> spidev4: spidev@5 {
> compatible = "spidev";
> reg = <4>;
> spi-max-frequency = <23000000>;
> }; };
I am using spidev_test.c from linux documentation to test the SPI lines. Can someone let me know why I can’t have SPI CS line active?
I am testing spidev3.1 as of now.
Thanks in advance.