Polytouch touchscreen driver issue: no irq domain found

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Polytouch touchscreen driver issue: no irq domain found

Jump to solution
4,669 Views
davidw_
Contributor II

Hello,

I'm trying to use a LCD display witch touchscreen using EDT Polytouch FocalTech FT5x06 driver. The system is using 3.13 kernel from Timesys with device tree, running on dual-core Vybrid MVF61NN151CMK50 processor.

The polytouch driver should use i2c bus for communication and gpio pin for interrupts. I can see the touch chip on i2c address 0x38. However, when I write config for the driver in the device tree, I get the following error on boot:


i2c i2c-0: IMX I2C adapter registered

irq: no irq domain found for /soc/aips-bus@40000000/gpio-controller@4004b000 !

 

i2c-0 is the bus touchscreen chip is on, 4004b000 is the address of gpio3, where the interrupt pin is.

 

the .dts file:

/* I2C-2 (400E_6000): Touch screen */

&i2c2 {

    clock-frequency = <100000>;

    pinctrl-names = "default";

    pinctrl-0 = <&pinctrl_i2c2>;

    status = "okay";

 

    polytouch: edt-ft5x06@38 {

        compatible = "edt,edt-ft5406", "edt,edt-ft5x06";

        reg = <0x38>;

        pinctrl-names = "default";

        pinctrl-0 = <&edt_ft5x06_pins>;

        interrupt-parent = <&gpio3>;    // PTE22 - pin 127 ~ gpio3, pin 31

        interrupts = <31 0>;

        wake-gpios = <&gpio4 14 0>;    // PTE5 - port3,pin14 ~ gpio4, 14

    };

};

 

...

 

edt_ft5x06_pins: ft5x06grp {

            fsl,pins = <

                VF610_PAD_PTE22__GPIO_127    0x621    // IRQ

                VF610_PAD_PTE5__GPIO_110    0x2192    // Wake

            >;
};

 

and the definition of gpio3 in .dtsi file (almost default vf610.dtsi file provided by Freescale)

/* This is a GPIO controller device */

            gpio3: gpio-controller@4004b000 {

                compatible = "fsl,vf610-gpio";

                #address-cells = <2>;

                /* PORT C mux control: addr size, GPIO control: addr size */

                reg = <0x4004b000 0x1000 0x400ff080 0x40>;

                interrupts = <0 109 IRQ_TYPE_LEVEL_HIGH>;

                gpio-controller;

                #gpio-cells = <2>;

                interrupt-controller;

                #interrupt-cells = <2>;

                gpio-ranges = <&iomuxc 0 64 32>;
};

 

The touch screen driver is then able to load by modprobe edt-ft5x06 (dmesg: i2c-core: driver [edt_ft5x06] registered),
but it doesn't work and provided calibrate touchscreen init script returns "Finding touchscreen using legacy method:[FAIL]"

 

Is there something to be added for the gpio to function as an interrupt controller? Or where the problem might be?
(Attached files are: board .dts file, SoC .dtsi file and kernel .config)

Original Attachment has been moved to: dts-3.13.zip

Original Attachment has been moved to: vf610.dtsi.zip

Original Attachment has been moved to: .config.zip

Labels (2)
Tags (4)
1 Solution
1,703 Views
davidw_
Contributor II

Solution:
There were two things wrong.

1) The Edt-ft5x06 touchscreen driver packaged in Timesys Factory with kernel 3.13 is not supposed to be used with Device Tree. New versions are ok.

2) The GPIO driver initializes too late for irq domains to be registered when touchscreen driver loads. Moving  GPIO driver initialization from fs_initcall() to arch_initcall() fixes this issue.

View solution in original post

10 Replies
1,704 Views
davidw_
Contributor II

Solution:
There were two things wrong.

1) The Edt-ft5x06 touchscreen driver packaged in Timesys Factory with kernel 3.13 is not supposed to be used with Device Tree. New versions are ok.

2) The GPIO driver initializes too late for irq domains to be registered when touchscreen driver loads. Moving  GPIO driver initialization from fs_initcall() to arch_initcall() fixes this issue.

1,703 Views
Nouchi
Senior Contributor II

Hello david,

