<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Hobby &#187; fbtft</title>
	<atom:link href="https://hobby.farit.ru/tag/fbtft/feed/" rel="self" type="application/rss+xml" />
	<link>https://hobby.farit.ru</link>
	<description></description>
	<lastBuildDate>Fri, 27 Feb 2026 07:17:33 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=4.2.39</generator>
	<item>
		<title>Linux Framebuffer fbtft with SPI DMA for Intel Edison</title>
		<link>https://hobby.farit.ru/linux-framebuffer-fbtft-with-dma-for-intel-edison/</link>
		<comments>https://hobby.farit.ru/linux-framebuffer-fbtft-with-dma-for-intel-edison/#comments</comments>
		<pubDate>Tue, 31 May 2016 02:43:50 +0000</pubDate>
		<dc:creator><![CDATA[Farit]]></dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[fbtft]]></category>
		<category><![CDATA[intel edison]]></category>

		<guid isPermaLink="false">http://hobby.farit.ru/?p=140</guid>
		<description><![CDATA[When you want to connect a display to the Intel Edison module, you should utilise the existing Linux infrastructure and use a kernel framebuffer driver instead of writing your own screen functions based on Arduino libraries. The schematics and more technical information about my display and board are in my previous post: Framebuffer fbtft Installation [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>When you want to connect a display to the Intel Edison module, you should utilise the existing Linux infrastructure and use a kernel framebuffer driver instead of writing your own screen functions based on Arduino libraries.</p>
<p>The schematics and more technical information about my display and board are in my previous post: <a href="http://hobby.farit.ru/framebuffer-fbtft-installation-intel-edison-oled-display-ssd1322/" target="_blank">Framebuffer fbtft Installation on Intel Edison for OLED Display SSD1322</a>.</p>
<p>At the time of writing the article, the Linux kernel SPI support was broken in the original Intel kernel. So, I used <a href="https://github.com/primiano/edison-kernel" target="_blank">Primiano&#8217;s kernel</a> that fixed the SPI support. It works perfectly for me, it may not contain the latest Intel&#8217;s modifications. Use it on your own risk.</p>
<p>First, I downloaded the Intel sources from <a href="http://iotdk.intel.com/src/3.0/edison/" target="_blank">http://iotdk.intel.com/src/3.0/edison/</a>. I extracted them into ~/edison in my home directory and followed the instructions for compiling it.</p>
<pre class="brush: bash; title: ; notranslate">
cd ~/edison/poky/
source oe-init-build-env ../build_edison/
bitbake edison-image u-boot
../poky/meta-intel-edison/utils/flash/postBuild.sh .
./toFlash/flashall.sh
</pre>
<p>Then I replaced the kernel in ~/edison/poky/linux-kernel by my own, but I kept the directories .git and .meta intact.<br />
I increased the revision number in the variable PR = &#8220;r3&#8243; in the file ~/edison/poky/meta-intel-edison/meta-intel-edison-bsp/recipes-kernel/linux/linux-externalsrc.bb<br />
I added my new configuration parameters for fbtft into the file ~/edison/poky/linux-kernel/arch/x86/configs/i386_edison_defconfig</p>
<p>I downloaded the <a href="https://github.com/notro/fbtft" target="_blank">fbtft sources</a>. I created the folder ~/edison/poky/linux-kernel/drivers/video/fbtft and extracted the fbtft sources into the folder.</p>
<p>I added the line in ~/edison/poky/linux-kernel/drivers/video/Kconfig before the line &#8220;endmenu&#8221;.</p>
<pre class="brush: cpp; title: ; notranslate">
source &quot;drivers/video/fbtft/Kconfig&quot;
</pre>
<p>I added the line in ~/edison/poky/linux-kernel/drivers/video/Makefile</p>
<pre class="brush: cpp; title: ; notranslate">
obj-$(CONFIG_FB_TFT)    += fbtft/
</pre>
<p>Then I edited the file ~/edison/poky/linux-kernel/drivers/video/fbtft/fbtft_device.c</p>
<p>I added the header</p>
<pre class="brush: cpp; title: ; notranslate">
#include &lt;linux/spi/intel_mid_ssp_spi.h&gt;
</pre>
<p>Then I added the description of my display into the list of displays.<br />
Where &#8220;reset&#8221; uses the number 49 of the GP49 pin, &#8220;dc&#8221; is GP15.<br />
The pin &#8220;led&#8221; is GP14 and I use it in my custom initialization code in the file fb_ssd1322.c</p>
<p>It seems that the chip SSD1322 supports speeds only up to 12.5MHz, but the Edison must be able to support speeds up to 25MHz.</p>
<pre class="brush: cpp; title: ; notranslate">
{
   .name = &quot;er_oled028&quot;,
   .spi = &amp;(struct spi_board_info) {
       .modalias = &quot;fb_ssd1322&quot;,
       .max_speed_hz = 12500000,
       .mode = SPI_MODE_3,
       .bus_num = 5,
       .chip_select = 0,
       .controller_data = &amp;(struct intel_mid_ssp_spi_chip) {
           .burst_size = DFLT_FIFO_BURST_SIZE,
           .timeout = DFLT_TIMEOUT_VAL,
           .dma_enabled = true,
        },
        .platform_data = &amp;(struct fbtft_platform_data) {
           .display = {
               .buswidth = 8,
               .backlight = 0,
               .width = 256,
               .height = 64,
           },
           .gpios = (const struct fbtft_gpio []) {
               { &quot;reset&quot;, 49 },
               { &quot;dc&quot;, 15},
               { &quot;led&quot;, 14},
               {},
           },
       }
   }
},
</pre>
<p>I modified the file ~/edison/poky/linux-kernel/drivers/video/fbtft/fbtft-core.c</p>
<pre class="brush: diff; title: ; notranslate">
--- fbtft-core.c	2015-03-05 02:54:01.000000000 -0800
+++ fbtft-core.c.new	2016-05-30 19:19:21.000000000 -0700
@@ -863,7 +863,7 @@
 	if (txbuflen &gt; 0) {
 		if (dma) {
 			dev-&gt;coherent_dma_mask = ~0;
-			txbuf = dmam_alloc_coherent(dev, txbuflen, &amp;par-&gt;txbuf.dma, GFP_DMA);
+			txbuf = devm_kzalloc(par-&gt;info-&gt;device, txbuflen, GFP_DMA | GFP_ATOMIC);
 		} else {
 			txbuf = devm_kzalloc(par-&gt;info-&gt;device, txbuflen, GFP_KERNEL);
 		}
</pre>
<p>I added the lines to the file ~/edison/poky/meta-intel-edison/meta-intel-edison-bsp/conf/machine/edison.conf to autoload the fbtft module.<br />
Where busnum=5 is the SPI bus number on the Edison.,<br />
name=er_oled028 defines my oled display from fbtft_device.c,<br />
debug=7 shows more debugging information. It&#8217;s optional.</p>
<pre class="brush: cpp; title: ; notranslate">
KERNEL_MODULE_AUTOLOAD += &quot;fbtft_device&quot;
module_conf_fbtft_device = &quot;options fbtft_device name=er_oled028 busnum=5 debug=7&quot;
KERNEL_MODULE_PROBECONF += &quot;fbtft_device&quot;
</pre>
<p>Then I recompiled the kernel and flashed my Edison.</p>
<p>I compiled mplayer on the Edison and played a sample video. I couldn&#8217;t find a video with the same dimensions as my display, but it should work in the full-screen mode too.</p>
<pre class="brush: bash; title: ; notranslate">
/usr/local/bin/mplayer -vo fbdev ultra.mp4
</pre>
		
		<!-- Begin Video.js Responsive Wrapper -->
		<div style='max-width:854px'>
			<div class='video-wrapper' style='padding-bottom:56.206088992974%;'>
				
	<!-- Begin Video.js -->
	<video id="example_video_id_2075905456" class="video-js vjs-default-skin" width="854" height="480" poster="http://hobby.farit.ru/wp-content/uploads/2016/05/video_playing.png" controls preload="none" data-setup='[]'>
		<source src="http://hobby.farit.ru/wp-content/uploads/2016/05/oled_video.mp4" type='video/mp4' />
		
		
	</video>
	<!-- End Video.js -->

			</div>
		</div>
		<!-- End Video.js Responsive Wrapper -->
		
<h5>Downloads</h5>
<p><a href="http://hobby.farit.ru/wp-content/uploads/2016/05/kernel_edison_fbtft.tar.gz">Linux kernel for Edison with SPI DMA fixes and fbtft framebuffer</a></p>
]]></content:encoded>
			<wfw:commentRss>https://hobby.farit.ru/linux-framebuffer-fbtft-with-dma-for-intel-edison/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
<enclosure url="http://hobby.farit.ru/wp-content/uploads/2016/05/oled_video.mp4" length="6725550" type="video/mp4" />
		</item>
		<item>
		<title>Framebuffer fbtft Installation on Intel Edison for OLED Display SSD1322</title>
		<link>https://hobby.farit.ru/framebuffer-fbtft-installation-intel-edison-oled-display-ssd1322/</link>
		<comments>https://hobby.farit.ru/framebuffer-fbtft-installation-intel-edison-oled-display-ssd1322/#comments</comments>
		<pubDate>Mon, 11 Apr 2016 03:59:14 +0000</pubDate>
		<dc:creator><![CDATA[Farit]]></dc:creator>
				<category><![CDATA[Electronics]]></category>
		<category><![CDATA[display]]></category>
		<category><![CDATA[fbtft]]></category>
		<category><![CDATA[intel edison]]></category>

		<guid isPermaLink="false">http://hobby.farit.ru/?p=102</guid>
		<description><![CDATA[Update: the version with working SPI DMA The Intel Edison doesn&#8217;t have a video interface; so, you connect an OLED or TFT LCD display via the SPI interface using the Linux kernel video module framebuffer. I used fbtft &#8211; Linux Framebuffer drivers for small TFT LCD display modules by Noralf Tronnes. My display is 2.8&#8243; [&#8230;]]]></description>
				<content:encoded><![CDATA[<h2><span style="color: #ff0000;">Update: <a style="color: #ff0000;" href="http://hobby.farit.ru/linux-framebuffer-fbtft-with-dma-for-intel-edison/">the version with working SPI DMA</a></span></h2>
<p>The Intel Edison doesn&#8217;t have a video interface; so, you connect an OLED or TFT LCD display via the SPI interface using the Linux kernel video module framebuffer.</p>
<p>I used fbtft &#8211; <a href="https://github.com/notro/fbtft" target="_blank">Linux Framebuffer drivers for small TFT LCD display modules</a> by Noralf Tronnes.</p>
<p>My display is <a href="http://www.buydisplay.com/default/2-8-inch-oled-display-256x64-graphic-module-ssd1322-yellow-on-black" target="_blank">2.8&#8243; OLED Display 256&#215;64 Graphic Module SSD1322</a>.</p>
<p>After reading the documentation for the display, I connected it to the Edison via the 4-wire SPI interface, which requires an additional GPIO pin for the D/C signal (Write Data/Write Command). The 3-wire SPI interface uses the 9 bit SPI interface and should be avoided.</p>
<p>I compared the timing diagrams for the SSD1322 chip with <a href="http://dlnware.com/theory/SPI-Transfer-Modes" target="_blank">the SPI Transfer Modes</a> and found that it uses the SPI Mode 3.</p>
<h5>Schematic</h5>
<p>Here is the schematic of my SSD1322 shield for the Intel Edison.</p>
<figure id="attachment_104" style="width: 854px;" class="wp-caption aligncenter"><a href="http://hobby.farit.ru/wp-content/uploads/2016/04/display_schematic.png"><img class="size-medium wp-image-104" src="http://hobby.farit.ru/wp-content/uploads/2016/04/display_schematic-854x604.png" alt="SSD1322 Shield for Intel Edison" width="854" height="604" /></a><figcaption class="wp-caption-text">The SSD1322 Display Shield for the Intel Edison</figcaption></figure>
<h5>Connections between the Edison and the Display:</h5>
<p>GP49 -&gt; RES(Reset Signal Input)<br />
GP15 -&gt; D/C(Data/Command Control)<br />
GP110_SPI_2_FS0(CS0) -&gt; CS(Chip Select Input)<br />
GP109_SPI_2_CLK -&gt; D0/SCLK(Serial Clock)<br />
GP115_SPI_2_TXD -&gt; D1/SDIN(Serial Data Input)<br />
I also connected GP14 to the SHDN pin of the +12V voltage regulator.</p>
<h5>fbtft download and configuration</h5>
<p>The latest code from the <a href="https://github.com/notro/fbtft" target="_blank">notro/fbtft</a> repository didn&#8217;t work for me.<br />
I used the older code <a href="https://github.com/presslab-us/fbtft" target="_blank">presslab-us/fbtft</a>, which also included support for my chip SSD1322.</p>
<p>I prepared the Edison directory with the Linux sources as described in my article <a href="http://hobby.farit.ru/building-yocto-linux-for-intel-edison/" target="_blank">Building Yocto Linux for Intel Edison</a>.</p>
<p>After I compiled the Edison image for the first time, I copied these two hidden directories into another folder (I placed the Edison sources into the &#8220;edison&#8221; directory in my home directory); so, I can return the sources to the original state by copying these hidden directories back at any moment.</p>
<pre class="brush: plain; title: ; notranslate">
~/edison/edison-src/build/tmp/work/edison-poky-linux/linux-yocto/3.10.17-r0/linux/.git
~/edison/edison-src/build/tmp/work/edison-poky-linux/linux-yocto/3.10.17-r0/linux/.meta
</pre>
<p>I created the directory &#8220;fbtft&#8221; and copied all fbtft files there.</p>
<pre class="brush: bash; title: ; notranslate">
mkdir ~/edison/edison-src/build/tmp/work/edison-poky-linux/linux-yocto/3.10.17-r0/linux/drivers/video/fbtft
</pre>
<p>I added the line in ~/edison/edison-src/build/tmp/work/edison-poky-linux/linux-yocto/3.10.17-r0/linux/drivers/video/Kconfig before the line &#8220;endmenu&#8221;.</p>
<pre class="brush: bash; title: ; notranslate">
source &quot;drivers/video/fbtft/Kconfig&quot;
</pre>
<p>I added the line in ~/edison/edison-src/build/tmp/work/edison-poky-linux/linux-yocto/3.10.17-r0/linux/drivers/video/Makefile</p>
<pre class="brush: cpp; title: ; notranslate">
obj-$(CONFIG_FB_TFT)    += fbtft/
</pre>
<p>Then I edited the file ~/edison/edison-src/build/tmp/work/edison-poky-linux/linux-yocto/3.10.17-r0/linux/drivers/video/fbtft/fbtft_device.c</p>
<p>I added the header</p>
<pre class="brush: cpp; title: ; notranslate">
#include &lt;linux/spi/intel_mid_ssp_spi.h&gt;
</pre>
<p>Then I added the description of my display into the list of displays.<br />
Where &#8220;reset&#8221; uses the number 49 of the GP49 pin, &#8220;dc&#8221; is GP15.<br />
The pin &#8220;led&#8221; is GP14 and I use it in my custom initialization code in the file fb_ssd1322.c</p>
<p>DMA has to be disabled because the DMA code in intel_mid_ssp_spi.h is broken.<br />
If you enable it, you can see errors like this: &#8220;intel_mid_ssp_spi_unified 0000:00:07.1: ERROR : DMA buffers already mapped&#8221;</p>
<pre class="brush: cpp; title: ; notranslate">
{
   .name = &quot;er_oled028&quot;,
   .spi = &amp;(struct spi_board_info) {
       .modalias = &quot;fb_ssd1322&quot;,
       .max_speed_hz = 12000000,
       .mode = SPI_MODE_3,
       .bus_num = 5,
       .chip_select = 0,
       .controller_data = &amp;(struct intel_mid_ssp_spi_chip) {
           .burst_size = DFLT_FIFO_BURST_SIZE,
           .timeout = DFLT_TIMEOUT_VAL,
           .dma_enabled = false,
        },
        .platform_data = &amp;(struct fbtft_platform_data) {
           .display = {
               .buswidth = 8,
               .backlight = 0,
               .width = 256,
               .height = 64,
           },
           .gpios = (const struct fbtft_gpio []) {
               { &quot;reset&quot;, 49 },
               { &quot;dc&quot;, 15},
               { &quot;led&quot;, 14},
               {},
           },
       }
   }
},
</pre>
<p>I wrote my custom initialization code for the display ER_OLED028 in fb_ssd1322.c following the documentation for my display.</p>
<pre class="brush: cpp; title: ; notranslate">
static int init_display(struct fbtft_par *par)
{
   fbtft_par_dbg(DEBUG_INIT_DISPLAY, par, &quot;%s()\n&quot;, __func__);

   //reset the chip
   mdelay(5);
   fbtft_par_dbg(DEBUG_RESET, par, &quot;%s()\n&quot;, __func__);
   gpio_set_value(par-&gt;gpio.reset, 0);
   udelay(200);
   gpio_set_value(par-&gt;gpio.reset, 1);
   udelay(200);

   write_reg(par, 0xfd, 0x12); /* Unlock OLED driver IC */
   write_reg(par, 0xae); /* Display Off */
   write_reg(par, 0xb3, 0x91); /* Display divide clockratio/frequency */
   write_reg(par, 0xca, 0x3f); /* Multiplex ratio, 1/64, 64 COMS enabled */
   write_reg(par, 0xa2, 0x00); /* Set offset, the display map starting line is COM0 */
   write_reg(par, 0xa1, 0x00); /* Set start line position */
   write_reg(par, 0xa0, 0x14, 0x11); /* Set remap, horiz address increment, disable colum address remap, */
				                      /*  enable nibble remap, scan from com[N-1] to COM0, disable COM split odd even */
   write_reg(par, 0xb5, 0x00); /* Set GPIO */
   write_reg(par, 0xab, 0x01); /* Select internal VDD */
   write_reg(par, 0xb4, 0xa0, 0xfd); /* Display enhancement A, external VSL, enhanced low GS display quality */
   write_reg(par, 0xc1, 0xff); /* Contrast current, 256 steps, default is 0x7F */
   write_reg(par, 0xc7, 0x0f); /* Master contrast current, 16 steps, default is 0x0F */
   write_reg(par, 0xb1, 0xe2); /* Phase Length */
   write_reg(par, 0xd1, 0x82, 0x20); /* Display enhancement B */
   write_reg(par, 0xbb, 0x1f); /* Pre-charge voltage */
   write_reg(par, 0xb6, 0x08); /* Set Second Pre-Charge Period */
   write_reg(par, 0xbe, 0x07); /* Set VCOMH */
   write_reg(par, 0xa6); /* Normal display */

   //enable VCC
   gpio_set_value(par-&gt;gpio.led[0], 1);
   mdelay(100);
  
   write_reg(par, 0xaf); /* Display ON */

   return 0;
}
</pre>
<p>After all modifications, I created a patch file.<br />
While committing to git, I added the comment line &#8220;fbtft_ssd1322&#8243;.</p>
<pre class="brush: bash; title: ; notranslate">
cd ~/edison/edison-src/build/tmp/work/edison-poky-linux/linux-yocto/3.10.17-r0/linux/drivers/video
git add .
git commit
git format-patch -1
</pre>
<p>It created the patch file &#8220;0001-fbtft_ssd1322.patch&#8221;. I renamed it to &#8220;fbtft_ssd1322.patch&#8221; and copied it to:</p>
<pre class="brush: plain; title: ; notranslate">
~edison/edison-src/meta-intel-edison/meta-intel-edison-bsp/recipes-kernel/linux/files/
</pre>
<p>I created the kernel configuration file fbtft.cfg in the same directory &#8220;recipes-kernel/linux/files/&#8221;:</p>
<pre class="brush: cpp; title: ; notranslate">
CONFIG_FRAMEBUFFER_CONSOLE=m
CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=m
CONFIG_FB_SYS_FILLRECT=y
CONFIG_FB_SYS_COPYAREA=y
CONFIG_FB_SYS_IMAGEBLIT=y
CONFIG_FB_SYS_FOPS=y
CONFIG_FB_DEFERRED_IO=y
CONFIG_FB_BACKLIGHT=y
CONFIG_FB_TFT=m
# CONFIG_FB_TFT_GU39XX is not set
# CONFIG_FB_TFT_HX8340BN is not set
# CONFIG_FB_TFT_HX8347D is not set
# CONFIG_FB_TFT_ILI9320 is not set
# CONFIG_FB_TFT_ILI9325 is not set
# CONFIG_FB_TFT_ILI9341 is not set
# CONFIG_FB_TFT_PCD8544 is not set
# CONFIG_FB_TFT_SSD1289 is not set
# CONFIG_FB_TFT_SSD1351 is not set
CONFIG_FB_TFT_SSD1322=m
# CONFIG_FB_TFT_ST7735R is not set
# CONFIG_FB_FLEX is not set
CONFIG_FB_TFT_FBTFT_DEVICE=m
# CONFIG_TOUCHSCREEN_ADS7846_DEVICE is not set
</pre>
<p>I commented the line in the file board.c for the device ads7955 that occupies the same SPI busnum=5, cs=0 that we use for the display.<br />
Then I ran the same git sequence to generate the patch file &#8220;platform_ssd1322.patch&#8221; and copied it into the same &#8220;recipes-kernel/linux/files&#8221; directory.</p>
<pre class="brush: diff; title: ; notranslate">
From c83f14b37bc2dcfa97b36214f02b15ddaad51a47 Mon Sep 17 00:00:00 2001
From: Farit &lt;farit@example.com&gt;
Date: Sat, 9 Apr 2016 22:02:19 -0700
Subject: [PATCH] platform_ssd1322

---
 arch/x86/platform/intel-mid/board.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/platform/intel-mid/board.c b/arch/x86/platform/intel-mid/board.c
index eb3d8a4..fca6440 100644
--- a/arch/x86/platform/intel-mid/board.c
+++ b/arch/x86/platform/intel-mid/board.c
@@ -111,7 +111,7 @@ struct devs_id __initconst device_ids[] = {
 
 	/* SPI devices */
 	{&quot;spidev&quot;, SFI_DEV_TYPE_SPI, 0, &amp;spidev_platform_data, NULL},
-	{&quot;ads7955&quot;, SFI_DEV_TYPE_SPI, 0, &amp;ads7955_platform_data, NULL},
+//	{&quot;ads7955&quot;, SFI_DEV_TYPE_SPI, 0, &amp;ads7955_platform_data, NULL},
 	{&quot;bma023&quot;, SFI_DEV_TYPE_I2C, 1, &amp;no_platform_data, NULL},
 	{&quot;pmic_gpio&quot;, SFI_DEV_TYPE_SPI, 1, &amp;pmic_gpio_platform_data, NULL},
 	{&quot;pmic_gpio&quot;, SFI_DEV_TYPE_IPC, 1, &amp;pmic_gpio_platform_data,
-- 
1.9.1
</pre>
<p>When all patch and configuration files were ready, I added links to them into the file &#8220;~/edison/edison-src/meta-intel-edison/meta-intel-edison-bsp/recipes-kernel/linux/linux-yocto_3.10.bbappend&#8221;.</p>
<pre class="brush: cpp; title: ; notranslate">
SRC_URI += &quot;file://defconfig&quot;
SRC_URI += &quot;file://upstream_to_edison.patch&quot;

SRC_URI += &quot;file://fbtft.cfg&quot;
SRC_URI += &quot;file://fbtft_ssd1322.patch&quot;
SRC_URI += &quot;file://platform_ssd1322.patch&quot;
</pre>
<h5>fbtft Module Compilation</h5>
<p>Then I recompiled the Linux image and installed it.</p>
<pre class="brush: bash; title: ; notranslate">
cd ~/edison/edison-src
source poky/oe-init-build-env
bitbake edison-image
~/edison/edison-src/meta-intel-edison/utils/flash/postBuild.sh
~/edison/edison-src/build/toFlash/flashall.sh
</pre>
<h5>Loading and Testing the Framebuffer Module</h5>
<p>I loaded the fbtft module supplying the name of the display and the SPI bus number (it&#8217;s 5 on the Edison).</p>
<pre class="brush: bash; title: ; notranslate">
modprobe fbtft_device name=er_oled028 busnum=5
</pre>
<p>Sometimes, it&#8217;s not loaded. I need to investigate the problems.<br />
When it loads, the &#8220;dmesg&#8221; command shows:</p>
<pre class="brush: plain; title: ; notranslate">
[   32.254181] fbtft_device:  GPIOS used by 'er_oled028':
[   32.254205] fbtft_device:    'reset' = GPIO49
[   32.254221] fbtft_device:    'dc' = GPIO15
[   32.254234] fbtft_device:    'led' = GPIO14
[   32.254246] fbtft_device:  SPI devices registered:
[   32.254264] fbtft_device:      spidev spi5.1 25000kHz 8 bits mode=0x00
[   32.254281] fbtft_device:      fb_ssd1322 spi5.0 12500kHz 8 bits mode=0x03
[   32.394493] graphics fb0: fb_ssd1322 frame buffer, 256x64, 32 KiB video memory, 8 KiB buffer memory, fps=20, spi5.0 at 12 MHz
</pre>
<p>Then I can test the module by sending random values to the framebuffer socket &#8220;/dev/fb0&#8243;.</p>
<pre class="brush: bash; title: ; notranslate">
cat /dev/urandom &gt; /dev/fb0
</pre>
<p>Here is the result.</p>
<figure id="attachment_117" style="width: 854px;" class="wp-caption aligncenter"><a href="http://hobby.farit.ru/wp-content/uploads/2016/04/display_urandom.png"><img class="size-medium wp-image-117" src="http://hobby.farit.ru/wp-content/uploads/2016/04/display_urandom-854x305.png" alt="Sending Random Data to the Framebuffer" width="854" height="305" /></a><figcaption class="wp-caption-text">Sending Random Data to the Framebuffer</figcaption></figure>
<p>I can also load the fbcon module to display the console on the display.</p>
<pre class="brush: bash; title: ; notranslate">
modprobe fbcon
</pre>
<figure id="attachment_118" style="width: 854px;" class="wp-caption aligncenter"><a href="http://hobby.farit.ru/wp-content/uploads/2016/04/fbcon.png"><img class="size-medium wp-image-118" src="http://hobby.farit.ru/wp-content/uploads/2016/04/fbcon-854x291.png" alt="Edison Console via the Framebuffer" width="854" height="291" /></a><figcaption class="wp-caption-text">Edison Console via the Framebuffer</figcaption></figure>
<h5>Improvements</h5>
<p>There are patches on the Edison forum that may help to fix the DMA issue. Otherwise, the display will be relatively slow.<br />
Check this link <a href="https://communities.intel.com/docs/DOC-24944" target="_blank">stewart maguire&#8217;s patches for DMA and FBTFT support</a>.<br />
And this <a href="https://communities.intel.com/thread/76768?start=0&amp;tstart=0" target="_blank">Intel MID SSP SPI driver getting stuck in kernel space</a>.</p>
<h5>Downloads</h5>
<p><a href="http://hobby.farit.ru/wp-content/uploads/2016/04/ssd1322patch.tar.gz">Configuration and patch files for fbtft on Intel Edison</a></p>
]]></content:encoded>
			<wfw:commentRss>https://hobby.farit.ru/framebuffer-fbtft-installation-intel-edison-oled-display-ssd1322/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
