COM AM335x Linux: Difference between revisions

From Wiki-DB
Jump to navigationJump to search
 
(27 intermediate revisions by the same user not shown)
Line 2: Line 2:
* Please have a look at: '''[[Virtual Machine for Application Development]]'''
* Please have a look at: '''[[Virtual Machine for Application Development]]'''


==Building your own Kernel ==
==Linux Kernel ==


==== Sources for the DHCOM AM335x Linux Kernel v4.1.x ====
==== 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 https://github.com/dh-electronics/linux-am33x]
:* The latest Linux Kernel source code is available on GitHub: [https://github.com/dh-electronics/linux-am33x https://github.com/dh-electronics/linux-am33x]


==== How to build a kernel ====
==== How to build a Kernel ====
Get sources from Github and build the linux kernel using 5 threads and a build directory
{| class="wikitable" align="center" |  style="width: 100%; background: #f3f3f3;" valign="top" |
{| class="wikitable"
|
|1. Start a terminal on Linux
Get sources from Github
|-
{| class="wikitable" style="width: 100%; color: #000000; background: #ffffff;" |
|2. <tt># ''git clone [https://github.com/dh-electronics/linux-am33x.git https://github.com/dh-electronics/linux-am33x.git]''</tt>
|  
|-
1. Start a terminal on Linux<br/>
|3. <tt># ''mkdir build''</tt>
2. <tt># ''git clone [https://github.com/dh-electronics/linux-am33x.git https://github.com/dh-electronics/linux-am33x.git]''</tt><br/>
|-
3. <tt># ''cd linux-am33x''</tt><br/>
|4. <tt># ''cd linux-am33x''</tt>
4. <tt># ''git checkout release/20160719'' # checkout latest/required release branch</tt>
|-
|}
|5. <tt># ''git checkout release/20160219'' # checkout latest/required release branch</tt>
Configure and build the kernel using 5 threads and a build directory
|-
{| class="wikitable" style="width: 100%; color: #000000; background: #ffffff;" |
|6. <tt># ''ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- make O=../build/ am335x_dhcom_defconfig''</tt>
|  
|-
5. <tt># ''mkdir ../build''</tt><br/>
|7. <tt># ''ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- make O=../build/ menuconfig''</tt> (optional: If you want to add/remove Kernel features)
6. <tt># ''ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make O=../build/ am335x_dhcom_defconfig''</tt><br/>
|-
7. <tt># ''ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make O=../build/ menuconfig''</tt> (optional: Add/Remove Kernel Features)<br/>
|8. <tt># ''ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- make -j5 O=../build/ zImage''</tt>
8. <tt># ''ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make -j5 O=../build/ zImage''</tt><br/>
|-
9. <tt># ''ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make -j5 O=../build/ dtbs''</tt><br/>
|9. <tt># ''ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- make -j5 O=../build/ dtbs''</tt>
|}
|}
* Your new <tt>zImage</tt> file is available in <tt>../build/arch/arm/boot</tt>
* Your new <tt>zImage</tt> file is available in <tt>../build/arch/arm/boot</tt>
* The Devicetree file <tt>am335x-dheva01.dtb</tt> is available in <tt>../build/arch/arm/boot/dts</tt>
* The Devicetree file <tt>am335x-dheva01.dtb</tt> is available in <tt>../build/arch/arm/boot/dts</tt>
|}


==Update the kernel with U-Boot ==
=== Update the Kernel and Devicetree with U-Boot ===
Please refere to the [[i.MX6 Update|DHCOM Update Mechanism for i.MX6]].
Please refere to the [[DHCOM Update Mechanism |DHCOM Update Mechanism for am335x]].


==Update the kernel in running Linux ==
=== Update Kernel and Devicetree on a running Linux ===
 
{| class="wikitable" align="center" |  style="width: 100%; background: #f3f3f3;" valign="top" |
{| class="wikitable"
|
==== Kernel ====
{| class="wikitable" style="width: 100%; color: #000000; background: #ffffff;" |
|  
|  
1. Copy the kernel zImage file to the path <tt>'''/boot'''</tt><br/>
'''1.''' Copy the kernel zImage file to the path <tt>'''/boot'''</tt><br/>
2. Check whether the correct zImage file name is set in <tt>'''/boot/uLinuxEnv.txt'''</tt> (e.g. <tt>'''zImage_file=zImage'''</tt>)<br/>
'''2.''' Check whether the correct zImage file name is set in <tt>'''/boot/uLinuxEnv.txt'''</tt> (e.g. <tt>'''zImage_file=zImage'''</tt>)<br/>
3. Restart the system (e.g. <tt>'''reboot'''</tt>)
|}
==== Devicetree ====
{| class="wikitable" style="width: 100%; color: #000000; background: #ffffff;" |
|
'''3.''' Copy the devicetree file am335x-dheva01.dtb to the path <tt>'''/boot/dtbs'''</tt><br/>
'''4.''' Check '''fdtfile''' variable in <tt>'''/boot/uLinuxEnv.txt'''</tt> (e.g. <tt>'''fdtfile=/dtbs/am335x-dheva01.dtb'''</tt>)<br/>
|}
==== Reboot System ====
{| class="wikitable" style="width: 100%; color: #000000; background: #ffffff;" |
|
'''5.''' Restart the system (e.g. <tt>'''reboot'''</tt>)
|}
|}
|}


Line 53: Line 66:


=== Login ===
=== Login ===
{| class="wikitable" align="center" |  style="width: 400px; color: #000000; background: #FFFFFF;" valign="top" |
{| class="wikitable" align="center" |  style="width: 450px; color: #000000; background: #FFFFFF;" valign="top" |
||
||
<tt>
<tt>
Line 64: Line 77:


=== Shutdown ===
=== Shutdown ===
{| class="wikitable" align="center" |  style="width: 400px; color: #000000; background: #FFFFFF;" valign="top" |
{| class="wikitable" align="center" |  style="width: 450px; color: #000000; background: #FFFFFF;" valign="top" |
|<tt># shutdown -h now</tt>
|<tt># shutdown -h now</tt>
|}
|}


=== Calibrating the touchscreen (tslib required) ===
=== Calibrating the touchscreen (tslib has to be installed) ===
{| class="wikitable" align="center" |  style="width: 400px; color: #000000; background: #FFFFFF;" valign="top" |
{| class="wikitable" align="center" |  style="width: 450px; color: #000000; background: #FFFFFF;" valign="top" |
|
|
<tt># source setup_tslib.sh </tt>      # setup environment for tslib use<br/>
<tt># source setup_tslib.sh </tt>      # setup environment for use of tslib<br/>
<tt># ts_calibrate</tt>
<tt># ts_calibrate</tt>
|}
|}
Line 98: Line 111:


=== Serial (UART) Interfaces ===
=== Serial (UART) Interfaces ===
:{| class="wikitable" style="width: 400px"
:{| class="wikitable" style="width: 600px"
  ||DHCOM (FF) UART 1||<code>/dev/ttymxc0</code>
!Interface || Kernel 4.1.x || Kernel > 4.4.x
|-
  ||DHCOM UART 1 (Rx Tx Rts Cts)||<code>/dev/ttyO0</code> ||<code>/dev/ttyS0</code>
  |-
  |-
  ||DHCOM (BT) UART 2 ||<code>/dev/ttymxc4</code>
  ||DHCOM UART 2 (Rx Tx) ||<code>/dev/ttyO1</code> ||<code>/dev/ttyS1</code>
  |-
  |-
  ||DHCOM (STD) UART 3 ||<code>/dev/ttymxc3</code>
  ||DHCOM UART 3 || not available || not available
  |}
  |}


=== I2C Interfaces ===
=== I2C Interfaces ===
:dhcom3B = Hardware revision 300
:{| class="wikitable" style="width: 400px"
||DHCOM I2C 1||<code>/dev/i2c-1</code>
|-
||DHCOM I2C 2 ||<code>/dev/i2c-0</code>
|-
||On Module Devices ||<code>/dev/i2c-2</code>
|}
:old: dhcom2B = Hardware revision 200
:{| class="wikitable" style="width: 400px"
:{| class="wikitable" style="width: 400px"
  ||DHCOM I2C 1||<code>/dev/i2c-0</code>
  ||DHCOM I2C 1||<code>/dev/i2c-2</code>
  |-
  |-
  ||DHCOM I2C 2 ||<code>/dev/i2c-1</code>
  ||DHCOM I2C 2 || not available
  |-
  |-
  ||On Module Devices ||<code>/dev/i2c-2</code>
  ||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/spidev0.2</code>
  ||DHCOM SPI 1||<code>/dev/spidev1.1</code>
  |-
  |-
  ||DHCOM SPI 2 ||<code>/dev/spidev1.0</code>
  ||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 i.MX6 doesn‘t boot with the current schematic.
::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/mmcblk1pX</code>
  ||on module µSD Card ||<code>/dev/mmcblk0pX</code> (optional)
  |-
  |-
  ||on module eMMC ||<code>/dev/mmcblk2pX</code>
  ||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 ===
: Coming soon
:{|class="wikitable" style="width: 600px"
|-
| ''<tt>echo [0..8] > /sys/class/backlight/backlight/brightness</tt>''
|}


=== Control GPIOs ===
=== Control GPIOs ===
Line 154: Line 163:
! DHCOM Name: !! alt. DHCOM Name: !! SO-DIMM Pin# !! Linux <GPIO#>  
! DHCOM Name: !! alt. DHCOM Name: !! SO-DIMM Pin# !! Linux <GPIO#>  
|-
|-
| GPIO A || || 154 || 2
| GPIO A || || 154 || 20
|-
|-
| GPIO B || || 156 || 4
| GPIO B || || 156 || 115
|-
|-
| GPIO C || || 162 || 5
| GPIO C || || 162 || 116
|-
|-
| GPIO D || || 163 || 163
| GPIO D || || 163 || 65
|-
|-
| GPIO E || || 164 || 101
| GPIO E || || 164 || 114
|-
|-
| GPIO F || || 165 || 116
| GPIO F || || 165 || 112
|-
|-
| GPIO G || || 167 || 91
| GPIO G || || 167 || 111
|-
|-
| GPIO H || || 173 || 103
| GPIO H || || 173 || 7
|-
|-
| GPIO I || || 175 || 104
| GPIO I || || 175 || 113
|-
|-
| CIF HSYNC || GPIO J || 74 || 174
| CIF HSYNC || GPIO J || 74 || 117
|-
|-
| CIF PCLK || GPIO K || 72 || 175
| CIF PCLK || GPIO K || 72 || 57
|-
|-
| CIF MCLK || GPIO L || 70 || 105
| CIF MCLK || GPIO L || 70 || 56
|-
|-
| CIF VSYNC || GPIO M || 68 || 192
| CIF VSYNC || GPIO M || 68 || 55
|-
|-
| CIF D9 || GPIO N || 66 || 193
| CIF D9 || GPIO N || 66 || 54
|-
|-
| CIF D8 || GPIO O || 64 || 149
| CIF D8 || GPIO O || 64 || 51
|-
|-
| CIF D7 || GPIO P || 62 || 205
| CIF D7 || GPIO P || 62 || 50
|-
|-
| CIF D6 || GPIO Q || 60 || 18
| CIF D6 || GPIO Q || 60 || 49
|-
| CIF D5 || GPIO R || 58 || 16
|-
| CIF D4 || GPIO S || 56 || 17
|-
| CIF D3 || GPIO T || 54 || 19
|-
| CIF D2 || GPIO U || 52 || 20
|-
| CIF D1 || GPIO V || 50 || 146
|-
| CIF D0 || GPIO W || 48 || 147
|}
|}
:: '''Remark:''' Depending on your board configuration some of the additional gpios shared with the camera interface are not available on your system.
:: '''Remark:''' The parallel camera interface is not available on DHCOM AM335x.


:Export
:Export
Line 238: Line 235:


:Get can-utils:
:Get can-utils:
:* [[media:can-utils_armel.zip|Debian package containing can-utils (ARM)]]
:* Debian Jessie (armhf): <tt> apt-get install can-utils </tt>
:* Debian Squeeze (armel):[[media:can-utils_armel.zip|Debian package containing can-utils (ARM)]]
 
=== Configure your own display ===


=== Parallel Address- / Databus ===
To customize the devicetree to support your display please follow these steps:


:To use the 16-bit address / databus from Linux userspace you can use the UIO driver interface. To enable and configure the interface it is necessary to setup the i.MX6 WEIM controller with the device tree. See the documentation of the device tree bindings of weim [https://github.com/dh-electronics/linux-imx6qdl/blob/master/Documentation/devicetree/bindings/bus/imx-weim.txt here].
1. Type in the display values into the device tree file <tt>[https://github.com/dh-electronics/linux-am33x/blob/release/20160219/arch/arm/boot/dts/am335x-dhcom.dtsi arch/arm/boot/dts/am335x-dhcom.dtsi]</tt>
*Where in the file?


:Here is an example code which demonstrates how to do enable and configure the WEIM interface (parallel address- / databus):
:{|
|<code>
&weim {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_dhcom_weim &pinctrl_dhcom_weim_cs0 &pinctrl_dhcom_weim_cs1>;
#address-cells = <2>;
#size-cells = <1>;
/* it is necessary to setup 2x 64MB otherwise setting gpr fails */
ranges = <0 0  0x08000000  0x04000000>, // Chip select 0 == DHCOM CS A
<1 0  0x0c000000  0x04000000>; // Chip select 1 == DHCOM CS B
fsl,weim-cs-gpr = <&gpr>;
status = "okay";
uiomap_cs0@0,0 {
compatible = "generic-uio";
reg = <0 0x00000000 0x04000000>;
reg-names = "uio_cs0";
interrupt-parent = <&gpio1>;
interrupts = <2 2>; // Add gpio A == interrupt
#address-cells = <1>;
#size-cells = <1>;
fsl,weim-cs-timing = <0x00610089 0x00001002 0x0F011061
      0x00000000 0x0F068A31 0x00000000>;
status = "okay";
};
uiomap_cs1@0,1 {
compatible = "generic-uio";
reg = <1 0x00000000 0x04000000>;
reg-names = "uio_cs1";
interrupt-parent = <&gpio1>;
interrupts = <4 2>; // Add gpio B == interrupt
#address-cells = <1>;
#size-cells = <1>;
fsl,weim-cs-timing = <0x00610089 0x00001002 0x0F011061
      0x00000000 0x0F068A31 0x00000000>;
status = "disabled";
};
};
</code>
|}
: We have already written some demo code at [https://github.com/dh-electronics/linux-imx6qdl/blob/master/arch/arm/boot/dts/imx6qdl-dhcom_cfg-weim.dtsi /arch/arm/boot/dts/imx6qdl-dhcom_cfg-weim.dtsi]. It is easy to enable in the matching device-tree file:
::*[https://github.com/dh-electronics/linux-imx6qdl/blob/master/arch/arm/boot/dts/imx6s-dhcom3B-pdk2.dts /arch/arm/boot/dts/imx6s-dhcom3B-pdk2.dts]
::*[https://github.com/dh-electronics/linux-imx6qdl/blob/master/arch/arm/boot/dts/imx6dl-dhcom3B-pdk2.dts /arch/arm/boot/dts/imx6dl-dhcom3B-pdk2.dts]
::*[https://github.com/dh-electronics/linux-imx6qdl/blob/master/arch/arm/boot/dts/imx6d-dhcom3B-pdk2.dts /arch/arm/boot/dts/imx6d-dhcom3B-pdk2.dts]
::*[https://github.com/dh-electronics/linux-imx6qdl/blob/master/arch/arm/boot/dts/imx6q-dhcom3B-pdk2.dts /arch/arm/boot/dts/imx6q-dhcom3B-pdk2.dts]
:{|
:{|
| <code>
|style="width: 8em"|Parallel display:||<tt>&panel</tt>
<font color="#FF1010">- // #include "imx6qdl-dhcom_cfg-weim.dtsi</font>
<font color="#00FF10">+ #include "imx6qdl-dhcom_cfg-weim.dtsi </font>
</code>
|}
|}


:To use the generic uio driver it has to be enabled in the kernel configuration (<code>[[COM_iMX6_Linux#How to build a kernel:|make menuconfig]]</code>)
*How?
::*Device Drivers -> Userspace I/O Drivers -> Userspace I/O platform driver with generic IRQ handling
::Here is an example:
: The device-tree of_id of the uio driver has to be set via kernel command line
::{|
::*Add "optargs='uio_pdrv_genirq.of_id=generic-uio'" to uLinuxEnv.txt
|<tt>
 
:Example for a UIO userspace driver:
:* [[media:uio_access.zip| uio_access.cpp]]
:* for further information have a look at the paper [https://www.osadl.org/fileadmin/dam/rtlws/12/Koch.pdf Userspace I/O drivers in a realtime context]
 
=== 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 <code>[https://github.com/dh-electronics/linux-imx6qdl/blob/master/arch/arm/boot/dts/imx6qdl-dheva01.dtsi /arch/arm/boot/dts/imx6qdl-dheva01.dtsi]</code>
::*Where in the file?
 
:::{|
|style="width: 8em"|Parallel display:||<code>display@di0</code>
|-
|style="width: 8em"|LVDS display:||<code>&ldb</code>
|-
|colspan="2"|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:
:::{|
|<code>
   display-timings {
   display-timings {
     DataImage_7inch_FG0700G3DSSW {
     DataImage_7inch_FG0700G3DSSW {
Line 342: Line 269:
     pixelclk-active = <1>;
     pixelclk-active = <1>;
     };
     };
   };
   }; </tt>
</code>
|}
|}
:2. Build the device tree dtb files <code>ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- make dtbs</code>
 
:3. Copy the dtb files onto your boot partition <code>/dtbs</code> (SD, µSD or eMMC)
2. Build the devicetree dtb files <tt>ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make dtbs</tt><br/>
:The built <code>imx6xx-dheva01.dtb</code> device tree files will you find in <code>arch/arm/boot/dts</code>
3. Copy the dtb files into your <tt>/boot</tt> partition <tt>/dtbs</tt> (SD, µSD, eMMC, or NAND)


== Additional Information ==
== Additional Information ==
*[[Linux Kernel Features | Linux Kernel Features ]]
*[[Linux Kernel Features | Linux Kernel Features ]]
*[[ELBE Overview| Embedded Linux Build Environment (ELBE)]]
*[[ELBE Overview| Embedded Linux Build Environment (ELBE)]]

Latest revision as of 11:36, 29 September 2016

Linux virtual machine for development

Linux Kernel

Sources for the DHCOM AM335x Linux Kernel v4.1.x

How to build a Kernel

Get sources from Github

1. Start a terminal on Linux
2. # git clone https://github.com/dh-electronics/linux-am33x.git
3. # cd linux-am33x
4. # git checkout release/20160719 # checkout latest/required release branch

Configure and build the kernel using 5 threads and a build directory

5. # mkdir ../build
6. # ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make O=../build/ am335x_dhcom_defconfig
7. # ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make O=../build/ menuconfig (optional: Add/Remove Kernel Features)
8. # ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make -j5 O=../build/ zImage
9. # ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make -j5 O=../build/ dtbs

  • Your new zImage file is available in ../build/arch/arm/boot
  • The Devicetree file am335x-dheva01.dtb is available in ../build/arch/arm/boot/dts

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

1. Copy the kernel zImage file to the path /boot
2. Check whether the correct zImage file name is set in /boot/uLinuxEnv.txt (e.g. zImage_file=zImage)

Devicetree

3. Copy the devicetree file am335x-dheva01.dtb to the path /boot/dtbs
4. Check fdtfile variable in /boot/uLinuxEnv.txt (e.g. fdtfile=/dtbs/am335x-dheva01.dtb)

Reboot System

5. Restart the system (e.g. reboot)

Debian Rootfilesystem

Available Rootfilesystems

Please have a look at the DHCOM AM335x Downloads section.

External Documentation

Login

Debian GNU/Linux 8 dhcom ttyO0

dhcom login: root
Password: foo

Shutdown

# shutdown -h now

Calibrating the touchscreen (tslib has to be installed)

# source setup_tslib.sh # setup environment for use of tslib
# ts_calibrate

  • 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)
P2 ext3, name="rootfs" (Primary part.: Residual space)

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
# su
# chmod 755 /path/of/the/microSD_card
# cd /path/of/the/microSD_card
# tar xfjv path/to/RootFS/Name_of_RootFS_file.tar.bz2

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

Interface Kernel 4.1.x Kernel > 4.4.x
DHCOM UART 1 (Rx Tx Rts Cts) /dev/ttyO0 /dev/ttyS0
DHCOM UART 2 (Rx Tx) /dev/ttyO1 /dev/ttyS1
DHCOM UART 3 not available 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.
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 customize the devicetree to support your display please follow these steps:

1. Type in the display values into the device tree file arch/arm/boot/dts/am335x-dhcom.dtsi

  • Where in the file?
Parallel display: &panel
  • 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 devicetree dtb files ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make dtbs
3. Copy the dtb files into your /boot partition /dtbs (SD, µSD, eMMC, or NAND)

Additional Information