AnsweredAssumed Answered

i.MX25 SPI problem

Question asked by Carlos Soto on Nov 30, 2014
Latest reply on Dec 6, 2014 by Fabio Estevam

Hi,

I'm trying to enable SPI in the TX25 module from KaRo. I'm using kernel 3.17.2, and in order to enable SPI i've modified imx25-karo-tx25.dts. The changes are two: first of all, enable SPI

/* SPI support */

&spi1 {

    pinctrl-names = "default";

    pinctrl-0 = <&pinctrl_cspi>;

    fsl,spi-num-chipselects = <2>;

    status = "okay";

 

    cs-gpios = <

        &gpio1 16 0

        &gpio1 17 0

    >;

 

    spidev0: spi@0 {

        compatible = "spidev";

        reg = <0>;

        spi-max-frequency = <24000000>;

    };

 

    spidev1: spi@1 {

        compatible = "spidev";

        reg = <1>;

        spi-max-frequency = <24000000>;

    };   

};

And

    pinctrl_cspi: cspigrp {
   fsl,pins = <
   MX25_PAD_CSPI1_RDY__CSPI1_RDY   0x80000000
   MX25_PAD_CSPI1_SS0__CSPI1_SS0   0x80000000
   MX25_PAD_CSPI1_SCLK__CSPI1_SCLK   0x80000000
   MX25_PAD_CSPI1_MISO__CSPI1_MISO   0x80000000
   MX25_PAD_CSPI1_MOSI__CSPI1_MOSI   0x80000000
   MX25_PAD_CSPI1_SS1__CSPI1_SS1   0x80000000
   >;
   };  

to iomuxc.

 

I've created a rootfs with buildroot, and added spidev_test to it. When I try this command, the process hangs and I'm unable to end it, even with a kill -9.

 

Further debugging using strace has shown that the process hangs when tries to execute this ioctl:

ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr);

but that's as far as I can get.

 

Any clues? Thanks in advance

Outcomes