https://redmine.graphics-muse.org/https://redmine.graphics-muse.org/favicon.ico?16278048512014-03-28T02:23:12ZGraphics Muse Issue TrackerXeon - Action Item #299: Add touchscreen driver to kernel buildhttps://redmine.graphics-muse.org/issues/299?journal_id=10832014-03-28T02:23:12ZHammelmjhammel@graphics-muse.org
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>In Progress</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>10</i></li></ul><p>Apparently I need to integrate this driver into the build too:<br /><a class="external" href="https://github.com/notro/fbtft_tools">https://github.com/notro/fbtft_tools</a></p> Xeon - Action Item #299: Add touchscreen driver to kernel buildhttps://redmine.graphics-muse.org/issues/299?journal_id=10872014-03-29T16:33:47ZHammelmjhammel@graphics-muse.org
<ul><li><strong>% Done</strong> changed from <i>10</i> to <i>20</i></li></ul><p>This repo is designed to be built out-of-kernel. It requires work to make it into a real driver tree.</p>
<p>What I may be able to do is modify the Makefile and add a Kconfig file for just the ads7846_device, which is all that's missing for touchscreen support. There are other drivers in there but they aren't required.</p> Xeon - Action Item #299: Add touchscreen driver to kernel buildhttps://redmine.graphics-muse.org/issues/299?journal_id=10922014-03-31T02:57:45ZHammelmjhammel@graphics-muse.org
<ul><li><strong>% Done</strong> changed from <i>20</i> to <i>50</i></li></ul><p>Added fbtft_tools to kernel build. The drivers are installed under lib/modules/<version>/extra.</p>
<p>They have not been tested on the target yet.</p> Xeon - Action Item #299: Add touchscreen driver to kernel buildhttps://redmine.graphics-muse.org/issues/299?journal_id=10962014-04-01T02:54:00ZHammelmjhammel@graphics-muse.org
<ul></ul>Drivers required:
<ol>
<li>Kernel
<ol>
<li>ads7846</li>
<li>ads7846_device (from fbtft_tools)</li>
<li>evdev</li>
</ol>
</li>
<li>Buildroot
<ol>
<li>xinput</li>
</ol></li>
</ol>
<p>ads7846 was not configured in the kernel.<br />ads7846_device is currently being built by the kernel-build-drivers target.<br />evdev was already enabled as a module in the kernel.</p>
<p>xinput was not enabled as an X.org driver module in Buildroot.</p>
<p>Updating both configs and rebuilding. S90UI will be updated to make sure these are all loaded when the fbtft driver is loaded.</p> Xeon - Action Item #299: Add touchscreen driver to kernel buildhttps://redmine.graphics-muse.org/issues/299?journal_id=10972014-04-01T03:50:02ZHammelmjhammel@graphics-muse.org
<ul></ul>Some helpful links:
<ol>
<li><a class="external" href="http://boundarydevices.com/debian-in-more-depth-adding-touch-support/">http://boundarydevices.com/debian-in-more-depth-adding-touch-support/</a></li>
<li><a class="external" href="http://www.friendlyarm.net/forum/topic/2958">http://www.friendlyarm.net/forum/topic/2958</a></li>
<li><a class="external" href="http://www.freedesktop.org/wiki/Software/xinput_calibrator/">http://www.freedesktop.org/wiki/Software/xinput_calibrator/</a></li>
<li><a class="external" href="https://www.alwaysinnovating.com/wiki/index.php/Touchscreen_calibration">https://www.alwaysinnovating.com/wiki/index.php/Touchscreen_calibration</a></li>
<li><a class="external" href="http://marks-space.com/2013/09/07/programming-a-touchscreen-on-the-raspberry-pi/">http://marks-space.com/2013/09/07/programming-a-touchscreen-on-the-raspberry-pi/</a></li>
<li><a class="external" href="http://www.thefanclub.co.za/how-to/how-ubuntu-1204-touchscreen-calibration">http://www.thefanclub.co.za/how-to/how-ubuntu-1204-touchscreen-calibration</a></li>
<li><a href="https://www.raspberrypi.org/forums/viewtopic.php?f=44&t=91764&start=75#p662735" class="external">Dual screen HDMI and 2.8 PiTFT</a> - lots of manual-howto help plus tips on testing.</li>
</ol> Xeon - Action Item #299: Add touchscreen driver to kernel buildhttps://redmine.graphics-muse.org/issues/299?journal_id=11052014-04-08T02:40:00ZHammelmjhammel@graphics-muse.org
<ul><li><strong>% Done</strong> changed from <i>50</i> to <i>70</i></li></ul><p>Enabled driver in modules.conf so it gets loaded by S11dev now. All that's left is to verify it can be used if the touchscreen is actually available and that it doesn't cause a problem if it isn't available.</p> Xeon - Action Item #299: Add touchscreen driver to kernel buildhttps://redmine.graphics-muse.org/issues/299?journal_id=11542014-05-13T01:40:35ZHammelmjhammel@graphics-muse.org
<ul><li><strong>Priority</strong> changed from <i>Immediate</i> to <i>Normal</i></li><li><strong>Target version</strong> changed from <i>0.9.0</i> to <i>0.10.0</i></li></ul><p>Additional work on this is being pushed to 0.10.0 so I can get the media specific stuff completed in time for camping season.</p> Xeon - Action Item #299: Add touchscreen driver to kernel buildhttps://redmine.graphics-muse.org/issues/299?journal_id=14522014-11-17T22:35:25ZHammelmjhammel@graphics-muse.org
<ul><li><strong>Target version</strong> changed from <i>0.10.0</i> to <i>2.0 - Harkonnen</i></li></ul><p>A touchscreen interface is not really required until we get to the "Nest"-like feature set that supports home automation, which isn't target till the 2.0 release.</p>
<p>Moving to 2.0 target version.</p> Xeon - Action Item #299: Add touchscreen driver to kernel buildhttps://redmine.graphics-muse.org/issues/299?journal_id=24092019-01-31T00:10:46ZHammelmjhammel@graphics-muse.org
<ul></ul><p>Touchscreen support is available via the official Raspberry Pi 7" touchscreen. Support for Adafruit displays like the ADS7846 is incomplete and will be investigated further with the PiBox Phone (project Xeon).</p> Xeon - Action Item #299: Add touchscreen driver to kernel buildhttps://redmine.graphics-muse.org/issues/299?journal_id=24102019-01-31T00:14:27ZHammelmjhammel@graphics-muse.org
<ul><li><strong>Project</strong> changed from <i>PiBox</i> to <i>Xeon</i></li><li><strong>Category</strong> deleted (<del><i>03 - Linux Kernel</i></del>)</li><li><strong>Priority</strong> changed from <i>Normal</i> to <i>Immediate</i></li><li><strong>Target version</strong> changed from <i>2.0 - Harkonnen</i> to <i>v0.1</i></li><li><strong>Severity</strong> changed from <i>03 - Medium</i> to <i>01 - Critical</i></li></ul> Xeon - Action Item #299: Add touchscreen driver to kernel buildhttps://redmine.graphics-muse.org/issues/299?journal_id=24322019-02-08T22:20:32ZHammelmjhammel@graphics-muse.org
<ul></ul><p>FYI: Here is a <a href="https://www.willprice.org/2017/09/16/adventures-with-tft-screens-for-raspberry-pi.html" class="external">blog post</a> from someone who tried doing the same thing.</p>
<p>In the end I think I'm on the right path here but I can probably learn a little more from what that guy went through.</p> Xeon - Action Item #299: Add touchscreen driver to kernel buildhttps://redmine.graphics-muse.org/issues/299?journal_id=24382019-02-11T16:14:42ZHammelmjhammel@graphics-muse.org
<ul><li><strong>% Done</strong> changed from <i>70</i> to <i>50</i></li></ul><p>Attempted to boot with TFT attached. I got a white screen but nothing else. HDMI still works.</p>
<p>The problems are likely configuration problems with config.txt and cmdline.txt. I also may or may not have the correct TFT drivers enabled for this particular display.</p>
<p>An alternative problem is that I soldered the headers to the Pi Zero W to connect the display. At least one pin may not be properly soldered. However, I checked the tutorial for the TFT and it appears this pin is not used for the display. So I <strong>think</strong> my soldering is sufficient for testing.</p>
<p>Bumping back the %done again because I think I still have a ways to go to get the TFT working properly.</p> Xeon - Action Item #299: Add touchscreen driver to kernel buildhttps://redmine.graphics-muse.org/issues/299?journal_id=24402019-02-24T18:30:38ZHammelmjhammel@graphics-muse.org
<ul><li><strong>% Done</strong> changed from <i>50</i> to <i>80</i></li></ul><p>I had a hard time getting the TFT touchscreen to work. So much so that I looked around to see if there was a small HDMI screen I could use. I found one:</p>
<pre><code><a class="external" href="http://wiki.52pi.com/index.php/5-Inch-800x480-Capacity-Touch-Screen_SKU:_EP-0081">http://wiki.52pi.com/index.php/5-Inch-800x480-Capacity-Touch-Screen_SKU:_EP-0081</a></code></pre>
<p>I picked one of these up from <a href="https://smile.amazon.com/gp/product/B0749D617J/ref=ppx_yo_dt_b_asin_title_o01_s02?ie=UTF8&psc=1" class="external">Amazon</a></p>
<p>This arrived pretty quickly and I was able to boot the Pi Zero with it quite easily. The package came with the exact changes required for config.txt in order for the display to work. The display is large (5") and just hooks up to the HDMI port on the Pi. So much simpler and requires no changes to the PiBox development platform other than the config.txt. At least so far - the touchscreen requires the display to be hooked to the USB port of the Pi. Both are female micro USB ports and I don't have a connector for that, so I haven't tried it yet (will need a hub for that, which I have but haven't tested yet).</p>
<p>So I'm switching to the HDMI display for the Xeon project. I've ordered a set of connectors that I think will allow me to hook up both the HDMI and USB ports with as small cabling as possible. Adafruit has some nice parts for <a href="https://www.adafruit.com/product/3549" class="external">DIY</a> <a href="https://www.adafruit.com/product/3561" class="external">HDMI</a> and <a href="https://www.adafruit.com/product/2910" class="external">USB connections</a>. I've also done a test layout of the parts for the phone over some perfboard and they fit fine.</p>
<p>Once I have the parts for the cables and have fit them to verify I can close this issue.</p> Xeon - Action Item #299: Add touchscreen driver to kernel buildhttps://redmine.graphics-muse.org/issues/299?journal_id=24652019-02-27T18:58:04ZHammelmjhammel@graphics-muse.org
<ul></ul><p>The HDMI display's touchscreen via the USB connection is not working with X.org under PiBox. It does work with Raspbian. I've logged everything I can find under Raspbian and started examining it to figure out what might be happening.</p>
<p>The first thing I found was the X.org.log file from Raspbian shows that <em>config/udev</em> is being used to identify the touchscreen device. Udev had already created the input device for it. PiBox doesn't use udev - it uses mdev. So the fix may be as simple as modifying</p>
<pre><code>lib/mdev/inputdev</code></pre>
<p>To support the touchscreen and create the appropriate input device. Then I can add an <a href="https://unix.stackexchange.com/questions/274149/setting-up-xorg-input-devices-without-udev" class="external">xorg.conf</a> that specifies the device to be used.</p>
<p>I also noted that X.org comes up fine without an xorg.conf file in general, it just doesn't support the input device. I may only need to make sure the input device is properly created (which I think it may already be because I tested it with evtest under PiBox), but I think the problem is with X.org knowing what to do with the device and that means making mdev create a specific device I can reference for it in the xorg.conf.</p> Xeon - Action Item #299: Add touchscreen driver to kernel buildhttps://redmine.graphics-muse.org/issues/299?journal_id=24672019-03-01T18:33:45ZHammelmjhammel@graphics-muse.org
<ul></ul><p>I managed to get the touchscreen working with the HDMI display. The first trick was to load the <em>hid_multitouch</em> kernel driver. That made the device available and worked, out of the box, with X.org. Then I needed to update libpibox to include the display name ILITEK ILITEK-TP. Now my lib sees the device.</p>
<p>The next problem is that touch points are way larger than screen points, which causes my launcher to not work with the display. So on an 800x480 screen I get a middle touch point of 8439,5161. This means I need to calibrate the display. The ts_calibrate tool lets me do that but I have to figure out what to do with the output it provides. I think there is a config file I can use to filter the touch points or maybe I can use the values myself in libpibox to calibrate manually.</p> Xeon - Action Item #299: Add touchscreen driver to kernel buildhttps://redmine.graphics-muse.org/issues/299?journal_id=24682019-03-01T18:44:07ZHammelmjhammel@graphics-muse.org
<ul></ul><p>Well that was easy. Run ts_calibrate to generate /etc/pointercal. This translates touches to within the display size. Now that should map to my icons correctly, though I still have to test that.</p>
<p>I should keep calibration files for landscape and portrait modes. Xeon will use portrait mode but a rotation (if I ever implement that) would need to swap calibration files.</p>
<p>Next I need to integrate the calibration files into the build. I can get them off the Pi and save them in the tree, then integrate them with the build using the skeleton tree. Might need a new Make target that handles updating the skeleton based on HW config, if I don't already have something like that.</p> Xeon - Action Item #299: Add touchscreen driver to kernel buildhttps://redmine.graphics-muse.org/issues/299?journal_id=24692019-03-02T19:22:48ZHammelmjhammel@graphics-muse.org
<ul><li><strong>Status</strong> changed from <i>In Progress</i> to <i>Closed</i></li><li><strong>% Done</strong> changed from <i>80</i> to <i>100</i></li></ul><p>Some experimentation with display_rotate and lcd_display_rotate in the config.txt shows that rotation of the display doesn't work quite right. The 800x480 is squeezed into a smaller space in portrait mode. I posted a comment about this on the device where I bought it (Amazon) since that seems my only way to provide feedback so far.</p>
<p>In the meantime I'll work with the device in landscape mode just to keep moving forward. I'll open a second issue on the rotation bug and track it separately.</p>
<p>The pointercal file is integrated into the mainline PiBox build and gets added to the tree if HW=xeon now. Changes pushed.</p>
<p>Closing issue.</p>