-
Notifications
You must be signed in to change notification settings - Fork 5.2k
DTS for Adafruit PiTFT 2.8 capacitive touchscreen ? #1050
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I wasn't able to find the original source dts file from Adafriut but from the dtb referenced above you can generate it with the device tree compiler: However I'm afraid that some modifications will be necessary to integrate it nicely into the RPI kernel. For the resistive display, the pitft28-resistive-overlay.dtb from the RPi kernel and pitft28r-overlay.dtb from Adafruit look substantially different. |
there's a lot more than just the dts file - we have to also send over the capacitive device driver and our tweaks to the resistive device driver, both of which we know aren't going to be accepted without quite a bit of effort on my part :( |
What about pitft28-resistive-overlay.dtb from the stock RPi kernel? Where did that come from and do we still need the Adafruit custom kernel for this resistive display? |
|
That overlay is by @notro, who is also at least partly responsible for upstreaming the drivers used and who has contributed many similar overlays, as well as work in many other areas. |
OK, I get the picture. Eventually I also found the original Adafruit dts files: I was looking at the wrong files before and now I see that the dts file for the resistive display is actually the same for both Adafruit and RPi native kernel. So I expect this to work. Looks like the main problem ATM is the touch driver for the capacitive display (Focaltech ft6x06) which is not included in the RPi native kernel. Too bad. Hope this can be sorted out sooner or later. Having to use the Adafruit kernel is not an ideal solution. |
I have the adafruit display working with the stock kernel and pitft28-resistive-overlay.dtb touch screen and all. |
But is it the capacitive model? It uses a completely different touchscreen controller. |
My bad I will now go sit in the corner its the restive 2.8 and 3.5in versions, I do have an additional dt overplay for mapping the buttons on the 28" to cursor keys by default (over-ridable) using the gpio_keys module. |
Now I have received both the resistive and the capacitive touch screen and tested them with the stock RPi kernel (4.0.8). As expected, the resistive display works fine OOTB with the provided overlay and the kernel drivers. The capacitive display works also fine but the touch interface is not functional due to the missing ft6x06_ts input driver. |
@ondrej1024 no change since #1050 (comment) |
I take that for a "no" 😏 |
I know this is a few weeks old now, but I have successfully included the touch screen drivers (capacitive) in the latest kernel (V 4.0.9-v7+) for the RPi 2B. You just need a couple of files (and some instructions). I can't attach files here, but let me know if you need the tarball. |
@NickWaterton can you email them to [email protected] please and include a link to this thread (so i remember what it is)? i would greatly appreciate it! |
E-Mail sent, let me know if security strips the tar file. |
👍 |
The ft6236 driver has just been accepted for mainline: https://git.kernel.org/cgit/linux/kernel/git/dtor/input.git/commit/?id=92deea1350f9fa97a841d45cd1f8228d5e8aa667 |
@notro that sounds very good. Glad to see that things got moving eventually. Looking forward to test the driver and the Adafruit PiTFT with the rpi-4.1.y kernel when it will be available. |
The driver is in the latest rpi-update kernel #1176 |
Thanks @notro, will try it ASAP. |
I tried the latest RPi stock kernel 4.1.12 with the ft6236 driver. Now the touch input of the Adafruit PiTFT capacitive touchscreen works fine. Here is the specific DT overlay I wrote for the display. /* * Device Tree overlay for Adafruit PiTFT 2.8" capavitive touch screen * */ /dts-v1/; /plugin/; / { compatible = "brcm,bcm2835", "brcm,bcm2708", "brcm,bcm2709"; fragment@0 { target = <&spi0>; __overlay__ { status = "okay"; spidev@0{ status = "disabled"; }; spidev@1{ status = "disabled"; }; }; }; fragment@1 { target = <&gpio>; __overlay__ { pitft_pins: pitft_pins { brcm,pins = <24 25>; brcm,function = <0 1>; /* in out */ brcm,pull = <2 0>; /* pullup none */ }; }; }; fragment@2 { target = <&spi0>; __overlay__ { /* needed to avoid dtc warning */ #address-cells = <1>; #size-cells = <0>; pitft: pitft@0{ compatible = "ilitek,ili9340"; reg = <0>; pinctrl-names = "default"; pinctrl-0 = <&pitft_pins>; spi-max-frequency = <32000000>; rotate = <90>; fps = <25>; bgr; buswidth = <8>; dc-gpios = <&gpio 25 0>; debug = <0>; }; }; }; fragment@3 { target = <&i2c1>; __overlay__ { /* needed to avoid dtc warning */ #address-cells = <1>; #size-cells = <0>; /*pitft_ctp {*/ ft6236: ft6236@38 { compatible = "focaltech,ft6236"; reg = <0x38>; /*irq-gpio = <&gpio 24 2>;*/ interrupt-parent = <&gpio>; interrupts = <24 2>; touchscreen-size-x = <320>; touchscreen-size-y = <480>; }; }; }; __overrides__ { speed = <&pitft>,"spi-max-frequency:0"; rotate = <&pitft>,"rotate:0"; fps = <&pitft>,"fps:0"; debug = <&pitft>,"debug:0"; invx = <&ft6236>,"touchscreen-inverted-x?"; invy = <&ft6236>,"touchscreen-inverted-y?"; swapxy = <&ft6236>,"touchscreen-swapped-x-y?"; }; }; |
That looks good. Although there's technically no need to disable spidev@1 since only CE0 is used, having something plugged into the whole 40-way header probably makes it a moot point. Can you create a pull request for this? |
Ah, I see that the header pins are still accessible, so it would be better to remove the:
|
I removed the |
Just a heads up, the ft6236 driver will be gone in 4.9. It turned out that edt-ft5x06 also supports ft6236. Input: remove duplicate ft6236 driver: DT binding doc patch: |
Thanks for the warning. |
[ Upstream commit 3347c8a ] When building with LLVM_IAS=1 means using Clang's Integrated Assembly (IAS) from LLVM/Clang >= v10.0.1-rc1+ instead of GNU/as from GNU/binutils I see the following breakage in Debian/testing AMD64: <instantiation>:15:74: error: too many positional arguments PRECOMPUTE 8*3+8(%rsp), %xmm1, %xmm2, %xmm3, %xmm4, %xmm5, %xmm6, %xmm7, ^ arch/x86/crypto/aesni-intel_asm.S:1598:2: note: while in macro instantiation GCM_INIT %r9, 8*3 +8(%rsp), 8*3 +16(%rsp), 8*3 +24(%rsp) ^ <instantiation>:47:2: error: unknown use of instruction mnemonic without a size suffix GHASH_4_ENCRYPT_4_PARALLEL_dec %xmm9, %xmm10, %xmm11, %xmm12, %xmm13, %xmm14, %xmm0, %xmm1, %xmm2, %xmm3, %xmm4, %xmm5, %xmm6, %xmm7, %xmm8, enc ^ arch/x86/crypto/aesni-intel_asm.S:1599:2: note: while in macro instantiation GCM_ENC_DEC dec ^ <instantiation>:15:74: error: too many positional arguments PRECOMPUTE 8*3+8(%rsp), %xmm1, %xmm2, %xmm3, %xmm4, %xmm5, %xmm6, %xmm7, ^ arch/x86/crypto/aesni-intel_asm.S:1686:2: note: while in macro instantiation GCM_INIT %r9, 8*3 +8(%rsp), 8*3 +16(%rsp), 8*3 +24(%rsp) ^ <instantiation>:47:2: error: unknown use of instruction mnemonic without a size suffix GHASH_4_ENCRYPT_4_PARALLEL_enc %xmm9, %xmm10, %xmm11, %xmm12, %xmm13, %xmm14, %xmm0, %xmm1, %xmm2, %xmm3, %xmm4, %xmm5, %xmm6, %xmm7, %xmm8, enc ^ arch/x86/crypto/aesni-intel_asm.S:1687:2: note: while in macro instantiation GCM_ENC_DEC enc Craig Topper suggested me in ClangBuiltLinux issue #1050: > I think the "too many positional arguments" is because the parser isn't able > to handle the trailing commas. > > The "unknown use of instruction mnemonic" is because the macro was named > GHASH_4_ENCRYPT_4_PARALLEL_DEC but its being instantiated with > GHASH_4_ENCRYPT_4_PARALLEL_dec I guess gas ignores case on the > macro instantiation, but llvm doesn't. First, I removed the trailing comma in the PRECOMPUTE line. Second, I substituted: 1. GHASH_4_ENCRYPT_4_PARALLEL_DEC -> GHASH_4_ENCRYPT_4_PARALLEL_dec 2. GHASH_4_ENCRYPT_4_PARALLEL_ENC -> GHASH_4_ENCRYPT_4_PARALLEL_enc With these changes I was able to build with LLVM_IAS=1 and boot on bare metal. I confirmed that this works with Linux-kernel v5.7.5 final. NOTE: This patch is on top of Linux v5.7 final. Thanks to Craig and especially Nick for double-checking and his comments. Suggested-by: Craig Topper <[email protected]> Suggested-by: Craig Topper <[email protected]> Suggested-by: Nick Desaulniers <[email protected]> Reviewed-by: Nick Desaulniers <[email protected]> Cc: "ClangBuiltLinux" <[email protected]> Link: ClangBuiltLinux/linux#1050 Link: https://bugs.llvm.org/show_bug.cgi?id=24494 Signed-off-by: Sedat Dilek <[email protected]> Signed-off-by: Herbert Xu <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 3347c8a ] When building with LLVM_IAS=1 means using Clang's Integrated Assembly (IAS) from LLVM/Clang >= v10.0.1-rc1+ instead of GNU/as from GNU/binutils I see the following breakage in Debian/testing AMD64: <instantiation>:15:74: error: too many positional arguments PRECOMPUTE 8*3+8(%rsp), %xmm1, %xmm2, %xmm3, %xmm4, %xmm5, %xmm6, %xmm7, ^ arch/x86/crypto/aesni-intel_asm.S:1598:2: note: while in macro instantiation GCM_INIT %r9, 8*3 +8(%rsp), 8*3 +16(%rsp), 8*3 +24(%rsp) ^ <instantiation>:47:2: error: unknown use of instruction mnemonic without a size suffix GHASH_4_ENCRYPT_4_PARALLEL_dec %xmm9, %xmm10, %xmm11, %xmm12, %xmm13, %xmm14, %xmm0, %xmm1, %xmm2, %xmm3, %xmm4, %xmm5, %xmm6, %xmm7, %xmm8, enc ^ arch/x86/crypto/aesni-intel_asm.S:1599:2: note: while in macro instantiation GCM_ENC_DEC dec ^ <instantiation>:15:74: error: too many positional arguments PRECOMPUTE 8*3+8(%rsp), %xmm1, %xmm2, %xmm3, %xmm4, %xmm5, %xmm6, %xmm7, ^ arch/x86/crypto/aesni-intel_asm.S:1686:2: note: while in macro instantiation GCM_INIT %r9, 8*3 +8(%rsp), 8*3 +16(%rsp), 8*3 +24(%rsp) ^ <instantiation>:47:2: error: unknown use of instruction mnemonic without a size suffix GHASH_4_ENCRYPT_4_PARALLEL_enc %xmm9, %xmm10, %xmm11, %xmm12, %xmm13, %xmm14, %xmm0, %xmm1, %xmm2, %xmm3, %xmm4, %xmm5, %xmm6, %xmm7, %xmm8, enc ^ arch/x86/crypto/aesni-intel_asm.S:1687:2: note: while in macro instantiation GCM_ENC_DEC enc Craig Topper suggested me in ClangBuiltLinux issue #1050: > I think the "too many positional arguments" is because the parser isn't able > to handle the trailing commas. > > The "unknown use of instruction mnemonic" is because the macro was named > GHASH_4_ENCRYPT_4_PARALLEL_DEC but its being instantiated with > GHASH_4_ENCRYPT_4_PARALLEL_dec I guess gas ignores case on the > macro instantiation, but llvm doesn't. First, I removed the trailing comma in the PRECOMPUTE line. Second, I substituted: 1. GHASH_4_ENCRYPT_4_PARALLEL_DEC -> GHASH_4_ENCRYPT_4_PARALLEL_dec 2. GHASH_4_ENCRYPT_4_PARALLEL_ENC -> GHASH_4_ENCRYPT_4_PARALLEL_enc With these changes I was able to build with LLVM_IAS=1 and boot on bare metal. I confirmed that this works with Linux-kernel v5.7.5 final. NOTE: This patch is on top of Linux v5.7 final. Thanks to Craig and especially Nick for double-checking and his comments. Suggested-by: Craig Topper <[email protected]> Suggested-by: Craig Topper <[email protected]> Suggested-by: Nick Desaulniers <[email protected]> Reviewed-by: Nick Desaulniers <[email protected]> Cc: "ClangBuiltLinux" <[email protected]> Link: ClangBuiltLinux/linux#1050 Link: https://bugs.llvm.org/show_bug.cgi?id=24494 Signed-off-by: Sedat Dilek <[email protected]> Signed-off-by: Herbert Xu <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 3347c8a ] When building with LLVM_IAS=1 means using Clang's Integrated Assembly (IAS) from LLVM/Clang >= v10.0.1-rc1+ instead of GNU/as from GNU/binutils I see the following breakage in Debian/testing AMD64: <instantiation>:15:74: error: too many positional arguments PRECOMPUTE 8*3+8(%rsp), %xmm1, %xmm2, %xmm3, %xmm4, %xmm5, %xmm6, %xmm7, ^ arch/x86/crypto/aesni-intel_asm.S:1598:2: note: while in macro instantiation GCM_INIT %r9, 8*3 +8(%rsp), 8*3 +16(%rsp), 8*3 +24(%rsp) ^ <instantiation>:47:2: error: unknown use of instruction mnemonic without a size suffix GHASH_4_ENCRYPT_4_PARALLEL_dec %xmm9, %xmm10, %xmm11, %xmm12, %xmm13, %xmm14, %xmm0, %xmm1, %xmm2, %xmm3, %xmm4, %xmm5, %xmm6, %xmm7, %xmm8, enc ^ arch/x86/crypto/aesni-intel_asm.S:1599:2: note: while in macro instantiation GCM_ENC_DEC dec ^ <instantiation>:15:74: error: too many positional arguments PRECOMPUTE 8*3+8(%rsp), %xmm1, %xmm2, %xmm3, %xmm4, %xmm5, %xmm6, %xmm7, ^ arch/x86/crypto/aesni-intel_asm.S:1686:2: note: while in macro instantiation GCM_INIT %r9, 8*3 +8(%rsp), 8*3 +16(%rsp), 8*3 +24(%rsp) ^ <instantiation>:47:2: error: unknown use of instruction mnemonic without a size suffix GHASH_4_ENCRYPT_4_PARALLEL_enc %xmm9, %xmm10, %xmm11, %xmm12, %xmm13, %xmm14, %xmm0, %xmm1, %xmm2, %xmm3, %xmm4, %xmm5, %xmm6, %xmm7, %xmm8, enc ^ arch/x86/crypto/aesni-intel_asm.S:1687:2: note: while in macro instantiation GCM_ENC_DEC enc Craig Topper suggested me in ClangBuiltLinux issue #1050: > I think the "too many positional arguments" is because the parser isn't able > to handle the trailing commas. > > The "unknown use of instruction mnemonic" is because the macro was named > GHASH_4_ENCRYPT_4_PARALLEL_DEC but its being instantiated with > GHASH_4_ENCRYPT_4_PARALLEL_dec I guess gas ignores case on the > macro instantiation, but llvm doesn't. First, I removed the trailing comma in the PRECOMPUTE line. Second, I substituted: 1. GHASH_4_ENCRYPT_4_PARALLEL_DEC -> GHASH_4_ENCRYPT_4_PARALLEL_dec 2. GHASH_4_ENCRYPT_4_PARALLEL_ENC -> GHASH_4_ENCRYPT_4_PARALLEL_enc With these changes I was able to build with LLVM_IAS=1 and boot on bare metal. I confirmed that this works with Linux-kernel v5.7.5 final. NOTE: This patch is on top of Linux v5.7 final. Thanks to Craig and especially Nick for double-checking and his comments. Suggested-by: Craig Topper <[email protected]> Suggested-by: Craig Topper <[email protected]> Suggested-by: Nick Desaulniers <[email protected]> Reviewed-by: Nick Desaulniers <[email protected]> Cc: "ClangBuiltLinux" <[email protected]> Link: ClangBuiltLinux/linux#1050 Link: https://bugs.llvm.org/show_bug.cgi?id=24494 Signed-off-by: Sedat Dilek <[email protected]> Signed-off-by: Herbert Xu <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
[ Upstream commit 3347c8a ] When building with LLVM_IAS=1 means using Clang's Integrated Assembly (IAS) from LLVM/Clang >= v10.0.1-rc1+ instead of GNU/as from GNU/binutils I see the following breakage in Debian/testing AMD64: <instantiation>:15:74: error: too many positional arguments PRECOMPUTE 8*3+8(%rsp), %xmm1, %xmm2, %xmm3, %xmm4, %xmm5, %xmm6, %xmm7, ^ arch/x86/crypto/aesni-intel_asm.S:1598:2: note: while in macro instantiation GCM_INIT %r9, 8*3 +8(%rsp), 8*3 +16(%rsp), 8*3 +24(%rsp) ^ <instantiation>:47:2: error: unknown use of instruction mnemonic without a size suffix GHASH_4_ENCRYPT_4_PARALLEL_dec %xmm9, %xmm10, %xmm11, %xmm12, %xmm13, %xmm14, %xmm0, %xmm1, %xmm2, %xmm3, %xmm4, %xmm5, %xmm6, %xmm7, %xmm8, enc ^ arch/x86/crypto/aesni-intel_asm.S:1599:2: note: while in macro instantiation GCM_ENC_DEC dec ^ <instantiation>:15:74: error: too many positional arguments PRECOMPUTE 8*3+8(%rsp), %xmm1, %xmm2, %xmm3, %xmm4, %xmm5, %xmm6, %xmm7, ^ arch/x86/crypto/aesni-intel_asm.S:1686:2: note: while in macro instantiation GCM_INIT %r9, 8*3 +8(%rsp), 8*3 +16(%rsp), 8*3 +24(%rsp) ^ <instantiation>:47:2: error: unknown use of instruction mnemonic without a size suffix GHASH_4_ENCRYPT_4_PARALLEL_enc %xmm9, %xmm10, %xmm11, %xmm12, %xmm13, %xmm14, %xmm0, %xmm1, %xmm2, %xmm3, %xmm4, %xmm5, %xmm6, %xmm7, %xmm8, enc ^ arch/x86/crypto/aesni-intel_asm.S:1687:2: note: while in macro instantiation GCM_ENC_DEC enc Craig Topper suggested me in ClangBuiltLinux issue raspberrypi#1050: > I think the "too many positional arguments" is because the parser isn't able > to handle the trailing commas. > > The "unknown use of instruction mnemonic" is because the macro was named > GHASH_4_ENCRYPT_4_PARALLEL_DEC but its being instantiated with > GHASH_4_ENCRYPT_4_PARALLEL_dec I guess gas ignores case on the > macro instantiation, but llvm doesn't. First, I removed the trailing comma in the PRECOMPUTE line. Second, I substituted: 1. GHASH_4_ENCRYPT_4_PARALLEL_DEC -> GHASH_4_ENCRYPT_4_PARALLEL_dec 2. GHASH_4_ENCRYPT_4_PARALLEL_ENC -> GHASH_4_ENCRYPT_4_PARALLEL_enc With these changes I was able to build with LLVM_IAS=1 and boot on bare metal. I confirmed that this works with Linux-kernel v5.7.5 final. NOTE: This patch is on top of Linux v5.7 final. Thanks to Craig and especially Nick for double-checking and his comments. Suggested-by: Craig Topper <[email protected]> Suggested-by: Craig Topper <[email protected]> Suggested-by: Nick Desaulniers <[email protected]> Reviewed-by: Nick Desaulniers <[email protected]> Cc: "ClangBuiltLinux" <[email protected]> Link: ClangBuiltLinux/linux#1050 Link: https://bugs.llvm.org/show_bug.cgi?id=24494 Signed-off-by: Sedat Dilek <[email protected]> Signed-off-by: Herbert Xu <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
Hi,
Is anyone working on a DT overlay for the Adafruit PiTFT 2.8 capacitive touchscreen?
https://www.adafruit.com/products/1983
Adafruit provide their own kernel with an overlay which can be found here:
https://github.com/adafruit/Adafruit-Pi-Kernel-o-Matic/blob/pitft/boot/overlays/pitft28c-overlay.dtb
But if would be much better of course, if the stock RPi firmware would support this display, so we wouldn't have to mess with third party kernels.
There is already an overlay pitft28-resistive-overlay.dtb for the resistive version of the display.
Thanks, Ondrej
The text was updated successfully, but these errors were encountered: