AnsweredAssumed Answered

tsc2046 (/ads7846) on imx6 "no irq" problem

Question asked by kartiknatarajan on Nov 8, 2014
Latest reply on Nov 18, 2014 by Ossian Riday

I have some trouble in getting the spi tsc2046 (ads7846 based) touchscreen(TS) controller up.

Here are the details:

I have added the TS to my ecspi2 (and not spi?) . This is how the dts code looks.

 

                                ecspi2: ecspi@0200c000 {

                                         #address-cells = <1>;

                                         #size-cells = <0>;

                                         compatible = "fsl,imx6q-ecspi", "fsl,imx51-ecspi";

                                        reg = <0x0200c000 0x4000>;

                                         interrupts = <0 32 0x04>;

                                        clocks = <&clks 113>, <&clks 113>;

                                        clock-names = "ipg", "per";

                                        status = "disabled";

                                       /*added for touchscreen on SPI2*/

                                              ads7846@0 {

                                              compatible = "ti,ads7846";

                                              spi-max-frequency = <1000000>;

                                              reg = <0>;

                                              /* interrupt in round 2, first just check if ts gets identified */

                                              pendown-gpio = <&gpio3 19 0>;

                                              //interrupt-parent = <&gpio2>;

                                              interrupts = <83 0>;

                                        };

 

                                };

..

..

..

&ecspi2 {

        pinctrl-names = "default";

        pinctrl-0 = <&pinctrl_ecspi2_1>;

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

        cs-gpios = <&gpio2 26 0>;

        status = "okay";

};

..

..

..

        ecspi2 {

pinctrl_ecspi2_1: ecspi2grp-1 {

fsl,pins = <

MX6QDL_PAD_EIM_OE__ECSPI2_MISO 0x100b1

MX6QDL_PAD_EIM_CS1__ECSPI2_MOSI 0x100b1

                                MX6QDL_PAD_EIM_CS0__ECSPI2_SCLK 0x100b1

MX6QDL_PAD_EIM_RW__GPIO2_IO26 0x1b0b0            //added the chip select as an gpio pin.

                                MX6QDL_PAD_EIM_A25__ECSPI2_RDY  0x100b1

>;

                };

        };

 

 

But the touchscreen won't get probed so I added debugs to the touchscreen driver - drivers/input/touchscreen/ads7846.c only to find that the spi struct passed does not have sufficient information.

 

static int ads7846_probe(struct spi_device *spi)

{

                struct ads7846 *ts;

                struct ads7846_packet *packet;

                struct input_dev *input_dev;

                struct ads7846_platform_data *pdata = spi->dev.platform_data;

                unsigned long irq_flags;

                int err;

 

                if (!spi->irq) {

                                dev_dbg(&spi->dev, "no IRQ?\n");

                                return -ENODEV;              // code returns from here

                }

                ..

                ..

                ..

}

 

 

Isn't the driver (or in this case the kernel invoking the probe) supposed to get all the information from the dtb file?

Are the ecspi and spi considered as separate interfaces?

Outcomes