Changes between Version 1 and Version 2 of ventana/LVDS


Ignore:
Timestamp:
10/22/2017 06:25:21 AM (7 years ago)
Author:
Chris Lang
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ventana/LVDS

    v1 v2  
    1 {{{#!html
    2           <div id="wikipage" class="trac-content"><p>
    3 </p><div class="wiki-toc">
    4 <ol>
    5   <li>
    6     <a href="#VentanaLVDSSupport">Ventana LVDS Support</a>
    7     <ol>
    8       <li>
    9         <a href="#GateworksLCDDevelopmentKits">Gateworks LCD Development Kits</a>
    10       </li>
    11       <li>
    12         <a href="#VentanaLVDSConnectorSpecifications">Ventana LVDS Connector Specifications</a>
    13         <ol>
    14           <li>
    15             <a href="#LVDSPowerPins">LVDS Power Pins</a>
    16           </li>
    17         </ol>
    18       </li>
    19       <li>
    20         <a href="#Touchscreensensors">Touchscreen sensors</a>
    21       </li>
    22       <li>
    23         <a href="#SoftwareSupportandConfiguration">Software Support and Configuration</a>
    24         <ol>
    25           <li>
    26             <a href="#TroubleshootingTouchscreenPortion">Troubleshooting Touchscreen Portion</a>
    27             <ol>
    28               <li>
    29                 <a href="#Interrupts">Interrupts</a>
    30               </li>
    31               <li>
    32                 <a href="#AndroidTouchscreen">Android Touchscreen</a>
    33               </li>
    34             </ol>
    35           </li>
    36         </ol>
    37       </li>
    38       <li>
    39         <a href="#SupportedDisplays">Supported Displays</a>
    40         <ol>
    41           <li>
    42             <a href="#FreescaleMCIMX-LVDS110XGATouchscreenDisplay">Freescale MCIMX-LVDS1 10" XGA Touchscreen Display</a>
    43           </li>
    44           <li>
    45             <a href="#GW17029DLC700JMGT47WSVGATouchscreenDisplay">GW17029 DLC700JMGT4 7" WSVGA Touchscreen Display</a>
    46           </li>
    47           <li>
    48             <a href="#GW17030DLC800FIGT38XGATouchscreenDisplay-SPECIALORDER-250PieceMinimum">GW17030 DLC800FIGT3 8" XGA Touchscreen Display - SPECIAL ORDER - 250 Piece …</a>
    49             <ol>
    50               <li>
    51                 <a href="#Setup">Setup</a>
    52               </li>
    53             </ol>
    54           </li>
    55         </ol>
    56       </li>
    57       <li>
    58         <a href="#SelectingaLCDTouchscreenDisplay">Selecting a LCD &amp; Touchscreen Display</a>
    59       </li>
    60       <li>
    61         <a href="#AddingSupportforaNewLCD">Adding Support for a New LCD</a>
    62         <ol>
    63           <li>
    64             <a href="#DeterminingTimingvalues">Determining Timing values</a>
    65           </li>
    66           <li>
    67             <a href="#U-BootBootloaderLCDdisplaysupport">U-Boot Bootloader LCD display support</a>
    68           </li>
    69           <li>
    70             <a href="#Bootloaderbootscript">Bootloader boot script</a>
    71           </li>
    72           <li>
    73             <a href="#LinuxKernelLCDdisplaysupport">Linux Kernel LCD display support</a>
    74           </li>
    75         </ol>
    76       </li>
    77     </ol>
    78   </li>
    79 </ol>
    80 </div><p>
    81 </p>
    82 <h1 id="VentanaLVDSSupport">Ventana LVDS Support</h1>
    83 <p>
    84 <span class="wikianchor" id="devkit"></span>
    85 </p>
    86 <h2 id="GateworksLCDDevelopmentKits">Gateworks LCD Development Kits</h2>
    87 <p>
     1[[PageOutline]]
     2
     3= Ventana LVDS Support =
     4
     5
     6[=#devkit]
     7== Gateworks LCD Development Kits ==
     8
    889Gateworks offers packaged LCD touchscreens that are plug and play with the Ventana board that have a LVDS interface.
    89 </p>
    90 <p>
     10
    9111Gateworks offers a 7" and 8" display. Use the following part numbers for ordering:
    92 </p>
    93 <ul><li><a class="wiki" href="/wiki/ventana/LVDS#WSVGA-7in">7" WSVGA (1024x600) display with backlight and 5pt capacitive touch</a>:
    94 <ul><li>GW17029 7" LCD <a class="wiki" href="/wiki/ventana/LVDS#DLC700JMGT47WSVGATouchscreenDisplay">Display</a>
    95 </li><li>GW10109 (8in) GW16113 (36in) GW16114 (60in) Cable
    96 </li><li>GW16114-1 Touch Interface (for 7" LCD)
    97 </li></ul></li><li><a class="wiki" href="/wiki/ventana/LVDS#XGA-8in">8" XGA (1024x768) display with backlight and 5pt capacitive touch</a>:
    98 <ul><li>Special Order - 250 piece minimum
    99 </li><li>GW17030 8" LCD <a class="wiki" href="/wiki/ventana/LVDS#DLC800FIGT38XGATouchscreenDisplay">Display</a>
    100 </li><li>GW10109 (8in) GW16113 (36in) GW16114 (60in) Cable
    101 </li><li>GW16114-2 Touch Interface (for 8" LCD)
    102 </li></ul></li></ul><p>
    103 <span class="wikianchor" id="lvdsspecs"></span>
    104 </p>
    105 <h2 id="VentanaLVDSConnectorSpecifications">Ventana LVDS Connector Specifications</h2>
    106 <p>
     12
     13 * [#WSVGA-7in 7" WSVGA (1024x600) display with backlight and 5pt capacitive touch]:
     14  * GW17029 7" LCD [wiki:ventana/LVDS#DLC700JMGT47WSVGATouchscreenDisplay Display]
     15  * GW10109 (8in) GW16113 (36in) GW16114 (60in) Cable
     16  * GW16114-1 Touch Interface (for 7" LCD)
     17 * [#XGA-8in 8" XGA (1024x768) display with backlight and 5pt capacitive touch]:
     18  * Special Order - 250 piece minimum
     19  * GW17030 8" LCD [wiki:ventana/LVDS#DLC800FIGT38XGATouchscreenDisplay Display]
     20  * GW10109 (8in) GW16113 (36in) GW16114 (60in) Cable
     21  * GW16114-2 Touch Interface (for 8" LCD)
     22
     23
     24[=#lvdsspecs]
     25== Ventana LVDS Connector Specifications ==
    10726The Ventana GW5400/GW5300/GW5200 designs all support LVDS via a 30 pin connector that provides:
    108 </p>
    109 <ul><li>3D+C (3 diff pairs data, 1 diff pair clock at 2.5V) for <a class="ext-link" href="http://en.wikipedia.org/wiki/Low-voltage_differential_signaling"><span class="icon">​</span>LVDS Video in compliance iwth EIA-644</a>
    110 <ul><li>Signalling is 1.0V to 1.4V (1.2V common mode) with a 400mV swing (3.3V logic level)
    111 </li><li>the maximum pixel clock (85MHz) and the maximum clock of the LVDS serializer results in a maximum resolution of WXGA (1366x768@60Hz with 35% blanking)
    112 </li><li>3D+C allows for 6bit-per-color for 18bit color (262K colors) for 6bit per color
    113 </li><li>displays which support 4D+C for 6bit-per-color (24bit color) typically use the 4th data pair for bit7/bit8 thus can likely be interfaced with Ventana as 6bit 3D+C (consult display datasheets)
    114 </li></ul></li><li>1xPWM (3.3V) For backlight brightness
    115 </li><li>1xGPIO (3.3V) For control
    116 </li><li>1xGPIO (3.3V) for touchscreen controller IRQ#
    117 </li><li>1xi2c (3.3V) for EDID and touchscreen or backlight controller
    118 </li><li>3.3VDC (always-on power)
    119 </li><li>5.0VDC (always-on power)
    120 </li></ul><p>
     27 * 3D+C (3 diff pairs data, 1 diff pair clock at 2.5V) for [http://en.wikipedia.org/wiki/Low-voltage_differential_signaling LVDS Video in compliance iwth EIA-644]
     28  * Signalling is 1.0V to 1.4V (1.2V common mode) with a 400mV swing (3.3V logic level)
     29  * the maximum pixel clock (85MHz) and the maximum clock of the LVDS serializer results in a maximum resolution of WXGA (1366x768@60Hz with 35% blanking)
     30  * 3D+C allows for 6bit-per-color for 18bit color (262K colors) for 6bit per color
     31  * displays which support 4D+C for 6bit-per-color (24bit color) typically use the 4th data pair for bit7/bit8 thus can likely be interfaced with Ventana as 6bit 3D+C (consult display datasheets)
     32 * 1xPWM (3.3V) For backlight brightness
     33 * 1xGPIO (3.3V) For control
     34 * 1xGPIO (3.3V) for touchscreen controller IRQ#
     35 * 1xi2c (3.3V) for EDID and touchscreen or backlight controller
     36 * 3.3VDC (always-on power)
     37 * 5.0VDC (always-on power)
     38
    12139Refer to the individual product manuals for more details.
    122 </p>
    123 <p>
     40
    12441The LVDS video output is available through a 30-pin connector in a 1x30 configuration with 1mm pin spacing.
    125 </p>
    126 <ul><li>The mating connector for a discrete wire plug is a Hirose DF19-30S-1C, available from Digi-Key as part number H3104-ND<a class="ext-link" href="http://www.digikey.com/product-detail/en/DF19-30S-1C/H3104-ND/679730"><span class="icon">​</span>link here</a>.
    127 </li><li>The crimp contacts for the discrete wire connector are Hirose DF19A-3032SCFA, available from Digi-Key as part number H12154CT-ND <a class="ext-link" href="http://www.digikey.com/product-detail/en/DF19A-3032SCFA/H12154CT-ND/3739512"><span class="icon">​</span>link here</a>.
    128 </li><li>Crimp Gun <a class="ext-link" href="http://www.digikey.com/product-detail/en/HT302%2FDF19S/H3131-ND/679757"><span class="icon">​</span>H3131-ND </a>
    129 </li></ul><p>
     42 * The mating connector for a discrete wire plug is a Hirose DF19-30S-1C, available from Digi-Key as part number H3104-ND[http://www.digikey.com/product-detail/en/DF19-30S-1C/H3104-ND/679730 link here].
     43 * The crimp contacts for the discrete wire connector are Hirose DF19A-3032SCFA, available from Digi-Key as part number H12154CT-ND [http://www.digikey.com/product-detail/en/DF19A-3032SCFA/H12154CT-ND/3739512 link here].
     44 * Crimp Gun [http://www.digikey.com/product-detail/en/HT302%2FDF19S/H3131-ND/679757 H3131-ND ]
     45
    13046IMX6 LVDS details:
    131 </p>
    132 <ul><li>Display interface clock: 20-85 MHz
    133 </li><li>Serializer clock: 140-595 MHz
    134 </li><li>while the IMX6 itself has 2 LVDS ports each supporting up to 4D+C (4 data pairs plus 1 clock pair) which can be used as separate displays or combined (see <a class="ext-link" href="http://cache.freescale.com/files/32bit/doc/ref_manual/IMX6DQRM.pdf"><span class="icon">​</span>IMX6DQRM section 39.4.2</a>), the Ventana designs only bring out 3D+C (3 data pairs plus 1 clock pair) of the first lvds port
    135 </li><li>for details on bitmapping supported see <a class="ext-link" href="http://cache.freescale.com/files/32bit/doc/ref_manual/IMX6DQRM.pdf"><span class="icon">​</span>IMX6DQRM</a> section 39.5.2
    136 </li></ul><p>
     47 * Display interface clock: 20-85 MHz
     48 * Serializer clock: 140-595 MHz
     49 * while the IMX6 itself has 2 LVDS ports each supporting up to 4D+C (4 data pairs plus 1 clock pair) which can be used as separate displays or combined (see [http://cache.freescale.com/files/32bit/doc/ref_manual/IMX6DQRM.pdf IMX6DQRM section 39.4.2]), the Ventana designs only bring out 3D+C (3 data pairs plus 1 clock pair) of the first lvds port
     50 * for details on bitmapping supported see [http://cache.freescale.com/files/32bit/doc/ref_manual/IMX6DQRM.pdf IMX6DQRM] section 39.5.2
     51
    13752Ventana 30-pin LVDS connector pinout:
    138 </p>
    139 <table class="wiki">
    140 <tr><th> Pin </th><th> Signal  </th><th> Notes
    141 </th></tr><tr><td> 1     </td><td> BACK_EN#  </td><td> GPIO1_IO10 (gpio10)
    142 </td></tr><tr><td> 2     </td><td> 3.3V      </td><td>
    143 </td></tr><tr><td> 3     </td><td> 3.3V      </td><td>
    144 </td></tr><tr><td> 4     </td><td> 3.3V      </td><td>
    145 </td></tr><tr><td> 5     </td><td> BACK_ADJ  </td><td> PWM4 or GPIO1_IO18 (gpio18)
    146 </td></tr><tr><td> 6     </td><td> SCL       </td><td> I2C3 - /dev/i2c-2
    147 </td></tr><tr><td> 7     </td><td> SDA       </td><td> I2C3 - /dev/i2c-2
    148 </td></tr><tr><td> 8     </td><td> TX0-      </td><td> differential pair
    149 </td></tr><tr><td> 9     </td><td> TX0+      </td><td> differential pair
    150 </td></tr><tr><td> 10    </td><td> GND       </td><td>
    151 </td></tr><tr><td> 11    </td><td> TX1-      </td><td> differential pair
    152 </td></tr><tr><td> 12    </td><td> TX1+      </td><td> differential pair
    153 </td></tr><tr><td> 13    </td><td> GND       </td><td>
    154 </td></tr><tr><td> 14    </td><td> TX2-      </td><td> differential pair
    155 </td></tr><tr><td> 15    </td><td> TX2+      </td><td> differential pair
    156 </td></tr><tr><td> 16    </td><td> GND       </td><td>
    157 </td></tr><tr><td> 17    </td><td> CLK-      </td><td> differential pair
    158 </td></tr><tr><td> 18    </td><td> CLK+      </td><td> differential pair
    159 </td></tr><tr><td> 19    </td><td> GND       </td><td>
    160 </td></tr><tr><td> 20    </td><td> 5V        </td><td>
    161 </td></tr><tr><td> 21    </td><td> 5V        </td><td>
    162 </td></tr><tr><td> 22    </td><td> GND       </td><td>
    163 </td></tr><tr><td> 23    </td><td> GND       </td><td>
    164 </td></tr><tr><td> 24    </td><td> 5V        </td><td>
    165 </td></tr><tr><td> 25    </td><td> 5V        </td><td>
    166 </td></tr><tr><td> 26    </td><td> 5V        </td><td>
    167 </td></tr><tr><td> 27    </td><td> SCL       </td><td> I2C3 - /dev/i2c-2
    168 </td></tr><tr><td> 28    </td><td> SDA       </td><td> I2C3 - /dev/i2c-2
    169 </td></tr><tr><td> 29    </td><td> TOUCH_IRQ </td><td> IMX6 GPIO7_IO12 (gpio204)
    170 </td></tr><tr><td> 30    </td><td> N/C       </td><td>
    171 </td></tr></table>
    172 <ul><li>The BACK_EN# signal is an ARM GPIO and can be routed to various LVDS display features. Typically this is either used as a RST# or a backlight enable.
    173 </li><li>The BACK_ADJ signal can be an ARM GPIO or a PWM.
    174 </li></ul><p>
    175 Note that the Ventana bootloader always configures BACK_EN# (gpio10) as output-low but leaves BACK_ADJ as a high-impediance input with a 100k pull-up unless the <tt>panel</tt> env is set to one of the supported LVDS configurations (see <a class="wiki" href="/wiki/ventana/LVDS#displays">below</a>) in which case the bootloader <tt>enable_lvds</tt> function drives BACK_EN# low making it appropriate if connected to an active low enable or active high reset and BACK_ADJ high making it 100% brightness.
    176 </p>
    177 <p>
    178 Note that the Ventana Linux kernel does not configure BACK_EN# (gpio10) (thus leaving it configured from the bootloader and exportable/managable by userspace) but does configure BACK_ADJ as PWM4 adjustable via <tt>/sys/class/backlight</tt>.
    179 </p>
    180 <p>
     53||= Pin =||= Signal  =||= Notes =||
     54|| 1     || BACK_EN#  || GPIO1_IO10 (gpio10) ||
     55|| 2     || 3.3V      || ||
     56|| 3     || 3.3V      || ||
     57|| 4     || 3.3V      || ||
     58|| 5     || BACK_ADJ  || PWM4 or GPIO1_IO18 (gpio18) ||
     59|| 6     || SCL       || I2C3 - /dev/i2c-2 ||
     60|| 7     || SDA       || I2C3 - /dev/i2c-2 ||
     61|| 8     || TX0-      || differential pair ||
     62|| 9     || TX0+      || differential pair ||
     63|| 10    || GND       || ||
     64|| 11    || TX1-      || differential pair ||
     65|| 12    || TX1+      || differential pair ||
     66|| 13    || GND       || ||
     67|| 14    || TX2-      || differential pair ||
     68|| 15    || TX2+      || differential pair ||
     69|| 16    || GND       || ||
     70|| 17    || CLK-      || differential pair ||
     71|| 18    || CLK+      || differential pair ||
     72|| 19    || GND       || ||
     73|| 20    || 5V        || ||
     74|| 21    || 5V        || ||
     75|| 22    || GND       || ||
     76|| 23    || GND       || ||
     77|| 24    || 5V        || ||
     78|| 25    || 5V        || ||
     79|| 26    || 5V        || ||
     80|| 27    || SCL       || I2C3 - /dev/i2c-2 ||
     81|| 28    || SDA       || I2C3 - /dev/i2c-2 ||
     82|| 29    || TOUCH_IRQ || IMX6 GPIO7_IO12 (gpio204) ||
     83|| 30    || N/C       || ||
     84 * The BACK_EN# signal is an ARM GPIO and can be routed to various LVDS display features. Typically this is either used as a RST# or a backlight enable.
     85 * The BACK_ADJ signal can be an ARM GPIO or a PWM.
     86
     87Note that the Ventana bootloader always configures BACK_EN# (gpio10) as output-low but leaves BACK_ADJ as a high-impediance input with a 100k pull-up unless the {{{panel}}} env is set to one of the supported LVDS configurations (see [#displays below]) in which case the bootloader {{{enable_lvds}}} function drives BACK_EN# low making it appropriate if connected to an active low enable or active high reset and BACK_ADJ high making it 100% brightness.
     88
     89Note that the Ventana Linux kernel does not configure BACK_EN# (gpio10) (thus leaving it configured from the bootloader and exportable/managable by userspace) but does configure BACK_ADJ as PWM4 adjustable via {{{/sys/class/backlight}}}.
     90
    18191If the above configuration is not compatible with your LVDS display you will need to make adjustments to the bootloader and/or kernel.
    182 </p>
    183 <p>
    184 <span class="wikianchor" id="power"></span>
    185 </p>
    186 <h3 id="LVDSPowerPins">LVDS Power Pins</h3>
    187 <p>
     92
     93[=#power]
     94=== LVDS Power Pins ===
    18895The LVDS connector that we use has three pins assigned to 3.3V and five pins assigned to 5V. The maximum current depends on the wire gauge of the cable used with the connector and the 5V supply on the board. A 36 gauge cable is 0.5A per contact, a 30 gauge cable is 0.9A per contact, and a 28 gauge cable is 1A per contact.
    189 </p>
    190 <p>
     96
    19197LVDS Connector 3.3V:
    192 </p>
    193 <ul><li>The GW52xx, GW53x, and GW54xx all have 30W available from the 3.3V supply and you can subtract ~3W for baseboard operation and additional power depending on PCIe devices (ie radios) to determine what is left for LVDS.
    194 </li><li>The limiting factor for the 3.3V current is going to be the connector and cable combination. Since 3.3V power has 3 pins, there is between 1.5A and 3A available depending on the wire gauge.
    195 </li></ul><p>
     98 - The GW52xx, GW53x, and GW54xx all have 30W available from the 3.3V supply and you can subtract ~3W for baseboard operation and additional power depending on PCIe devices (ie radios) to determine what is left for LVDS.
     99 - The limiting factor for the 3.3V current is going to be the connector and cable combination. Since 3.3V power has 3 pins, there is between 1.5A and 3A available depending on the wire gauge.
     100
    196101LVDS Connector 5V:
    197 </p>
    198 <ul><li>5V power supplies on the Ventana products have a much lower current rating than  the 3.3V supply therefore you should pay careful attention to the 5V power needs of your display.
    199 </li><li>GW52xx has a 1A capable 5V supply shared between CAN transceiver, HDMI DDC, and LVDS.
    200 </li><li>GW53xx-B and earlier board revisions have a 800mA capable 5V supply shared between front-panel USB, CAN transceiver, HDMI DDC, and LVDS.
    201 </li><li>GW53xx-C, D, and E board revisions have a 1.6A capable 5V supply shared between front-panel USB, CAN transceiver, HDMI DDC, and LVDS.
    202 <ul><li><strong>Note</strong> - The 3.3V to 5V boost part used on these revisions has an inrush limitation of 100mA at power-up, causing some displays to not reliably power on
    203 </li></ul></li><li>GW53xx-F and above have a 700mA capable 5V supply shared between CAN transceiver, HDMI DDC, and LVDS.
    204 </li><li>GW54xx has a 600mA capable 5V supply shared between CAN transceiver, HDMI DDC, FAN power, and LVDS.
    205 </li></ul><p>
    206 <span class="wikianchor" id="touchcontroller"></span>
    207 </p>
    208 <h2 id="Touchscreensensors">Touchscreen sensors</h2>
    209 <p>
     102 - 5V power supplies on the Ventana products have a much lower current rating than  the 3.3V supply therefore you should pay careful attention to the 5V power needs of your display.
     103 - GW52xx has a 1A capable 5V supply shared between CAN transceiver, HDMI DDC, and LVDS.
     104 - GW53xx-B and earlier board revisions have a 800mA capable 5V supply shared between front-panel USB, CAN transceiver, HDMI DDC, and LVDS.
     105 - GW53xx-C, D, and E board revisions have a 1.6A capable 5V supply shared between front-panel USB, CAN transceiver, HDMI DDC, and LVDS.
     106  - '''Note''' - The 3.3V to 5V boost part used on these revisions has an inrush limitation of 100mA at power-up, causing some displays to not reliably power on
     107 - GW53xx-F and above have a 700mA capable 5V supply shared between CAN transceiver, HDMI DDC, and LVDS.
     108 - GW54xx has a 600mA capable 5V supply shared between CAN transceiver, HDMI DDC, FAN power, and LVDS.
     109
     110
     111[=#touchcontroller]
     112== Touchscreen sensors ==
    210113Touchscreen's are displays that have bonded to them a thin glass sensor to detect touch events. These can have a variety of features and technologies:
    211 </p>
    212 <ul><li>resistive touch vs capacitive (each has their pro's and con's)
    213 </li><li>communication channels (I2C vs USB typically) - the Ventana LVDS connector itself supports an i2c channel although USB can be picked up from the main-board on different connectors
    214 </li><li>multi-touch vs single-touch
    215 </li><li>other features...
    216 </li></ul><p>
     114 * resistive touch vs capacitive (each has their pro's and con's)
     115 * communication channels (I2C vs USB typically) - the Ventana LVDS connector itself supports an i2c channel although USB can be picked up from the main-board on different connectors
     116 * multi-touch vs single-touch
     117 * other features...
     118
    217119There is a large variety of touch sensor controllers (the chip) and touch sensor's (the glass with the micro-wires or elements that connect to the controller chip). Each controller chip has a certain number of sensor circuits that can limit the size of the display.
    218 </p>
    219 <p>
     120
    220121The panels that we offer 'out-of-the-box' support for listed below use one of the following controller chips:
    221 </p>
    222 <ul><li>eGalax (used on the Freescale MCIMX-LVDS1 10" XGA Touchscreen Display)
    223 </li><li>FocalTech FT5x06 (used on the DLC700JMGT4 7" WSVGA Touchscreen Display)
    224 </li><li>Goodix GT9110 (used on the DLC800FIGT3 8" XGA Touchscreen Display)
    225 </li></ul><p>
    226 <span class="wikianchor" id="software"></span>
    227 </p>
    228 <h2 id="SoftwareSupportandConfiguration">Software Support and Configuration</h2>
    229 <p>
     122 * eGalax (used on the Freescale MCIMX-LVDS1 10" XGA Touchscreen Display)
     123 * !FocalTech FT5x06 (used on the DLC700JMGT4 7" WSVGA Touchscreen Display)
     124 * Goodix GT9110 (used on the DLC800FIGT3 8" XGA Touchscreen Display)
     125
     126
     127[=#software]
     128== Software Support and Configuration ==
    230129Gateworks U-Boot Bootloader:
    231 </p>
    232 <ul><li>supports 'display' (not touch) of the various displays below
    233 </li><li>very easy to add additional support to <tt>gw_ventana.c</tt> by knowing the display timings
    234 </li><li>the <tt>panel</tt> env variable enables display output maching one of the device names in the displays array
    235 <ul><li>un-setting <tt>panel</tt> will auto-detect displays that have that capability (typically i2c probing the touch controller)
    236 </li><li>setting <tt>panel</tt> to none disables display out completely
    237 </li></ul></li><li>the <tt>display</tt> env variable will select the 'native-mode' device-tree node for the LCD display to timings for the kernel (supported in the 3.10.53 vendor kernel used on the Android Kitkat BSP, Yocto v1.8 BSP, and the latest <a class="wiki" href="/wiki/OpenWrt">OpenWrt</a> (see: <a class="ext-link" href="https://github.com/Gateworks/openwrt"><span class="icon">​</span>https://github.com/Gateworks/openwrt</a>))
    238 </li></ul><p>
     130 * supports 'display' (not touch) of the various displays below
     131 * very easy to add additional support to {{{gw_ventana.c}}} by knowing the display timings
     132 * the {{{panel}}} env variable enables display output maching one of the device names in the displays array
     133  * un-setting {{{panel}}} will auto-detect displays that have that capability (typically i2c probing the touch controller)
     134  * setting {{{panel}}} to none disables display out completely
     135 * the {{{display}}} env variable will select the 'native-mode' device-tree node for the LCD display to timings for the kernel (supported in the 3.10.53 vendor kernel used on the Android Kitkat BSP, Yocto v1.8 BSP, and the latest OpenWrt (see: https://github.com/Gateworks/openwrt))
     136
    239137Freescale Linux Kernels (3.0.35, 3.10.17, 3.10.31, 3.10.53, 3.14.28, 3.14.48):
    240 </p>
    241 <ul><li>the video kernel parameter can specify display details for mxcfb0, mxcfb1, mxcfb2, mxcfb3 devices (IMX6Q can support 4 simultaneous display out, while IMX6DL can support 2).
    242 </li><li>see <a class="wiki" href="/wiki/Yocto/Video_Out#DisplaysDevices">here</a> for details
    243 <ul><li>For 3.10.31 and later kernels the video mode settings describing resolution and timings are selected through device-tree properties
    244 </li><li>For earlier kernels the video mode settings are selected by specifying one of the following in the mxcfb device descriptor in the video command line parameter
    245 </li></ul></li></ul><p>
     138 * the video kernel parameter can specify display details for mxcfb0, mxcfb1, mxcfb2, mxcfb3 devices (IMX6Q can support 4 simultaneous display out, while IMX6DL can support 2).
     139 * see [wiki:Yocto/Video_Out#DisplaysDevices here] for details
     140  * For 3.10.31 and later kernels the video mode settings describing resolution and timings are selected through device-tree properties
     141  * For earlier kernels the video mode settings are selected by specifying one of the following in the mxcfb device descriptor in the video command line parameter
     142
    246143Linux Display Driver Support:
    247 </p>
    248 <ul><li>The Gateworks Yocto and Android BSP's support  A driver supporting the i.MX6 IPU is required for display. This is available in the Gateworks 3.0.35 and 3.10.17 kernels available in our Yocto BSP
    249 <ul><li>mainline linux driver support is being worked on currently and targeted for the 3.15 kernel
    250 </li></ul></li><li>The touch controller on the EXC7200 is compatible with the 'egalax_ts' linux driver
    251 </li><li>The display requires either a panel driver or device-tree configuration depending on kernel
    252 </li><li>The backlight can be controlled through the standard Linux pwm-backlight driver
    253 </li></ul><p>
     144 * The Gateworks Yocto and Android BSP's support  A driver supporting the i.MX6 IPU is required for display. This is available in the Gateworks 3.0.35 and 3.10.17 kernels available in our Yocto BSP
     145  * mainline linux driver support is being worked on currently and targeted for the 3.15 kernel
     146 * The touch controller on the EXC7200 is compatible with the 'egalax_ts' linux driver
     147 * The display requires either a panel driver or device-tree configuration depending on kernel
     148 * The backlight can be controlled through the standard Linux pwm-backlight driver
     149
    254150Linux Touchscreen Driver Support:
    255 </p>
    256 <ul><li>touchscreen's are typically I2C or USB based devices with drivers in the <tt>drivers/input/touchscreen</tt> directory
    257 </li></ul><p>
    258 <span class="wikianchor" id="troubleshooting"></span>
    259 </p>
    260 <h3 id="TroubleshootingTouchscreenPortion">Troubleshooting Touchscreen Portion</h3>
    261 <p>
    262 There is a command line tool called <tt>evtest</tt> that can be used to check for touch events.
    263 </p>
    264 <p>
     151 * touchscreen's are typically I2C or USB based devices with drivers in the {{{drivers/input/touchscreen}}} directory
     152
     153
     154[=#troubleshooting]
     155=== Troubleshooting Touchscreen Portion ===
     156There is a command line tool called {{{evtest}}} that can be used to check for touch events.
     157
    265158An example is shown below:
    266 </p>
    267 <div class="code"><pre>root@ventana:~# evtest
     159{{{#!bash
     160root@ventana:~# evtest
    268161No device specified, trying to scan all of /dev/input/event*
    269162Available devices:
     
    272165/dev/input/event2:      mma845x_a
    273166/dev/input/event3:      fxos8700_m
    274 Select the device event number <span class="o">[</span>0-3<span class="o">]</span>: 0
     167Select the device event number [0-3]: 0
    275168Input driver version is 1.0.1
    276169Input device ID: bus 0x18 vendor 0x0 product 0x0 version 0x0
    277 Input device name: <span class="s2">"EP0810M09"</span>
     170Input device name: "EP0810M09"
    278171Supported events:
    279   Event <span class="nb">type </span>0 <span class="o">(</span>EV_SYN<span class="o">)</span>
    280   Event <span class="nb">type </span>1 <span class="o">(</span>EV_KEY<span class="o">)</span>
    281     Event code 330 <span class="o">(</span>BTN_TOUCH<span class="o">)</span>
    282   Event <span class="nb">type </span>3 <span class="o">(</span>EV_ABS<span class="o">)</span>
    283     Event code 0 <span class="o">(</span>ABS_X<span class="o">)</span>
     172  Event type 0 (EV_SYN)
     173  Event type 1 (EV_KEY)
     174    Event code 330 (BTN_TOUCH)
     175  Event type 3 (EV_ABS)
     176    Event code 0 (ABS_X)
    284177      Value    863
    285178      Min        0
    286179      Max     1023
    287     Event code 1 <span class="o">(</span>ABS_Y<span class="o">)</span>
     180    Event code 1 (ABS_Y)
    288181      Value  -3374
    289182      Min        0
    290183      Max      599
    291     Event code 47 <span class="o">(</span>ABS_MT_SLOT<span class="o">)</span>
     184    Event code 47 (ABS_MT_SLOT)
    292185      Value      3
    293186      Min        0
    294187      Max        4
    295     Event code 53 <span class="o">(</span>ABS_MT_POSITION_X<span class="o">)</span>
     188    Event code 53 (ABS_MT_POSITION_X)
    296189      Value      0
    297190      Min        0
    298191      Max     1023
    299     Event code 54 <span class="o">(</span>ABS_MT_POSITION_Y<span class="o">)</span>
     192    Event code 54 (ABS_MT_POSITION_Y)
    300193      Value      0
    301194      Min        0
    302195      Max      599
    303     Event code 57 <span class="o">(</span>ABS_MT_TRACKING_ID<span class="o">)</span>
     196    Event code 57 (ABS_MT_TRACKING_ID)
    304197      Value      0
    305198      Min        0
    306199      Max    65535
    307200Properties:
    308 Testing ... <span class="o">(</span>interrupt to <span class="nb">exit</span><span class="o">)</span>
    309 Event: <span class="nb">time </span>1430493672.054573, <span class="nb">type </span>3 <span class="o">(</span>EV_ABS<span class="o">)</span>, code 47 <span class="o">(</span>ABS_MT_SLOT<span class="o">)</span>, value 0
    310 Event: <span class="nb">time </span>1430493672.054573, <span class="nb">type </span>3 <span class="o">(</span>EV_ABS<span class="o">)</span>, code 53 <span class="o">(</span>ABS_MT_POSITION_X<span class="o">)</span>, value 63
    311 Event: <span class="nb">time </span>1430493672.054573, <span class="nb">type </span>3 <span class="o">(</span>EV_ABS<span class="o">)</span>, code 54 <span class="o">(</span>ABS_MT_POSITION_Y<span class="o">)</span>, value 128
    312 Event: <span class="nb">time </span>1430493672.054573, <span class="nb">type </span>3 <span class="o">(</span>EV_ABS<span class="o">)</span>, code 0 <span class="o">(</span>ABS_X<span class="o">)</span>, value 63
    313 Event: <span class="nb">time </span>1430493672.054573, <span class="nb">type </span>3 <span class="o">(</span>EV_ABS<span class="o">)</span>, code 1 <span class="o">(</span>ABS_Y<span class="o">)</span>, value 128
    314 Event: <span class="nb">time </span>1430493672.054573, -------------- EV_SYN ------------
    315 Event: <span class="nb">time </span>1430493672.129208, <span class="nb">type </span>3 <span class="o">(</span>EV_ABS<span class="o">)</span>, code 57 <span class="o">(</span>ABS_MT_TRACKING_ID<span class="o">)</span>, value -1
    316 
    317 </pre></div><p>
     201Testing ... (interrupt to exit)
     202Event: time 1430493672.054573, type 3 (EV_ABS), code 47 (ABS_MT_SLOT), value 0
     203Event: time 1430493672.054573, type 3 (EV_ABS), code 53 (ABS_MT_POSITION_X), value 63
     204Event: time 1430493672.054573, type 3 (EV_ABS), code 54 (ABS_MT_POSITION_Y), value 128
     205Event: time 1430493672.054573, type 3 (EV_ABS), code 0 (ABS_X), value 63
     206Event: time 1430493672.054573, type 3 (EV_ABS), code 1 (ABS_Y), value 128
     207Event: time 1430493672.054573, -------------- EV_SYN ------------
     208Event: time 1430493672.129208, type 3 (EV_ABS), code 57 (ABS_MT_TRACKING_ID), value -1
     209
     210}}}
     211
    318212It is important verify the touchscreen is detected by running the following command in the example example:
    319 </p>
    320 <div class="code"><pre>root@ventana:/ <span class="c"># cat /proc/bus/input/devices
    321 </span>I: <span class="nv">Bus</span><span class="o">=</span>0018 <span class="nv">Vendor</span><span class="o">=</span>0416 <span class="nv">Product</span><span class="o">=</span>1001 <span class="nv">Version</span><span class="o">=</span>28bb
    322 N: <span class="nv">Name</span><span class="o">=</span><span class="s2">"Goodix Capacitive TouchScreen"</span>
    323 P: <span class="nv">Phys</span><span class="o">=</span>input/ts
    324 S: <span class="nv">Sysfs</span><span class="o">=</span>/devices/soc0/soc.1/2100000.aips-bus/21a8000.i2c/i2c-2/2-0014/input/input0
    325 U: <span class="nv">Uniq</span><span class="o">=</span>
    326 H: <span class="nv">Handlers</span><span class="o">=</span>mouse0 event0
    327 B: <span class="nv">PROP</span><span class="o">=</span>2
    328 B: <span class="nv">EV</span><span class="o">=</span>b
    329 B: <span class="nv">KEY</span><span class="o">=</span>400 0 0 0 0 0 0 0 0 0 0
    330 B: <span class="nv">ABS</span><span class="o">=</span>2658000 3
    331 </pre></div><h4 id="Interrupts">Interrupts</h4>
    332 <p>
     213
     214{{{#!bash
     215root@ventana:/ # cat /proc/bus/input/devices
     216I: Bus=0018 Vendor=0416 Product=1001 Version=28bb
     217N: Name="Goodix Capacitive TouchScreen"
     218P: Phys=input/ts
     219S: Sysfs=/devices/soc0/soc.1/2100000.aips-bus/21a8000.i2c/i2c-2/2-0014/input/input0
     220U: Uniq=
     221H: Handlers=mouse0 event0
     222B: PROP=2
     223B: EV=b
     224B: KEY=400 0 0 0 0 0 0 0 0 0 0
     225B: ABS=2658000 3
     226}}}
     227
     228==== Interrupts ====
    333229You can see if interrupts are being sent to the touchscreen controller.
    334 </p>
    335 <p>
     230
    336231Run the command:
    337 </p>
    338 <pre class="wiki">cat /proc/interrupts
    339 </pre><p>
     232{{{
     233cat /proc/interrupts
     234}}}
     235
    340236Find the touch controller in the list.
    341 </p>
    342 <p>
     237
    343238Note the number of interrupts it currently has.
    344 </p>
    345 <p>
     239
    346240Then touch the screen a few times.
    347 </p>
    348 <p>
     241
    349242Then check the interrupts again to verify if it has increased.
    350 </p>
    351 <h4 id="AndroidTouchscreen">Android Touchscreen</h4>
    352 <p>
     243
     244
     245==== Android Touchscreen ====
    353246In addition to the above information, here is some more information that may be relevant to Android.
    354 </p>
    355 <p>
    356 To detect touch events on Android, where <tt>evtest</tt> may not exist, try using the <tt>getevent</tt> command.
    357 </p>
    358 <p>
     247
     248To detect touch events on Android, where {{{evtest}}} may not exist, try using the {{{getevent}}} command.
     249
    359250Example shown below, adjust command as necessary.
    360 </p>
    361 <p>
     251
    362252Note that values should appear on the serial console when the screen is touched.
    363 </p>
    364 <p>
     253
    365254This verifies the touchscreen is getting events.
    366 </p>
    367 <div class="code"><pre>root@ventana:/ <span class="c"># getevent /dev/input/event0
    368 </span>0003 0039 00000022
     255{{{#!bash
     256root@ventana:/ # getevent /dev/input/event0
     2570003 0039 00000022
    3692580003 0036 00000251
    3702590003 0035 0000033b
     
    3812700001 014a 00000000
    3822710000 0000 00000000
    383 </pre></div><p>
    384 <span class="wikianchor" id="displays"></span>
    385 </p>
    386 <h2 id="SupportedDisplays">Supported Displays</h2>
    387 <p>
    388 While you should be able to make a wide variety of LVDS displays work, Gateworks provides software support and cables for several readily available displays. Please contact sales@… for details.
    389 </p>
    390 <p>
    391 <span class="wikianchor" id="XGA-10in"></span>
    392 </p>
    393 <h3 id="FreescaleMCIMX-LVDS110XGATouchscreenDisplay">Freescale MCIMX-LVDS1 10" XGA Touchscreen Display</h3>
    394 <p>
     272}}}
     273
     274
     275[=#displays]
     276== Supported Displays ==
     277While you should be able to make a wide variety of LVDS displays work, Gateworks provides software support and cables for several readily available displays. Please contact sales@gateworks.com for details.
     278
     279
     280[=#XGA-10in]
     281=== Freescale MCIMX-LVDS1 10" XGA Touchscreen Display ===
    395282The 'Freescale LVDS1' or 'MCIMX-LVDS1' was originally designed for an i.MX53 dev kit and is a LCD+Backlight-controller+Touchscreen-controller.
    396 </p>
    397 <p>
     283
    398284This is the display used in many of the Gateworks demo videos and is directly compatible with our LVDS connector.
    399 </p>
    400 <p>
     285
    401286Its available from a few distributors if you search but always $500:
    402 </p>
    403 <ul><li><a class="ext-link" href="https://www.digikey.com/products/en?keywords=MCIMX-LVDS1"><span class="icon">​</span>Digikey</a>
    404 </li><li><a class="ext-link" href="http://www.newark.com/freescale-semiconductor/mcimx-lvds1/daughter-card-10-1in-lcd-module/dp/45T2344"><span class="icon">​</span>Newark</a>
    405 </li><li><a class="ext-link" href="http://www.mouser.com/ProductDetail/Freescale-Semiconductor/MCIMX-LVDS1/?qs=Bd5/XmnHbhsyKVtPrY51Kg=="><span class="icon">​</span>Mouser</a>
    406 </li></ul><p>
     287 * [https://www.digikey.com/products/en?keywords=MCIMX-LVDS1 Digikey]
     288 * [http://www.newark.com/freescale-semiconductor/mcimx-lvds1/daughter-card-10-1in-lcd-module/dp/45T2344 Newark]
     289 * [http://www.mouser.com/ProductDetail/Freescale-Semiconductor/MCIMX-LVDS1/?qs=Bd5/XmnHbhsyKVtPrY51Kg== Mouser]
     290
    407291Details:
    408 </p>
    409 <ul><li>Display: 10in 1024x768 pixel 128dpi LCD <a class="ext-link" href="http://dev.gateworks.com/datasheets/HSD100PXN1-A00.pdf"><span class="icon">​</span>HSD100PXN1</a>
    410 </li><li>Touch Controller: <a class="ext-link" href="http://dev.gateworks.com/datasheets/EXC7200_Datasheet.pdf"><span class="icon">​</span>EXC7200</a> on i2c-2@0x04
    411 <ul><li>IRQ via gpio-11 on GW5200/GW5300, gpio-204 on GW5400
    412 </li></ul></li><li>Backlight: White LED (PWM Driven) on i.MX6 pwm4
    413 </li><li>Power Consumption: approximately 700mW to 1.5mW depending on BL brightness
    414 </li><li>supports <a class="ext-link" href="http://www.ecnmag.com/articles/2010/04/content-adaptive-lcd-backlight-control"><span class="icon">​</span>Content Adaptive Backlight Control</a> (CABC) via gpio-10
    415 <ul><li>when enabled this sets backlight automatically according to content - this can cause annoying flickering and is usually best disabled by de-asserting the gpio (driving low))
    416 </li></ul></li></ul><p>
     292 * Display: 10in 1024x768 pixel 128dpi LCD [http://dev.gateworks.com/datasheets/HSD100PXN1-A00.pdf HSD100PXN1]
     293 * Touch Controller: [http://dev.gateworks.com/datasheets/EXC7200_Datasheet.pdf EXC7200] on i2c-2@0x04
     294  * IRQ via gpio-11 on GW5200/GW5300, gpio-204 on GW5400
     295 * Backlight: White LED (PWM Driven) on i.MX6 pwm4
     296 * Power Consumption: approximately 700mW to 1.5mW depending on BL brightness
     297 * supports [http://www.ecnmag.com/articles/2010/04/content-adaptive-lcd-backlight-control Content Adaptive Backlight Control] (CABC) via gpio-10
     298  * when enabled this sets backlight automatically according to content - this can cause annoying flickering and is usually best disabled by de-asserting the gpio (driving low))
     299
    417300Gateworks Bootloader support:
    418 </p>
    419 <ul><li>you can enable display out in the bootloader via:
    420 <div class="code"><pre>setenv panel Hannstar-XGA
    421 saveenv
    422 </pre></div></li></ul><p>
     301 * you can enable display out in the bootloader via:
     302{{{#!bash
     303setenv panel Hannstar-XGA
     304saveenv
     305}}}
     306
    423307Yocto support:
    424 </p>
    425 <ul><li>you can enable display and touch support for Yocto by setting the <tt>video</tt> env variable in the bootloader:
    426 <div class="code"><pre>setenv video <span class="s1">'video=mxcfb0:dev=ldb,bpp=32,LDB-XGA,if=RGB666 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off'</span>
    427 saveenv
    428 </pre></div></li><li>Alternatively, you can enable support for this using version v1.06+ bootscript
    429 <div class="code"><pre>setenv display Hannstar-XGA
    430 saveenv
    431 </pre></div></li></ul><p>
    432 Android KitKat+ support:
    433 </p>
    434 <ul><li>you can enable display and touch support for Android KitKat setting the <tt>display</tt> env variable in the bootloader:
    435 <div class="code"><pre>setenv display Hannstar-XGA
    436 saveenv
    437 </pre></div></li></ul><p>
    438 <span class="wikianchor" id="WSVGA-7in"></span>
    439 </p>
    440 <h3 id="GW17029DLC700JMGT47WSVGATouchscreenDisplay">GW17029 DLC700JMGT4 7" WSVGA Touchscreen Display</h3>
    441 <p>
     308 * you can enable display and touch support for Yocto by setting the {{{video}}} env variable in the bootloader:
     309{{{#!bash
     310setenv video 'video=mxcfb0:dev=ldb,bpp=32,LDB-XGA,if=RGB666 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off'
     311saveenv
     312}}}
     313 * Alternatively, you can enable support for this using version v1.06+ bootscript
     314{{{#!bash
     315setenv display Hannstar-XGA
     316saveenv
     317}}}
     318
     319Android !KitKat+ support:
     320 * you can enable display and touch support for Android !KitKat setting the {{{display}}} env variable in the bootloader:
     321{{{#!bash
     322setenv display Hannstar-XGA
     323saveenv
     324}}}
     325
     326
     327[=#WSVGA-7in]
     328=== GW17029 DLC700JMGT4 7" WSVGA Touchscreen Display ===
    442329The GW17029 DLC700JMGT4 7" WSVGA Touchscreen Display is a low-cost display supporting:
    443 </p>
    444 <ul><li>7" LCD 1024x600 display with backlight
    445 <ul><li>Physical size (W/H/D): 165.75 x 105.39 x 5.39mm
    446 </li><li>Active area: 153.6 x 90.00mm
    447 </li><li>Resolution: 1024x600 24bit RGB
    448 </li><li>Pixel pitch: 0.05 x 0.15mm
    449 </li><li>Pixel config: RGB stripes
    450 </li><li>Mode: Transmissive, normally black
    451 </li><li>Brightness: 200 nits
    452 </li><li>Contrast: 700:1
    453 </li><li>Backlight: LED
    454 </li><li>Interface: LVDS
    455 </li><li>Technology: IPS TFT
    456 </li><li>Power consuption: 1W to 2W (typ)
    457 </li><li>operating temperature: -20C to +70C
    458 </li></ul></li><li>5pt Capacitive touch via FT5406 touch controller
    459 <ul><li>10-point capacitive touch
    460 </li><li>scanning frequency: &gt;100 Hz
    461 </li><li>channels: 28 (drive) * 16 (induction)
    462 </li><li>active area: up to 8.9"
    463 </li><li>transmission: i2c i2c-2@0x38
    464 </li><li>operating temperature: -40C to +85C
    465 </li></ul></li><li>SmarterGlass LVDS-7 adapter board provides pwm-controlled backlight
    466 </li><li><a class="ext-link" href="http://dev.gateworks.com/datasheets/DLC0700DDG-4%20SPEC%20V1.1.pdf"><span class="icon">​</span>DLC0700JMG Datasheet</a>
    467 </li></ul><p>
     330 * 7" LCD 1024x600 display with backlight
     331  * Physical size (W/H/D): 165.75 x 105.39 x 5.39mm
     332  * Active area: 153.6 x 90.00mm
     333  * Resolution: 1024x600 24bit RGB
     334  * Pixel pitch: 0.05 x 0.15mm
     335  * Pixel config: RGB stripes
     336  * Mode: Transmissive, normally black
     337  * Brightness: 200 nits
     338  * Contrast: 700:1
     339  * Backlight: LED
     340  * Interface: LVDS
     341  * Technology: IPS TFT
     342  * Power consuption: 1W to 2W (typ)
     343  * operating temperature: -20C to +70C
     344 * 5pt Capacitive touch via FT5406 touch controller
     345  * 10-point capacitive touch
     346  * scanning frequency: >100 Hz
     347  * channels: 28 (drive) * 16 (induction)
     348  * active area: up to 8.9"
     349  * transmission: i2c i2c-2@0x38
     350  * operating temperature: -40C to +85C
     351 * !SmarterGlass LVDS-7 adapter board provides pwm-controlled backlight
     352 * [http://dev.gateworks.com/datasheets/DLC0700DDG-4%20SPEC%20V1.1.pdf DLC0700JMG Datasheet]
     353
    468354Gateworks Bootloader support:
    469 </p>
    470 <ul><li>you can enable display out in the bootloader via:
    471 <div class="code"><pre>setenv panel DLC700JMGT4
    472 saveenv
    473 </pre></div></li></ul><p>
     355 * you can enable display out in the bootloader via:
     356{{{#!bash
     357setenv panel DLC700JMGT4
     358saveenv
     359}}}
     360
    474361Yocto support:
    475 </p>
    476 <ul><li>you can enable display and touch support for Yocto by setting the <tt>video</tt> env variable in the bootloader:
    477 <div class="code"><pre>setenv video <span class="s1">'video=mxcfb0:dev=ldb,bpp=32,LDB-WSVGA,if=RGB666 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off'</span>
    478 saveenv
    479 </pre></div></li><li>Alternatively, you can enable support for this using version v1.06+ bootscript
    480 <div class="code"><pre>setenv display DLC700JMGT4
    481 saveenv
    482 </pre></div></li></ul><p>
     362 * you can enable display and touch support for Yocto by setting the {{{video}}} env variable in the bootloader:
     363{{{#!bash
     364setenv video 'video=mxcfb0:dev=ldb,bpp=32,LDB-WSVGA,if=RGB666 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off'
     365saveenv
     366}}}
     367 * Alternatively, you can enable support for this using version v1.06+ bootscript
     368{{{#!bash
     369setenv display DLC700JMGT4
     370saveenv
     371}}}
     372
    483373Android Kitkat+ support:
    484 </p>
    485 <ul><li>you can enable display and touch support for Android KitKat by setting the <tt>display</tt> env variable in the bootloader:
    486 <div class="code"><pre>setenv display DLC700JMGT4
    487 saveenv
    488 </pre></div></li></ul><p>
    489 <span class="wikianchor" id="XGA-8in"></span>
    490 </p>
    491 <h3 id="GW17030DLC800FIGT38XGATouchscreenDisplay-SPECIALORDER-250PieceMinimum">GW17030 DLC800FIGT3 8" XGA Touchscreen Display - SPECIAL ORDER - 250 Piece Minimum</h3>
    492 <p>
     374 * you can enable display and touch support for Android !KitKat by setting the {{{display}}} env variable in the bootloader:
     375{{{#!bash
     376setenv display DLC700JMGT4
     377saveenv
     378}}}
     379
     380
     381[=#XGA-8in]
     382=== GW17030 DLC800FIGT3 8" XGA Touchscreen Display - SPECIAL ORDER - 250 Piece Minimum ===
    493383The GW17030 DLC800FIGT3 8" XGA Touchscreen Display is a low-cost display supporting:
    494 </p>
    495 <ul><li>8" LCD 1024x768 display with backlight
    496 <ul><li>Physical size (W/H/D): 168.80 x 139.17 x 4.43mm
    497 </li><li>Active area: 162.05 x 121.54mm
    498 </li><li>Resolution: 1024x768 24bit RGB
    499 </li><li>Pixel pitch: 0.05275 x 0.15825mm
    500 </li><li>Pixel config: RGB stripes
    501 </li><li>Mode: Transmissive, normally black
    502 </li><li>Brightness: 280 nits
    503 </li><li>Contrast: 800:1
    504 </li><li>Backlight: LED
    505 </li><li>Interface: LVDS
    506 </li><li>Technology: IPS TFT
    507 </li><li>Power consuption: 1W to 2W (typ)
    508 </li><li>operating temperature: -10C to +50C
    509 </li></ul></li><li>Capacitive touch via GT9110 touch controller
    510 <ul><li>10-point capacitive touch
    511 </li><li>scanning frequency: 100 Hz
    512 </li><li>channels: 42 (drive) * 30 (induction)
    513 </li><li>active area: 7" to 12.1"
    514 </li><li>transmission: 7.0Kbps (max) i2c i2c-2@0x14
    515 </li><li>gesture and HotKnot support
    516 </li><li>operating temperature: -40C to +85C
    517 </li></ul></li><li>SmarterGlass LVDS-7 adapter board provides pwm-controlled backlight
    518 </li><li><a class="ext-link" href="http://dev.gateworks.com/datasheets/DLC0800FIG-5.pdf"><span class="icon">​</span>DLC800FIG Datasheet</a>
    519 </li></ul><p>
     384 * 8" LCD 1024x768 display with backlight
     385  * Physical size (W/H/D): 168.80 x 139.17 x 4.43mm
     386  * Active area: 162.05 x 121.54mm
     387  * Resolution: 1024x768 24bit RGB
     388  * Pixel pitch: 0.05275 x 0.15825mm
     389  * Pixel config: RGB stripes
     390  * Mode: Transmissive, normally black
     391  * Brightness: 280 nits
     392  * Contrast: 800:1
     393  * Backlight: LED
     394  * Interface: LVDS
     395  * Technology: IPS TFT
     396  * Power consuption: 1W to 2W (typ)
     397  * operating temperature: -10C to +50C
     398 * Capacitive touch via GT9110 touch controller
     399  * 10-point capacitive touch
     400  * scanning frequency: 100 Hz
     401  * channels: 42 (drive) * 30 (induction)
     402  * active area: 7" to 12.1"
     403  * transmission: 7.0Kbps (max) i2c i2c-2@0x14
     404  * gesture and !HotKnot support
     405  * operating temperature: -40C to +85C
     406 * !SmarterGlass LVDS-7 adapter board provides pwm-controlled backlight
     407 * [http://dev.gateworks.com/datasheets/DLC0800FIG-5.pdf DLC800FIG Datasheet]
     408
    520409Gateworks Bootloader support:
    521 </p>
    522 <ul><li>you can enable display out in the bootloader via:
    523 <div class="code"><pre>setenv panel DLC800FIGT3
    524 saveenv
    525 </pre></div></li></ul><p>
     410 * you can enable display out in the bootloader via:
     411{{{#!bash
     412setenv panel DLC800FIGT3
     413saveenv
     414}}}
     415
    526416Yocto support:
    527 </p>
    528 <ul><li>you can enable display and touch support for Yocto by setting the <tt>video</tt> env variable in the bootloader:
    529 <div class="code"><pre>setenv video <span class="s1">'video=mxcfb0:dev=ldb,bpp=32,LDB-XGA,if=RGB666 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off'</span>
    530 saveenv
    531 </pre></div></li><li>Alternatively, you can enable support for this using version v1.06+ bootscript
    532 <div class="code"><pre>setenv display DLC800FIGT3
    533 saveenv
    534 </pre></div></li></ul><p>
    535 Android KitKat+ support:
    536 </p>
    537 <ul><li>you can enable display support for Android KitKat by setting the <tt>display</tt> env variable in the bootloader:
    538 <div class="code"><pre>setenv display DLC800FIGT3
    539 saveenv
    540 </pre></div></li></ul><h4 id="Setup">Setup</h4>
    541 <p>
     417 * you can enable display and touch support for Yocto by setting the {{{video}}} env variable in the bootloader:
     418{{{#!bash
     419setenv video 'video=mxcfb0:dev=ldb,bpp=32,LDB-XGA,if=RGB666 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off'
     420saveenv
     421}}}
     422 * Alternatively, you can enable support for this using version v1.06+ bootscript
     423{{{#!bash
     424setenv display DLC800FIGT3
     425saveenv
     426}}}
     427
     428Android !KitKat+ support:
     429 * you can enable display support for Android !KitKat by setting the {{{display}}} env variable in the bootloader:
     430{{{#!bash
     431setenv display DLC800FIGT3
     432saveenv
     433}}}
     434
     435==== Setup ====
    542436This setup applies to the Gateworks 7 and 8" LCD kits.
    543 </p>
    544 <ul><li>8" XGA (1024x768) display with backlight and 5pt capacitive touch:
    545 <ul><li>GW17030 8" LCD Display
    546 </li><li>GW10109 (8in) GW16113 (36in) GW16114 (60in) Cable
    547 </li><li>GW16114-2 Adapter Board (for 8" LCD)
    548 </li></ul></li></ul><ul><li>7" WSVGA (1024x600) display with backlight and 5pt capacitive touch:
    549 <ul><li>GW17029 7" LCD Display
    550 </li><li>GW10109 (8in) GW16113 (36in) GW16114 (60in) Cable
    551 </li><li>GW16114-1 Adapter Board (for 7" LCD)
    552 </li></ul></li></ul><ol><li>Plug the small ribbon cable on the LCD into the adapter board slot as pictured
    553 </li></ol><p>
    554 <a style="padding:0; border:none" href="/attachment/wiki/ventana/LVDS/lcdadapterboard.jpg"><img width="400px" src="/raw-attachment/wiki/ventana/LVDS/lcdadapterboard.jpg" /></a>
    555 </p>
    556 <ol start="2"><li>Take the GW10109/GW16113/GW16114 Cable and plug the side with two connectors into the LCD and the Adapter board.
    557 </li></ol><p>
    558 <a style="padding:0; border:none" href="/attachment/wiki/ventana/LVDS/lcdcables.jpg"><img width="400px" src="/raw-attachment/wiki/ventana/LVDS/lcdcables.jpg" /></a>
    559 </p>
    560 <ol start="3"><li>Plug the single end of the cable onto the Ventana board LVDS connector.
    561 </li></ol><p>
    562 <a style="padding:0; border:none" href="/attachment/wiki/ventana/LVDS/ventanalvdsconnector.jpg"><img width="400px" src="/raw-attachment/wiki/ventana/LVDS/ventanalvdsconnector.jpg" /></a>
    563 </p>
    564 <p>
    565 <span class="wikianchor" id="selection"></span>
    566 </p>
    567 <h2 id="SelectingaLCDTouchscreenDisplay">Selecting a LCD &amp; Touchscreen Display</h2>
    568 <p>
     437
     438 * 8" XGA (1024x768) display with backlight and 5pt capacitive touch:
     439  * GW17030 8" LCD Display
     440  * GW10109 (8in) GW16113 (36in) GW16114 (60in) Cable
     441  * GW16114-2 Adapter Board (for 8" LCD)
     442
     443 * 7" WSVGA (1024x600) display with backlight and 5pt capacitive touch:
     444  * GW17029 7" LCD Display
     445  * GW10109 (8in) GW16113 (36in) GW16114 (60in) Cable
     446  * GW16114-1 Adapter Board (for 7" LCD)
     447
     448 1. Plug the small ribbon cable on the LCD into the adapter board slot as pictured
     449[[Image(lcdadapterboard.jpg,400px)]]
     450 2. Take the GW10109/GW16113/GW16114 Cable and plug the side with two connectors into the LCD and the Adapter board.
     451[[Image(lcdcables.jpg,400px)]]
     452 3. Plug the single end of the cable onto the Ventana board LVDS connector.
     453[[Image(ventanalvdsconnector.jpg,400px)]]
     454
     455
     456[=#selection]
     457== Selecting a LCD & Touchscreen Display ==
    569458Selecting a usable display can be complex. Gateworks has broken down the selection process:
    570 </p>
    571 <ol><li>Size
    572 <ul><li>Typical sizes range from 4" to 15", with something like 7" the most common
    573 </li></ul></li><li>Backlight
    574 <ul><li>Voltage - LED's can require a large boost voltage. If this voltage is not available on the board, display driver boards are often created for boosting to a higher voltage. Current must also be taken into consideration. 5V and 3.3V are supplied on the Gateworks SBC 30 pin connector.
    575 </li><li>Backlight Adjustment
    576 <ul><li>PWM - Supported on Gateworks 30 pin connector
    577 </li><li>Analog
    578 </li></ul></li></ul></li><li>Video Interface
    579 <ul><li>LVDS - Gateworks has a 30 pin LVDS connector as documented on this wiki page.
    580 </li></ul></li><li>Touchscreen
    581 <ul><li>Capacitive - Similar to most cell phones. More expensive. More sensitive.
    582 </li><li>Resistive - Requires a physical press, less sensitive, but good for gloves, etc
    583 </li><li>Controller - The touchscreen itself outputs signals that are typically best interpreted via a specific touchscreen controller. This controller then interfaces with the Gateworks SBC. Gateworks has a I2C interface on the LVDS connector for this interface. USB interfaces also exist, but USB is not on the LVDS connector, and thus a separate cable would be needed.
    584 <ul><li><strong>VERY IMPORTANT: Controller software driver</strong> - A touchscreen controller will not work if the proper driver is not loaded in the Linux software. Be sure a driver is supported for this touchscreen controller chip. Look for possibly supported chips here: <a class="ext-link" href="http://lxr.free-electrons.com/source/drivers/input/touchscreen/?v=3.10"><span class="icon">​</span>http://lxr.free-electrons.com/source/drivers/input/touchscreen/?v=3.10</a>
    585 </li></ul></li><li>Bonding - Touchscreens are bonded to LCD displays. Some combinations are pre-bonded but otherwise bonding is a very complex process and requires very expensive machinery. It is highly recommended that the LCD and touchscreen be bought pre-bonded.
    586 </li></ul></li><li>Cabling
    587 <ul><li>Often cabling will need to be created to mate connectors. Gateworks has a 30 pin connector that may have to mate to a 20 pin connector along with backlight and touchscreen. For cabling, companies such as Quadrangle can create a custom cables.
    588 </li></ul></li></ol><p>
    589 <span class="wikianchor" id="adding"></span>
    590 </p>
    591 <h2 id="AddingSupportforaNewLCD">Adding Support for a New LCD</h2>
    592 <p>
     459
     460 1. Size
     461  * Typical sizes range from 4" to 15", with something like 7" the most common
     462 2. Backlight
     463  * Voltage - LED's can require a large boost voltage. If this voltage is not available on the board, display driver boards are often created for boosting to a higher voltage. Current must also be taken into consideration. 5V and 3.3V are supplied on the Gateworks SBC 30 pin connector.
     464  * Backlight Adjustment
     465   * PWM - Supported on Gateworks 30 pin connector
     466   * Analog
     467 3. Video Interface
     468  * LVDS - Gateworks has a 30 pin LVDS connector as documented on this wiki page.
     469 4. Touchscreen
     470  * Capacitive - Similar to most cell phones. More expensive. More sensitive.
     471  * Resistive - Requires a physical press, less sensitive, but good for gloves, etc
     472  * Controller - The touchscreen itself outputs signals that are typically best interpreted via a specific touchscreen controller. This controller then interfaces with the Gateworks SBC. Gateworks has a I2C interface on the LVDS connector for this interface. USB interfaces also exist, but USB is not on the LVDS connector, and thus a separate cable would be needed.
     473   * '''VERY IMPORTANT: Controller software driver''' - A touchscreen controller will not work if the proper driver is not loaded in the Linux software. Be sure a driver is supported for this touchscreen controller chip. Look for possibly supported chips here: [http://lxr.free-electrons.com/source/drivers/input/touchscreen/?v=3.10]
     474  * Bonding - Touchscreens are bonded to LCD displays. Some combinations are pre-bonded but otherwise bonding is a very complex process and requires very expensive machinery. It is highly recommended that the LCD and touchscreen be bought pre-bonded.
     475 5. Cabling
     476  * Often cabling will need to be created to mate connectors. Gateworks has a 30 pin connector that may have to mate to a 20 pin connector along with backlight and touchscreen. For cabling, companies such as Quadrangle can create a custom cables.
     477
     478
     479[=#adding]
     480== Adding Support for a New LCD ==
    593481Adding support for a new LCD requires modifying the source code of the software.
    594 </p>
    595 <p>
     482
    596483While the code changes are fairly simple, determining the timings can be complicated and involves translating timings from the manufacturers datasheet to the display timings that Linux drivers need.
    597 </p>
    598 <h3 id="DeterminingTimingvalues">Determining Timing values</h3>
    599 <p>
    600 You can easily experiment with different timing values by using the Ventana bootloader 'fixfdt' script to alter the timings of the default display which is the 'hsd100pxn1' (unless you've changed it by setting the <tt>display</tt> env variable). Note that the timings represented in the device-tree are hex values.
    601 </p>
    602 <p>
     484
     485=== Determining Timing values ===
     486You can easily experiment with different timing values by using the Ventana bootloader 'fixfdt' script to alter the timings of the default display which is the 'hsd100pxn1' (unless you've changed it by setting the {{{display}}} env variable). Note that the timings represented in the device-tree are hex values.
     487
    603488Here is an example of setting up a {{{fixfdt}} script for overriding the values and setting them for a 1280x800 pixel display (0x500 x 0x320) with a refresh rate of 60Hz (0x3c) and a clock-frequency of 68930000Hz (0x41bc9d0) and margins of 220/40/21/7:
    604 </p>
    605 <pre class="wiki">setenv timing_path '/soc/aips-bus@02000000/ldb@020e0008/lvds-channel@0/display-timings/hsd100pxn1'
     489{{{
     490setenv timing_path '/soc/aips-bus@02000000/ldb@020e0008/lvds-channel@0/display-timings/hsd100pxn1'
    606491setenv fixfdt '\
    607492 fdt addr ${fdt_addr}; \
    608  fdt set ${timing_path} clock-frequency &lt;0x41bc9d0&gt;; \
    609  fdt set ${timing_path} hactive &lt;0x500&gt;; \
    610  fdt set ${timing_path} vactive &lt;0x320&gt;; \
    611  fdt set ${timing_path} hback-porch &lt;0xdc&gt;; \
    612  fdt set ${timing_path} hfront-porch &lt;0x28&gt;; \
    613  fdt set ${timing_path} vback-porch &lt;0x15&gt;; \
    614  fdt set ${timing_path} vfront-porch &lt;0x0x7&gt;; \
    615  fdt set ${timing_path} hsync-len &lt;0x3c&gt;; \
    616  fdt set ${timing_path} vsync-len &lt;0xa&gt;; \
     493 fdt set ${timing_path} clock-frequency <0x41bc9d0>; \
     494 fdt set ${timing_path} hactive <0x500>; \
     495 fdt set ${timing_path} vactive <0x320>; \
     496 fdt set ${timing_path} hback-porch <0xdc>; \
     497 fdt set ${timing_path} hfront-porch <0x28>; \
     498 fdt set ${timing_path} vback-porch <0x15>; \
     499 fdt set ${timing_path} vfront-porch <0x0x7>; \
     500 fdt set ${timing_path} hsync-len <0x3c>; \
     501 fdt set ${timing_path} vsync-len <0xa>; \
    617502'; saveenv; reset
    618 </pre><p>
    619 The display timing device-tree bindings are documented in <a class="ext-link" href="https://lxr.missinglinkelectronics.com/linux+v3.14/Documentation/devicetree/bindings/video/display-timing.txt"><span class="icon">​</span>Documentation/devicetree/bindings/video/display-timing.txt</a>.
    620 </p>
    621 <p>
    622 <span class="wikianchor" id="uboot"></span>
    623 </p>
    624 <h3 id="U-BootBootloaderLCDdisplaysupport">U-Boot Bootloader LCD display support</h3>
    625 <p>
    626 The Ventana U-Boot Bootloader specifies an array of displays via the <tt>displays</tt> variable <a class="ext-link" href="https://github.com/Gateworks/u-boot-imx6/blob/gateworks_v2015.04/board/gateworks/gw_ventana/gw_ventana.c#L328"><span class="icon">​</span>here</a>. The <tt>struct display_info_t</tt> structure (defined <a class="ext-link" href="https://lxr.missinglinkelectronics.com/uboot/arch/arm/include/asm/imx-common/video.h#L11"><span class="icon">​</span>here</a>) defines a bus/addr, pixel format, detect function, enable function, and video mode which includes a unique name, resolution and timings details. The <tt>panel</tt> env variable is used by U-Boot to determine which panel to configure and the value must match one of the video mode names in the array. Note that the <tt>display</tt> env variable can also be used for configuring the display for the Linux kernel (see below).
    627 </p>
    628 <p>
    629 The video-mode structure is described <a class="ext-link" href="https://lxr.missinglinkelectronics.com/uboot/include/linux/fb.h#L598"><span class="icon">​</span>https://lxr.missinglinkelectronics.com/uboot/include/linux/fb.h#L598</a> - some of it is self-explanatory and comes straight out of the manufacturers datasheet and some is not:
    630 </p>
    631 <ul><li>name - unique name that needs to match the <tt>panel</tt> and/or <tt>display</tt> env variable
    632 </li><li>refresh - refresh rate
    633 </li><li>xres/yres - display resolution or 'active pixels'
    634 </li><li>left_margin/right_margin/upper_margin/lower_margin - the margins (in units of pixclock periods) for video blanking
    635 </li><li>pixclock - the frequency of the pixel clock (from the datasheet) (in units of picoseconds) (for example, 64MHz would be pixclock=(1/64000000)*100000=15625)
    636 </li><li>hsync_len/vsync_len - hsync and vsync period (in units of pixclock periods)
    637 </li><li>sync - flags describing the polarity details of the sync signals (see <a class="ext-link" href="https://lxr.missinglinkelectronics.com/uboot/include/linux/fb.h#L74"><span class="icon">​</span>here</a>) - for LVDS displays this is always FB_SYNC_EXT
    638 </li><li>vmode - videomode flags (see <a class="ext-link" href="https://lxr.missinglinkelectronics.com/uboot/include/linux/fb.h#L83"><span class="icon">​</span>here</a>) - for LVDS displays this is always FB_VMODE_NONINTERLACED
    639 </li><li>flag
    640 </li></ul><p>
     503}}}
     504
     505The display timing device-tree bindings are documented in [https://lxr.missinglinkelectronics.com/linux+v3.14/Documentation/devicetree/bindings/video/display-timing.txt Documentation/devicetree/bindings/video/display-timing.txt].
     506
     507
     508[=#uboot]
     509=== U-Boot Bootloader LCD display support ===
     510The Ventana U-Boot Bootloader specifies an array of displays via the {{{displays}}} variable [https://github.com/Gateworks/u-boot-imx6/blob/gateworks_v2015.04/board/gateworks/gw_ventana/gw_ventana.c#L328 here]. The {{{struct display_info_t}}} structure (defined [https://lxr.missinglinkelectronics.com/uboot/arch/arm/include/asm/imx-common/video.h#L11 here]) defines a bus/addr, pixel format, detect function, enable function, and video mode which includes a unique name, resolution and timings details. The {{{panel}}} env variable is used by U-Boot to determine which panel to configure and the value must match one of the video mode names in the array. Note that the {{{display}}} env variable can also be used for configuring the display for the Linux kernel (see below).
     511
     512The video-mode structure is described [https://lxr.missinglinkelectronics.com/uboot/include/linux/fb.h#L598] - some of it is self-explanatory and comes straight out of the manufacturers datasheet and some is not:
     513 * name - unique name that needs to match the {{{panel}}} and/or {{{display}}} env variable
     514 * refresh - refresh rate
     515 * xres/yres - display resolution or 'active pixels'
     516 * left_margin/right_margin/upper_margin/lower_margin - the margins (in units of pixclock periods) for video blanking
     517 * pixclock - the frequency of the pixel clock (from the datasheet) (in units of picoseconds) (for example, 64MHz would be pixclock=(1/64000000)*100000=15625)
     518 * hsync_len/vsync_len - hsync and vsync period (in units of pixclock periods)
     519 * sync - flags describing the polarity details of the sync signals (see [https://lxr.missinglinkelectronics.com/uboot/include/linux/fb.h#L74 here]) - for LVDS displays this is always FB_SYNC_EXT
     520 * vmode - videomode flags (see [https://lxr.missinglinkelectronics.com/uboot/include/linux/fb.h#L83 here]) - for LVDS displays this is always FB_VMODE_NONINTERLACED
     521 * flag
     522
    641523As an example, lets take the 'AUO G101EVN01.0' 1280x800 10.1" LVDS display:
    642 </p>
    643 <ul><li><a class="ext-link" href="http://dev.gateworks.com/datasheets/AUOG101EVN01.0_Datasheet.pdf"><span class="icon">​</span>AUO G101EVN01.0 datasheet</a>
    644 </li><li>1280x800 active pixels (6.5.1 Timing Characteristics)
    645 </li><li>pixclock = (1/68.93MHz)*(1000000) = 14507 (68.93MHz is from typical clock frequency specified in 6.5.1 Timing Characteristics)
    646 </li></ul><p>
    647 We would add an additional structure to <tt>displays</tt> in board/gateworks/gw_ventana/gw_ventana.c:
    648 </p>
    649 <pre class="wiki">{
     524 * [http://dev.gateworks.com/datasheets/AUOG101EVN01.0_Datasheet.pdf AUO G101EVN01.0 datasheet]
     525 * 1280x800 active pixels (6.5.1 Timing Characteristics)
     526 * pixclock = (1/68.93MHz)*(1000000) = 14507 (68.93MHz is from typical clock frequency specified in 6.5.1 Timing Characteristics)
     527
     528We would add an additional structure to {{{displays}}} in board/gateworks/gw_ventana/gw_ventana.c:
     529{{{
     530{
    650531        /* AUO G101EVN01.0 */
    651532        .bus    = 0,
     
    670551        }
    671552}
    672 </pre><p>
    673 After rebuilding the bootloader and updating the board, we can set <tt>panel</tt> as such:
    674 </p>
    675 <pre class="wiki">Ventana &gt; setenv panel AUOG101EVN01.0; saveenv; reset
    676 </pre><p>
     553}}}
     554
     555After rebuilding the bootloader and updating the board, we can set {{{panel}}} as such:
     556{{{
     557Ventana > setenv panel AUOG101EVN01.0; saveenv; reset
     558}}}
     559
    677560Depending on how you connected the LVDS display to the Gateworks Ventana board, you may need to manipulate the two GPIO signals going to the LVDS connector:
    678 </p>
    679 <ul><li>GPIO1_IO10 (gpio10 BACK_EN#)
    680 </li><li>GPIO1_IO18 (gpio18 BACK_ADJ) (in the kernel this would be the backlight PWM signal)
    681 </li></ul><p>
    682 By default these are configured in the <tt>enable_lvds</tt> function as gpio10/BACK_GPIO low, and gpio18/BACK_ADJ high. The gpio18/BACK_ADJ signal is configured as a PWM for backlight brightness in the kernel, however the Ventana bootloader does not have PWM support so this is defaulted to a gpio out driven high (which would be 100% backlight). The gpio10/BACK_GPIO signal can be used to connect to a RST# or EN# signal and if connected must be adjusted for your display. As the bootloader defaults this to output-low, you may need to change that to output high if you connected it to an active-high enable:
    683 </p>
    684 <pre class="wiki">Ventana &gt; setenv preboot 'gpio set 10'; saveenv; reset
    685 </pre><p>
     561 * GPIO1_IO10 (gpio10 BACK_EN#)
     562 * GPIO1_IO18 (gpio18 BACK_ADJ) (in the kernel this would be the backlight PWM signal)
     563
     564By default these are configured in the {{{enable_lvds}}} function as gpio10/BACK_GPIO low, and gpio18/BACK_ADJ high. The gpio18/BACK_ADJ signal is configured as a PWM for backlight brightness in the kernel, however the Ventana bootloader does not have PWM support so this is defaulted to a gpio out driven high (which would be 100% backlight). The gpio10/BACK_GPIO signal can be used to connect to a RST# or EN# signal and if connected must be adjusted for your display. As the bootloader defaults this to output-low, you may need to change that to output high if you connected it to an active-high enable:
     565{{{
     566Ventana > setenv preboot 'gpio set 10'; saveenv; reset
     567}}}
     568
    686569Note that there is no support for touch-screen control in the Ventana bootloader.
    687 </p>
    688 <p>
    689 <span class="wikianchor" id="bootscript"></span>
    690 </p>
    691 <h3 id="Bootloaderbootscript">Bootloader boot script</h3>
    692 <p>
    693 Most Gateworks BSP's load and execute a U-Boot bootscript from the OS that performs any OS specific kernel configuration. The bootloader will load and execute a script (if found) from the first ext2/3/4 partition on a block storage device, or the ubi boot/rootfs volume of a NAND ubi partition named <tt>boot/6x_bootscript-ventana</tt>. The source for these scripts can be found here:
    694 </p>
    695 <ul><li><a class="ext-link" href="https://github.com/Freescale/meta-freescale-3rdparty/blob/master/recipes-bsp/u-boot/u-boot-script-gateworks-imx/6x_bootscript-yocto.txt"><span class="icon">​</span>Yocto Bootscript</a>
    696 </li><li><a class="ext-link" href="https://github.com/Gateworks/android_device_gateworks/blob/imx_l5.1.1_2.1.0-ga/ventana/6x_bootscript.txt"><span class="icon">​</span>Android 5.1 Bootscript</a>
    697 </li><li><a class="ext-link" href="https://github.com/Gateworks/openwrt/blob/16.02/target/linux/imx6/image/bootscript-ventana"><span class="icon">​</span>OpenWrt 16.02</a>
    698 </li></ul><p>
     570
     571
     572[=#bootscript]
     573=== Bootloader boot script ===
     574Most Gateworks BSP's load and execute a U-Boot bootscript from the OS that performs any OS specific kernel configuration. The bootloader will load and execute a script (if found) from the first ext2/3/4 partition on a block storage device, or the ubi boot/rootfs volume of a NAND ubi partition named {{{boot/6x_bootscript-ventana}}}. The source for these scripts can be found here:
     575 - [https://github.com/Freescale/meta-freescale-3rdparty/blob/master/recipes-bsp/u-boot/u-boot-script-gateworks-imx/6x_bootscript-yocto.txt Yocto Bootscript]
     576 - [https://github.com/Gateworks/android_device_gateworks/blob/imx_l5.1.1_2.1.0-ga/ventana/6x_bootscript.txt Android 5.1 Bootscript]
     577 - [https://github.com/Gateworks/openwrt/blob/16.02/target/linux/imx6/image/bootscript-ventana OpenWrt 16.02]
     578
    699579One of the things the Yocto and Android bootscripts do is configure the 'video=' kernel parameters based on the display env variable to values that are appropriate for the kernels used there. You can always override this by setting the bootloader 'video' env parameter manually, or you can add to the bootloader script to configure the parameters for your device specifically.
    700 </p>
    701 <p>
     580
    702581As an example, lets take the 'AUO G101EVN01.0' 1280x800 10.1" LVDS display:
    703 </p>
    704 <ul><li>for Yocto 1.8 using the 3.14 kernel (see <a class="wiki" href="/wiki/Yocto/Video_Out">wiki:Yocto/Video_Out</a> Yocto/Video_Out)
    705 <div class="code"><pre>setenv video <span class="s1">'video=mxcfb0:dev=ldb,LDB-XGA,if=RGB666 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off'</span>
    706 </pre></div></li><li>for Android using the 3.14 kernel:
    707 <div class="code"><pre>setenv video <span class="s1">'video=mxcfb0:dev=ldb,bpp=32,LDB-XGA,if=RGB666 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off'</span>
    708 </pre></div></li><li>for <a class="wiki" href="/wiki/OpenWrt">OpenWrt</a> 16.02 using the 4.4 kernel (see <a class="wiki" href="/wiki/linux/display">wiki:linux/display</a>):
    709 <div class="code"><pre>setenv video <span class="s1">'video=LVDS-1:1280x800@60M video=HDMI-A-1:d'</span>
    710 </pre></div></li></ul><p>
    711 <span class="wikianchor" id="linux"></span>
    712 </p>
    713 <h3 id="LinuxKernelLCDdisplaysupport">Linux Kernel LCD display support</h3>
    714 <p>
    715 For Linux Kernel support, the device-tree specifies the display timings. The device tree file you modify will depend on the board you are using, such as GW52xx, GW53xx, or GW54xx. For example, the GW53xx device-tree in the Gateworks 3.14 vendor kernel is <a class="ext-link" href="https://github.com/Gateworks/linux-imx6/blob/gateworks_fslc_3.14_1.0.x_ga/arch/arm/boot/dts/imx6qdl-gw53xx.dtsi"><span class="icon">​</span>here</a>.
    716 </p>
    717 <p>
    718 The Ventana kernel specifies multiple <tt>display-timings</tt> within the <tt>lvds-channel@0</tt> node and the <tt>native-mode</tt> property points to which one to use. This <tt>native-mode</tt> property gets set by the bootloader prior to booting the kernel based on the <tt>display</tt> env variable. Therefore, you can either add an additional timing and set the <tt>display</tt> variable, or you can simply overwrite the default timing0.
    719 </p>
    720 <p>
    721 The display timing device-tree bindings are documented in <a class="ext-link" href="https://lxr.missinglinkelectronics.com/linux+v3.14/Documentation/devicetree/bindings/video/display-timing.txt"><span class="icon">​</span>Documentation/devicetree/bindings/video/display-timing.txt</a>. All values are identical to those used in the bootloader except that the bootloader uses 'pixclock' which is in units of picoseconds, and the kernel uses 'clock-frequency' in units of Hz.
    722 </p>
    723 <p>
     582 * for Yocto 1.8 using the 3.14 kernel (see wiki:Yocto/Video_Out Yocto/Video_Out)
     583{{{#!bash
     584setenv video 'video=mxcfb0:dev=ldb,LDB-XGA,if=RGB666 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off'
     585}}}
     586 * for Android using the 3.14 kernel:
     587{{{#!bash
     588setenv video 'video=mxcfb0:dev=ldb,bpp=32,LDB-XGA,if=RGB666 video=mxcfb1:off video=mxcfb2:off video=mxcfb3:off'
     589}}}
     590 * for OpenWrt 16.02 using the 4.4 kernel (see wiki:linux/display):
     591{{{#!bash
     592setenv video 'video=LVDS-1:1280x800@60M video=HDMI-A-1:d'
     593}}}
     594
     595[=#linux]
     596=== Linux Kernel LCD display support ===
     597For Linux Kernel support, the device-tree specifies the display timings. The device tree file you modify will depend on the board you are using, such as GW52xx, GW53xx, or GW54xx. For example, the GW53xx device-tree in the Gateworks 3.14 vendor kernel is [https://github.com/Gateworks/linux-imx6/blob/gateworks_fslc_3.14_1.0.x_ga/arch/arm/boot/dts/imx6qdl-gw53xx.dtsi here].
     598
     599The Ventana kernel specifies multiple {{{display-timings}}} within the {{{lvds-channel@0}}} node and the {{{native-mode}}} property points to which one to use. This {{{native-mode}}} property gets set by the bootloader prior to booting the kernel based on the {{{display}}} env variable. Therefore, you can either add an additional timing and set the {{{display}}} variable, or you can simply overwrite the default timing0.
     600
     601The display timing device-tree bindings are documented in [https://lxr.missinglinkelectronics.com/linux+v3.14/Documentation/devicetree/bindings/video/display-timing.txt Documentation/devicetree/bindings/video/display-timing.txt]. All values are identical to those used in the bootloader except that the bootloader uses 'pixclock' which is in units of picoseconds, and the kernel uses 'clock-frequency' in units of Hz.
     602
    724603As an example, lets take the 'AUO G101EVN01.0' 1280x800 10.1" LVDS display:
    725 </p>
    726 <ul><li><a class="ext-link" href="http://dev.gateworks.com/datasheets/AUOG101EVN01.0_Datasheet.pdf"><span class="icon">​</span>AUO G101EVN01.0 datasheet</a>
    727 </li><li>1280x800 active pixels (6.5.1 Timing Characteristics)
    728 </li><li>pixclock = (1/68.93MHz)*(1000000) = 14507 (68.93MHz is from typical clock frequency specified in 6.5.1 Timing Characteristics)
    729 </li></ul><p>
    730 We would add an additional device-tree node to <tt>display-timings</tt> in arch/arm/boot/dts/imx6qdl-gw53xx.dtsi (to add it to the GW53xx - add it to the other board dtsi files as needed)
    731 </p>
    732 <pre class="wiki">timing3: g101evn010 {
    733      clock-frequency = &lt;68930000&gt;;
    734      hactive = &lt;1280&gt;;
    735      vactive = &lt;800&gt;;
    736      hback-porch = &lt;220&gt;;
    737      hfront-porch = &lt;40&gt;;
    738      vback-porch = &lt;21&gt;;
    739      vfront-porch = &lt;7&gt;;
    740      hsync-len = &lt;60&gt;;
    741      vsync-len = &lt;10&gt;;
    742      linux,phandle = &lt;&amp;timing3&gt;;
     604 * [http://dev.gateworks.com/datasheets/AUOG101EVN01.0_Datasheet.pdf AUO G101EVN01.0 datasheet]
     605 * 1280x800 active pixels (6.5.1 Timing Characteristics)
     606 * pixclock = (1/68.93MHz)*(1000000) = 14507 (68.93MHz is from typical clock frequency specified in 6.5.1 Timing Characteristics)
     607
     608We would add an additional device-tree node to {{{display-timings}}} in arch/arm/boot/dts/imx6qdl-gw53xx.dtsi (to add it to the GW53xx - add it to the other board dtsi files as needed)
     609{{{
     610timing3: g101evn010 {
     611     clock-frequency = <68930000>;
     612     hactive = <1280>;
     613     vactive = <800>;
     614     hback-porch = <220>;
     615     hfront-porch = <40>;
     616     vback-porch = <21>;
     617     vfront-porch = <7>;
     618     hsync-len = <60>;
     619     vsync-len = <10>;
     620     linux,phandle = <&timing3>;
    743621};
    744 </pre><ul><li>Note that 'timing3' needs to be unique from the other timings already defined
    745 </li><li>Note the 'linux,phandle' property that needs to reference itself (timing3 in this example). This is un-conventional but necessary in order for the Ventana U-Boot bootloader to adjust the 'native-timing' property to match (case-insenstive) the display named 'G101EVN010' in this example based on the env variable.
    746 </li></ul><p>
    747 Now, after our kernel device-tree is built and updated on our target board we can set the <tt>display</tt> variable as follows:
    748 </p>
    749 <div class="code"><pre>Ventana &gt; setenv display G101EVN010; saveenv; reset
    750 </pre></div><p>
     622}}}
     623 * Note that 'timing3' needs to be unique from the other timings already defined
     624 * Note the 'linux,phandle' property that needs to reference itself (timing3 in this example). This is un-conventional but necessary in order for the Ventana U-Boot bootloader to adjust the 'native-timing' property to match (case-insenstive) the display named 'G101EVN010' in this example based on the env variable.
     625
     626Now, after our kernel device-tree is built and updated on our target board we can set the {{{display}}} variable as follows:
     627{{{#!bash
     628Ventana > setenv display G101EVN010; saveenv; reset
     629}}}
     630
    751631To verify the device tree has the correct information once the board is booted, browse through the directory structure for the display-timings, and you should see your display:
    752 </p>
    753 <pre class="wiki">root@ventana:~# ls /proc/device-tree/soc/aips-bus\@02000000/ldb\@020e0008/lvds-channel\@0/display-timings/
     632{{{
     633root@ventana:~# ls /proc/device-tree/soc/aips-bus\@02000000/ldb\@020e0008/lvds-channel\@0/display-timings/
    754634dlc700ctp    dlc700jmgt4  dlc800figt3  hsd100pxn1   name         native-mode
    755 </pre><p>
     635}}}
     636
    756637Then, to verify the correct information, you can use something like the following command to see the values:
    757 </p>
    758 <pre class="wiki">root@ventana:~# hexdump -C /proc/device-tree/soc/aips-bus\@02000000/ldb\@020e0008/lvds-channel\@0/display-timings/dlc700ctp/hactive
     638{{{
     639root@ventana:~# hexdump -C /proc/device-tree/soc/aips-bus\@02000000/ldb\@020e0008/lvds-channel\@0/display-timings/dlc700ctp/hactive
    75964000000000  00 00 03 20                                       |... |
    76064100000004
    761 </pre><p>
     642}}}
     643
    762644The hex value of 0x0320 is decimal 800, which is correct for this example, of a horizontal active resolution of 800 pixels.
    763 </p>
    764 <p>
     645
    765646If your display has a touch-screen controller you need to add support for that separately which typically involves enabling a driver and adding a device-tree binding for that driver (not described here).
    766 </p>
    767 }}}