COM AM335x Linux: Difference between revisions
Line 112: | Line 112: | ||
=== Serial (UART) Interfaces === | === Serial (UART) Interfaces === | ||
:{| class="wikitable" style="width: 400px" | :{| class="wikitable" style="width: 400px" | ||
||DHCOM (FF) UART 1||<code>/dev/ | ||DHCOM (FF) UART 1||<code>/dev/ttyO0</code> | ||
|- | |- | ||
||DHCOM (BT) UART 2 ||<code>/dev/ | ||DHCOM (BT) UART 2 ||<code>/dev/ttyO1</code> | ||
|- | |- | ||
||DHCOM (STD) UART 3 || | ||DHCOM (STD) UART 3 || not available | ||
|} | |} | ||
=== I2C Interfaces === | === I2C Interfaces === | ||
:{| class="wikitable" style="width: 400px" | :{| class="wikitable" style="width: 400px" | ||
||DHCOM I2C 1||<code>/dev/i2c- | ||DHCOM I2C 1||<code>/dev/i2c-2</code> | ||
|- | |- | ||
||DHCOM I2C 2 || | ||DHCOM I2C 2 || not available | ||
|- | |- | ||
||On Module Devices ||<code>/dev/i2c- | ||On Module Devices ||<code>/dev/i2c-0</code> | ||
|} | |} | ||
=== SPI Interfaces === | === SPI Interfaces === | ||
:{| class="wikitable" style="width: 400px" | :{| class="wikitable" style="width: 400px" | ||
||DHCOM SPI 1||<code>/dev/ | ||DHCOM SPI 1||<code>/dev/spidev1.1</code> | ||
|- | |- | ||
||DHCOM SPI 2 || | ||DHCOM SPI 2 || not available | ||
|} | |} | ||
:: '''Remark:''' DHCOM SPI1 interface doesn‘t work with DHCOM Premium Developer Kit (HD00013). | :: '''Remark:''' DHCOM SPI1 interface doesn‘t work with DHCOM Premium Developer Kit (HD00013). | ||
::Reason: At DHCOM Premium Developer Kit SPI 1 isn‘t connected, because otherwise | ::Reason: At DHCOM Premium Developer Kit SPI 1 isn‘t connected, because otherwise AM335x doesn‘t boot with the current schematic. | ||
=== MMC/SD/eMMC Interfaces === | === MMC/SD/eMMC Interfaces === | ||
:{| class="wikitable" style="width: 400px" | :{| class="wikitable" style="width: 400px" | ||
||DHCOM SD-Interface ||<code>/dev/mmcblk0pX</code> | ||DHCOM SD-Interface ||<code>/dev/mmcblk0pX</code> (optional) | ||
|- | |- | ||
||on module µSD Card ||<code>/dev/ | ||on module µSD Card ||<code>/dev/mmcblk0pX</code> (optional) | ||
|- | |- | ||
||on module eMMC ||<code>/dev/ | ||on module eMMC ||<code>/dev/mmcblk1pX</code> | ||
|} | |} | ||
: 'X' has to be replaced with the partition number | : 'X' has to be replaced with the partition number | ||
: DHCOM SD-Interface '''or''' on module µSD slot is available | |||
=== Control the display brightness === | === Control the display brightness === | ||
: | :{|class="wikitable" style="text-align: center; width: 600px" | ||
|- | |||
|echo [0..8] > /sys/class/backlight/backlight/brightness | |||
|} | |||
=== Control GPIOs === | === Control GPIOs === | ||
Line 167: | Line 162: | ||
! DHCOM Name: !! alt. DHCOM Name: !! SO-DIMM Pin# !! Linux <GPIO#> | ! DHCOM Name: !! alt. DHCOM Name: !! SO-DIMM Pin# !! Linux <GPIO#> | ||
|- | |- | ||
| GPIO A || || 154 || | | GPIO A || || 154 || 20 | ||
|- | |- | ||
| GPIO | | GPIO B || || 156 || 115 | ||
|- | |- | ||
| GPIO | | GPIO C || || 162 || 116 | ||
|- | |- | ||
| | | GPIO D || || 163 || 65 | ||
|- | |- | ||
| | | GPIO E || || 164 || 114 | ||
|- | |- | ||
| | | GPIO F || || 165 || 112 | ||
|- | |- | ||
| | | GPIO G || || 167 || 111 | ||
|- | |- | ||
| | | GPIO H || || 173 || 7 | ||
|- | |- | ||
| | | GPIO I || || 175 || 113 | ||
|- | |- | ||
| CIF | | CIF HSYNC || GPIO J || 74 || 117 | ||
|- | |- | ||
| CIF | | CIF PCLK || GPIO K || 72 || 57 | ||
|- | |- | ||
| CIF | | CIF MCLK || GPIO L || 70 || 56 | ||
|- | |- | ||
| CIF | | CIF VSYNC || GPIO M || 68 || 55 | ||
|- | |- | ||
| CIF | | CIF D9 || GPIO N || 66 || 54 | ||
|- | |- | ||
| CIF | | CIF D8 || GPIO O || 64 || 51 | ||
|- | |- | ||
| CIF | | CIF D7 || GPIO P || 62 || 50 | ||
|- | |- | ||
| CIF | | CIF D6 || GPIO Q || 60 || 49 | ||
|} | |} | ||
:: '''Remark:''' | :: '''Remark:''' The parallel camera interface is not available on DHCOM AM335x. | ||
:Export | :Export |
Revision as of 14:27, 22 March 2016
Linux virtual machine for development
- Please have a look at: Virtual Machine for Application Development
Linux Kernel
Sources for the DHCOM AM335x Linux Kernel v4.1.x
- The latest Linux Kernel source code is available on GitHub: https://github.com/dh-electronics/linux-am33x
How to build a Kernel
Get sources from Github
Configure and build the kernel using 5 threads in a separate build directory
|
Update the Kernel and Devicetree with U-Boot
Please refere to the DHCOM Update Mechanism for am335x.
Update Kernel and Devicetree on a running Linux
Kernel
Devicetree
Reboot System
|
Debian Rootfilesystem
Available Rootfilesystems
Please have a look at the DHCOM AM335x Downloads section.
External Documentation
- The Debian Administrator's Handbook: A reference book presenting the Debian distribution, from initial installation to configuration of services. The administration and configuration chapters apply to our Debian based root filesystems.
- Debian Documentation
Login
Debian GNU/Linux 8 dhcom ttyO0 dhcom login: root |
Shutdown
# shutdown -h now |
Calibrating the touchscreen (tslib has to be installed)
# source setup_tslib.sh # setup environment for use of tslib |
- Check the enviroment variable "TSLIB_TSDEVICE=/dev/input/event0" with printenv if an error occurs.
How to create a microSD-card with a rootfilesystem on it
1. Format a microSD card like following (in linux e.g. gparted, palimpsest) with Master Boot Record partition scheme
P1 ext3, name="boot" (Primary partition: 100MiB) |
2. Untar the root file system to the "rootfs" partition of the microSD card (Don't copy the tar archive directly to the microSD card)
Start the Console on Linux |
Remark: If you got a *.tar.gz file so type tar xfzv ... to extract the rootfilesystem.
Kernel Userspace Interfaces to Access Hardware
Serial (UART) Interfaces
DHCOM (FF) UART 1 /dev/ttyO0
DHCOM (BT) UART 2 /dev/ttyO1
DHCOM (STD) UART 3 not available
I2C Interfaces
DHCOM I2C 1 /dev/i2c-2
DHCOM I2C 2 not available On Module Devices /dev/i2c-0
SPI Interfaces
DHCOM SPI 1 /dev/spidev1.1
DHCOM SPI 2 not available
- Remark: DHCOM SPI1 interface doesn‘t work with DHCOM Premium Developer Kit (HD00013).
- Reason: At DHCOM Premium Developer Kit SPI 1 isn‘t connected, because otherwise AM335x doesn‘t boot with the current schematic.
MMC/SD/eMMC Interfaces
DHCOM SD-Interface /dev/mmcblk0pX
(optional)on module µSD Card /dev/mmcblk0pX
(optional)on module eMMC /dev/mmcblk1pX
- 'X' has to be replaced with the partition number
- DHCOM SD-Interface or on module µSD slot is available
Control the display brightness
echo [0..8] > /sys/class/backlight/backlight/brightness
Control GPIOs
DHCOM Name: alt. DHCOM Name: SO-DIMM Pin# Linux <GPIO#> GPIO A 154 20 GPIO B 156 115 GPIO C 162 116 GPIO D 163 65 GPIO E 164 114 GPIO F 165 112 GPIO G 167 111 GPIO H 173 7 GPIO I 175 113 CIF HSYNC GPIO J 74 117 CIF PCLK GPIO K 72 57 CIF MCLK GPIO L 70 56 CIF VSYNC GPIO M 68 55 CIF D9 GPIO N 66 54 CIF D8 GPIO O 64 51 CIF D7 GPIO P 62 50 CIF D6 GPIO Q 60 49
- Remark: The parallel camera interface is not available on DHCOM AM335x.
- Export
echo <GPIO#> >/sys/class/gpio/export
- Remark: Have a look into
/sys/class/gpio/
for already configured gpios.
- Remark: Have a look into
- Set direction
echo in >/sys/class/gpio/gpio<GPIO#>/direction
echo out >/sys/class/gpio/gpio<GPIO#>/direction
- Set state
echo 0 >/sys/class/gpio/gpio<GPIO#>/value
echo 1 >/sys/class/gpio/gpio<GPIO#>/value
Initialize and Test CAN Interface
- Initialize:
ip link set can0 up type can bitrate 500000
- Send test message via cansend (part of can-utils):
cansend can0 100#11.2233.44556677.88
- Receive can messages (part of can-utils):
candump can0
- Get can-utils:
Configure your own display
- To configure your own display you have to do the following steps:
- 1. Type in the display values into the device tree file
/arch/arm/boot/dts/imx6qdl-dheva01.dtsi
- Where in the file?
Parallel display: display@di0
LVDS display: &ldb
Remarks: If you don't want to use both interfaces comment the unwanted out! The frame buffer resolution depends on the higher display resolution of both displays
- How?
- Here is an example:
display-timings { DataImage_7inch_FG0700G3DSSW { clock-frequency = <33260000>; hactive = <800>; vactive = <480>; hback-porch = <86>; hfront-porch = <42>; vback-porch = <33>; vfront-porch = <10>; hsync-len = <128>; vsync-len = <2>; hsync-active = <0>; vsync-active = <0>; de-active = <1>; pixelclk-active = <1>; }; };
- 2. Build the device tree dtb files
ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- make dtbs
- 3. Copy the dtb files onto your boot partition
/dtbs
(SD, µSD or eMMC) - The built
imx6xx-dheva01.dtb
device tree files will you find inarch/arm/boot/dts