Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => A13 => Topic started by: arjepsen on March 28, 2021, 06:22:13 PM

Title: goodix touch panel, once again.
Post by: arjepsen on March 28, 2021, 06:22:13 PM
With the new and improved olimage images, I'm once again trying to put together an installation for the controller of my beer-brewing machine.
It's using a A13-SOM-512 board, that has a 4.3 capacitive touch panel attached to it.
So far, the image seems to do very well, and the screen displays just fine.
However, I'm having quite a lot of trouble getting the touch functionality to work.
It's using a Goodix 911 chip, and unfortunately, the information on getting this to work is a bit sparse.
I'm working on making a dts overlay file, and this is what I've come up with so far:

// Device tree overlay for I2C connected Goodix gt911 multiple touch controller
/dts-v1/;
/plugin/;

/ {
        compatible = "allwinner,sun5i-a13";
        description = "Trying to enable gt911";

        fragment@0 {
                target = <&rtp>;
                __overlay__ {
                        status = "disabled";
                };
        };

        fragment@1 {
                target = <&uart3_cts_rts_pg_pins>;
                __overlay__ {
                        status = "disabled";
                };
        };


        fragment@2 {
                target = <&pio>;
                __overlay__ {
                        goodix_pins: goodix_pins {
                                allwinner,pins = "PG12\0PC3";
                                allwinner,function = "gpio_in", "gpio_out";
                                allwinner,pull = <2 2>; // pull-up
                        };
                };
        };


        fragment@3 {
                target = <&i2c2>;
                __overlay__ {
                        #address-cells = <1>;
                        #size-cells = <0>;
                        status = "okay";

                        gt911: gt911@14 {
                                compatible = "goodix,gt911";
                                reg = <0x14>;
                                status = "okay";
                                pinctrl-names = "default";
                                pinctrl-0 = <&goodix_pins>;
                                interrupt-parent = <&pio>;
                                interrupts = <6 12 2>;
                                irq-gpios = <&pio 6 12 4>;
                                reset-gpios = <&pio 2 3 8>;
                        };
                };
        };
};


This gives me this result in dmesg:

Quote[    8.214093] Goodix-TS 2-0014: supply AVDD28 not found, using dummy regulator
[    8.214468] Goodix-TS 2-0014: supply VDDIO not found, using dummy regulator
[    8.223192] Goodix-TS: probe of 2-0014 failed with error -16

Interesting thing is, if I comment out the "irq-gpios" line, I get:

Quote[    8.220078] Goodix-TS 2-0014: supply AVDD28 not found, using dummy regulator
[    8.220546] Goodix-TS 2-0014: supply VDDIO not found, using dummy regulator
[    8.227913] Goodix-TS 2-0014: ID 911, version: 1060
[    8.252229] input: Goodix Capacitive TouchScreen as /devices/platform/soc/1c2b400.i2c/i2c-2/2-0014/input/input0
[    8.256396] gpio gpiochip0: (1c20800.pinctrl): gpiochip_lock_as_irq: tried to flag a GPIO set as output for IRQ
[    8.266686] sun5i-pinctrl 1c20800.pinctrl: unable to lock HW IRQ 12 for IRQ
[    8.273675] genirq: Failed to request resources for gt911 (irq 51) on irqchip sunxi_pio_edge
[    8.323122] systemd[1]: Finished File System Check on Root Device.
[    8.381872] systemd[1]: Starting Remount Root and Kernel File Systems...
[    8.382920] phy phy-1c13400.phy.0: External vbus detected, not enabling our own vbus
[    8.430959] Goodix-TS 2-0014: request IRQ failed: -5
[    8.463247] Goodix-TS: probe of 2-0014 failed with error -5

Weirdly it seems it "gets more done", like setting up the input, but it's still failing.

Anyone got any tips?

Regards.