Embedded module TQMa6x - PTXdist Linux BSP documentation
How-to
Boot loader
Barebox
The TQMa6x modules are mainlined in barebox featuring device tree and SPL support.
Please note that TQ systems uses U-Boot for testing and verification. In case of differences in pin and clock configuration etc. please contact our technical support.
U-Boot
For details on using U-Boot see U-Boot Command Line Interface
Booting
The default environment is configured to try booting from SD / eMMC card and fall back to booting from net. You can set the environment variable bootcmd, to force either booting from net or from eMMC / SD card:
TQMa6Q[MBa6x] U-Boot > setenv bootcmd run netboot TQMa6Q[MBa6x] U-Boot > setenv bootcmd run mmcboot
Updating existing firmware over ethernet
In order to update existing firmware please have a look at our deployment section.
Devicetree fit image BSP Rev.0109
update to fit image
With BSP Rev.0109 fdt fit image was introduced, this image contains all devicetree blob files in one file.To select a specific configuration environment variable fitfdt_part By defailt U-Boot is configured for single devicetree. When fdt fit image should be used then U-Boot must be configured and updated as follows:
- set environment variable fdt_type from single to fit
setenv fdt_type fit
- set environment variable fitfdt_file from imx6q-mba6x.dtb to mba6-image-dtb.itb
setenv fdt_file mba6-image-dtb.itb
- save environment settings
saveenv
- set environment variable autoload to no
setenv autoload no
setenv
- set ip address manually or get the network configuration via dhcp
- set environment variable serverip to the ip address where your TFTP server is running
setenv serverip xxx.xxx.xxx.xxx
- run fdt update
run update_fdt
using fit image
These scripts load the files from the configured tftp server. You need a working network connection.
To update parts of the U-Boot environment or the Device Tree during development you can use also the U-Boot tftp command.
Using different boot media
Using different interfaces
The use of the interfaces can be found in our tutorial.
Change Device Tree
Instructions on how to change device tree are located in our tutorial section.
Load / Change / Save the Device Tree under U-Boot
Devicetree can be edit with the fdt commands under U-Boot.
For testing purpose only. For bigger changes, please compile the Devicetree.
Therefore you can have a look at the following tutorial.
Tested with TQMa6x BSP Rev.0109
1) At first the fdt file has to be loaded from the current boot medium (mmc) into RAM.
=> run loadfdt
2) Next step is to set the predefined U-Boot environment variable fdt_addr through the fdt addr command.
=> fdt addr $fdt_addr
3) Afterwards the size of the fdt has to be increased (to the next 4K divider) in order to have some space for modifications. This is simply done by entering:
=> fdt resize
4) List device in the tree you want to change to have a look at the default settings.
5) To modify a value of a propertie use the fdt set command.
=> fdt set <path> <property> <value>
6) Optional: If you want to save your modified Devicetree back to mmc you'll have to run the following command:
=> mmc dev $mmcdev; mmc write $fdt_addr $fdt_start $fdt_size
TQMa6x BSP.0110 <code>⇒ fatwrite mmc $mmcdev:$firmwarepart $fdt_addr $fdt_file <totalsize> </code> You can find out <totalsize> of the modified fdt by entering the command fdt header
Otherwise you can boot your module with the changed Devicetree right after the modification.
Change / adapt display type
Configuration of display type and display support depends on the kernel version used since the drivers are at least partly in staging.
When displays or display settings are altered the device tree has to be modified. See here how to change device tree.
Configure HDMI
Beginning with Linux 3.16-rc5 (BSP REV.0104) a devicetree with special settings for HDMI is compiled.
Correct working of the HDMI driver depends on the function of the HPD signal of the Monitor.
Configure parallel display
under construction
Beginning with Linux 3.16-rc5 (BSP REV.0104) a devicetree with special settings for parallel display is compiled. To change the display type, you need to change the default timing and - in case timing is not supplied yet - the correct display timing has to be entered in device tree.
Configure LVDS
To use LVDS display with frame buffer support, make sure to disable other displays in the device tree (set the status property of the node to “disabled”).
To enable the LVDS output you have to
- enable the LDB and the LBD port(s) in arch/arm/boot/dts/imx6qdl-mba6x.dtsi
- configure video timing for your display
Timing examples:
Sharp lq085y3lg13
lq085y3lg13 { /* needs fsl,data-width = <18> */ clock-frequency = <26200000 26600000 27000000>; hactive = <800>; vactive = <480>; hfront-porch = <10>; hback-porch = <0>; hsync-len = <255>; /* FIXME: typ < 256!!*/ vback-porch = <0>; vfront-porch = <2>; /* move 2 lines up */ vsync-len = <40 45 50>; de-active = <1>; hsync-active = <0>; vsync-active = <0>; };
AUO auo-g156-xw01
auo-g156-xw01 { clock-frequency = <60000000 76000000 90000000>; hactive = <1366>; vactive = <768>; hfront-porch = <10>; hback-porch = <10>; hsync-len = <80 200 570>; vback-porch = <100>; vfront-porch = <10>; vsync-len = <10 38 120>; de-active = <1>; hsync-active = <0>; vsync-active = <0>; };
CHIMEI g104-x1
chimei-g104-x1 { clock-frequency = <55000000 65000000 75000000>; hactive = <1024>; vactive = <768>; hfront-porch = <75>; hback-porch = <10>; hsync-len = <76 255 776>; /* FIXME: typ < 256!*/ vback-porch = <100>; vfront-porch = <10>; vsync-len = <2 38 182>; de-active = <1>; hsync-active = <0>; vsync-active = <0>; };
CHIMEI g070y2-l01
chimei-g070y2-l01 { clock-frequency = <27000000 29500000 33000000>; hactive = <800>; vactive = <480>; hfront-porch = <0>; hback-porch = <0>; hsync-len = <130 192 290>; vback-porch = <0>; vfront-porch = <2>; vsync-len = <10 20 70>; de-active = <1>; hsync-active = <0>; vsync-active = <0>; };
TQMa6x BSP REV.0110 Display
With BSP REV.0110 the kmsfb wrapper was introduced for the compability between linux mainline kernel and the Vivante GPU driver. The kmsfb wrapper emulates a framebuffer device from the kernel mode settings and requires a proper configuration file /etc/kmsfb-manage.conf.
To show the current drm information please execute kmsfb-manage -s
in the linux shell. Please see the example output below after executing kmsfb-manage -s
on a Starterkit with HDMI display connected:
root@MBa6x:/usr/lib/qt5/examples/webview/minibrowser kmsfb-manage -s ------------------------ Current Layout ------------------------ CRTCs: id: 18 fb id: 0 x: 0 y: 0 id: 22 fb id: 0 x: 0 y: 0 Connectors: id 25 current encoder: 24 type: HDMI-A mode0: 1680x1050@60 mode1: 1280x1024@75 mode2: 1280x1024@60 mode3: 1152x864@75 mode4: 1024x768@75 mode5: 1024x768@60 mode6: 800x600@75 mode7: 800x600@60 mode8: 800x600@56 mode9: 848x480@60 mode10: 640x480@75 mode11: 640x480@60 mode12: 640x480@60 mode13: 720x400@70 Property: EDID id : 1 flags : 20 count_values : 0 count_enums : 0 blob is 128 length, FFFFFF00 Property: DPMS id : 2 flags : 8 count_values : 4 values : 0 1 2 3 count_enums : 4 0 = On 1 = Standby 2 = Suspend 3 = Off con_value : On Encoders: 1 id: 24 crtc id: 0 possible crtcs: 0x00000003 possible clones: 0x00000000 Framebuffers: 0 Planes: 1 id: 20
The following values are required to create the kmsfb configuration file:
- mode0: 1680x1050@60
- Connectors: id 25
- current encoder: 24
- crtc id: 0
After determining the appropriate values the file /etc/kmsfb-manage.conf can be edited. Please see the example configuration for a HDMI display below:
-f bpp=32,xres=1680,yres=1050,fill=1,3d=1,vsync=0 -w fbid=0,connector=25,encoder=24,crtc=0
After editing the kmsfb-manage.conf file please reboot the Starterkit to activate the display configuration.
Compile kernel/bootloader outside of the BSP
To compile the kernel/bootloader outside of the BSP, please have a look at the corresponding tutorial.
Setup the Ethernet devices under U-Boot
USB-ETH
1) Set environment variable usbethaddr No longer necessary for BSP Rev. ≥0109
setenv usbethaddr <MAC address>
2) Start to detect USB device
usb start
3) To use Ethernet device “sms0” under U-Boot you have to change the active Ethernet device
setenv ethact sms0
Available Ethernet devices are “sms0”(X12) and “FEC”(X11)
If no link activity shown in U-Boot see Known Issues
WEIM bus
The term “wireless” does not imply that the WEIM is literally an interface without wires. It simply means that this module was originally designed for wireless and mobile applications that use low-power technology.
The actual devices are instantiated from the child nodes of a WEIM node.
Device tree documentation
Example for WEIM Bus
- Example code for Linux 3.14
- Customized pinmuxing
- Customized timing
- For Linux 3.16 fsl,weim-cs-gpr = <&gpr>; must be added
- Line 15 <mainboard-name> must be customized
- Line 18 Mainboard xyz must be customized
- Line 19 mainboard must be costumized
Configure and use PWM Backlight
the following information is based on Linux kernel 3.16
- Pins (GPIO,PWM) must be configured
- The power-supply property could refer to a logical always-on device
- Required Kernel configuration:
- PWM support
- PWM backlight support
- regulator support
Device tree documentation
TQMa6x serial downloader
In order to use serial downloader please have a look at our deployment section.
TQ-Systems GmbH provides the Board Support Packages (BSP) free of charge. The software included in the shipment has been configured individually for the starter kits. The software is only intended to evaluate the module. The use of the Board Support Packages (BSP) is only allowed within the scope of functionality described by TQ-Systems GmbH. TQ-Systems GmbH does not accept any liability for all further changes of the Board Support Package and for any damage resulting from its use.