Can you, please, explain how to move GPIO driver, I've got same issue with egalax_ts, may be a similar problem.

Emmanuel

0 Kudos
1,703 Views
davidw_
Contributor II

Hello,

moving driver initialization should be just a matter of changing one line in driver source code.

In my case it is driver: linux/drivers/gpio-vf610.c Near the end of the file, there is a line specifying when the driver should initialize.

for example: "arch_initcall(gpio_vf610_init);"

The whole system initializes in these steps:

early_initcall()

core_initcall()

postcore_initcall()

arch_initcall()

subsys_initcall()

fs_initcall()

device_initcall()

late_initcall()

I hope it helps.

D.W.

0 Kudos
1,703 Views
Nouchi
Senior Contributor II

Hello,

Thanks for explanation, this eliminate some error messages, but I've got some difficulties to use poweroff-gpio pin to shut-off the board.

poweroff-gpio: probe of gpio-poweroff failed with error -22

May be something wrong in my device tree definition.

Emmanuel

Edit: Problem solved, I used an already attributed gpio, then gpio-poweroff is registered and egalax probed

0 Kudos
1,703 Views
timesyssupport
Senior Contributor II

Hello David,

Can you confirm this is using the in-tree driver sources for the EDT FT5x06?

This is utilizing custom hardware correct? Or is this touchscreen connected to the Vybrid TWR evaluation kit?

Thank you,

Timesys Support

0 Kudos
1,703 Views
davidw_
Contributor II

Hello,
I am using just the sources included in Timesys Factory (version 20150126, with the 3.13 kernel).
The board is a custom hardware, where touchscreen works with our older Factory build with 3.0 kernel. Now, I'm trying to port the new system to the board.
Also, I was earlier able to get the touchscreen on TWR evaluation kit working, but it is using different driver (CRTOUCH) with no interrupts defined in the device tree.

0 Kudos
1,703 Views
timesyssupport
Senior Contributor II

Hello David,

As your issue is on custom hardware, we can provide best-effort support.

The error message you are seeing, "irq: no irq domain found" may be caused by attempting to use an irqchip that has not yet been initialized.

There are some patches upstream that address this. Please try applying the attached two patches to your kernel sources, which allow dynamic irqchip creation to avoid this error.

Thanks, and let me know how it goes.

Timesys Support

1,703 Views
davidw_
Contributor II

Hello,
unfortunately, those patches did not fix the issue. The "no irq domain found" error is still shown on boot and FT5x06 driver fails to work.

It does seem like trying to use the irqchip too early is the issue here, though. Interrupts for gpio-keys, which initialize later in the boot process than the FT5x06 driver (according to boot messages) are visible in irq_domain_mapping along with what seem to be gpio irq_domains

# cat /sys/kernel/debug/irq_domain_mapping

name          mapped     linear-max  direct-max  devtree-node

gpio-vf610     32          32                    0               /soc/aips-bus@40000000/gpio-controller@4004d000

gpio-vf610     32          32                    0               /soc/aips-bus@40000000/gpio-controller@4004c000

gpio-vf610     32          32                    0               /soc/aips-bus@40000000/gpio-controller@4004b000

gpio-vf610     32          32                    0               /soc/aips-bus@40000000/gpio-controller@4004a000

gpio-vf610     32          32                    0               /soc/aips-bus@40000000/gpio-controller@40049000

GIC               160        160                  0               /soc/aips-bus@40000000/interrupt-controller@40002000

irq          hwirq          chip name          chip data          active          type          domain

16          0x00010          GIC               0x80642ac8                        LINEAR     GIC

...

165       0x00005       gpio-vf610         0x879f0490     *                  LINEAR    gpio-vf610

(irq 165 is an unrelated but working gpio-key. Interrupt for FT5x06 is not listed as active)

If those patches did not work as expected, but the irq domain still gets initialized later on in the boot process, is it possible to just delay loading of the driver or load it manually after boot? (a dirty solution would be enough here).

0 Kudos
1,703 Views
karina_valencia
NXP Apps Support
NXP Apps Support

timesyssupport  please continue with the follow up.

0 Kudos
1,703 Views
karina_valencia
NXP Apps Support
NXP Apps Support

timesyssupport can you   help to review this case?

0 Kudos