I have an I2C touchscreen which uses the Goodix GT911 chip connected to I2C20 and the GPIO4 & 17 for the RST/INT pins.
I can see the device on the bus if I do an i2cdetect:As far as I can tell the Goodix drivers are included in the kernel by default, I have added "dtoverlay=goodix" to config.txt and I see the Goodix driver scanning the correct I2C address (0x14) at boot, but it appears to be scanning I2C1 rather than I2C20:
I found this snippet on making a DT Overlay for the GT911:
https://gist.github.com/io4nn1s/2013789 ... cff81453b4
So I tried tweaking that and adding it:
Modified DTS:Compile & add:But this resulted in nothing happening during boot (no goodix or gt911 mentions in dmesg), using dtoverlay gives me this:
Which is not much to go on.
What am I missing here?
Hardware is CM4, custom carrier board, unmodified Raspbian distro, Bookworm 6.6.51
I can see the device on the bus if I do an i2cdetect:
Code:
$ i2cdetect -r 20WARNING! This program can confuse your I2C bus, cause data loss and worse!I will probe file /dev/i2c-20 using receive byte commands.I will probe address range 0x08-0x77.Continue? [Y/n] y 0 1 2 3 4 5 6 7 8 9 a b c d e f00: -- -- -- -- -- -- -- -- 10: -- -- -- -- 14 -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: 50 51 52 53 54 55 56 57 -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- --
Code:
$ dmesg | grep -i goodix[ 6.492542] Goodix-TS 1-0014: supply AVDD28 not found, using dummy regulator[ 6.492797] Goodix-TS 1-0014: supply VDDIO not found, using dummy regulator[ 6.603697] Goodix-TS 1-0014: Error reading 1 bytes from 0x8140: -5[ 6.631350] Goodix-TS 1-0014: Error reading 1 bytes from 0x8140: -5[ 6.665997] Goodix-TS 1-0014: I2C communication failure: -5[ 6.666455] Goodix-TS: probe of 1-0014 failed with error -5
https://gist.github.com/io4nn1s/2013789 ... cff81453b4
So I tried tweaking that and adding it:
Modified DTS:
Code:
/dts-v1/;/plugin/;/ { compatible = "brcm,bcm2711"; fragment@0 { target = <&gpio>; // Overlay for GPIO pins, using standard 'gpio' node __overlay__ { goodix_pins: goodix_pins { // create overlay labeled "goodix_pins" brcm,pins = <17 4>; // use GPIO_17 (p50), GPIO_4(pin 54) brcm,function = <1 0>; // set pins as Output, Input brcm,pull = <2 2>; // enable internal pull-up resistors }; }; }; fragment@1 { target = <&i2c20>; // Overlay for I2C pins, using the 'i2c20' node __overlay__ { #address-cells = <1>; #size-cells = <0>; status = "okay"; // device is enabled gt9110: gt9110@14 { // set GT9110 with i2c address 0x14 compatible = "goodix,gt911"; // using 'goodix' kernel device driver reg = <0x14>; // I2C address (needs to match above) pinctrl-names = "default"; // default pin configuration pinctrl-0 = <&goodix_pins>; // assign overlay to pin control interrupt-parent = <&gpio>; // assign interrupt rutines interrupts = <4 2>; // high-to-low edge triggered irq-gpios = <&gpio 4 0>; // set Interupt pin on GPIO 4 reset-gpios = <&gpio 17 0>; // set Reset pin on GPIO 17 }; }; };};
Code:
$ sudo dtc -I dts -O dtb -o /boot/overlays/gt911.dtbo GT9110_overlay.dtsAdd to config.txt:dtoverlay=gt911
Code:
$ sudo dtoverlay gt911* Failed to apply overlay '0_gt911' (kernel)
What am I missing here?
Hardware is CM4, custom carrier board, unmodified Raspbian distro, Bookworm 6.6.51
Statistics: Posted by John_U — Fri Nov 29, 2024 11:49 am — Replies 6 — Views 106