Difference between revisions of "CL-SOM-AM57x: Linux: Kernel"

From Compulab Mediawiki
Jump to: navigation, search
(Wifi support)
(Building the kernel)
 
Line 1: Line 1:
 
== Overview ==
 
== Overview ==
 
Linux kernel for the CompuLab CL-SOM-AM57x System-on-Module / Computer-on-Module provides support for on-board peripherals and abstracts the functionality provided by the hardware.
 
Linux kernel for the CompuLab CL-SOM-AM57x System-on-Module / Computer-on-Module provides support for on-board peripherals and abstracts the functionality provided by the hardware.
CompuLab provides ready-to-run binary kernel images, and source code of the modifications and additions made to the Linux kernel to work properly with CL-SOM-AM57x modules.
+
CompuLab provides ready-to-run binary kernel images, and source code of the modifications and additions made to the Linux kernel to work properly with CL-SOM-AM57x modules.<br>
 +
The latest Linux package is available at the [http://www.compulab.com/products/computer-on-modules/cl-som-am57x-ti-am5728-am5718-system-on-module/#devres CL-SOM-AM57x Resources] web page.
  
 
== Building kernel for CL-SOM-AM57x ==
 
== Building kernel for CL-SOM-AM57x ==
 +
 +
=== Extract the Linux package ===
 +
* Create a directory for downloading.
 +
<blockquote><pre>
 +
mkdir -p ~/development/cl-som-am57x/download
 +
</pre></blockquote>
 +
* Download the package from the [http://www.compulab.com/products/computer-on-modules/cl-som-am57x-ti-am5728-am5718-system-on-module/#devres CompuLab website] to the download directory.
 +
* Extract the Linux package:
 +
<blockquote><pre>
 +
cd ~/development/cl-som-am57x/
 +
unzip download/cl-som-am57x_linux_2017-06-05.zip
 +
</pre></blockquote>
  
 
=== Getting kernel sources ===
 
=== Getting kernel sources ===
Line 9: Line 22:
 
For instance, a copy of linux-stable git tree can be created or a Linux kernel sources snapshot can be downloaded.
 
For instance, a copy of linux-stable git tree can be created or a Linux kernel sources snapshot can be downloaded.
  
Assuming that the {{filename|/home/development/cl-som-am57x/kernel}} directory structure has been created for CL-SOM-AM57x kernel development.
+
Create a directory for the CL-SOM-AM57x kernel development.<br>
 
+
Directory name {{filename|~/development/cl-som-am57x/kernel}} is used in the following instructions.
==== Snapshot download ====
 
===== Mainline kernel v4.4.21 =====
 
* Download [https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.4.21.tar.gz v4.4.21] snapshot with a web browser.
 
* Extract the downloaded archive {{filename|linux-4.4.tar.gz}}
 
 
<pre>
 
<pre>
cd /home/development/cl-som-am57x/kernel
+
mkdir -p ~/development/cl-som-am57x/kernel
tar xvf /path/to/downloaded/linux-4.4.21.tar.gz
 
mv linux-4.4.21 linux-cl-som-am57x
 
</pre>
 
: This will create {{filename|/home/development/cl-som-am57x/kernel/linux-cl-som-am57x}} directory containing linux kernel tree.
 
* Apply the CL-SOM-AM57x patch
 
<pre>
 
cd /home/development/cl-som-am57x/kernel/cl-som-am57x
 
patch -p1 < /path/to/cl-som-am57x/kernel/kernel-v4.4/linux-4.4.21-cl-som-am57x-3.2.patch
 
</pre>
 
===== TI SDK kernel v4.1.13 =====
 
* Download [https://git.ti.com/processor-sdk/processor-sdk-linux/archive-tarball/processor-sdk-linux-02.00.01 v4.1.13] snapshot with a web browser.
 
<pre>
 
cd /home/development/cl-som-am57x/kernel
 
tar xvf /path/to/downloaded/processor-sdk-processor-sdk-linux-processor-sdk-linux-02.00.01.tar.gz
 
mv processor-sdk-linux linux-cl-som-am57x-ti
 
</pre>
 
: This will create {{filename|/home/development/cl-som-am57x/kernel/linux-cl-som-am57x-ti}} directory containing linux kernel tree.
 
* Apply the CL-SOM-AM57x patch
 
<pre>
 
cd /home/development/cl-som-am57x/kernel/cl-som-am57x-ti
 
patch -p1 < /path/to/cl-som-am57x/kernel/ti-sdk-4.1.13/linux-4.1.13-cl-som-am57x-ti-3.2.patch
 
 
</pre>
 
</pre>
 +
 
==== Git clone ====
 
==== Git clone ====
 
* Install [http://git-scm.com/ git] version control system.
 
* Install [http://git-scm.com/ git] version control system.
===== Mainline kernel v4.4.21 =====
+
* Create a clone of Linux kernel tree
* Create a clone of linux kernel tree
+
<blockquote><pre>
<pre>
+
cd ~/development/cl-som-am57x/kernel
cd /home/development/cl-som-am57x/kernel
+
git clone git://git.ti.com/processor-sdk/processor-sdk-linux.git linux-cl-som-am57x
git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-cl-som-am57x
+
</pre></blockquote>
</pre>
+
* Create a branch for CL-SOM-AM57x development. The CL-SOM-AM57x patches are generated vs. {{parameter|processor-sdk-linux-03.02.00}} branch (commid id: {{parameter|adde2ca9f867}}). in the TI Linux tree. It is recommended to use exactly the same baseline to avoid merge conflicts.
* Create a branch for CL-SOM-AM57x development. The CL-SOM-AM57x patches are generated vs. v4.4.21 tag (1d074db69c46d62ce82b331c2080e2fcb710bf4a commit) in the Linux stable tree. It is recommended to use exactly the same baseline to avoid merge conflicts.
+
<blockquote><pre>
<pre>
+
cd linux-cl-som-am57x
cd /home/development/cl-som-am57x/kernel/linux-cl-som-am57x
+
git checkout -b cl-som-am57x-dev-ti adde2ca9f867
git checkout -b cl-som-am57x-dev v4.4.21
+
</pre></blockquote>
</pre>
+
{{Note|As an alternative, the TI SDK kernel can be added as an additional remote to the mainline kernel git repository.}}
 
* Apply the CL-SOM-AM57x patch
 
* Apply the CL-SOM-AM57x patch
<pre>
+
<blockquote><pre>
git am /path/to/cl-som-am57x-linux/kernel/kernel-v4.4/patches/*.patch
+
git am ../../cl-som-am57x-linux/kernel/patches/*.patch
</pre>
+
</pre></blockquote>
  
{{Note|Future stable kernel versions of 4.4 can also be used by adding the Linux kernel stable repository as a remote and checking out any later tag of the v4.4.y stable kernel branch.}}
+
==== Snapshot download (Not Recommended) ====
===== TI SDK kernel v4.1.13 =====
+
{{Note|This method is <u>not</u> recommended as TI git tree bases on branches that are subject to be updated w/o prior notice.}}
* Create a clone of linux kernel tree
+
* Download [https://git.ti.com/processor-sdk/processor-sdk-linux/archive-tarball/processor-sdk-linux-03.02.00 v4.4.32] snapshot with a web browser to the download directory.
<pre>
+
<blockquote><pre>
cd /home/development/cl-som-am57x/kernel
+
cd ~/development/cl-som-am57x/kernel
git clone git://git.ti.com/processor-sdk/processor-sdk-linux.git linux-cl-som-am57x-ti
+
tar xvf ../download/processor-sdk-processor-sdk-linux-processor-sdk-linux-03.02.00.tar.gz
</pre>
+
mv processor-sdk-processor-sdk-linux linux-cl-som-am57x
* Create a branch for CL-SOM-AM57x development. The CL-SOM-AM57x patches are generated vs. processor-sdk-linux-rt-02.00.01 branch in the TI Linux tree. It is recommended to use exactly the same baseline to avoid merge conflicts.
+
</pre></blockquote>
<pre>
+
: This will create {{filename|~/development/cl-som-am57x/kernel/linux-cl-som-am57x}} directory containing linux kernel tree.
cd /home/development/cl-som-am57x/kernel/linux-cl-som-am57x-ti
 
git checkout -b cl-som-am57x-dev-ti origin/processor-sdk-linux-02.00.01
 
</pre>
 
{{Note|As an alternative, the TI SDK kernel can be added as an additional remote to the mainline kernel git repository.}}
 
 
* Apply the CL-SOM-AM57x patch
 
* Apply the CL-SOM-AM57x patch
<pre>
+
<blockquote><pre>
git am /path/to/cl-som-am57x-linux/kernel/ti-sdk-4.1.13/kernel/patches/*.patch
+
cd linux-cl-som-am57x
</pre>
+
patch -p1 < ../../cl-som-am57x-linux/kernel/linux-4.4.32-cl-som-am57x-ti-3.3.patch
 +
</pre></blockquote>
  
 
=== Building the kernel ===
 
=== Building the kernel ===
 
* Run the following commands:
 
* Run the following commands:
<pre>
+
<blockquote><pre>
 
export ARCH=arm
 
export ARCH=arm
 
export CROSS_COMPILE=arm-none-linux-eabi-
 
export CROSS_COMPILE=arm-none-linux-eabi-
make cl-som-am57x_defconfig && make menuconfig
+
[ -x /usr/bin/nproc ] && NPROC=$(($(/usr/bin/nproc) * 3 / 2)) || NPROC=2
make && make zImage && make am57xx-sbc-am57x.dtb \
+
make cl-som-am57x_defconfig && make -j$NPROC zImage && make -j$NPROC modules && make dtbs && INSTALL_MOD_PATH=~/development/cl-som-am57x/rootfs make modules_install
    INSTALL_MOD_PATH=/home/development/cl-som-am57x/rootfs make modules_install
+
</pre></blockquote>
</pre>
+
{{Note|The CROSS_COMPILE line should be updated according to the installed [[Linux:_Setting_up_a_development_environment#Cross-Compilation | cross compiler]]}}
 
 
 
In the example above:
 
In the example above:
 +
* The Linux kernel image {{filename|zImage}} will be created in {{filename|~/development/cl-som-am57x/kernel/linux-cl-som-am57x/arch/arm/boot}}
 +
* The following Device Tree binaries will be created in {{filename|~/development/cl-som-am57x/kernel/linux-cl-som-am57x/arch/arm/boot/dts}}
 +
** {{filename|am572x-cl-som-am57x.dtb}}
 +
** {{filename|am571x-cl-som-am57x.dtb}}
 +
** {{filename|am572x-sbc-am57x.dtb}}
 +
** {{filename|am571x-sbc-am57x.dtb}}
 +
* The loadable kernel modules will be installed into the {{filename|~/development/cl-som-am57x/rootfs/lib/modules}} directory.
  
* The Linux kernel image {{filename|zImage}} will be created in {{filename|/home/development/cl-som-am57x/kernel/linux-cl-som-am57x/arch/arm/boot}}
+
When the CL-SOM-AM57x is booted with the kernel image and Device Tree binary created as described above and with networked root filesystem at {{filename|~/development/cl-som-am57x/rootfs/}}, the system will be able to load the kernel modules properly, thus avoiding module version problems.
* The Device Tree binary {{filename|am57xx-sbc-am57x.dtb}} will be created in {{filename|/home/development/cl-som-am57x/kernel/linux-cl-som-am57x/arch/arm/boot/dts}}
 
* The loadable kernel modules will be installed into the {{filename|/home/development/cl-som-am57x/rootfs/lib/modules}} directory.
 
  
When the CL-SOM-AM57x is booted with the kernel image and Device Tree binary created as described above and with networked root filesystem at {{filename|/home/development/cl-som-am57x/rootfs/}}, the system will be able to load the kernel modules properly, thus avoiding module version problems.
+
=== Building the extra kernel object files ===
 +
The extra kernel objects are not created during the kernel compilations.
 +
The source code for the extra kernel objects are included in the Linux package, was taken from the Texas Instrument package [http://software-dl.ti.com/processor-sdk-linux/esd/AM57X/03_02_00_05/index_FDS.html PROCESSOR-SDK-LINUX-AM57X  03_02_00_05].
 +
* Create a directory for the extra kernel object compilation.
 +
<blockquote><pre>
 +
mkdir -p ~/development/cl-som-am57x/kernel/extra-ko
 +
</pre></blockquote>
 +
* Copy the extra kernel objects directory from the package
 +
<blockquote><pre>
 +
cd ~/development/cl-som-am57x/kernel/extra-ko
 +
cp -a ../../cl-som-am57x-linux/extra/develop/* ./
 +
</pre></blockquote>
 +
* Update the first 3 parameters of the environment parameters file {{filename|env_ko_cl-som-am57x}}.
 +
The description of the parameters is included in the environment file.
 +
* Execute the kernel objects compilation scripts
 +
<blockquote><pre>
 +
./do-cmemk.sh
 +
./do-galcore.sh
 +
./do-pvrsrvkm.sh
 +
</pre></blockquote>
 +
The kernel object creation directory is set by the environment variable ROOTFS.
 +
* The new kernel object should be placed on root file system, at the modules directory: {{filename|/${ROOTFS-notset}/lib/modules/4.4.32-cl-som-am57x-ti-3.3/extra/}}.
  
 
=== Device Tree ===
 
=== Device Tree ===
Line 115: Line 126:
 
SBC-AM57x Device tree hierarchy reflects the hardware hierarchy:
 
SBC-AM57x Device tree hierarchy reflects the hardware hierarchy:
 
<pre>
 
<pre>
      dra74x.dtsi
+
┌───────────┐     : ┌────────────────────────┐    :     ┌───────────┐
 
+
│dra72x.dtsi│  ┌───────────────>│am57xx-cl-som-am57x.dtsi│<────────────────┐ │dra74x.dtsi│
 
+
└───────────┘  │     : └────────────────────────┘    :     │ └───────────┘
am57xx-cl-som-am57x.dts       compulab-sb-som.dtsi
+
    ∧ │     :       :     │ ∧
         
+
    │ │     : ┌────────────────────────┐    :     │ │
  └────────┐       ┌────────┘
+
    │ │     : │  compulab-sb-som.dtsi │    :     │ │
    │       │
+
    │ │     : └────────────────────────┘    :     │ │
am57xx-sbc-am57x.dts
+
    │ │     :           :     │ │
 +
    │ │     :     │       :     │
 +
┌───────────────────────┐    : ┌────────────────────────┐    :    ┌───────────────────────┐
 +
│am571x-cl-som-am57x.dts│    : │ am57xx-sbc-am57x.dtsi  │    :    │am572x-cl-som-am57x.dts│
 +
└───────────────────────┘    : └────────────────────────┘    :    └───────────────────────┘
 +
        :   ∧   ∧       :
 +
    │     : │   │       : │
 +
┌───────────────────────┐    : │   │       :    ┌───────────────────────┐
 +
am571x-sbc-am57x.dts  │────────────────┘   └─────────────────│ am572x-sbc-am57x.dts
 +
└───────────────────────┘    :       :    └───────────────────────┘
 +
    :       :
 +
Single Core     :   Common       :     Dual Core
 
</pre>
 
</pre>
  
* {{filename | dra74x.dtsi}} is the SoC vendor device tree describing the dra74x SoC family.
+
* {{filename | dra72x.dtsi}} - SoC vendor device tree describing the dra72x family (single core).
* {{filename | am57xx-cl-som-am57x.dts}} is the SoM vendor device tree describing the CL-SOM-AM57x SoM.
+
* {{filename | dra74x.dtsi}} - SoC vendor device tree describing the dra74x family (dual core).
* {{filename | compulab-sb-som.dtsi}} describes the SB-SOM baseboard. Only hardware properties that remain constant regardless of which SoM is installed on the baseboard are described here.
+
* {{filename | am571x-cl-som-am57x.dts}} - CL-SOM-AM57x dual core device tree source.
* {{filename | am57xx-sbc-am57x.dts}} describes the integration between CL-SOM-AM57x SoM and the SB-SOM baseboard. Everything that is related to the SB-SOM baseboard and would change if we were to swap the CL-SOM-AM57x module with another SoM is described here. For example: SB-SOM contains TFP410, an RGB-to-DVI encoder. The encoder is located on an I2C bus, but depending on the installed SoC it might be i2c1, i2c2, or i2c3. Therefore, it is not described in the generic {{filename | compulab-sb-som.dtsi}} device tree, but in the device tree describing the SB-SOM/CL-SOM-AM57x combination. On the other hand, in order to describe the DVI connector on SB-SOM, there is no need to reference any SoM specific information, and therefore it is described in the generic {{filename | compulab-sb-som.dtsi}} file.
+
* {{filename | am572x-cl-som-am57x.dts}} - CL-SOM-AM57x single core device tree source.
 +
* {{filename | am57xx-cl-som-am57x.dtsi}} - CL-SOM-AM57x common device tree source.
 +
* {{filename | compulab-sb-som.dtsi}} - describes the SB-SOM baseboard. Only hardware properties that remain constant regardless of which SoM is installed on the baseboard are described here.
 +
* {{filename | am57xx-sbc-am57x.dtsi}} - describes the integration between CL-SOM-AM57x SoM and the SB-SOM baseboard. Everything that is related to the SB-SOM baseboard and would change if we were to swap the CL-SOM-AM57x module with another SoM is described here. For example: SB-SOM contains TFP410, an RGB-to-DVI encoder. The encoder is located on an I2C bus, but depending on the installed SoC it might be i2c1, i2c2, or i2c3. Therefore, it is not described in the generic {{filename | compulab-sb-som.dtsi}} device tree, but in the device tree describing the SB-SOM/CL-SOM-AM57x combination. On the other hand, in order to describe the DVI connector on SB-SOM, there is no need to reference any SoM specific information, and therefore it is described in the generic {{filename | compulab-sb-som.dtsi}} file.
 +
* {{filename | am571x-sbc-am57x.dts}} - SBC-AM57x single core device tree source.
 +
* {{filename | am572x-sbc-am57x.dts}} - SBC-AM57x dual core device tree source.
 +
 
  
 
For more details visit official [http://devicetree.org/Device_Tree_Usage Device Tree WiKi] pages and make an overview of a [http://events.linuxfoundation.org/sites/events/files/slides/petazzoni-device-tree-dummies.pdf  Device Tree tutorial]
 
For more details visit official [http://devicetree.org/Device_Tree_Usage Device Tree WiKi] pages and make an overview of a [http://events.linuxfoundation.org/sites/events/files/slides/petazzoni-device-tree-dummies.pdf  Device Tree tutorial]
  
 
=== Kernel configuration ===
 
=== Kernel configuration ===
 +
Use the menuconfig to update the CL-SOM-AM57x kernel configurations:
 +
<pre>
 +
export ARCH=arm
 +
make cl-som-am57x_defconfig
 +
cd ~/development/cl-som-am57x/kernel/linux-cl-som-am57x
 +
make menuconfig
 +
</pre>
  
 
==== USB support ====
 
==== USB support ====
Line 150: Line 185:
 
   │ │      [*]    Enable USB persist by default                          │ │
 
   │ │      [*]    Enable USB persist by default                          │ │
 
   │ │      [ ]    Dynamic USB minor allocation                            │ │
 
   │ │      [ ]    Dynamic USB minor allocation                            │ │
   │ │      [*]    OTG support                                             │ │
+
   │ │      [*]    OTG/Dual-role support                                   │ │
 
   │ │      ...                                                            │ │
 
   │ │      ...                                                            │ │
   │ │      <*>    xHCI HCD (USB 3.0) support                              │ │
+
   │ │      <M>    xHCI HCD (USB 3.0) support                              │ │
   │ │      -*-      Generic xHCI driver for a platform device            │ │   
+
   │ │      -M-      Generic xHCI driver for a platform device            │ │   
   │ │      <*>    EHCI HCD (USB 2.0) support                              │ │
+
   │ │      <M>    EHCI HCD (USB 2.0) support                              │ │
   │ │      [*]      Root Hub Transaction Translators                      │ │
+
   │ │      [ ]      Root Hub Transaction Translators                      │ │
   │ │      [ ]      Improved Transaction Translator scheduling            │ │
+
   │ │      [*]      Improved Transaction Translator scheduling            │ │
 
   │ │      ...                                                            │ │  
 
   │ │      ...                                                            │ │  
   │ │      <*>  DesignWare USB3 DRD Core Support                          │ │
+
   │ │      <M>  DesignWare USB3 DRD Core Support                          │ │
 
   │ │            DWC3 Mode Selection (Host only mode)  --->                │ │
 
   │ │            DWC3 Mode Selection (Host only mode)  --->                │ │
 
   │ │            *** Platform Glue Driver Support ***                      │ │
 
   │ │            *** Platform Glue Driver Support ***                      │ │
   │ │      <*>    Texas Instruments OMAP5 and similar Platforms          │ │
+
   │ │      <M>    Texas Instruments OMAP5 and similar Platforms          │ │
   │ │      <*>    PCIe-based Platforms                                    │ │
+
   │ │      <M>    PCIe-based Platforms                                    │ │
 
   │ │      ...                                                            │ │   
 
   │ │      ...                                                            │ │   
 
   │ └───────────────────────────────────────────────────────────────────────┘ │   
 
   │ └───────────────────────────────────────────────────────────────────────┘ │   
Line 176: Line 211:
 
   │ │      ...                                                            │ │   
 
   │ │      ...                                                            │ │   
 
   │ │    -*- OMAP CONTROL PHY Driver                                        │ │   
 
   │ │    -*- OMAP CONTROL PHY Driver                                        │ │   
   │ │    <*> OMAP USB2 PHY Driver                                          │ │   
+
   │ │    <N> OMAP USB2 PHY Driver                                          │ │   
 
   │ │      ...                                                            │ │   
 
   │ │      ...                                                            │ │   
 
   │ └───────────────────────────────────────────────────────────────────────┘ │   
 
   │ └───────────────────────────────────────────────────────────────────────┘ │   
Line 193: Line 228:
 
   │ ┌─────────────────────────────────────────────────────────────────────────┐ │
 
   │ ┌─────────────────────────────────────────────────────────────────────────┐ │
 
   │ │      ...                                                              │ │
 
   │ │      ...                                                              │ │
   │ │      <M>  MMC block device driver                                    │ │
+
   │ │      <*>  MMC block device driver                                    │ │
 
   │ │      (8)    Number of minors per block device                        │ │
 
   │ │      (8)    Number of minors per block device                        │ │
 
   │ │      [*]    Use bounce buffer for simple hosts                        │ │
 
   │ │      [*]    Use bounce buffer for simple hosts                        │ │
Line 273: Line 308:
 
* 8250/16550 and compatible serial support
 
* 8250/16550 and compatible serial support
 
* OMAP serial port support
 
* OMAP serial port support
* Console on OMAP serial port
 
 
<pre>
 
<pre>
 
   ┌────────────────────────────── Serial drivers ───────────────────────────────┐
 
   ┌────────────────────────────── Serial drivers ───────────────────────────────┐
Line 280: Line 314:
 
   │ │      [*]  Support 8250_core.* kernel options (DEPRECATED)            │ │
 
   │ │      [*]  Support 8250_core.* kernel options (DEPRECATED)            │ │
 
   │ │      [*]  Console on 8250/16550 and compatible serial port            │ │
 
   │ │      [*]  Console on 8250/16550 and compatible serial port            │ │
   │ │      [*]  DMA support for 16550 compatible UART controllers          │ │
+
   │ │      [ ]  DMA support for 16550 compatible UART controllers          │ │
 
   │ │      <*>  8250/16550 PCI device support                              │ │
 
   │ │      <*>  8250/16550 PCI device support                              │ │
 
   │ │      (32)  Maximum number of 8250/16550 serial ports                  │ │
 
   │ │      (32)  Maximum number of 8250/16550 serial ports                  │ │
Line 289: Line 323:
 
   │ │      [*]    Autodetect IRQ on standard ports (unsafe)                │ │
 
   │ │      [*]    Autodetect IRQ on standard ports (unsafe)                │ │
 
   │ │      [*]    Support RSA serial ports                                  │ │
 
   │ │      [*]    Support RSA serial ports                                  │ │
  │ │      ...                                                              │ │
 
  │ │      <*> OMAP serial port support                                      │ │
 
  │ │      [*]  Console on OMAP serial port                                │ │
 
 
   │ │      ...                                                              │ │
 
   │ │      ...                                                              │ │
 
   │ └─────────────────────────────────────────────────────────────────────────┘ │
 
   │ └─────────────────────────────────────────────────────────────────────────┘ │
Line 310: Line 341:
 
   │ │      ...                                                              │ │
 
   │ │      ...                                                              │ │
 
   │ │      [*]  Texas Instruments (TI) devices                              │ │
 
   │ │      [*]  Texas Instruments (TI) devices                              │ │
  │ │      <*>    TI DaVinci EMAC Support                                  │ │
 
 
   │ │      -*-    TI DaVinci MDIO Support                                  │ │
 
   │ │      -*-    TI DaVinci MDIO Support                                  │ │
 
   │ │      -*-    TI DaVinci CPDMA Support                                  │ │
 
   │ │      -*-    TI DaVinci CPDMA Support                                  │ │
Line 316: Line 346:
 
   │ │      -*-    TI CPSW ALE Support                                      │ │
 
   │ │      -*-    TI CPSW ALE Support                                      │ │
 
   │ │      <*>    TI CPSW Switch Support                                    │ │
 
   │ │      <*>    TI CPSW Switch Support                                    │ │
   │ │      [*]      TI Common Platform Time Sync (CPTS) Support             │ │
+
   │ │      <*>    TI Common Platform Time Sync (CPTS) Support               │ │
 
   │ │      ...                                                              │ │
 
   │ │      ...                                                              │ │
 
   │ └─────────────────────────────────────────────────────────────────────────┘ │
 
   │ └─────────────────────────────────────────────────────────────────────────┘ │
Line 361: Line 391:
 
</pre>
 
</pre>
  
In the kernel configuration menu choose '''Device Drivers ---> Graphics support ---> Frame buffer Devices ---> OMAP2+ Display Subsystem support''' submenu and enable:
+
In the kernel configuration menu choose '''Device Drivers ---> Graphics support ---> OMAP2+ Display Subsystem support''' submenu and enable:
 
* DPI support
 
* DPI support
 
* HDMI support for OMAP5
 
* HDMI support for OMAP5
Line 378: Line 408:
 
</pre>
 
</pre>
  
In the kernel configuration menu choose '''Device Drivers ---> Graphics support ---> Frame buffer Devices ---> OMAP2+ Display Subsystem support --- OMAP Display Device Driver''' submenu and enable:
+
In the kernel configuration menu choose '''Device Drivers ---> Graphics support ---> OMAP DRM ---> OMAPDRM External Display Device Drivers''' submenu and enable:
 
* TFP410 DPI to DVI Encoder
 
* TFP410 DPI to DVI Encoder
 
* DVI Connector
 
* DVI Connector
Line 487: Line 517:
  
 
Under the '''CODEC drivers''' submenu of the same section enable:
 
Under the '''CODEC drivers''' submenu of the same section enable:
* HDMI stub CODEC
 
 
* Wolfson Microelectronics WM8731 CODEC
 
* Wolfson Microelectronics WM8731 CODEC
 
<pre>
 
<pre>
 
   ┌──────────────────────── ALSA for SoC audio support ─────────────────────────┐
 
   ┌──────────────────────── ALSA for SoC audio support ─────────────────────────┐
 
   │ ┌─────────────────────────────────────────────────────────────────────────┐ │
 
   │ ┌─────────────────────────────────────────────────────────────────────────┐ │
  │ │      ...                                                              │ │
 
  │ │      <M> HDMI stub CODEC                                              │ │
 
 
   │ │      ...                                                              │ │
 
   │ │      ...                                                              │ │
 
   │ │      <M> Wolfson Microelectronics WM8731 CODEC                        │ │
 
   │ │      <M> Wolfson Microelectronics WM8731 CODEC                        │ │

Latest revision as of 13:18, 8 June 2017

Overview

Linux kernel for the CompuLab CL-SOM-AM57x System-on-Module / Computer-on-Module provides support for on-board peripherals and abstracts the functionality provided by the hardware. CompuLab provides ready-to-run binary kernel images, and source code of the modifications and additions made to the Linux kernel to work properly with CL-SOM-AM57x modules.
The latest Linux package is available at the CL-SOM-AM57x Resources web page.

Building kernel for CL-SOM-AM57x

Extract the Linux package

  • Create a directory for downloading.
mkdir -p ~/development/cl-som-am57x/download
  • Download the package from the CompuLab website to the download directory.
  • Extract the Linux package:
cd ~/development/cl-som-am57x/
unzip download/cl-som-am57x_linux_2017-06-05.zip

Getting kernel sources

There are various ways to get Linux kernel sources that can be used as a baseline for CL-SOM-AM57x kernel. For instance, a copy of linux-stable git tree can be created or a Linux kernel sources snapshot can be downloaded.

Create a directory for the CL-SOM-AM57x kernel development.
Directory name ~/development/cl-som-am57x/kernel is used in the following instructions.

mkdir -p ~/development/cl-som-am57x/kernel

Git clone

  • Install git version control system.
  • Create a clone of Linux kernel tree
cd ~/development/cl-som-am57x/kernel
git clone git://git.ti.com/processor-sdk/processor-sdk-linux.git linux-cl-som-am57x
  • Create a branch for CL-SOM-AM57x development. The CL-SOM-AM57x patches are generated vs. processor-sdk-linux-03.02.00 branch (commid id: adde2ca9f867). in the TI Linux tree. It is recommended to use exactly the same baseline to avoid merge conflicts.
cd linux-cl-som-am57x
git checkout -b cl-som-am57x-dev-ti adde2ca9f867
Admolition note.png As an alternative, the TI SDK kernel can be added as an additional remote to the mainline kernel git repository.
  • Apply the CL-SOM-AM57x patch
git am ../../cl-som-am57x-linux/kernel/patches/*.patch

Snapshot download (Not Recommended)

Admolition note.png This method is not recommended as TI git tree bases on branches that are subject to be updated w/o prior notice.
  • Download v4.4.32 snapshot with a web browser to the download directory.
cd ~/development/cl-som-am57x/kernel
tar xvf ../download/processor-sdk-processor-sdk-linux-processor-sdk-linux-03.02.00.tar.gz
mv processor-sdk-processor-sdk-linux linux-cl-som-am57x
This will create ~/development/cl-som-am57x/kernel/linux-cl-som-am57x directory containing linux kernel tree.
  • Apply the CL-SOM-AM57x patch
cd linux-cl-som-am57x
patch -p1 < ../../cl-som-am57x-linux/kernel/linux-4.4.32-cl-som-am57x-ti-3.3.patch

Building the kernel

  • Run the following commands:
export ARCH=arm
export CROSS_COMPILE=arm-none-linux-eabi-
[ -x /usr/bin/nproc ] && NPROC=$(($(/usr/bin/nproc) * 3 / 2)) || NPROC=2
make cl-som-am57x_defconfig && make -j$NPROC zImage && make -j$NPROC modules && make dtbs && INSTALL_MOD_PATH=~/development/cl-som-am57x/rootfs make modules_install
Admolition note.png The CROSS_COMPILE line should be updated according to the installed cross compiler

In the example above:

  • The Linux kernel image zImage will be created in ~/development/cl-som-am57x/kernel/linux-cl-som-am57x/arch/arm/boot
  • The following Device Tree binaries will be created in ~/development/cl-som-am57x/kernel/linux-cl-som-am57x/arch/arm/boot/dts
    • am572x-cl-som-am57x.dtb
    • am571x-cl-som-am57x.dtb
    • am572x-sbc-am57x.dtb
    • am571x-sbc-am57x.dtb
  • The loadable kernel modules will be installed into the ~/development/cl-som-am57x/rootfs/lib/modules directory.

When the CL-SOM-AM57x is booted with the kernel image and Device Tree binary created as described above and with networked root filesystem at ~/development/cl-som-am57x/rootfs/, the system will be able to load the kernel modules properly, thus avoiding module version problems.

Building the extra kernel object files

The extra kernel objects are not created during the kernel compilations. The source code for the extra kernel objects are included in the Linux package, was taken from the Texas Instrument package PROCESSOR-SDK-LINUX-AM57X 03_02_00_05.

  • Create a directory for the extra kernel object compilation.
mkdir -p ~/development/cl-som-am57x/kernel/extra-ko
  • Copy the extra kernel objects directory from the package
cd ~/development/cl-som-am57x/kernel/extra-ko
cp -a ../../cl-som-am57x-linux/extra/develop/* ./
  • Update the first 3 parameters of the environment parameters file env_ko_cl-som-am57x.

The description of the parameters is included in the environment file.

  • Execute the kernel objects compilation scripts
./do-cmemk.sh
./do-galcore.sh
./do-pvrsrvkm.sh

The kernel object creation directory is set by the environment variable ROOTFS.

  • The new kernel object should be placed on root file system, at the modules directory: /${ROOTFS-notset}/lib/modules/4.4.32-cl-som-am57x-ti-3.3/extra/.

Device Tree

Device Tree (DT), is a data structure and language for describing hardware. More specifically, it is a description of hardware that is readable by an operating system so that the operating system doesn't need to hard code details of the machine.

A device tree file, named *.dts, is a text file that describes the hardware platform. It is compiled into a device tree blob, *.dtb, which is loaded into memory before the Linux kernel is started. The Linux kernel then uses that device tree blob to initialize itself at runtime.

CL-SOM-AM57x device tree organization

The SBC-AM57x product is built from 3 major components:

┌───────────────────────────────┐
│ SB-SOM baseboard    	        │
│      	       	       	   	│
│   ┌─────────────────────┐  	│
│   │ CL-SOM-AM57x SoM 	  │    	│
│   │  	       		  │	│
│   │  	┌──────────────┐  │	│
│   │ 	│ TI AM57x SoC │  │	│
│   │	└──────────────┘  │	│
│   └─────────────────────┘	│
└───────────────────────────────┘

SBC-AM57x Device tree hierarchy reflects the hardware hierarchy:

	┌───────────┐		     :	 ┌────────────────────────┐    :	     	┌───────────┐
	│dra72x.dtsi│   ┌───────────────>│am57xx-cl-som-am57x.dtsi│<────────────────┐	│dra74x.dtsi│
	└───────────┘   │	     :	 └────────────────────────┘    :	    │	└───────────┘
	    ∧		│	     :				       :	    │		 ∧
	    │		│	     :	 ┌────────────────────────┐    :	    │		 │
	    │		│	     :	 │  compulab-sb-som.dtsi  │    :	    │		 │
	    │		│	     :	 └────────────────────────┘    :	    │		 │
	    │		│	     :		     ∧		       :	    │		 │
	    │		│	     :		     │		       :	    │		 │
	┌───────────────────────┐    :	 ┌────────────────────────┐    :    ┌───────────────────────┐
	│am571x-cl-som-am57x.dts│    :	 │ am57xx-sbc-am57x.dtsi  │    :    │am572x-cl-som-am57x.dts│
	└───────────────────────┘    :	 └────────────────────────┘    :    └───────────────────────┘
		    ∧		     :	  	 ∧	  ∧	       :		∧
		    │		     :		 │	  │	       :		│
	┌───────────────────────┐    :		 │	  │	       :    ┌───────────────────────┐
	│ am571x-sbc-am57x.dts  │────────────────┘	  └─────────────────│ am572x-sbc-am57x.dts  │
	└───────────────────────┘    :				       :    └───────────────────────┘
				     :				       :
	Single Core		     :		  Common	       :		    Dual Core
  • dra72x.dtsi - SoC vendor device tree describing the dra72x family (single core).
  • dra74x.dtsi - SoC vendor device tree describing the dra74x family (dual core).
  • am571x-cl-som-am57x.dts - CL-SOM-AM57x dual core device tree source.
  • am572x-cl-som-am57x.dts - CL-SOM-AM57x single core device tree source.
  • am57xx-cl-som-am57x.dtsi - CL-SOM-AM57x common device tree source.
  • compulab-sb-som.dtsi - describes the SB-SOM baseboard. Only hardware properties that remain constant regardless of which SoM is installed on the baseboard are described here.
  • am57xx-sbc-am57x.dtsi - describes the integration between CL-SOM-AM57x SoM and the SB-SOM baseboard. Everything that is related to the SB-SOM baseboard and would change if we were to swap the CL-SOM-AM57x module with another SoM is described here. For example: SB-SOM contains TFP410, an RGB-to-DVI encoder. The encoder is located on an I2C bus, but depending on the installed SoC it might be i2c1, i2c2, or i2c3. Therefore, it is not described in the generic compulab-sb-som.dtsi device tree, but in the device tree describing the SB-SOM/CL-SOM-AM57x combination. On the other hand, in order to describe the DVI connector on SB-SOM, there is no need to reference any SoM specific information, and therefore it is described in the generic compulab-sb-som.dtsi file.
  • am571x-sbc-am57x.dts - SBC-AM57x single core device tree source.
  • am572x-sbc-am57x.dts - SBC-AM57x dual core device tree source.


For more details visit official Device Tree WiKi pages and make an overview of a Device Tree tutorial

Kernel configuration

Use the menuconfig to update the CL-SOM-AM57x kernel configurations:

export ARCH=arm
make cl-som-am57x_defconfig
cd ~/development/cl-som-am57x/kernel/linux-cl-som-am57x
make menuconfig

USB support

In the kernel configuration menu choose Device Drivers ---> USB support submenu and enable:

  • Support for Host-side USB
  • Enable USB persist by default
  • OTG support
  • xHCI HCD (USB 3.0) support
  • EHCI HCD (USB 2.0) support
  • DesignWare USB3 DRD Core Support
 ┌─────────────────────────────── USB support ───────────────────────────────┐
 │ ┌───────────────────────────────────────────────────────────────────────┐ │
 │ │       --- USB support                                                 │ │
 │ │       <*>   Support for Host-side USB                                 │ │
 │ │       [*]     USB announce new devices                                │ │
 │ │               *** Miscellaneous USB options ***                       │ │
 │ │       [*]     Enable USB persist by default                           │ │
 │ │       [ ]     Dynamic USB minor allocation                            │ │
 │ │       [*]     OTG/Dual-role support                                   │ │
 │ │       ...                                                             │ │
 │ │       <M>     xHCI HCD (USB 3.0) support                              │ │
 │ │       -M-       Generic xHCI driver for a platform device             │ │  
 │ │       <M>     EHCI HCD (USB 2.0) support                              │ │
 │ │       [ ]       Root Hub Transaction Translators                      │ │
 │ │       [*]       Improved Transaction Translator scheduling            │ │
 │ │       ...                                                             │ │ 
 │ │       <M>   DesignWare USB3 DRD Core Support                          │ │
 │ │             DWC3 Mode Selection (Host only mode)  --->                │ │
 │ │             *** Platform Glue Driver Support ***                      │ │
 │ │       <M>     Texas Instruments OMAP5 and similar Platforms           │ │
 │ │       <M>     PCIe-based Platforms                                    │ │
 │ │       ...                                                             │ │  
 │ └───────────────────────────────────────────────────────────────────────┘ │  
 ├───────────────────────────────────────────────────────────────────────────┤  
 │         <Select>    < Exit >    < Help >    < Save >    < Load >          │  
 └───────────────────────────────────────────────────────────────────────────┘

In the kernel configuration menu choose Device Drivers ---> PHY subsystem submenu and enable:

  • OMAP USB2 PHY Driver
  ┌────────────────────────────── PHY Subsystem ──────────────────────────────┐
  │ ┌───────────────────────────────────────────────────────────────────────┐ │  
  │ │       ...                                                             │ │  
  │ │    -*- OMAP CONTROL PHY Driver                                        │ │  
  │ │    <N> OMAP USB2 PHY Driver                                           │ │  
  │ │       ...                                                             │ │  
  │ └───────────────────────────────────────────────────────────────────────┘ │  
  ├───────────────────────────────────────────────────────────────────────────┤  
  │         <Select>    < Exit >    < Help >    < Save >    < Load >          │  
  └───────────────────────────────────────────────────────────────────────────┘  

MMC/SDIO support

In the kernel configuration menu choose Device Drivers ---> MMC/SD/SDIO card support submenu and enable:

  • MMC block device driver
  • TI OMAP Multimedia Card Interface support
  • TI OMAP High Speed Multimedia Card Interface support
  ┌───────────────────────── MMC/SD/SDIO card support ──────────────────────────┐
  │ ┌─────────────────────────────────────────────────────────────────────────┐ │
  │ │       ...                                                               │ │
  │ │       <*>   MMC block device driver                                     │ │
  │ │       (8)     Number of minors per block device                         │ │
  │ │       [*]     Use bounce buffer for simple hosts                        │ │
  │ │       ...                                                               │ │
  │ │       <*>   TI OMAP Multimedia Card Interface support                   │ │
  │ │       <*>   TI OMAP High Speed Multimedia Card Interface support        │ │
  │ │       ...                                                               │ │
  │ └─────────────────────────────────────────────────────────────────────────┘ │
  ├─────────────────────────────────────────────────────────────────────────────┤
  │         <Select>    < Exit >    < Help >    < Save >    < Load >            │
  └─────────────────────────────────────────────────────────────────────────────┘

NAND support

In the kernel configuration menu choose Device Drivers ---> Memory Technology Device (MTD) support ---> NAND Device Support submenu and enable:

  • NAND Flash device on OMAP2, OMAP3 and OMAP4
  • Support hardware based BCH error correction
  ┌──────────────────────────── NAND Device Support ────────────────────────────┐
  │ ┌─────────────────────────────────────────────────────────────────────────┐ │  
  │ │       ...                                                               │ │
  │ │       <*>   NAND Flash device on OMAP2, OMAP3 and OMAP4                 │ │
  │ │       [*]     Support hardware based BCH error correction               │ │
  │ │       ...                                                               │ │
  │ └─────────────────────────────────────────────────────────────────────────┘ │
  ├─────────────────────────────────────────────────────────────────────────────┤
  │         <Select>    < Exit >    < Help >    < Save >    < Load >            │
  └─────────────────────────────────────────────────────────────────────────────┘

SPI support

In the kernel configuration menu choose Device Drivers ---> SPI support submenu and enable:

  • McSPI driver for OMAP
  • DRA7xxx QSPI controller support
  ┌──────────────────────────────── SPI support ────────────────────────────────┐
  │ ┌─────────────────────────────────────────────────────────────────────────┐ │  
  │ │    ...                                                                  │ │
  │ │    <*>   McSPI driver for OMAP                                          │ │
  │ │    <*>   DRA7xxx QSPI controller support                                │ │
  │ │    ...                                                                  │ │
  │ └─────────────────────────────────────────────────────────────────────────┘ │
  ├─────────────────────────────────────────────────────────────────────────────┤
  │         <Select>    < Exit >    < Help >    < Save >    < Load >            │
  └─────────────────────────────────────────────────────────────────────────────┘
SPI-flash support

In the kernel configuration menu choose Device Drivers ---> Memory Technology Device (MTD) support submenu and enable:

  • SPI-NOR device support
  ┌────────────────── Memory Technology Device (MTD) support ───────────────────┐
  │ ┌─────────────────────────────────────────────────────────────────────────┐ │  
  │ │       ...                                                               │ │
  │ │       <*>   SPI-NOR device support  --->                                │ │  
  │ │       <*>   Enable UBI - Unsorted block images  --->                    │ │
  │ └─────────────────────────────────────────────────────────────────────────┘ │
  ├─────────────────────────────────────────────────────────────────────────────┤
  │         <Select>    < Exit >    < Help >    < Save >    < Load >            │
  └─────────────────────────────────────────────────────────────────────────────┘

In the kernel configuration menu choose Device Drivers ---> Memory Technology Device (MTD) support ---> Self-contained MTD device drivers submenu and enable:

  • Support most SPI Flash chips (AT26DF, M25P, W25X, ...)
  ┌───────────────────── Self-contained MTD device drivers ─────────────────────┐
  │ ┌─────────────────────────────────────────────────────────────────────────┐ │  
  │ │       < > Support for AT45xxx DataFlash                                 │ │
  │ │       <*> Support most SPI Flash chips (AT26DF, M25P, W25X, ...)        │ │
  │ │       ...                                                               │ │
  │ └─────────────────────────────────────────────────────────────────────────┘ │
  ├─────────────────────────────────────────────────────────────────────────────┤
  │         <Select>    < Exit >    < Help >    < Save >    < Load >            │
  └─────────────────────────────────────────────────────────────────────────────┘

UART support

In the kernel configuration menu choose Device Drivers ---> Character devices ---> Serial drivers submenu and enable:

  • 8250/16550 and compatible serial support
  • OMAP serial port support
  ┌────────────────────────────── Serial drivers ───────────────────────────────┐
  │ ┌─────────────────────────────────────────────────────────────────────────┐ │  
  │ │       <*> 8250/16550 and compatible serial support                      │ │
  │ │       [*]   Support 8250_core.* kernel options (DEPRECATED)             │ │
  │ │       [*]   Console on 8250/16550 and compatible serial port            │ │
  │ │       [ ]   DMA support for 16550 compatible UART controllers           │ │
  │ │       <*>   8250/16550 PCI device support                               │ │
  │ │       (32)  Maximum number of 8250/16550 serial ports                   │ │
  │ │       (4)   Number of 8250/16550 serial ports to register at runtime    │ │
  │ │       [*]   Extended 8250/16550 serial driver options                   │ │
  │ │       [*]     Support more than 4 legacy serial ports                   │ │
  │ │       [*]     Support for sharing serial interrupts                     │ │
  │ │       [*]     Autodetect IRQ on standard ports (unsafe)                 │ │
  │ │       [*]     Support RSA serial ports                                  │ │
  │ │       ...                                                               │ │
  │ └─────────────────────────────────────────────────────────────────────────┘ │
  ├─────────────────────────────────────────────────────────────────────────────┤
  │         <Select>    < Exit >    < Help >    < Save >    < Load >            │
  └─────────────────────────────────────────────────────────────────────────────┘

Ethernet support

CL-SOM-AM57x features an ethernet controller that can operate as a Layer-2 3-port ethernet switch. Alternatively, the ethernet controller can be setup in dualEMAC mode, which is the default on CL-SOM-AM57x. The mode of operation can be changed to ethernet switch by editing the device tree.

In the kernel configuration menu choose Device Drivers ---> Network device support ---> Ethernet driver support submenu and enable:

  • Texas Instruments (TI) devices
  • TI CPSW Switch Support
  ┌────────────────────────── Ethernet driver support ──────────────────────────┐
  │ ┌─────────────────────────────────────────────────────────────────────────┐ │
  │ │       ...                                                               │ │
  │ │       [*]   Texas Instruments (TI) devices                              │ │
  │ │       -*-     TI DaVinci MDIO Support                                   │ │
  │ │       -*-     TI DaVinci CPDMA Support                                  │ │
  │ │       -*-     TI CPSW Switch Phy sel Support                            │ │
  │ │       -*-     TI CPSW ALE Support                                       │ │
  │ │       <*>     TI CPSW Switch Support                                    │ │
  │ │       <*>     TI Common Platform Time Sync (CPTS) Support               │ │
  │ │       ...                                                               │ │
  │ └─────────────────────────────────────────────────────────────────────────┘ │
  ├─────────────────────────────────────────────────────────────────────────────┤
  │         <Select>    < Exit >    < Help >    < Save >    < Load >            │
  └─────────────────────────────────────────────────────────────────────────────┘

In the kernel configuration menu choose Device Drivers ---> Network device support ---> PHY Device support and infrastructure submenu and enable:

  • Drivers for Atheros AT803X PHYs
  ┌─────────────────── PHY Device support and infrastructure ───────────────────┐
  │ ┌─────────────────────────────────────────────────────────────────────────┐ │
  │ │       ...                                                               │ │
  │ │       <*>   Drivers for Atheros AT803X PHYs                             │ │
  │ │       ...                                                               │ │
  │ └─────────────────────────────────────────────────────────────────────────┘ │
  ├─────────────────────────────────────────────────────────────────────────────┤
  │         <Select>    < Exit >    < Help >    < Save >    < Load >            │
  └─────────────────────────────────────────────────────────────────────────────┘

Display support

CL-SOM-AM57 has 3 parallel RGB display interface and a single DHMI interface. Display interfaces usage:

  • RGB interface 1 is used for LCD and DVI display.
  • RGB interface 3 is used for LVDS display.
  • The HDMI interface is used for HDMI display.

In the kernel configuration menu choose Device Drivers ---> Graphics support submenu and set/enable:

  • MAP DRM
  • Number of CRTCs = 2
  ┌───────────────────────────── Graphics support ──────────────────────────────┐
  │ ┌─────────────────────────────────────────────────────────────────────────┐ │
  │ │       ...                                                               │ │
  │ │       [*]   OMAP DRM                                                    │ │
  │ │       (2)     Number of CRTCs                                           │ │
  │ │       ...                                                               │ │
  │ └─────────────────────────────────────────────────────────────────────────┘ │
  ├─────────────────────────────────────────────────────────────────────────────┤
  │         <Select>    < Exit >    < Help >    < Save >    < Load >            │
  └─────────────────────────────────────────────────────────────────────────────┘

In the kernel configuration menu choose Device Drivers ---> Graphics support ---> OMAP2+ Display Subsystem support submenu and enable:

  • DPI support
  • HDMI support for OMAP5
  ┌───────────────────── OMAP2+ Display Subsystem support ──────────────────────┐
  │ ┌─────────────────────────────────────────────────────────────────────────┐ │
  │ │       ...                                                               │ │
  │ │       [*]   DPI support                                                 │ │
  │ │       ...                                                               │ │
  │ │       [*]   HDMI support for OMAP5                                      │ │
  │ │       ...                                                               │ │
  │ └─────────────────────────────────────────────────────────────────────────┘ │
  ├─────────────────────────────────────────────────────────────────────────────┤
  │         <Select>    < Exit >    < Help >    < Save >    < Load >            │
  └─────────────────────────────────────────────────────────────────────────────┘

In the kernel configuration menu choose Device Drivers ---> Graphics support ---> OMAP DRM ---> OMAPDRM External Display Device Drivers submenu and enable:

  • TFP410 DPI to DVI Encoder
  • DVI Connector
  • HDMI Connector
  • Generic DPI panel
  ┌────────────── OMAP Display Device Drivers (new device model) ───────────────┐
  │ ┌─────────────────────────────────────────────────────────────────────────┐ │
  │ │       < > OPA362 external analog amplifier                              │ │
  │ │       <*> TFP410 DPI to DVI Encoder                                     │ │
  │ │       < > TPD12S015 HDMI ESD protection and level shifter               │ │
  │ │       <*> DVI Connector                                                 │ │
  │ │       <*> HDMI Connector                                                │ │
  │ │       < > Analog TV Connector                                           │ │
  │ │       <*> Generic DPI panel                                             │ │
  │ │       ...                                                               │ │
  │ └─────────────────────────────────────────────────────────────────────────┘ │
  ├─────────────────────────────────────────────────────────────────────────────┤
  │         <Select>    < Exit >    < Help >    < Save >    < Load >            │
  └─────────────────────────────────────────────────────────────────────────────┘

Wifi support

The WiFi chip is connected to the SoC via SDIO interface, so make sure you have MMC support turned on. Also, make sure wireless support is turned on under Network support.

In the kernel configuration menu choose Device Drivers ---> Network device support ---> Wireless LAN submenu and enable:

  • TI Wireless LAN support
  ┌──────────────────────────────── Wireless LAN ───────────────────────────────┐
  │ ┌─────────────────────────────────────────────────────────────────────────┐ │
  │ │       ...                                                               │ │
  │ │       [*]   TI Wireless LAN support  --->                               │ │
  │ │       ...                                                               │ │
  │ └─────────────────────────────────────────────────────────────────────────┘ │
  ├─────────────────────────────────────────────────────────────────────────────┤
  │         <Select>    < Exit >    < Help >    < Save >    < Load >            │
  └─────────────────────────────────────────────────────────────────────────────┘

In the kernel configuration menu choose Device Drivers ---> Network device support ---> Wireless LAN ---> TI Wireless LAN support submenu and enable:

  • TI wl18xx support
  • TI wlcore support
  ┌────────────────────────── TI Wireless LAN support ──────────────────────────┐
  │ ┌─────────────────────────────────────────────────────────────────────────┐ │
  │ │       ...                                                               │ │
  │ │       <M>   TI wl18xx support                                           │ │
  │ │       -M-   TI wlcore support                                           │ │
  │ │       < >     TI wlcore SPI support                                     │ │
  │ │       <M>     TI wlcore SDIO support                                    │ │
  │ │       [ ]   TI WiLink platform data                                     │ │
  │ └─────────────────────────────────────────────────────────────────────────┘ │
  ├─────────────────────────────────────────────────────────────────────────────┤
  │         <Select>    < Exit >    < Help >    < Save >    < Load >            │
  └─────────────────────────────────────────────────────────────────────────────┘

Bluetooth support

The Bluetooth chip is connected to the SoC via UART interface, so make sure you have UART support turned on. Also, make sure bluetooth support is turned on under Network support ---> Bluetooth subsystem support.

In the kernel configuration menu choose Networking support ---> Bluetooth subsystem support ---> Bluetooth device drivers submenu and enable:

  • HCI UART driver
  • UART (H4) protocol support
  • HCILL protocol support
  ┌───────────────────────── Bluetooth device drivers ──────────────────────────┐
  │ ┌─────────────────────────────────────────────────────────────────────────┐ │
  │ │       ...                                                               │ │
  │ │       <M> HCI UART driver                                               │ │
  │ │       [*]   UART (H4) protocol support                                  │ │
  │ │       [ ]   BCSP protocol support                                       │ │
  │ │       [ ]   Atheros AR300x serial support                               │ │
  │ │       [*]   HCILL protocol support                                      │ │
  │ │       ...                                                               │ │
  │ └─────────────────────────────────────────────────────────────────────────┘ │
  ├─────────────────────────────────────────────────────────────────────────────┤
  │         <Select>    < Exit >    < Help >    < Save >    < Load >            │
  └─────────────────────────────────────────────────────────────────────────────┘

Audio support

In the kernel configuration menu choose Device Drivers ---> Sound card support ---> Advanced Linux Sound Architecture ---> ALSA for SoC audio support submenu and enable:

  • SoC Audio for Texas Instruments chips using eDMA
  • Multichannel Audio Serial Port (McASP) support
  • SoC Audio for the Texas Instruments OMAP chips
  • HDMI audio support for OMAP4+ based SoCs
  • ASoC Simple sound card support
  ┌──────────────────────── ALSA for SoC audio support ─────────────────────────┐
  │ ┌─────────────────────────────────────────────────────────────────────────┐ │
  │ │       --- ALSA for SoC audio support                                    │ │
  │ │       < >   SoC Audio for the Atmel System-on-Chip                      │ │
  │ │       <*>   SoC Audio for Texas Instruments chips using eDMA            │ │
  │ │       <*>   Multichannel Audio Serial Port (McASP) support              │ │
  │ │       < >   SoC Audio for the AM33XX chip based boards                  │ │
  │ │       < >   Synopsys I2S Device Driver                                  │ │
  │ │             SoC Audio for Freescale CPUs  --->                          │ │
  │ │       <M>   SoC Audio for the Texas Instruments OMAP chips              │ │
  │ │       <M>   HDMI audio support for OMAP4+ based SoCs                    │ │
  │ │       ...                                                               │ │
  │ │       <M>   ASoC Simple sound card support                              │ │
  │ └─────────────────────────────────────────────────────────────────────────┘ │
  ├─────────────────────────────────────────────────────────────────────────────┤
  │         <Select>    < Exit >    < Help >    < Save >    < Load >            │
  └─────────────────────────────────────────────────────────────────────────────┘

Under the CODEC drivers submenu of the same section enable:

  • Wolfson Microelectronics WM8731 CODEC
  ┌──────────────────────── ALSA for SoC audio support ─────────────────────────┐
  │ ┌─────────────────────────────────────────────────────────────────────────┐ │
  │ │       ...                                                               │ │
  │ │       <M> Wolfson Microelectronics WM8731 CODEC                         │ │
  │ │       ...                                                               │ │
  │ └─────────────────────────────────────────────────────────────────────────┘ │
  ├─────────────────────────────────────────────────────────────────────────────┤
  │         <Select>    < Exit >    < Help >    < Save >    < Load >            │
  └─────────────────────────────────────────────────────────────────────────────┘

CAN bus support

In the kernel configuration menu choose Networking support ---> CAN bus subsystem support ---> CAN Device Drivers submenu and enable:

  • Platform CAN drivers with Netlink support
  • Bosch C_CAN/D_CAN devices
  ┌───────────────────────────── CAN Device Drivers ────────────────────────────┐
  │ ┌─────────────────────────────────────────────────────────────────────────┐ │
  │ │       ...                                                               │ │
  │ │       <M> Platform CAN drivers with Netlink support                     │ │
  │ │       ...                                                               │ │
  │ │       <M>   Bosch C_CAN/D_CAN devices  --->                             │ │
  │ │       ...                                                               │ │
  │ └─────────────────────────────────────────────────────────────────────────┘ │
  ├─────────────────────────────────────────────────────────────────────────────┤
  │         <Select>    < Exit >    < Help >    < Save >    < Load >            │
  └─────────────────────────────────────────────────────────────────────────────┘

In the kernel configuration menu choose Networking support ---> CAN bus subsystem support ---> CAN Device Drivers ---> Bosch C_CAN/D_CAN devices submenu and enable:

  • Generic Platform Bus based C_CAN/D_CAN driver
  ┌───────────────────────── Bosch C_CAN/D_CAN devices ─────────────────────────┐
  │ ┌─────────────────────────────────────────────────────────────────────────┐ │
  │ │       ...                                                               │ │
  │ │       <M>   Generic Platform Bus based C_CAN/D_CAN driver               │ │
  │ │       ...                                                               │ │
  │ └─────────────────────────────────────────────────────────────────────────┘ │
  ├─────────────────────────────────────────────────────────────────────────────┤
  │         <Select>    < Exit >    < Help >    < Save >    < Load >            │
  └─────────────────────────────────────────────────────────────────────────────┘

See also