Topic: Switching to a touchscreen ?

Hi all,

I'm fine carrying my keyboard around, as I would miss my ErgoDox anyway if I did not. But having a mouse is bugging me. I  was wondering if anyone had thought about switching the Novena screen for a touchscreen ? I was hopeful because I read [0] "  Breakouts for touchscreen and USB".

Thx for any info !

Best Regards.


[0] http://www.kosagi.com/w/index.php?title … DP_Adapter

Re: Switching to a touchscreen ?

I am working on getting a 10” capacitive multitouch screen going that runs on one channel LVDS (so it should work well with Novena). I have a supplier lined up, just need to generate interest to do a big enough order. The touch controller speaks USB and I have confirmed that it works out-of-the-box with the Linux kernel shipped with Novena.

Re: Switching to a touchscreen ?

Great news !
I look forward to be part of it.

Re: Switching to a touchscreen ?

There are five holes on the eDP board that connect to an STMPE810 port expander chip.  Specifically, it connects to the touchscreen controller.

So you could, if you want, hook up a resistive panel.

Incidentally, the ADC from the STMPE is connected to the headphone port, in case you want to add support for headsets with volume buttons.

Re: Switching to a touchscreen ?

How much is it? I would be interested in a multitouch too, but I would need a second eDP board, I guess. Are spare eDP boards available?

Re: Switching to a touchscreen ?

If your captouch board speaks USB, you can also use the USB port present on the breakout board.

You might try contacting Crowd Supply about eDP boards.

I'm also personally interested in learning how much it costs smile

Re: Switching to a touchscreen ?

Consider me interested as well.

Re: Switching to a touchscreen ?

Estimated per-unit cost for the displays is 150 USD (depends a bit on shipping and duty things, etc).

Re: Switching to a touchscreen ?

singpolyma wrote:

Estimated per-unit cost for the displays is 150 USD (depends a bit on shipping and duty things, etc).

Count me in if using it does not require too much technical skill !

Re: Switching to a touchscreen ?

Well, it will require at least enough technical skill to take the eDP board off, hook up to a single LVDS channel, and set the kernel to output to a single LVDS channel with the right settings. So, similar to hooking up any other panel, pretty much, I hope smile

11 (edited by dileepvr 2015-09-10 07:02:18)

Re: Switching to a touchscreen ?

Can I use a 4-wire glass panel digitizer touchscreen (such as a Promate 3" panel: http://www.ebay.com/itm/NEW-Promate-3-T … 2c9e4c4473) through the LCD XP/XM/YP/YM leads on the 54-pin port?

Is there a flag that simply enables the touchscreen to work (like a touchpad, with some calibration) or do I actually need to write some C code to talk to /dev/i2c-0 bus? What's the address for the STMPE811 controller chip? Is it the reg field in the device tree?

Re: Switching to a touchscreen ?

Yes, that panel should work.

There isn't [yet] a flag, but one could be created!  It'd be a device tree entry.

Actually, now that I look at it, support is almost there, but a typo has prevented it from actually working.  The documentation is at https://github.com/xobs/novena-linux/bl … /stmpe.txt and the device tree file is at https://github.com/xobs/novena-linux/bl … a.dts#L343

I'd recommend giving the 3.19 build a go, and then building a new device tree.  Edit arch/arm/boot/dts/imx6q-novena.dts, change the "compatible" line to match stmpe.txt (i.e. make it "st,stmpe-ts"), then run "make dtbs" and copy arch/arm/boot/dts/imx6q-novena.dtb to /boot/novena.dtb.

The 3.19 debs are at https://nas.xobs.io/novena/20150902/ and I'll be releasing them through the repo soon.

Re: Switching to a touchscreen ?

That didn't work!

I installed the four deb packages, then went into imx6q-novena.dts and changed

compatible = "st,stmpe811";

to

compatible = "st,stmpe-ts";

. This did not change the contents of /dev/inputs.

There is also a change in the output of dmesg. Before the device tree change, a grep for stmpe gave:

[    0.743976] stmpe-i2c 0-0044: Looking up vcc-supply from device tree
[    0.744081] stmpe-i2c 0-0044: Looking up vio-supply from device tree
[    0.744950] stmpe-i2c 0-0044: stmpe811 detected, chip id: 0x811

After the device tree change, there are no lines in dmesg that contain "stmpe".
Before the device tree change, the command

i2cdetect -r 0

would earlier show a "UU" at row "40" and column 4 (address 0x44, right?). After the change, there is nothing in that slot.

Maybe it wasn't a typo!

Here is my current device tree dts file (after change) pages.uoregon.edu/dileep/imx6q-novena.dts

Possibly unrelated, but my CPU is hissing (as if the conductive paste is vaporizing). Is that normal? It IS hot. probably requires a fan.

Re: Switching to a touchscreen ?

the "UU" means that the kernel is using the part, meaning it's "Unavailable" to userspace.  It looks like you changed the wrong field.

The STMPE is a bit of a weird device.  It's called a MultiFunction Device, and falls into the MFD section.  It is an umbrella device which as one physical part and multiple logical parts.  That's because it's a touchscreen controller, keypad, GPIO device, and ADC.  You pick which parts you want by configuring sub-devices.

The section should look something like this:

        stmpe811@44 {
                compatible = "st,stmpe811";
                reg = <0x44>;
                #address-cells = <1>;
                #size-cells = <0>;
                irq-gpio = <&gpio5 13 GPIO_ACTIVE_HIGH>;
                id = <0>;
                blocks = <0x5>;
                irq-trigger = <0x1>;
                pinctrl-names = "default";
                pinctrl-0 = <&pinctrl_stmpe_novena>;
                vio-supply = <&reg_3p3v>;
                vcc-supply = <&reg_3p3v>;

                stmpe_touchscreen {
                        compatible = "st,stmpe-ts";
                        st,sample-time = <4>;
                        st,mod-12b = <1>;
                        st,ref-sel = <0>;
                        st,adc-freq = <1>;
                        st,ave-ctrl = <1>;
                        st,touch-det-delay = <2>;
                        st,settling = <2>;
                        st,fraction-z = <7>;
                        st,i-drive = <1>;
                };
        };

15 (edited by dileepvr 2015-09-17 07:59:33)

Re: Switching to a touchscreen ?

Noted. But what is the next step? I don't know how to actually use the touchscreen if it doesn't show up as a device in /dev/input/ .

Is there something I can add to uEnv.txt to make this happen?

Is there some stmpe-ts module I can compile from the source? How do I do so without compiling all modules?

Re: Switching to a touchscreen ?

My failed attempt at attempting to compile the stmpe-ts module from source is as follows:

Cloned xob's git repository and ensured that branch v3.19-novena-etnadrm-r3 was checked out.

Edited arch/arm/configs/novena_defconfig and made the following changes:

CONFIG_TOUCHSCREEN_USB_COMPOSITE=m       ->      CONFIG_TOUCHSCREEN_USB_COMPOSITE=y
...
# CONFIG_TOUCHSCREEN_STMPE is not set        ->      CONFIG_TOUCHSCREEN_STMPE=m

executed the following commands:

$ make novena_defconfig && make modules_prepare && make modules M=drivers/input/touchscreen

This generated stmpe-ts.ko file inside drivers/input/touchscreen. However, insmod returned an "invalid module format" error.
modinfo revealed that the version number 'vermagic' field was

3.19.0-00468-g53b6c5d-dirty

, which did not match my native precompiled and installed kernel (i.e., the output of

uname -r

).

I can change the vermagic field by changing the contents of include/config/kernel.release and include/generated/utsrelease.h files manually before generating modules, but the insmod error remains.

Is there a way around this issue?

Re: Switching to a touchscreen ?

dileepvr wrote:

Is there a way around this issue?

I would just compile and install the whole kernel- that should make sure everything works together. I've always had mixed luck trying to compile just a new module, even from a previously-compiled and installed kernel.

Re: Switching to a touchscreen ?

Regarding -dirty, I usually make this hack to get around that:

diff --git a/scripts/setlocalversion b/scripts/setlocalversion
index 63d91e2..4d24d6a 100755
--- a/scripts/setlocalversion
+++ b/scripts/setlocalversion
@@ -73,9 +73,9 @@ scm_version()
                fi
 
                # Check for uncommitted changes
-               if git diff-index --name-only HEAD | grep -qv "^scripts/package"; then
-                       printf '%s' -dirty
-               fi
+#              if git diff-index --name-only HEAD | grep -qv "^scripts/package"; then
+#                      printf '%s' -dirty
+#              fi
 
                # All done with git
                return

And... that's a good catch.  I can't believe I forgot to enable the STMPE touchscreen module.  That would be why it's not working.  I'll build those in so that the touchscreen will work for you.

Re: Switching to a touchscreen ?

A small cellphone touchscreen panel actually works out great!

Here is my experience with getting it to work: http://rightshift.info/starterkit/home/ … a-X-part-4