Hi,
I have already modified the imx6sl-evk.dts file and I added the following code:
&ecspi2 {
fsl,spi-num-chipselects = <2>;
cs-gpios = <0>,<&gpio3 31 0>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ecspi2_1>;
status = "okay";
spidev@0x00 {
compatible = "spidev";
spi-max-frequency = <20000000>;
reg = <0>;
};
spidev@0x01 {
compatible = "spidev";
spi-max-frequency = <20000000>;
reg = <1>;
};
};
&iomuxc {
...
...
ecspi2 {
pinctrl_ecspi2_1: ecspi2grp-1 {
fsl,pins = <
MX6SL_PAD_ECSPI2_MISO__ECSPI2_MISO 0x100b1
MX6SL_PAD_ECSPI2_MOSI__ECSPI2_MOSI 0x100b1
MX6SL_PAD_ECSPI2_SCLK__ECSPI2_SCLK 0x100b1
MX6SL_PAD_ECSPI2_SS0__ECSPI2_SS0 0x100b1
MX6SL_PAD_KEY_ROW3__GPIO3_IO31 0x100b1
>;
};
};
And I can see /dev/spidev32765. 0 and /dev/spidev32765.1. With this I hope I can use the ECSPI2 that is in the LCD port (I have an adapter for this), but I cannot even see the clock when something is sent (or at least I assume that). The test I am doing is based on a program from the kernel files and you can find it in spidev_test.c - The Linux Kernel Archives .