Learnincurve Posted January 26, 2017 Posted January 26, 2017 Hi, I have a pine64 with the official touch screen, currently running Xenial with legacy kernel. I followed the instructions to enable the touchscreen: Also starting with 5.24 Pine64’s own LCD with touchscreen support can simply be activated in /boot/armbianEnv.txt by setting pine64_lcd=on and adding gt9xxf_ts to /etc/modules followed by a reboot. which works fine. Preferably, I'd like to use a later kernel, as I'm not interested in any graphical HW acceleration but would like some of the other improvements in later kernels. When I tried the instructions with kernel 4.9, I couldn't find the gt9xxf_ts module. Is there any way of making this work with vanilla/developer kernels? BR. --Marius--
bomber Posted February 2, 2017 Posted February 2, 2017 With legacy kernel there was different way to enable gt9xx touchscreen. With dev kernel you need to compile kernel drivers module (now it's called "goodix" ) in menuconfig it is in Drivers -> Input Devices -> Touchscreens -> "Goodix". But i think this drivers is compiled by default. After that you need to modify Device Tree, compile it, and boot board with it. Some info what add to Device Tree are in kernel source Documentation/devicetree/bindings/input/touchscreen/goodix.txt
Learnincurve Posted February 2, 2017 Author Posted February 2, 2017 PERFECT! Thanks very much! I started looking at the kernel source tree and have seen (and enabled) the Goodix I2C touchscreen driver. When it comes to the device tree, I'm not so sure. I can see from /sys/bus/devices that my screen is using the 0-005d address but haven't found the rest of the information that needs to be in the .dtc file. including "goodix,gt911" or "goodix,gt9110" - interrupt-parent - interrupts - irq-gpios - reset-gpios : GPIO pin used for reset Does a .dtc already exist for the device or how can I query the system for the rest of the information?
Learnincurve Posted February 3, 2017 Author Posted February 3, 2017 Hmmm. I was hoping to be able to identify the device branch from the current tree for 3.10.104 and gt9xxf_ts module, but the device is only listed as a ctp_list entry (both in the current tree file and /proc filesystem representation): ls /proc/device-tree/soc@01c00000/ctp_list/ aw5306_ts compatible device_type gslX680new gt82x gt9xxf_ts gt9xxnew_ts gt9xx_ts name status zet622x So no help there in adding the new goodix tree entry. From /sys/devices, I see that the touchscreen is connected somewhere under one of the twi nodes: /sys/devices/soc.0/1c2ac00.twi/i2c-0/0-005d/driver/0-005d/name="gt9xxf_ts" but if I try to navigate the device tree I lose the trail after /proc/device-tree/soc@01c00000/pinctrl@01c20800 where I have four twi* subdirectories: twi@0x01c2ac00/ twi@0x01c2b000/ twi@0x01c2b400/ twi_para/ Any ideas on how to proceed? BR.
bomber Posted February 3, 2017 Posted February 3, 2017 Look at the datasheet and schematics of pine64 and your screen. http://wiki.pine64.org/index.php/Main_Page its looks that screen uses GT911 and on pine64 its connected by TWI0 with address 0x5d. PH4 as Interrupt pin, and PH11 as Reset pin.
bomber Posted February 4, 2017 Posted February 4, 2017 Something like that: add that to sources\linux-pine64-dev\sunxi64-next-20170125\arch\arm64\boot\dts\allwinner\sun50i-a64-pine64.dts make sure you have FORCE_CHECKOUT = "no" in compile.sh &i2c0 { pinctrl-names = "default"; pinctrl-0 = <&i2c0_pins>; status = "okay"; gt911@5d { compatibile = "goodix,gt911"; reg = <0x5d>; pinctrl-names = "default"; pinctrl-0 = <>911_irq_pin>, <>911_reset_pin>; interrput-parent = <&pio>; interrputs = <7 4 IRQ_TYPE_EDGE_RISING>; irq-gpios = <&pio 7 4>; reset-gpios = <&pio 7 11>; }; }; &pio { i2c0_pins: i2c0_pins { pins = "PH0", "PH1"; function = "i2c0"; }; gt911_irq_pin: gt911_irq_pin { pins = "PH4"; function = "irq"; }; gt911_reset_pin: gt911_reset_pin { pins = "PH11"; function = "gpio_out"; }; }; Note that i don't have pine64 and this is untested. After boot do: ls -lah /dev/input/by-path and try with evtest sun50i-a64-pine64.zip linux-dtb-dev-pine64_5.25_arm64.zip
Learnincurve Posted February 6, 2017 Author Posted February 6, 2017 Thank you Bomber! I now have a booting 4.10 image. Will move over the compiled goodix module that I have from another 4.10 build and start working on the device tree. Right now I have an even simpler question: How to enable the LCD output? --Marius--
Learnincurve Posted February 6, 2017 Author Posted February 6, 2017 I just installed the dtb deb file from the link that you provided and rebooted. Maybe that wasn't the same as adding: &i2c0 { pinctrl-names = "default"; pinctrl-0 = <&i2c0_pins>; status = "okay"; gt911@5d { compatibile = "goodix,gt911"; reg = <0x5d>; pinctrl-names = "default"; pinctrl-0 = <>911_irq_pin>, <>911_reset_pin>; interrput-parent = <&pio>; interrputs = <7 4 IRQ_TYPE_EDGE_RISING>; irq-gpios = <&pio 7 4>; reset-gpios = <&pio 7 11>; }; }; &pio { i2c0_pins: i2c0_pins { pins = "PH0", "PH1"; function = "i2c0"; }; gt911_irq_pin: gt911_irq_pin { pins = "PH4"; function = "irq"; }; gt911_reset_pin: gt911_reset_pin { pins = "PH11"; function = "gpio_out"; }; }; to sources\linux-pine64-dev\sunxi64-next-20170125\arch\arm64\boot\dts\allwinner\sun50i-a64-pine64.dts and rebuilding? Anyway, system boots, but I don't see the input node and dmesg includes: [ 3.900500] i2c i2c-0: of_i2c: modalias failure on /soc/i2c@1c2ac00/gt911@5d [ 3.900511] i2c i2c-0: Failed to create I2C device for /soc/i2c@1c2ac00/gt911@5d BR. --Marius--
tkaiser Posted February 6, 2017 Posted February 6, 2017 How to enable the LCD output? Become a kernel developer and start to code? This is clearly written on the download page for Pine64: 'vanilla kernel does not support DVFS, HDMI, onboard analog audio output, onboard IR receiver, CSI, DSI and TP interfaces' (DSI is LCD).
Learnincurve Posted February 6, 2017 Author Posted February 6, 2017 Ah. Sorry didn't know that DSI was LCD... which kinda explains why it would not be a good idea for me to try to code anything ... Also makes it a bit pointless trying to get the touch interface working. Thanks all for your work... I'll check out mainline again in a few months. BR.
tkaiser Posted February 6, 2017 Posted February 6, 2017 I'll check out mainline again in a few months. I really don't follow anything display related with mainline kernel (headless use cases) but IIRC Icenowy managed to get A33 based tablets running with GUI and mainline kernel. You might check linux-sunxi IRC for related info (also a backlog available, just do a web search for 'icenowy a33 lcd tablet site:irclog.whitequark.org' or something like this). No idea whether anyone works on A64 in this area. It seems A64 while being designed to be a tablet SoC is not used in that much Android tablets today (Icenowy reported a few weeks ago from a local Chinese market that there wasn't a single A64 device, just cheap A33 based devices)
Learnincurve Posted February 7, 2017 Author Posted February 7, 2017 Thanks for info. It's a crying shame that Allwinner don't release their code and I'll happily sign anything to encourage them to do so. I'm sure there's hope that A64 will gain more following with time and that more work will be done. In the meantime, I'll make do with 3.10.104 and maybe try to patch that with some realtime stuff, to make it more suitable for audio. BR. --Marius--
tkaiser Posted February 7, 2017 Posted February 7, 2017 It's a crying shame that Allwinner don't release their code Huh? They release their code but it's the usual 'port and forget' style most other Android SoC vendors also follow: Take the mainline (or Linaro) kernel at some point in time, fiddle around all the necessary driver bits to get your own hardware supported (in a really awful manner that would never be accepted upstream and unfortunately more than once relying on blobs for whatever reasons) and then forget about it. So you either take their kernel drop (3.10.65), take community's partially fixed one (then you're at 3.10.104 but this is still an ugly Android kernel that might contain severe flaws) or you wait for linux-sunxi community to get real mainline drivers later. Based on looking at Allwinner's tinalinux software offerings I doubt they will ever get that mainlining work should start at Allwinner already.
alifiratari Posted July 23, 2018 Posted July 23, 2018 After 12 kernel compilations; gt911@5d { compatibile compatible = "goodix,gt911"; reg = <0x5d>;
Recommended Posts