Hello,
I’m working on imx7D, with a Colibri Evaluation Board v3.2B. I’m building a Kernel with Toradex Repository V2.7 (Linux Kernel Version is 4.1.35-v2.7b1+gc117783)
I have a working SPI Device on ecspi3, working with default Chip Select:
cs-gpios = <&gpio4 11 GPIO_ACTIVE_HIGH>;
I would like to add another /dev/spidev that would use the same signals exept for CS.
I followed information here: Add an SPI device to colibri imx6 - Technical Support - Toradex Community
But I could not get new spidev… So, here is what I have done:
- Using pin configurator, I found that CS1 for ecspi3 is pin 53. In imx7d-pinfunc.h I figured out that is was GPIO05 IO8.
- I modified imx7-colibri.dtsi:
Original:
&ecspi3 {
fsl,spi-num-chipselects = <1>;
cs-gpios = <&gpio4 11 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ecspi3 &pinctrl_ecspi3_cs>;
};
pinctrl_ecspi3_cs: ecspi3_cs_grp {
fsl,pins = <
MX7D_PAD_I2C2_SDA__GPIO4_IO11 0x14
>;
};
Became:
&ecspi3 {
fsl,spi-num-chipselects = <2>;
cs-gpios = <&gpio4 11 GPIO_ACTIVE_HIGH>, <&gpio5 8 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ecspi3 &pinctrl_ecspi3_cs>;
};
pinctrl_ecspi3_cs: ecspi3_cs_grp {
fsl,pins = <
MX7D_PAD_I2C2_SDA__GPIO4_IO11 0x14
MX7D_PAD_SD1_DATA3__GPIO5_IO8 0x14
>;
};
- I also modified imx7-colibri-eval-v3.dtsi:
After spidev0: spidev@1 in &ecspi3 node, I added:
spidev1: spidev@2 {
compatible = "toradex,evalspi";
reg = <1>;
spi-max-frequency = <23000000>;
status = "okay";
};
During boot, the only trace refering to spi is the following:
[ 1.138252] spi_imx 30840000.ecspi: probed
Is there something wrong or missing? (It must as I do not get the second spidev )