Kontron KTAM3874-pITX User Manual

KTAM3874/pITX
KTD-S0057-I
The pulse of innovation
User Information
» Table of Contents «
1 User Information .............................................................................1
1.1 About This Document.................................................................................................... 1
1.2 Copyright Notice.......................................................................................................... 1
1.3 Trademarks................................................................................................................. 1
1.4 Standards................................................................................................................... 1
1.5 Warranty .................................................................................................................... 1
1.6 Life Support Policy ....................................................................................................... 2
1.7 Technical Support ........................................................................................................ 2
2 U-Boot Setup ..................................................................................3
2.1 Setup Command .......................................................................................................... 3
2.2 Setup Usage................................................................................................................ 3
2.3 Display Menu .............................................................................................................. 4
2.3.1 Boot Display .............................................................................................................................4
2.3.2 Mirror Mode.............................................................................................................................. 4
2.3.3 LCD Panel Resolution.................................................................................................................. 5
2.3.4 LCD Panel Mapping ....................................................................................................................5
2.3.5 Backlight Output Control............................................................................................................. 5
2.3.6 Backlight Output Level ...............................................................................................................5
2.3.7 Backlight Brightness.................................................................................................................. 5
2.4 Devices Menu .............................................................................................................. 6
2.4.1 mPCI Express® Port .................................................................................................................... 6
2.4.2 Audio Device............................................................................................................................. 6
2.4.3 LAN Devices.............................................................................................................................. 6
2.4.4 S-ATA® Device........................................................................................................................... 6
2.4.5 CAN Port 0................................................................................................................................ 7
2.4.6 CAN Port 1................................................................................................................................ 7
2.4.7 UART Port 5 ..............................................................................................................................7
2.4.8 First GPIO Port .......................................................................................................................... 7
2.4.9 Second GPIO Port....................................................................................................................... 7
2.5 Password Command...................................................................................................... 8
2.6 Defaults Command ....................................................................................................... 8
2.7 Save Command ............................................................................................................ 9
2.8 Summary Command...................................................................................................... 9
2.9 ShowDID Command ...................................................................................................... 9
3 U-Boot Environment....................................................................... 10
KTAM3874/pITX Software Guide
User Information
4 VESA® DisplayIDTM.......................................................................... 12
4.1 LCD/LVDS Technology Overview .....................................................................................12
4.1.1 Detailed Timing Descriptor ........................................................................................................ 12
4.1.2 24 Bit Color Mapping Tips.......................................................................................................... 14
4.2 EDID 1.3 Specification (VESA®) ......................................................................................15
4.3 DisplayID
4.3.1 DisplayIDTM Parameter Summary ................................................................................................. 15
4.3.2 DisplayIDTM Restrictions ............................................................................................................ 16
4.3.3 LCD Panel Selection ................................................................................................................. 16
4.3.4 DisplayID
4.3.5 Building DisplayIDTM File ........................................................................................................... 18
4.3.6 Erasing DisplayIDTM Record ........................................................................................................ 18
4.3.7 U-Boot EEPROM Update Tool ...................................................................................................... 18
TM
Specification (VESA
TM
Windows
®
Tool ........................................................................................................ 17
®
)...................................................................................15
5 U-Boot Bootloader ......................................................................... 20
5.1 UART Bootloader ........................................................................................................20
5.2 Ethernet Bootloader....................................................................................................22
5.3 SPITM Bootloader.........................................................................................................23
5.4 MMC Bootloader .........................................................................................................25
6 DebianTM Linux® BSP ....................................................................... 26
6.1 User Login Arguments..................................................................................................26
6.2 Video Decoding ..........................................................................................................26
6.3 Audio Support ............................................................................................................26
6.4 KEAPI Interface ..........................................................................................................26
6.5 CAN Bus Utilities (SocketCAN) .......................................................................................27
6.6 S-ATA® Interface.........................................................................................................27
6.7 Suspend Mode............................................................................................................27
6.8 Screensaver ...............................................................................................................27
6.9 Sysfs Support .............................................................................................................28
7 Ethernet Switch ............................................................................. 29
8 Kernel Boot from SPITM Flash ............................................................ 30
9 Root File System Boot from S-ATA® Drive............................................. 31
10 Linux® Programming Examples (DebianTM) .......................................... 32
10.1 TI® AM3874 Register Access ..........................................................................................32
10.1.1 Register Access Restrictions....................................................................................................... 34
10.2 SPITM Interface Examples ..............................................................................................35
10.2.1 SPITM Loopback Test Utility ........................................................................................................ 35
10.2.2 SPITM Display Interface.............................................................................................................. 39
KTAM3874/pITX Software Guide
User Information
10.3 I
10.3.1 I
10.3.2 I
2CTM
Interface Examples...............................................................................................42
2CTM
Detection Utility............................................................................................................... 42
2CTM
Display Interface .............................................................................................................. 48
10.4 UART Interface Examples ..............................................................................................51
10.4.1 UART Loopback Test Utility ........................................................................................................ 51
10.4.2 UART Display Interface ............................................................................................................. 53
10.5 Timer Example............................................................................................................55
10.6 GPIO Example.............................................................................................................60
10.7 Watchdog Example ......................................................................................................69
10.8 CAN Bus Examples .......................................................................................................71
10.8.1 CAN Loopback Test Utility.......................................................................................................... 71
10.8.2 Single CAN Controller Usage ...................................................................................................... 78
10.8.3 CAN Wiring ............................................................................................................................. 79
10.9 Backlight Example ......................................................................................................80
10.10 RS485 Interface Example..............................................................................................83
10.11 Sound Programming with ALSA......................................................................................88
10.12 Graphic Programming ................................................................................................116
10.12.1 X11TM ................................................................................................................................116
10.12.2 Cairo ................................................................................................................................140
10.12.3 GTK+ 3.x ...............................................................................................................................156
10.12.4 QtTM 4.8 ................................................................................................................................170
10.12.5 QtTM Quick 1.x / QML................................................................................................................211
10.13 Interprocess Communication (Root/User)...................................................................... 259
Appendix A: Linux® on microSDTM Card ....................................................... 273
A.1 UbuntuTM 12.04 LTS ...................................................................................................273
A.2 UbuntuTM 14.04 LTS ...................................................................................................277
Appendix B: User Space on Onboard Flash .................................................. 283
Appendix C: Reference Documents ............................................................ 288
Appendix D: Document Revision History ..................................................... 289
KTAM3874/pITX Software Guide
KTD-S0057-I Page 1 User Information
1 User Information
1.1 About This Document
This document provides information about products from KONTRON Technology A/S and/or its subsidiaries. No warranty of suitability, purpose or fitness is implied. While every attempt has been made to ensure that the information in this document is accurate the information contained within is supplied “as-is” - no liability is taken for any inaccuracies. Manual is subject to change without prior notice. KONTRON assumes no responsibility for the circuits, descriptions and tables indicated as far as patents or other rights of third parties are concerned.
1.2 Copyright Notice
Copyright © 2013-2014, KONTRON Technology A/S, ALL RIGHTS RESERVED. No part of this document may be reproduced or transmitted in any form or by any means, electronically or mechanically, for any purpose without the express written permission of KONTRON Technology A/S.
1.3 Trademarks
Brand and product names are trademarks or registered trademarks of their respective owners.
1.4 Standards
KONTRON Technology A/S is certified to ISO 9000 standards.
1.5 Warranty
This product is warranted against defects in material and workmanship for the warranty period from the date of shipment. During the warranty period KONTRON Technology A/S will at its discretion decide to repair or replace defective products. Within the warranty period the repair of products is free of charge as long as warranty conditions are observed. The warranty does not apply to defects resulting from improper or inadequate maintenance or handling by the buyer, unauthorized modification or misuse, operation outside of the product’s environmental speci­fications or improper installation or maintenance. KONTRON Technology A/S will not be responsible for any defects or damages to third party products that are caused by a faulty KONTRON Technology A/S product.
KTAM3874/pITX Software Guide
KTD-S0057-I Page 2 User Information
1.6 Life Support Policy
KONTRON Technology's products are not for use as critical components in life support devices or systems without express written approval of the general manager of KONTRON Technology A/S. As used herein: Life support devices or systems are devices or systems which a) are intended for surgical implant into body or b) support or sustain life and whose failure to perform, when properly used in accordance with instructions for use provided in the labelling, can be reasonably expected to result in significant injury to the user. A critical component is any component of a life support device or system whose failure to perform can be reasonably expected to cause the failure of the life support device or system or to affect its safety or effectiveness.
1.7 Technical Support
Please consult our web site at http://www.kontron.com/support for the latest product documentation, utilities, drivers and support contacts
or use the special e-mail address sbc-support@kontron.com for a technical problem. In any case you can always contact your board supplier for technical support. Before contacting support please be prepared to provide as much information as possible: Board identification:
System environment:
Type Part number (find PN on label) Serial number (find SN on label)
O/S type and version Driver origin and version Attached hardware (drives, USB devices, LCD panels ...)
KTAM3874/pITX Software Guide
KTD-S0057-I Page 3 U-Boot Setup
2 U-Boot Setup
The sense of a special Setup part is to avoid expendable changes in the proper operating systems. The
®
Setup entries are valid for all supported operating systems (e.g. Linux
®
bedded Compact). For example if you switch from Linux
to AndroidTM or vice versa in the ideal case no changes will be necessary. The Setup data records are stored in a non-volatile memory (EEPROM) and not in an erasable script. A possible password input protects from unauthorized access. The KONTRON Setup provides two configurable main menus:
display
devices
The display menu allows to define one or more boot displays, resolution and mapping of a LCD panel and backlight parameters. The
devices part involves some hardware device settings, e.g. audio controller
enabled or disabled.
ATTENTION
Only the original KONTRON BSPs guarantee the realization of the U-Boot Setup features.
, AndroidTM and Windows® Em-
2.1 Setup Command
For a help screen type the command without an argument
setup
Now you can see all the supported sub-commands (menus). Normally the following entries are displayed
display display settings
devices onboard device configuration
password password input
defaults reset all settings to the default values
summary show all actual settings
save save all settings to EEPROM
showdid show the DisplayIDTM settings
Syntax example: setup display <Enter>
2.2 Setup Usage
After the execution of a sub-command (e.g. setup devices) the selection of a submenu only requires a numeric value. Thereafter the real settings are visible. Now you can choose between an alphanumeric (default) or a numeric input. The alphanumeric presentation illustrates intuitive the right choice. If you favor the numeric input delete all chars with the <Backspace> key, type the number and then press the <Enter> key. After the completion of all changes it is reasonable to control the settings with the summary command. Syntax:
setup summary <Enter>
KTAM3874/pITX Software Guide
KTD-S0057-I Page 4 U-Boot Setup
2.3 Display Menu
This menu part includes several display settings:
First boot display
Second boot display
Boot display mirror mode
LCD panel resolution
LCD panel mapping
Backlight output control
Backlight enable level
Backlight brightness
2.3.1 Boot Display
The TI® AM3874 implies a graphics subsystem with two independent HD display controllers. Without a restriction (except duplicate usage but 'none' on both settings is possible) each controller interface can be configured as:
none switch off the display controller
lcd
hdmi
Examples:
First boot display hdmi Second boot display none
or
First boot display none Second boot display lcd
or
First boot display hdmi Second boot display lcd
or
First boot display lcd Second boot display hdmi
2.3.2 Mirror Mode
This feature is only meaningful if both boot displays are active. In enabled state always the first boot display determines the real resolution. In this case it would be advisable to use the LCD panel (setting
'lcd') as first boot display. If mirror mode is disabled the second boot display remains black but it can be used with custom programs.
KTAM3874/pITX Software Guide
KTD-S0057-I Page 5 U-Boot Setup
2.3.3 LCD Panel Resolution
You have the choice to select a panel resolution with a fixed timing or a special setting 'auto' for a free
®
definable timing based on the VESA
®
chapter 'VESA
DisplayIDTM'. The KTAM3874/pITX supports following resolutions:
auto free timing based on VESA® DisplayIDTM
vga fixed timing 640x480 pixel, 18 bit color depth, single channel
wvga fixed timing 800x480 pixel, 18 bit color depth, single channel
svga fixed timing 800x600 pixel, 18 bit color depth, single channel
xga fixed timing 1024x768 pixel, 24 bit color depth, single channel
sxga fixed timing 1280x1024 pixel, 24 bit color depth, dual channel
uxga fixed timing 1600x1200 pixel, 24 bit color depth, dual channel
fullhd fixed timing 1920x1080 pixel, 24 bit color depth, dual channel
DisplayIDTM specification. For further details about DisplayIDTM see the
2.3.4 LCD Panel Mapping
There are two interface modes existing at 24-bit color depth: FPDI (Flat Panel Display Interface) or LDI
VDS Display Interface). For 18-bit color depth this setting has no validity. More information can be found
(L
®
in chapter ' VESA
DisplayIDTM/24 Bit Color Mapping Tips'.
fpdi
ldi
2.3.5 Backlight Output Control
Almost all LCD panels support either analog or PWM backlight brightness, therefore two options are avail­able.
analog
pwm frequency approx. 600 Hz
2.3.6 Backlight Output Level
Some backlight inverters need a low level for the enable signal, other inverters a high level. Use this submenu to configure the right enable output level.
low voltage = 0V
high voltage = +3.3V
2.3.7 Backlight Brightness
This submenu allows the definition of the analog backlight brightness (voltage range: 0V to +5V). The input format is represented by a decimal number with maximal three digits.
KTAM3874/pITX Software Guide
KTD-S0057-I Page 6 U-Boot Setup
Examples:
Brightness: 0 minimal value = 0V
or
Brightness: 255 maximal value = +5V
2.4 Devices Menu
This menu part defines several hardware device settings:
mPCIe port settings
Audio settings
LAN ports settings
SATA settings
CAN port 0 settings
CAN port 1 settings
UART port 5 settings
First GPIO port settings
Second GPIO port settings
2.4.1 mPCI Express® Port
The selection is limited to the enable respectively disable feature.
disabled
enabled
2.4.2 Audio Device
The selection is limited to the enable respectively disable feature.
This setting only concerns the audio codec and not the HDMI® audio part.
Note:
disabled
enabled
2.4.3 LAN Devices
The selection is limited to the enable respectively disable feature.
This setting affects both LAN controllers.
Note:
disabled
enabled
2.4.4 S-ATA® Device
The selection is limited to the enable respectively disable feature.
disabled
enabled
KTAM3874/pITX Software Guide
KTD-S0057-I Page 7 U-Boot Setup
2.4.5 CAN Port 0
The selection is limited to the enable respectively disable feature.
disabled
enabled
2.4.6 CAN Port 1
The selection is limited to the enable respectively disable feature.
disabled
enabled
2.4.7 UART Port 5
You can choose between three modes:
rs232
rs422
rs485
2.4.8 First GPIO Port
All interface signals can be defined as GPIOs (General Purpose Input Output) or some special signals have another function (Timer 4 to 7). For a detailed overview about these signals see the KTAM3874/pITX User's Guide chapter 'Digital I/O Interface'. The signals are named GPIO21 to 24.
the operating systems do not support these special functions because the possible applications can
Note:
be too different. The main menu shows following options:
Multiplexed GPIO/TIMER4+6 part
The submenu allows the selection between:
Multiplexed GPIO/TIMER5+7 part
gpio
timer
2.4.9 Second GPIO Port
All interface signals can be defined as GPIOs (General Purpose Input Output) or some special signals have another function (UART2, UART4 or SPI3). For a detailed overview about these signals see the KTAM3874/ pITX User's Guide chapter 'Digital I/O Interface'. The signals are named GPIO12 to 18 resp. GPIO4 to 7. The main menu shows following options:
Multiplexed GPIO/UART2 part
Multiplexed GPIO/UART4 part
Multiplexed GPIO/SPI3 part
KTAM3874/pITX Software Guide
KTD-S0057-I Page 8 U-Boot Setup
The submenu for UART2 and UART4 allows the selection between:
gpio
uart
and the submenu for SPI3:
gpio
spi
2.5 Password Command
If you want to control the access to the Setup settings it is possible to use a password protection. Maximal eight alphanumeric chars, numbers or special characters are admissible. You can delete an old password respectively cancel the password protection with the input of an empty string. Syntax:
Example:
New password: ******** e.g. 12%&fgWQ Verify password: ******** the same input
setup password <Enter>
2.6 Defaults Command
In some cases it can be useful to reset quickly the Setup settings. For an example there is a problem with driving of a single Syntax:
First boot display hdmi Second boot display none Boot display mirror mode enabled LCD panel resolution auto LCD panel mapping fpdi Backlight output control pwm Backlight enable level high Backlight brightness 128 mPCI Express interface enabled Audio interface enabled LAN interfaces enabled SATA interface enabled CAN interface 0 enabled CAN interface 1 enabled UART interface 5 rs232 GPIO/TIMER4+6 interface gpio GPIO/TIMER5+7 interface gpio GPIO/UART2 interface gpio GPIO/UART4 interface gpio GPIO/SPI3 interface gpio
setup defaults <Enter>
display - preferably a LCD panel - and the connection of a HDMI® monitor is possible.
KTAM3874/pITX Software Guide
KTD-S0057-I Page 9 U-Boot Setup
2.7 Save Command
This is one of the most important sub-commands. Without this calling all Setup changes are lost after power off. The save instruction writes the temporary Setup settings into the non-volatile memory device (EEPROM). Syntax:
setup save <Enter>
2.8 Summary Command
This Setup command gives a quick overview about all actual settings. Syntax:
Example:
DISPLAY PART: First boot display : hdmi Second boot display : lcd Boot display mirror mode : enabled LCD panel resolution : sxga LCD panel mapping : ldi Backlight output control : pwm Backlight enable level : high Backlight brightness : 255
DEVICES PART: mPCI Express interface : enabled Audio interface : disabled LAN interfaces : enabled SATA interface : disabled CAN interface 0 : enabled CAN interface 1 : enabled UART interface 5 : rs485 GPIO/TIMER4+6 interface : gpio GPIO/TIMER5+7 interface : gpio GPIO/UART2 interface : uart GPIO/UART4 interface : gpio GPIO/SPI3 interface : gpio
setup summary <Enter>
2.9 ShowDID Command
The showdid command provides the necessary information for checking the DisplayIDTM values. Some addi­tional messages are possible, for example:
No DisplayID record present ! ATTENTION: DisplayID record is not activated !
Syntax: setup showdid <Enter>
KTAM3874/pITX Software Guide
KTD-S0057-I Page 10 U-Boot Environment
Example:
DisplayID data:
----------------------------
Type I Timing Data Block Pixel clock : 83500000 Hz Horizontal active : 1280 clocks Horizontal sync start : 1430 clocks Horizontal sync end : 1530 clocks Horizontal total : 1680 clocks Horizontal sync pol. : positive Vertical active : 800 lines Vertical sync start : 815 lines Vertical sync end : 816 lines Vertical total : 831 lines Vertical sync pol. : positive Display Device Data Block Color depth : 24 bit Display Interface Data Block Number of channels : 1 Color mapping : FPDI
3 U-Boot Environment
You can use the U-Boot environment to configure the behavior of U-Boot as you like. Default settings:
autoload=yes baudrate=115200 bootcmd=run sdboot;run mmcboot;run spiboot;ru n nfsboot bootdelay=3 bootfile=uImage bootmmc=setenv root_bootargs root=/dev/mmcblk${device}p${rootpart} rw rootwait;setenv interface mmc; mmc rescan ${device} && run fsdetect
cpuspeed=cpu_maxfreq=800 cputype=AM3874
debug_bootargs=earlyprink default_bootargs=console=ttyO0,115200n8 vram=50M notifyk.vpssm3_sva=0xBF900000 ti814xfb.vram=0:16M,1:16M noinitrd --no-log doboot=run setmemarg;run loadscript;run setbootarg;run loadkernel;
ethaddr=xx:xx:xx:xx:xx:xx eth1addr=xx:xx:xx:xx:xx:xx ethact=cpsw extra_bootargs=bootdisp1=hdmi bootdisp2=none mirrordisp=1 pcie=1 audio=1 lan=1 sata=1 can0=1 can1=1 uart5_mode=rs232 tm46_enable=0 tm57_enable=0 uart2_enable=0 uart4_enable=0 spi3_enable=0
fsdetect=setenv fsloader ext2load ${interface} ${device};fatinfo ${interface} ${device} && setenv fsloader fatload ${interface} ${device};run doboot
lcdmode=0,0,0,0,0,0,0
loadaddr=0x80009000 loadkernel=${fsloader} ${loadaddr} ${bootfile} && bootm ${loadaddr} loadscript=${fsloader} ${scriptaddr} ${scriptfile} && source ${scriptaddr} mmcboot=setenv device 1; setenv rootpart 1; run bootmmc
memsize=2048
nfsboot=setenv autoload no; dhcp;sete nv root_bootargs root=/dev/nfs ${nfsroot} ip=${ipaddr}:${serverip}:${gatewayip}: ${netmask}:${hostname}:eth0:off;setenv f sl oader tftp;run doboot; nfsroot=nfsroot=192.168.1.1:/nfsroot
KTAM3874/pITX Software Guide
KTD-S0057-I Page 11 U-Boot Environment
ramdisk_file=ramdisk.gz rootpart=2 scriptaddr=0x80900000 scriptfile=boot.scr sdboot=setenv device 0; setenv rootpart 2; run bootmmc setbootarg=setenv lcd_bootargs lcdmode=${lcdmode} videomode=${videomode};setenv bootargs ${default_bootargs} ${lowmem} ${highmem} ${debug_bootargs} ${root_bootargs} ${lcd_bootargs} ${extra_bootargs} ${cpuspeed} eth0=${ethaddr} eth1=${eth1addr} setmemarg=setenv lowmem mem=417M;test ${cputype} = DM8148 && setenv lowmem mem=364M;setenv highmem mem=320M@0x9FC00000;test ${memsize} = 2048 && setenv highmem ${highmem} mem=1023M@0xC0000000; setenv highmem ${highmem} vmalloc=512M spiboot=setenv root_bootargs root=/dev/mmcbl k0p${rootpart} rw rootwait;run setbootarg;sf probe 0 && sf read ${load ad d r } 0xE2000 0x31E000 && bootm ${loadaddr} verify=yes
videomode=25180000,640,656,752,800,480,490,492,525,0,1,1
ATTENTION
Do not change the arguments in red color because U-Boot generates these parameters itself.
The U-Boot command 'printenv' lists all variables, 'setenv' modifies the values and 'saveenv' stores the new environment.
KTAM3874/pITX Software Guide
KTD-S0057-I Page 12 VESA® DisplayIDTM
4 VESA
®
DisplayIDTM
4.1 LCD/LVDS Technology Overview
4.1.1 Detailed Timing Descriptor
The input fields Pixel Clock, Horizontal Active, Horizontal Blank, Horizontal Sync Offset, Horizontal Sync Width, Vertical Active, Vertical Blank, Vertical Sync Offset and Vertical Sync Width must be filled in with the correct values according to the panel’s data sheet. In many cases the value for Horizontal/Vertical Blank cannot be read directly from the data sheet. Instead terms such as Display Period (active pixels/lines) or Horizontal/Vertical Total appear. In this case the following calculation can be made:
Blank Value = Total Value – Active Value.
Sometimes the datasheet does not specify Sync Offset and/or Sync Width. In this case the permissible values can only be determined through testing. However the rule is:
The sum of Sync Offset and Sync Width must not exceed the value for Horizontal/Vertical Blank.
Also datasheets are often different for displays with double pixel clock. If Pixel Clock and Horizontal Values seem to be halved this must be corrected for input:
The values must always be entered as though it were a panel with single pixel clock.
Example 1:
PRIMEVIEW PM070WL4 (single pixel clock) Data sheet specifications: Clock Frequency [typ.] 32 MHz HSync Period [typ.] 1056 Clocks (equivalent to Horizontal Total) HSync Display Period [typ.] 800 Clocks (equivalent to Horizontal Active) HSync Pulse Width [typ.] 128 Clocks HSync Front Porch [typ.] 42 Clocks HSync Back Porch [typ.] 86 Clocks VSync Period [typ.] 525 Lines (equivalent to Vertical Total) VSync Display Period 480 Lines (equivalent to Vertical Active) VSync Pulse Width [typ.] 2 Lines VSync Front Porch [typ.] 10 Lines VSync Back Porch [typ.] 33 Lines
Result:
Pixel Clock 32 Horizontal Active 800 Horizontal Blank 256 ((128 + 42 + 86) H. Pulse Width + H. Front Porch + H. Back Porch) Horizontal Sync Offset 42 (H. Front Porch) Horizontal Sync Width 128 (H. Pulse Width) Vertical Active 480 Vertical Blank 45 ((2 + 10 + 33) V. Pulse Width + V. Front Porch + V. Back Porch) Vertical Sync Offset 10 (V. Front Porch) Vertical Sync Width 3 (V. Pulse Width)
KTAM3874/pITX Software Guide
KTD-S0057-I Page 13 VESA® DisplayIDTM
Example 2:
SHARP LQ190E1LW01 (double pixel clock) Data sheet specifications (no definition of Sync Offset and Sync Width): Clock Frequency [typ.] 54 MHz Horizontal Period (1) [typ.] 844 Clocks (equivalent to Horizontal Total) Horizontal Display Period 640 Clocks (equivalent to Horizontal Active) Vertical Period [typ.] 1066 Lines (equivalent to Vertical Total) Vertical Display Period 1024 Lines (equivalent to Vertical Active)
Result:
Pixel Clock 108 (2 x 54 MHz) Horizontal Active 1280 (2 x 640 Clocks) Horizontal Blank 408 ((844 – 640) x 2 Clocks) Horizontal Sync Offset 45 (normally approx. 10 – 15 % of Horizontal Blank) Horizontal Sync Width 140 (normally approx. 30 – 70 % of Horizontal Blank) Vertical Active 1024 Vertical Blank 42 (1066 – 1024 Lines) Vertical Sync Offset 1 (normally approx. 1 – 3 Lines) Vertical Sync Width 3 (normally approx. 1 – 15 Lines)
Example 3:
LG-PHILIPS LM170E01-TLA1 (double pixel clock) Data sheet specifications: Clock Frequency [typ.] 54 MHz Hsync Period [typ.] 844 Clocks Horiz. Valid [typ.] 640 Clocks Horiz. Back Porch [typ.] 124 Clocks Horiz. Front Porch [typ.] 24 Clocks Vsync Period [typ.] 1066 Lines Vert. Valid [typ.] 1024 Lines Vert. Back Porch [typ.] 38 Lines Vert. Front Porch [typ.] 1 Line
Result:
Pixel Clock 108 (2 x 54 MHz) Horizontal Active 1280 (2 x 640 Clocks Horizontal Addr. Time) Horizontal Blank 408 ((844 – 640) x 2 Clocks) Horizontal Sync Offset 48 (2 x 24 Clocks Horizontal Front Porch) Horizontal Sync Width 112 (((408/2 – 124 – 24) x 2) H. Blank – H. Back Porch – H. Front Porch) Vertical Active 1024 (Vertical Addr. Time) Vertical Blank 42 (1066 – 1024 Lines) Vertical Sync Offset 1 (Vertical Front Porch) Vertical Sync Width 3 (Vertical Blank – Vertical Back Porch – Vertical Front Porch)
The following picture shows the typical video timing.
Timing Parameter Definitions
Blanking
Active Part
Blanking
H-/V-Video
Front Porch
H-/V-Sync
Sync Pulse Width
pos. Sync
neg. Sync
Back Porch
Address Time
Total
KTAM3874/pITX Software Guide
Front Porch
Sync Pulse Width
pos. Sync
neg. Sync
Back Porch
KTD-S0057-I Page 14 VESA® DisplayIDTM
4.1.2 24 Bit Color Mapping Tips
The double pixel clock or 24-bit color depth can generally be taken from the datasheet. There are two interface modes existing at 24-bit color depth: FPDI (F
nterface). Some panels use the line SELL LVDS (SELect Lvds data order). The LVDS data assignment in the
I
lat Panel Display Interface) or LDI (LVDS Display
datasheet can give you an indication by the last channel (e.g. RX3/TX3 – SELL LVDS = low) wether it is a LDI panel (contains the lowest bits).
Example:
FPDI data assignment (LVDS channel 3 even or odd): Tx/Rx27 Red 6 (e.g. even: RE6 or ER6) Tx/Rx5 Red 7 Tx/Rx10 Green 6 (e.g. even: GE6 or EG6) Tx/Rx11 Green 7 Tx/Rx16 Blue 6 (e.g. even: BE6 or EB6) Tx/Rx17 Blue 7 Tx/Rx23 not used
LDI data assignment (LVDS channel 3 even or odd): Tx/Rx27 Red 0 (e.g. even: RE0 or ER0) Tx/Rx5 Red 1 Tx/Rx10 Green 0 (e.g. even: GE0 or EG0) Tx/Rx11 Green 1 Tx/Rx16 Blue 0 (e.g. even: BE0 or EB0) Tx/Rx17 Blue 1 Tx/Rx23 not used
TxClk
TxOut0
G0
R5
R4
R3
R2 R1
R0
FPDI
TxOut1
TxOut2
B1
DE
B0
VS
G5 G4 G3 G2 G1
HS
B5
B4
B3
B2
TxOut3
B7
B6
G7 G6 R7
R6
t
cycle
LDI
TxClk
TxOut0
TxOut1
G2 R7 R6 R5
B3
R4
R3
R2
G3G4G5G6G7B2
TxOut2
TxOut3
DE VS HS B7 B6 B5
B1
B0 G1 G0
R1
B4
R0
KTAM3874/pITX Software Guide
KTD-S0057-I Page 15 VESA® DisplayIDTM
4.2 EDID 1.3 Specification (VESA
®
)
The EDID (Extended Display Identification Data) record has a fixed structure. The first 8 bytes contain the distinctive identification 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00. The end of the record is marked by the checksum (1 byte). The result of the addition of all bytes including the checksum has to be zero. For a comprehensive support of the majority of available panels you don't need all fields of the EDID record. The Detailed Timing Descriptor (18 bytes) is the most important field. No 24bit panels (FPDI/LDI) are supported though. This means EDID should only be used for 18bit panels.
®
For further information please consult the official EDID specification from the VESA
comitee which has to
be payed.
4.3 DisplayID
TM
Specification (VESA®)
Intended as a replacement for all previous EDID versions DisplayIDTM contains many new features. It's a structure with several well defined elements (tags). Not every element that is listed in the specification has to be part of the resulting data set (basic section). KONTRON has decided to use this selection of tags (mandatory presence).
Tag Description
0x00 Product Identification Data Block (Vendor ID, Product Code, Manufacturing Date ...)
0x03 Type I Detailed Timing Data Block (Pixel Clock, Horizontal/Vertical Data ...)
0x0C Display Device Data Block (Device Technology, Operating Mode, Color Depth ...)
0x0D Interface Power Sequencing Data Block (Power On/Off Timing)
0x0F Display Interface Data Block (Interface Type, Interface Attribute ...)
4.3.1 DisplayIDTM Parameter Summary
Only a part of the parameters used in the DisplayIDTM Windows® tool are interpreted by a specific board. The following table shows a summary of the used parameters (valid for KTAM3874/pITX).
Group Parameter Comment
Type I Timing Pixel Clock
Type I Timing Horizontal Active
Type I Timing Horizontal Blank
Type I Timing Horizontal Sync Offset Front porch
Type I Timing Horizontal Sync Width
Type I Timing Vertical Active
Type I Timing Vertical Blank
Type I Timing Vertical Sync Offset Front porch
Type I Timing Vertical Sync Width
Display Interface 1 Bits per Pixel Color depth (18 or 24bit)
Display Interface 1 Pixel per Clock Single or dual channel
Display Interface 1 24 Bit Color Mapping FPDI or LDI
KTAM3874/pITX Software Guide
KTD-S0057-I Page 16 VESA® DisplayIDTM
4.3.2 DisplayIDTM Restrictions
Depending on the graphic controller not all features can be used. The following table shows the most im­portant restrictions.
Restrictions for KTAM3874/pITX
Variable power sequencing not supported
4.3.3 LCD Panel Selection
The choice of a LCD display is basically defined by two parameters.
Parameter Value
Pixel per Clock (Channels) 1 or 2
Pixel Clock Range 165 MHz
Currently this leads to a maximum resolution of
With TIs® graphic driver it is not guaranteed that every resolution can be achieved. KONTRON does not guarantee the correct function of the board for untypical resolution. In principal the use of DisplayID allows realizing every special display resolution. For this a valid DisplayID onboard EEPROM. Additionally the U-Boot Setup entry
setup display x submenu [3] x Set LCD panel resolution
must be set to auto.
1920 x 1080 Pixel
TM
dataset must be written to the
TM
KTAM3874/pITX Software Guide
KTD-S0057-I Page 17 VESA® DisplayIDTM
4.3.4 DisplayIDTM Windows® Tool
The DisplayIDTM parameter can be modified with the DisplayIDTM Windows® tool.
For an example the following picture shows the input fields for the Detailed Timing parameters.
For more information see the documentation of the DisplayID
kontron.com).
KTAM3874/pITX Software Guide
TM
tool (software can be downloaded from
KTD-S0057-I Page 18 VESA® DisplayIDTM
TM
The DisplayID
isplayIDTM Data). This file format cannot be used to program the onboard EEPROM.
tron D
Editor saves the parameters in a intermediate file format. The file extension is 'KDD' (Kon-
For transferring this file format into the binary file format for the EEPROM apply the Converter.
4.3.5 Building DisplayIDTM File
Start the Windows® tool DisplayID.exe.
Use the Editor if you want to modify an existing DisplayIDTM file or select New to create a
complete new record.
Change respectively enter new parameters.
Save the parameters in a file with the extension 'KDD'.
Open the saved 'KDD'-file using the Converter.
Save the binary file with the extension 'KDB' (Kontron DisplayIDTM Binary).
Program the onboard EEPROM using the board specific update tool.
4.3.6 Erasing DisplayIDTM Record
Create a dummy file with a size of 128 bytes filled with the value 0xFFh and program this file using the U-
TM
Boot update tool. This treatment deletes a valid DisplayID
record.
4.3.7 U-Boot EEPROM Update Tool
The update tool is a new component of the U-Boot bootloader. You need two commands to program a
TM
DisplayID
file into the EEPROM:
ext2load, fatload, loadb or loady
writedid
File Operation
The following example gives an overview:
TM
The storage medium is a microSD is located in the root directory. The file size of wvga.kdb amounts 81 bytes. For loading the file into memory type the following standard U-Boot command lines
mmc rescan 0 ext2load mmc 0 81000000 wvga.kdb
The memory address (0x81000000) is free selectable. With the md command you can control the result md.b 81000000 80
Now you can load the memory content into the EEPROM. Type the new KONTRON U-Boot command writedid 81000000 51
The 'count' respectively the size argument is a very important parameter. Do not use another value as the
TM
file size of your DisplayID
file.
card formatted with a Linux® partition and the DisplayIDTM file wvga.kdb
KTAM3874/pITX Software Guide
KTD-S0057-I Page 19 VESA® DisplayIDTM
Serial Download
The following example demonstrates a serial download via the ymodem protocol: The KTAM3874/pITX board is connected to a desktop computer with a suitable terminal program (e.g. Hyper-Terminal or TeraTerm). The file size of wvga.kdb amounts 81 bytes. For downloading the file into memory type the following standard U-Boot command line
loady
Now U-Boot waits for reply. User input to the desktop terminal program starts the download session. After the download of wvga.kdb ends you can control the result with the
md.b 80009000 80
Now you can load the memory content into the EEPROM. Type the new KONTRON U-Boot command writedid 80009000 51
The 'count' respectively the size argument is a very important parameter. Do not use another value as the
TM
file size of your DisplayID
file.
The memory parameter of md.b and writedid depends on the environment entry loadaddr because
Note:
loady uses this definition as base address, for example if loadaddr equals 0x81000000 the new KONTRON U-
Boot command changes to
writedid 81000000 51
md command
KTAM3874/pITX Software Guide
KTD-S0057-I Page 20 U-Boot Bootloader
5 U-Boot Bootloader
TI® requires a two-part U-Boot version. The ROM code loads the first part (named U-Boot-MIN) into the on­chip prozessor RAM and starts automatically this part. After setting up the clocks and initializing all necessary peripherals U-Boot-MIN loads the final version. The KTAM3874/pITX board offers four different
TM
load mechanisms: SPI
(default, see chapter 'SPI
For development purposes the UART and Ethernet methods promise some advantages.
5.1 UART Bootloader
The first serial port (UART0) on connector J1304 provides the serial console interface. For communication a standard terminal program on a desktop computer is necessary (e.g. TeraTerm). The next line shows the default serial console settings:
The UART method strictly needs a jumper on pin header J1101 (see User's Guide chapter 'Serial Console'). After power on the following screen appears:
115 kBaud / 8 data bits / 1 stop bit / no parity
TM
Bootloader'), MMC, Ethernet and UART.
Now you have to select the XMODEM transfer mode.
KTAM3874/pITX Software Guide
KTD-S0057-I Page 21 U-Boot Bootloader
Note: Do not start the transmission before all eight C's are visible - otherwise the download can be confused.
Thereafter select the U-Boot-MIN file (normally named 'u-boot.min.uart') and immediately press the Reset button to start the download process.
The terminal program shows the following result:
Type 'loadb 81000000' at the 'TI-MIN#' prompt and press 'Enter'. Then choose the Kermit transfer mode.
KTAM3874/pITX Software Guide
KTD-S0057-I Page 22 U-Boot Bootloader
The next step is to load the final U-Boot version (normally named 'u-boot.bin'). This time the transfer starts automatically. The result looks as follows:
Now you can start the final U-Boot version with 'go 81000000'.
5.2 Ethernet Bootloader
For download over Ethernet you need a TFTP (Trivial File Transfer Protocol) server with DHCP ability.
Use only the first Ethernet port (J1600).
Note:
Some preference changes are necessary:
This method strictly needs a jumper on pin header J1101 (see User's Guide chapter 'Serial
Console').
Rename the U-Boot-MIN file named 'u-boot.min.eth' in 'MLO'.
The ROM code tries first to load the U-Boot-MIN part over the serial interface but this approach fails. Afterwards the ROM code etablish the Ethernet connection and loads MLO and subsequently the real U­Boot version. As a result of the serial interface timeout the network connection is rather slowly.
Copy 'MLO' and u-boot.bin' into the same directory.
KTAM3874/pITX Software Guide
KTD-S0057-I Page 23 U-Boot Bootloader
5.3 SPI
TM
Bootloader
This chapter describes the programming of the SPITM flash with the serial interface. Alternative you can load
TM
both U-Boot versions for example from the microSD
Assumption:
the default boot order is active (SPITM flash first boot device).
card.
The picture shows the fixed address ranges within the SPITM flash.
After power on U-Boot starts from SPITM. Hit any key to stop the autoboot process. As a first step you should
TM
erase the bootloader part of the SPI
flash with the following commands:
sf probe 0:0
sf erase 0 60000
Thereafter type 'loadb 81000000' at the 'KTAM3874#' prompt and press 'Enter'. Then choose the Kermit transfer mode. Before the download you can clear the memory with
mw.b 81000000 ff 20000
Load the U-Boot-MIN file (normally named 'u-boot.min.spi') and then type sf write 81000000 0 20000
KTAM3874/pITX Software Guide
KTD-S0057-I Page 24 U-Boot Bootloader
Now the first update part is finished. For the second part type again 'loadb 81000000' at the 'KTAM3874#' prompt and press 'Enter'. Then choose the Kermit transfer mode. Before the download you can clear the memory with
mw.b 81000000 ff 40000
Load the real U-Boot file (normally named 'u-boot.bin') and then input with another offset and size sf write 81000000 20000 40000
After power off and power on U-Boot-MIN loads automatically the second part. No additional steps are necessary.
KTAM3874/pITX Software Guide
KTD-S0057-I Page 25 U-Boot Bootloader
5.4 MMC Bootloader
For booting from the microSDTM card you have to change some preferences:
Replug the boot order jumper to MMC x SPI x ... (see User's Guide chapter 'Boot Order').
Rename the U-Boot-MIN file named 'u-boot.min.sd' in 'MLO'.
Format the microSDTM card with FAT16 or FAT32 (Linux® partitions are not accepted). For
®
previous Linux Disk Storage Format Tool' otherwise the detection can fail.
You need an active FAT partition.
Note:
Copy 'MLO' and u-boot.bin' to the microSDTM card.
After power on U-Boot-MIN (MLO) loads automatically the second part.
formatted cards it would be advisable to use for example the 'HP® USB
KTAM3874/pITX Software Guide
KTD-S0057-I Page 26 DebianTM Linux® BSP
6 Debian
TM
Linux® BSP
6.1 User Login Arguments
For both, serial remote system or terminal root privileges with 'sudo', the arguments are the same (necessary input in green color):
ktam3874 login: ktam3874 Password: ktam3874
6.2 Video Decoding
The KTAM3874/pITX is not qualified for video decoding, the major focus lies on industrial applications. If you still want to apply a video player use
MPlayer ('sudo apt-get install mplayer'). Other deployable
programs (e.g. Totem Movie Player or SMPlayer, VLC does not work with the default settings) show strong dropouts. For measuring the graphics performance use the
glmark2-es2 benchmark.
6.3 Audio Support
If you have trouble with audio input/output please check the 'alsamixer' settings. Examples with the command line tool 'amixer':
First select a card with amixer -c KTAM3874 (WM8903 codec) or use amixer -c HDMI
®
(HDMI
For an overview type amixer contents
To change a value type e.g. amixer cset numid=27 on
You can find some audio files in the directory example
aplay login.wav.
monitor). Card names are readable in the directory /proc/asound/
/usr/share/sounds/. Play these files with the 'aplay' tool, for
6.4 KEAPI Interface
The menu item 'Applications x System Tools x KEAPI' offers the practical KEAPI GUI tool. A password is needed (default: mentation but rather hidden. The KEAPI GUI includes four important components: SerialBus, GPIO, Perf(ormance) and Misc(ellaneous).
TM
Three I2C
busses are selectable in the SerialBus tab:
For GPIO pin assignment see the KTAM3874/pITX User's Guide (chapter 'Digital I/O Interface'). The Perf tab only allows the switch between 600 and 800 MHz (all available frequencies are listed in the file '/sys/ devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies'). Finally the Misc tab includes the Watchdog and System State control (only RESTART possible - TURN OFF and HIBERNATE without function).
Kontron) - this information can also be detected in the 'Kontron EAPI for Linux' docu-
#0 for onboard devices. Normally the access to these devices should be avoided - further
information on request.
#1 for the HDMI
#2 provides free access to the I2C
®
DDC EEPROM. The graphic driver blocks the access.
TM
bus at J2105 (pins 3 and 4).
KTAM3874/pITX Software Guide
Loading...
+ 263 hidden pages