I can work with spidev with one chip-select. Now I want to add one more chip -select to the same spidev and modify the device tree as follow,
&ecspi2 {
#address-cells = <1>;
#size-cells = <0>;
fsl,spi-num-chipselects = <2>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ecspi2 &pinctrl_ecspi2_cs>;
num-cs = <2>;
cs-gpios = <&gpio5 13 GPIO_ACTIVE_LOW>,
<&gpio4 27 GPIO_ACTIVE_LOW>;
status = "okay";
spidev0: spi@0 {
reg = <0x00>;
compatible = "linux,spidev";
spi-max-frequency = <1000000>;
};
spidev1: spi@1 {
reg = <1>;
compatible = "linux,spidev";
spi-max-frequency = <1000000>;
};
};
pinctrl_ecspi2_cs: ecspi2cs {
fsl,pins = <
MX8MM_IOMUXC_ECSPI2_SS0_GPIO5_IO13 0x40000
MX8MM_IOMUXC_SAI2_MCLK_GPIO4_IO27 0x15
>;
};
The console log shows an error
[ 5.131261] spi_imx 30830000.spi: error -EBUSY: bitbang start failed
[ 5.138905] spi_imx: probe of 30830000.spi failed with error -16
Could someone help resolve this problem?
Many thanks in advance!