AnsweredAssumed Answered

Unable to make ecspi2 work on SCM-i.MX6

Question asked by Marco Oman on Jan 11, 2018
Latest reply on Jan 16, 2018 by Marco Oman

I am working with the QWKS-SCMIMX6DQ board and trying to test, at least partially ecspi2. So I have modified the device tree this way:

I have added an entry for this SPI (file imx6dqscm-qwks-rev2.dtsi)

 

&ecspi2 {
    fsl,spi-num-chipselects = <1>;
    cs-gpios = <&gpio5 12 0>;
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_ecspi2>;
    status = "okay";
    spidev0: spidev@0 {
        #address-cells = <1>;
        #size-cells = <0>;
        compatible = "rohm,dh2228fv";
        spi-max-frequency = <200000>;
        reg = <0>;
    };
};

 

and removed i2c1/pinctrl_i2c1 which uses the same pads  (CSI0_DAT8/CSI0_DAT9).

 

Then I added also pinctrl_ecspi2

 

        pinctrl_ecspi2: ecspi2grp {
            fsl,pins = <
                MX6QDL_PAD_DISP0_DAT17__ECSPI2_MISO 0x80000000
                MX6QDL_PAD_CSI0_DAT9__ECSPI2_MOSI 0x100b1
                MX6QDL_PAD_CSI0_DAT8__ECSPI2_SCLK 0x100b1
                MX6QDL_PAD_DISP0_DAT18__ECSPI2_SS0 0x100b1
            >;
        };

 

I can see in /dev that i2c-0 disappears and that I have a new device spidev1.0. So far so good.

The problem is that if I issue a command like

 

echo 123 >/dev/spidev1.0

 

then I do not see (with the probe) any activity on pins J11.10/J11.12 of the board.

 

I tried a different Device tree that makes use of ecspi1 and verified that echoing something gets the expected result on J2.12/10/8/6.

 

So my question is: there is something wrong with my Device Tree or is not possible to (ab)use the board this way?

(For example I see on the schematic that there is a 4.7k pull-up on J11.10, which is OK for a I2C but unsuited for a SPI, anyway I would expect to see some activity with the probe...)

Outcomes