OMAP35X Drivers Datasheet

SPRS524 -oct 2008

OMAP35X Linux Drivers Datasheet SDO PSP Validation

ABSTRACT

The Linux PSP consists of optimized peripheral device drivers for OMAP35X EVM integrated with the Linux 2.6.22 kernel to run on the ARM CORTEX-A8 core. The drivers enable rapid software development on the OMAP platforms and are provided in source form to facilitate portability on production hardware platforms. This document provides an overview and performance data for each of the drivers.

Contents 1 Texas Instruments OMAP 35x Linux Drivers ...... 6 1.1 Drivers Summary ...... 6 1.2 Limitations...... 7 1.3 Documentation...... 8 2 Linux Kernel Drivers...... 9 2.1 Video Display Driver ...... 9 2.1.1 DSS Display Driver Features...... 10 2.1.2 Features Not Supported ...... 10 2.1.3 Constraints...... 10 2.1.4 Kernel menu configuration...... 11 2.1.5 Supported System Calls ...... 11 2.1.6 Supported ...... 12 2.1.7 Performance and Benchmarks...... 14 2.2 Video capture Driver...... 15 2.2.1 Description ...... 15 2.2.2 Driver Features ...... 16 2.2.3 Features Not supported...... 16 2.2.4 Constraints...... 16 2.2.5 Kernel Menu Configuration...... 16 2.2.6 Supported System Calls ...... 16 2.2.7 Supported IOCTLS ...... 16 2.2.8 Performance and Benchmarks...... 17 2.3 Resizer Driver ...... 18 2.3.1 Description ...... 18 2.3.2 Driver Features ...... 18 2.3.3 Features Not supported...... 18 2.3.4 Constraints...... 18 2.3.5 Kernel Menu Configuration...... 19 2.3.6 Supported System Calls ...... 19 2.3.7 Supported IOCTLS ...... 19 2.3.8 Performance and Benchmarks...... 19 2.4 Audio Driver ...... 20 2.4.1 Description ...... 20 2.4.2 Driver Features ...... 21 2.4.3 Features Not Supported ...... 21 2.4.4 Constraints...... 21

1

2.4.5 Kernel Menu Configuration...... 21 2.4.6 Supported System Calls ...... 22 2.4.7 Supported IOCTLs...... 22 2.4.8 Performance and Benchmarks...... 23 2.5 Ethernet Driver...... 24 2.5.1 Description ...... 24 2.5.2 Features...... 24 2.5.3 Features Not supported...... 24 2.5.4 Constraints...... 25 2.5.5 Kernel Menu Configuration...... 25 2.5.6 Supported System Calls ...... 25 2.5.7 Supported IOCTLS ...... 25 2.5.8 Performance and Benchmarks...... 26 2.6 USB Drivers ...... 27 2.6.1 EHCI/OHCI Controller...... 27 2.6.2 USB OTG HS Controller...... 27 2.6.3 USB-Mass Storage Class Host Driver...... 28 2.6.4 USB-Mass Storage Class Slave Driver...... 33 2.6.5 USB-CDC/RNDIS Slave Driver ...... 36 2.6.6 USB-Human Interface ...... 38 2.6.7 USB-ISO Driver...... 40 2.7 NAND Flash Driver ...... 42 2.7.1 Description ...... 42 2.7.2 Driver Features ...... 42 2.7.3 Features Not Supported ...... 43 2.7.4 Constraints...... 43 2.7.5 Kernel Menu configuration...... 43 2.7.6 Supported System Calls ...... 43 2.7.7 Supported IOCTLs...... 44 2.7.8 Performance and Benchmarks...... 45 2.8 MMC/SD Driver...... 47 2.8.1 Description ...... 47 2.8.2 Driver Features ...... 47 2.8.3 Features Not Supported ...... 48 2.8.4 Constraints...... 48 2.8.5 Kernel Menu Configuration...... 48 2.8.6 Supported System Calls ...... 48 2.8.7 Performance and Benchmarks...... 49 2.9 UART Driver...... 52 2.9.1 Description ...... 52 2.9.2 Driver Features ...... 52 2.9.3 Features Not Supported ...... 53 2.9.4 Constraints...... 53 2.9.5 Kernel Menu Configuration...... 54 2.9.6 Supported System Calls ...... 54 2.9.7 Supported IOCTLs...... 55 2.9.8 Performance and Benchmarks...... 55 2.10 I2C Driver...... 56 2.10.1 Description ...... 56 2.10.2 Driver Features ...... 56 2.10.3 Features Not Supported ...... 56 2.10.4 Constraints...... 57 2.10.5 Kernel Menu Configuration...... 57

2 Texas Instruments OMAP 35x Linux Drivers

2.10.6 Supported System Calls ...... 57 2.10.7 Supported IOCTLs...... 57 2.11 Touch screen driver ...... 58 2.11.1 Description ...... 58 2.11.2 Driver Features ...... 58 2.11.3 Features Not Supported ...... 59 2.11.4 Constraints...... 59 2.11.5 Kernel Menu Configuration...... 59 2.11.6 Supported System Calls ...... 59 2.11.7 Supported IOCTLS ...... 59 2.11.8 Performance and Benchmarks...... 59 2.12 Power Management Driver...... 60 2.12.1 Description ...... 60 2.12.2 Driver Features ...... 60 2.12.3 Features Not Supported ...... 61 2.12.4 Constraints...... 61 2.12.5 Kernel Menu Configuration...... 61 2.12.6 Supported System Calls ...... 61 2.12.7 Supported IOCTLS ...... 61 2.12.8 Performance and Benchmarks...... 62 2.12.9 Power measurements for C-States at various OPPs...... 62 2.13 SDIO WLAN Driver ...... 64 2.13.1 Description ...... 64 2.13.2 Driver Features ...... 64 2.13.3 Features not supported...... 64 2.13.4 Constraints...... 64 2.13.5 Supported System Calls ...... 65 2.13.6 Supported IOCTLS ...... 65 2.13.7 Performance and Benchmarks...... 65 Appendix A ...... 66 U-Boot Overview...... 66 Description ...... 66

3 OMAP35X Linux Drivers Datasheet

SPRS524 -oct 2008

Features OMAP35x Linux Drivers SPRS518-SEP 2008 • Supported Devices o Supports Mirroring • OMAP35x • The following features are supported through Linux V4L2 • Developed and Tested on OMAP35XX Interface EVM with ES 2.1 silicon o Supports both the video • Built with Linux Kernel version 2.6.22 pipelines • Compiled with CodeSourcery arm- o Supports NTSC-J, M,NTSC- 2007-q3 tool chain 443 and PAL-B, D, G, H, I ,N, • ARM GNU/Linux Application Binary PAL-M, PAL-N, PAL-Nc Interface (ABI) Standards on S-Video interface • Support for U-boot 1.1.4 o Supports YUYV4:2:2, • Supported boot modes UYVY4:2:2, RGB565, • OneNAND RGB565X, RGB888, RGB32 (ARGB) pixel formats on • Ships with sample root each of the video windows based on Busybox 1.9.0 o Supports Rotation by 0, • Ramdisk 90,180 and 270 degrees • NFS o Supports Mirroring • Display Sub System (DSS) o Supports Upscaling from 1x • Supports display using FBDEV and to 8x and Downscaling upto V4L2. 0.5x • Supports NTSC and PAL resolutions o Supports Transparency Color on TV output. key (Source and Destination) • Supports VGA resolution on LCD. o Programmable Video Color Space conversion YCbCr • Supports ED (480P) and HD (720P) 4:2:2 into RGB resolutions on DVI. o Supports Cropping • The following features are supported through Linux FBDEV o Supports alpha blending Interface • Video Capture o Supports VGA resolution on • Supports BT.656 NTSC capture LCD, NTSC/PAL on S-Video through TVP5146 interface, ED (480P), HD(720P) on DVI. • Audio o Supports Display Panning • Advanced Sound Linux Architecture (ALSA) o Supports programmable display modes (1, 2, 4, 8, 12, • Supports record and playback 16, 24 bits per pixel modes) through TWL4030 and AIC23(on on OSD daughter card). o Supports Color Lookup Table • Supports McBSP in slave mode and for 1, 2, 4 and 8 bits per pixel TWL4030 Codec in master mode. modes. • Supports I2S McBSP data format

4

• Connectivity Drivers – (Ethernet, • Supports I2C interface to Audio USB,SDIO-WLAN) codec. • Supports SMSC9115 external • Supports UART 1 interface for Ethernet controller (via GPMC) console. o 10/100 Mbps, Half and Full • Power Management duplex • Supports dynamic tick and tick o Auto-negotiation suppression • Supports High Speed USB OTG • Supports cpuidle framework with Controller with mini-AB port menu governor • Supports USB Host and Gadget o MPU/Core retention and Off- mode of operations mode • Support for USB2.0 Low, Full and o Smart Reflex in bypass High speed devices mode. • Supports Mass storage and HID • Supports cpufreq framework with class devices under host mode of ondemand and performance operation governors • Supports Mass storage, CDC and RNDIS classes under gadget mode • Resizer of operation. • Supports resizing from 1/4x to 4x • Supports SDIO functionality with Marvel SD8686/SD8385 WLAN card. • Supports independent horizontal and vertical resizing. • Supports adhoc (peer to peer) and • Supports YUV422 packed data and infrastructure (managed) modes of color separate data. WLAN operation. • Supports resizing using multiple driver instances. • Storage (MMC/SD, CEATA, OneNAND, SLC NAND) • Supports OneNAND • Miscellaneous with big block access • Keypad • Supports High-speed, High Capacity • Touch screen MMC (8-bit/4-bit/1-bit) • SDMA • Supports High-speed, High Capacity • PWM SD (4-bit/1-bit) • GPIO • Supports CEATA hard drive through MMC/SD interface. • WDT • Serial (McSPI, UART, HS-I2C) • Timers • Supports McSPI interface to Touch Screen

5 OMAP35X Linux Drivers Datasheet

SPRS524 -oct 2008

1 Texas Instruments OMAP 35x Linux Drivers

1.1 Drivers Summary The table below summarizes Linux driver support in the Linux PSP release 1.0.2 from TI:

Table 1. OMAP 35x Peripheral Driver Support

Peripheral Description Linux Driver Type Section Display Enables display for graphics pipeline. Supporting VGA FBDEV 2.1 Subsystem resolutions on LCD, NTSC/PAL on TV out and (DSS) ED(480P),HD(720P) on DVI. Enables display for Video pipelines for NTSC,PAL on TV out and V4L2 2.1 VGA resolutions on LCD,ED(480P) and HD(720P) on DVI. Video Capture Enables NTSC and PAL BT.656 capture V4L2 2.2

Resizer Enables upscaling to 4x and downscaling to 1/4x of input images. 2.3 Character Audio (McBSP) Audio Record and Playback ALSA 2.4 Transmit/receive network data. Supports Auto negotiation with Netdev 2.5 Ethernet 10/100 Mbps link speed. USB 2.0 MSC USB Mass Storage Class Host Driver Block 2.6.3 Host USB 2.0 MSC USB Mass Storage Class Slave Driver USB Gadget 2.6.4 Slave USB 2.0 HID USB Human Interface Device Host Driver Input driver 2.6.6 Host USB 2.0 CDC USB Communication Device Class USB Gadget /netdev 2.6.5 Slave USB 2.0 RNDIS USB Remote Network Driver Interface Specification USB Gadget /netdev 2.6.5 SLAVE Flash Storage system MTD Character and 2.7 OneNAND Block MMC/SD Interface to Multi Media Secure Digital cards Block 2.8 Serial Character 2.9 UART Communication Interface Inter-IC Communication Character 2.10 I2C

Enables power management by supporting 2.11 Power CPU Idle and CPUIdle,CPUfreq,dynamic tick and Standard Linux clock Management CPUfreq framework Frameworks Enables transmission/reception of wireless network data. 2.12 SDIO/WLAN Supports adhoc and infrastructure modes. Netdev

CEATA Interface to CEATA hard drives. Block

Serial Peripheral Interface Character McSPI

SDMA System DMA Engine Linux DMA

6 OMAP35X Linux Drivers Datasheet

SPRS524 -oct 2008

1.2 Limitations This table summarizes the limitations in the PSP release version 1.0.2

Peripheral Status Use Case USB 2.0 OTG Feature not supported USB On The Go. Supports HNP and SRP. SDIO Feature not supported Bluetooth DSS-Composite Video Feature not supported Display through Composite interface

Table 2. Feature Limitations

7

1.3 Documentation The following documents are included in the driver package:

Document Name Contents ReleaseNotes.pdf Release notes for the release. UserGuide.pdf UserGuide for the release

Table 3. List of documents

:

8 Texas Instruments OMAP 35x Linux Drivers OMAP35X Linux Drivers Datasheet

SPRS524 -oct 2008

2 Linux Kernel Drivers This section describes the OMAP Linux device driver features and performance data.

2.1 Video Display Driver The video display driver for the OMAP 35x DSS peripheral consists of video driver, compliant with the V4L2 framework and frame buffer driver compliant with FBDEV framework. The device nodes for display driver are /dev/v4l/video1, /dev/v4l/video2 for video pipelines and /dev/fb0 for single graphics pipeline. Board Control Driver implements LCD , DVI and TV output software configurations. Display library implements abstraction layer for the Video Display Hardware.

Control GUI Video Application Applications Applications

Control Interface /dev/fb0 /dev/v4l/video1 (2.6) FBDEV /dev/v4l/video2 V4L2

Frame Buffer Driver Video Driver

Board control driver

Display library Kernel space

Hardware VGA DVI LCD Monitor TV Set OMAP 35x Display Pane l Hardware

9 OMAP35X Linux Drivers Datasheet

SPRS524 -oct 2008

2.1.1 DSS Display Driver Features The driver supports the following features • Buffer exchange mechanism supporting mmap’ed on both V4L2 and Fbdev and user pointer exchange mechanism only on V4L2. • Supports static and modular builds. Modular build is supported only for V4L2. • Supports VGA resolution on LCD, NTSC/PAL resolution on TV out, ED(480P) and HD(720P) resolutions on DVI. • Display Panning, Mirroring and Color Map operations for the graphics pipeline. • Windowing, Cropping, Rotation (0, 90,180 and 270 degrees), Mirroring, Upscaling, downscaling for Video pipelines. • Configuration of parameters such as height and width of display screen, bits-per-pixel, refresh rate, etc. • Supports setting up of OSD and Video window destinations (TV or LCD or DVI) through sysfs • Supports LCD backlight control through sysfs interface • Supports global alpha blending and pixel based alpha blending on Video2 and graphics pipelines. • Supports linking on both the video pipelines.

2.1.2 Features Not Supported The driver does not support the following features • Rotation in 8 or less bits per pixel in color mode. • Mirroring of RGB888 format images • Composite out interface • Hardware cursor • Gamma corrections • RFBI(MIPI DBI Protocol) • Serial display interface (DSI / SDI)

2.1.3 Constraints • Rotation of an RGB24-packed format image is not supported due to hardware limitations • Alpha blending for Video2 pipeline on TV out. • PAL resolution can be set maximum to 720 X 574 instead of 720X 576 because of hardware limitation. • Display loses sync when incorrect parameters are programmed. • Minimum 3 buffers are required for streaming. • Panning is not supported on Fbdev when rotation is enabled.

10

2.1.4 Kernel menu configuration Device Drivers ---> Multimedia devices---> <*> Video For Linux [*] Video capture adapters OMAP2/OMAP3 V4L2 drivers ---> <*> Video out library <*> Video out driver [*] TV Out support Graphics Support ---> <*> Support for frame buffer devices <*> OMAP frame buffer support (EXPERIMENTAL) <*> OMAP3 EVM VGA Display

2.1.5 Supported System Calls Driver conforms to V4l2 and FBDEV framework. V4l2: See http://v4l2spec.bytesex.org/v4l2spec/v4l2.pdf FBDEV: See http://www.linux-fbdev.org/

11 OMAP35X Linux Drivers Datasheet

SPRS524 -oct 2008

2.1.6 Supported IOCTLs

2.1.6.1 FBDEV

Constant Description FBIOGET_VSCREENINFO These I/O controls are used to query the variable screen info. This allows an application to query the display mode, including the color depth, resolution, timing etc. FBIOPUT_VSCREENINFO These I/O controls are used to set the variable screen info. This allows an application to query or change the display mode, including the color depth, resolution, timing etc. This I/O control can be used by applications to get the fixed FBIOGET_FSCREENINFO properties of the display, e.g. the start address of the framebuffer memory. FBIOPUTCMAP Sets up pseudo palette. FBIOGETCMAP Return the CMAP to the application.

FBIOPAN_DISPLAY This I/O control is used to pan the display. It controls the portion of framebuffer memory that is visible. In general, the framebuffer dimensions in memory can be larger than the size of the display. This feature can be used in a GUI environment to support a “virtual desktop” larger than the physical display. However, it can also be used to support framebuffer “flipping.” Flipping refers to the process of writing to a non-visible portion of framebuffer memory and then making it visible all at once FBIO_BLANK This I/O control is used to blank or unblank the frame buffer console.

12 OMAP35X Linux Drivers Datasheet

SPRS524 -oct 2008

2.1.6.2 V4L2

Constant Description VIDIOC_ENUMOUTPUT,VIDIOC_S_OU Enumerate video outputs, set output, get output TPUT,VIDIOC_G_OUTPUT VIDIOC_ENUM_FMT Enumerate supported formats by current decoder VIDIOC_G_FMT, VIDIOC_S_FMT, Gets or sets the data format, try a format. VIDIOC_TRY_FMT VIDIOC_G_CROP, VIDIOC_S_CROP Queries or selects the current cropping rectangle. VIDIOC_QBUF, VIDIOC_DQBUF Exchanges a buffer with the driver. VIDIOC_QUERYBUF Queries the status of a buffer. VIDIOC_QUERYCAP Queries device capabilities. VIDIOC_REQBUFS Initiates memory mapping I/O. VIDIOC_STREAMON, Starts or stops streaming I/O. VIDIOC_STREAMOFF VIDIOC_CROPCAP To get cropping parameters

CUSTOM IOCTLS: Constant Description VIDIOC_S_OMAP2_MIRROR Set the Mirroring. VIDIOC_G_OMAP2_MIRROR Gets the current mirroring status VIDIOC_S_OMAP2_ ROTATION Sets / gets the rotation angle VIDIOC_G_OMAP2_ ROTATION VIDIOC_S_OMAP2_BGCOLOR Sets /gets the background color VIDIOC_G_OMAP2_BGCOLOR VIDIOC_S_OMAP2_COLORKEY Sets/gets the chosen transparent color key value VIDIOC_G_OMAP2_COLORKEY VIDIOC_S_OMAP2_COLORKEY_ENAB Enable/Disable the chosen transparent color key LE,VIDIOC_G_OMAP2_COLORKEY_DI SABLE VIDIOC_S_OMAP2_COLORCONV These are used to set/get the color conversion coefficients matrix. VIDIOC_G_OMAP2_COLORCONV The VIDIOC_S_OMAP2_DEFCOLORCONV I/O control can be VIDIOC_S_OMAP2_DEFCOLORCONV used to set the coefficients matrix to default values.

13 OMAP35X Linux Drivers Datasheet

SPRS524 -oct 2008

2.1.7 Performance and Benchmarks

Display Frame Interface Resolution rate (fps)

LCD(V4L2) VGA 59.66 LCD(Fbdev) VGA 60.5 DVI(V4L2) 480P,720P 59.66 DVI(Fbdev) 480P,720P 60.03 TV-OUT(V4L2) NTSC 30.03 TV-OUT(Fbdev) NTSC 59.84

Table 4. DSS Performance

The performance numbers are captured using the following

• LCD Display- LS037V7DW01 from Sharp

• TV Display – OMAP35xx EVM connected via S-Video to Sony Trinitron CRT TV.

• DVI Display- OMAP35xx EVM connected via DVI-D interface to Dell monitor.

• Default Cpu Idle State (C1)

• CPU occupancy seen was around 15% for V4L2 (mmap based application), around 0.13% for V4L2(user pointer based application) , 0.06% for Fbdev(on LCD and S- Video) and around 15% for Fbdev(on DVI).

• The frame rates observed with Fbdev are low. MR DPSP00012099 has been raised for the same.

14 OMAP35X Linux Drivers Datasheet

SPRS524 -oct 2008

2.2 Video capture Driver

2.2.1 Description The camera ISP is a key component for imaging and video applications such as video preview, video record, and still-image capture with or without digital zooming. The camera ISP provides the system interface and the processing capability to connect RAW image-sensor modules and video decoders tothe OMAP35x device. The capture module consists of the following interfaces: • One S-video SD input in BT.656 format • One Composite SD input in BT.656 format Both these video inputs are connected to one TVP5146 decoder and the application can select between these two inputs using standard V4L2 interface.Only one input can be captured or selected at any given time.

The following figure shows the basic block diagram of capture interface .

15

2.2.2 Driver Features • Supports one software channel of capture and a corresponding device node (/dev/video0) is created. • Supports single I/O instance and multiple control instances • Supports buffer access mechanism through memory mapping and user pointers • Supports dynamic switching among input interfaces with some necessary restrictions wherever applicable • Supports NTSC and PAL standard on Composite and S-Video interfaces • Supports 8-bit BT.656 capture in UYVY and YUYV interleaved formats • Supports standard V4L2 IOCTLs to get/set various control parameters like brightness, contrast and saturation. • TVP5146 decoder driver module can be used statically or dynamically (insmod and rmmod supported)

2.2.3 Features Not supported • Modular driver build • Cropping and scaling operations and their corresponding V4L2 IOCTLs. • Raw capture (capture through sensor interface)

2.2.4 Constraints

• Dynamic switching of resolution and dynamic switching of interfaces is not supported when streaming is on. • Driver buffer addresses and pitch must be aligned to 32 byte boundary.

2.2.5 Kernel Menu Configuration Please refer to the Addendum daughter card pdf provided along with the release.

2.2.6 Supported System Calls open(), close(), (),mmap(),munmap().

2.2.7 Supported IOCTLS Driver conforms to V4l2 framework. Please refer to this link for V4L2 ioctls- http://v4l2spec.bytesex.org/v4l2spec/v4l2.pdf

16 Linux Kernel Drivers

2.2.8 Performance and Benchmarks

Resolution Frame rate NTSC 30.07 PAL 25.03

The performance numbers are captured using the following • REV P9 OMAP3 EVM Daughter Card • Default Cpu Idle State (C1) • CPU occupancy seen was around 15%.

17 OMAP35X Linux Drivers Datasheet

SPRS524 -oct 2008

2.3 Resizer Driver

2.3.1 Description

OMAP35x Resizer module supports upscaling and downscaling. It resizes YUV422 image and stores output image in the RAM. The following figure shows the block diagram of resizer module.

Application User Space

Kernel Space Resizer Application Interface

Resizer Hardware Hardware

2.3.2 Driver Features The driver supports the following features • Resizes input frame stored in RAM and stores output frame in RAM. • Supports resizing from 1/4x to 4x. • Supports independent horizontal & vertical resizing. • Supports YUV422 packed and color separate data. • Supports driver allocated and user provided buffers. • Supports resizing using multiple channels.

2.3.3 Features Not supported The driver does not support the following features • Modular driver build.

2.3.4 Constraints • All input,ouput addresses and pitch must be 32 bytes aligned. • Output image size cannot be more than 2047x2047

18

• Output width must be even. • Output width must be 16 byte aligned for vertical resizing. • The horizontal start pixel must be within range 0-15 for color interleaved and 0-31 for color separate data.

2.3.5 Kernel Menu Configuration Please refer to the PSP user guide provided along with the release.

2.3.6 Supported System Calls open(), close(), ioctl(),mmap(),munmap().

2.3.7 Supported IOCTLS

Constant Description RSZ_S_PARAM Set the Resizer driver parameters RSZ_G_PARAM Get the Resizer driver parameters RSZ_RESIZE Starts the resizing process RSZ_QUERYBUF Request physical address of buffers allocated by RSZ_REQBUF RSZ_REQBUF Request to allocate buffers

2.3.8 Performance and Benchmarks

Resize operation Time taken in ms

Upscale to 4x 2.258 Downscale to 1/4x 4.059

The Performance was captured with the following setup • For upscale operation input image resolution used was 176x144. • For downscale operation input image used was of 704x576 resolution. • The CPU occupancy observed is around 90%. IR SDOCM00036123 has been raised to track the issue. • Default Cpu Idle State (C1)

19 OMAP35X Linux Drivers Datasheet

SPRS524 -oct 2008

2.4 Audio Driver

2.4.1 Description

The OMAP audio driver is a char driver that supports audio operations over the McBSP/TWL4030 Codec. It is compatible with Advanced Linux Sound Architecture (ALSA) interface.

Native ALSA Application Native ALSA Application

User Space

ALSA Library

Hardware Access

Plugins (Conversion, Routing etc.)

ALSA Library API

ALSA Kernel API

PCM Control Kernel Space

OMAP ALSA Kernel Driver

TWL4030 Codec ALSA Driver

Helper Driver (Control/Data T ransfer)

Hardware

Data transfer Interface SYSTEM DMA Control Interface (McBSP) (I2C) OMAP 35x

Audio Codec (TWL4030/AIC23)

Figure 1. OMAP35X Audio Driver Architecture

20 OMAP35X Linux Drivers Datasheet

SPRS524 -oct 2008

2.4.2 Driver Features The driver supports the following features – • ALSA framework • Record and playback capability in full duplex mode are supported for multiple sample rates(8KHz, 11.025KHz, 12KHz, 16KHz, 22KHz, 24KHz, 32KHz, 44.1kHz and 48kHz) • I2S mode of operation. • Mono and stereo modes. Audio channel set to stereo mode by default. • 16/24 Bit little endian signed PCM data. • Interleaved access mode • McBSP works in slave mode and TWL4030 Codec in master mode. • Start, stop, pause and resume feature • Mixer support. • McBSP is configured as slave and TWL4030 Codec is configured as master.

2.4.3 Features Not Supported • mmap mode..

2.4.4 Constraints The Driver has the following constraints. • McBSP can not be set as master when TWL4030 codec is used. • Synthesizer and similar interfaces are not supported. • Formats other than I2S. • Opening of the same stream (Play/Record) multiple times is not supported • OSS framework is not supported • Configuration of capture and playback streams in different sampling rates.

2.4.5 Kernel Menu Configuration Device Drivers ---> Sound ---> <*> Sound card support Advanced Linux Sound Architecture ---> <*> Advanced Linux Sound Architecture <*> Dynamic minor numbers ALSA ARM devices ---> <*> OMAP 35XX EVM ALSA driver

21

2.4.6 Supported System Calls Refer http://www.alsa-project.org/main/index.php/Main_Page for API calls.

2.4.7 Supported IOCTLs

NA

22 Linux Kernel Drivers OMAP35X Linux Drivers Datasheet

SPRS524 -oct 2008

2.4.8 Performance and Benchmarks

1800000 1600000 1400000 1200000 1000000 Read 800000 Write 600000 400000 Data rate in rate bits/sec Data 200000 0 8000 32000 44100 48000 Sampling Rate in Hz

Figure 2. Audio Performance

Sampling Rate in Hz No. of bits/Sec Duration in Sec CPU Load in %

8000 256010 163.833613 0.08

32000 1024031 40.958741 0.34

44100 1411240 29.720697 0.44

48000 1536021 27.306302 0.44

Table 5. Audio Read Performance

Sampling Rate in Hz No. of bits/Sec Duration in Sec CPU Load in %

8000 259379 161.70559 0.03

32000 1037507 40.426755 0.15

44100 1429799 29.33493 0.14

48000 1556102 26.953918 0.41

Table 6. Audio Write Performance

The Performance numbers were captured using the following • Word length in bits = 16 • Number of channels per sample = 2 • Application Buffer size = 4096 bytes • Total Buffer size = 5 MB

23

2.5 Ethernet Driver

2.5.1 Description The Ethernet driver supports the Linux netdev Interface. The EMAC module SMSC911x is connected through the GPMC interface.

User Space Application

Kernel Space Linux Socket Layer & Networking Protocols

Linux Networking Core

OMAP 35X Ethernet Controller Driver

OMAP 35X GPMC Module Hardware

Ethernet Hardware

Figure 3. Linux Kernel Ethernet Driver

2.5.2 Features The driver supports the following features. • 10/100 Mbps speed. • Auto Negotiation. • Multicast and broadcast. • Promiscuous mode. • Full duplex and half duplex modes. • Ethtool

2.5.3 Features Not supported None

24 Linux Kernel Drivers OMAP35X Linux Drivers Datasheet

SPRS524 -oct 2008

2.5.4 Constraints • Link might not be established if the peer doesn't enable autonegotiation. • If "Power management Off mode" support enabled, the Ethernet driver is instable

2.5.5 Kernel Menu Configuration Networking support ---> [*] Networking support Networking options ---> <*> Packet socket <*> Unix domain sockets [*] TCP/IP networking [*] IP: kernel level autoconfiguration [*] IP: DHCP support Device Drivers ---> Network device support ---> [*] Network device support Ethernet (10 or 100Mbit) ---> [*] Ethernet (10 or 100Mbit) <*> SMSC LAN9115 support for OMAP3EVM board

2.5.6 Supported System Calls None

2.5.7 Supported IOCTLS None

25 OMAP35X Linux Drivers Datasheet

SPRS524 -oct 2008

2.5.8 Performance and Benchmarks

100-LLD

100.00 90.00 80.00 70.00 60.00 50.00 100-LLD 40.00 30.00 20.00 Bandwidth inBandwidth MB/S 10.00 0.00 16 32 64 128 212 TCP Window Size in KBytes

Figure 4. Ethernet-100- Performance

TCP window size Bandwidth Transfer size in in KBytes Mbits/Sec Mbytes Interval in sec 16 21.2 310 60 32 21.45 304 60 64 20.8 297.7 60 128 20.85 294.9 60 208 20.5 291.0 60

Table 7. Ethernet-100- Performance

The Performance numbers were captured using the following • server side command : “-s” • client side command: "-c -w -d -t60" • iperf tool is run on DUT1 in server mode and on DUT2 in Client mode(ver1.7.0 is used on both sides) • The Data captured here is for "iperf" in Client mode • Cross cable is used to measure performance • speed is set to 100Mbps • Cpu Idle State=0

26

2.6 USB Drivers

2.6.1 EHCI/OHCI Controller Current release doesn’t support this feature.

2.6.2 USB OTG HS Controller

2.6.2.1 Description The USB driver is implemented on top of Mentor IP version 1.4 as a communication driver and supports MSC, HID, Hub, CDC-Slave and RNDIS slave classes. HS DMA engine is used for both MSC-host and MSC-slave operations.

2.6.2.2 Driver Features The Driver supports the following features. • Host mode driver • Mass Storage Class (MSC) Host • Hub Class. • Human Interface Devices (HID) • Isochronous Devices(ISO) • Slave mode driver • Mass Storage Class (MSC) Slave. • Communication Device Class (CDC)Slave support • Remote Network Driver Interface Specification (RNDIS) Slave support.

2.6.2.3 Features Not Supported The following features are not supported by driver. • USB OTG support.

27 OMAP35X Linux Drivers Datasheet

SPRS524 -oct 2008

2.6.3 USB-Mass Storage Class Host Driver

2.6.3.1 Description:

Host Application User Space

Kernel Space File System

SCSI Layer

USB Core and Hub

USB Host Controller Driver

Hardware Mentor USB OTG Controller (Host)

NXP -PHY

Figure 5. USB Mass Storage Class Host Driver

2.6.3.2 Driver Features The Driver supports the following features. • DMA and Interrupt mode

2.6.3.3 Features Not Supported None

2.6.3.4 Constraints • VBUS must be re-enabled after disconnect & reconnect of the MSC device. • Few flash disks may not enumerate themselves if they do not respond to the PING points during CONTROL packet transactions. • There is a limitation in the power that is supplied by the charge pump. If you notice VBUSERR messages in the system console, then connect a self powered USB hub and then attach the device to the hub.

28

2.6.3.5 Kernel Menu Configuration Device Drivers ---> SCSI device support ---> <*> SCSI device support [*] legacy /proc/scsi/support --- SCSI support type (disk, tape, CD-ROM) <*> SCSI disk support USB support ---> <*> Support for Host-side USB --- Miscellaneous USB options [*] USB device filesystem [*] USB device class-devices (DEPRECATED) --- USB Host Controller Drivers Inventra USB Highspeed Dual Role Controller Support <*> Use Builtin Controller --- OMAP 343x high speed USB support Driver Mode (USB Host) ---> (X) USB Host [ ] Disable DMA (always use PIO) --- USB Device Class drivers <*> USB Mass Storage support --- USB Input Devices <*> USB Human Interface Device(full HID) support [*] HID input layer support

2.6.3.6 Supported System Calls open() , close() , read() , write() , ioctl()

2.6.3.7 Supported IOCTLS None

29 OMAP35X Linux Drivers Datasheet

SPRS524 -oct 2008

2.6.3.8 Performance Benchmarks

2.6.3.8.1 USB-MSC Host-DMA-Ext2 Performance

50.00 45.00 40.00 35.00 30.00 DMA 25.00 Read 20.00 DMA 15.00 Write 10.00 Transfer Rate in Rate MB/S Transfer 5.00 0.00 100 256 512 1024 5120 Buffer Size in KB

Figure 6. USB-MSC HOST-DMA-Ext2 Performance

Buffer size Total Bytes Transfer Rate (KBytes) Transferred (MB) (MB/s) CPU Load in % 100 100 8.70 14.02 256 100 9.45 17.40 512 100 9.44 18.20 1024 100 9.54 17.74 5120 100 9.33 16.71

Table 8. USB-MSC Host-DMA-Read Performance values

Buffer size Total Bytes Transfer Rate (KBytes) Transferred (MB) (MB/s) CPU Load in % 100 100 22.66 20.04 256 100 21.39 19.80 512 100 21.06 18.91 1024 100 21.41 19.55 5120 100 19.68 17.26

Table 9. USB-MSC Host-DMA-Write Performance values

The performance numbers are captured using the following • Hard Disk: Western Digital, 60 GB • File Format = Ext2 • CPU IDLE STATE=0

30

2.6.3.8.2 USB-MSC Host-DMA-Ext3 Performance

50.00 45.00 40.00 35.00 30.00 DMA 25.00 Read 20.00 DMA 15.00 Write 10.00 Transfer Rate in Rate MB/S Transfer 5.00 0.00 100 256 512 1024 5120 Buffer Size in KB

Figure 7. USB-MSC HOST-DMA-Ext3 Performance

Buffer size Total Bytes Transfer Rate (KBytes) Transferred (MB) (MB/s) CPU Load in % 100 100 8.57 12.85 256 100 8.94 13.20 512 100 9.15 17.36 1024 100 9.32 18.21 5120 100 9.20 16.84

Table 10. USB-MSC Host-DMA-Ext3 Read Performance values

Buffer size Total Bytes Transfer Rate (KBytes) Transferred (MB) (MB/s) CPU Load in % 100 100 19.19 35.65 256 100 17.51 35.28 512 100 18.03 36.77 1024 100 16.65 35.56 5120 100 16.12 33.49

Table 11. USB-MSC Host-DMA-Ext3 Write Performance values

The performance numbers are captured using the following • Hard Disk: Western Digital, 60 GB • CPU IDLE STATE=0 • File Format = Ext3

31 OMAP35X Linux Drivers Datasheet

SPRS524 -oct 2008

2.6.3.8.3 USB-MSC Host-DMA-VFAT Performance

50.00 45.00 40.00 35.00 30.00 DMA 25.00 Read 20.00 DMA 15.00 Write 10.00 Transfer Rate in Rate MB/S Transfer 5.00 0.00 100 256 512 1024 5120 Buffer Size in KB

Figure 8. USB-MSC HOST-DMA-VFAT Performance

Buffer size Total Bytes Transfer Rate (KBytes) Transferred (MB) (MB/s) CPU Load in % 100 100 8.81 13.78 256 100 9.54 16.82 512 100 9.63 18.62 1024 100 9.41 18.13 5120 100 9.60 17.66

Table 12. USB-MSC Host-DMA-VFAT Read Performance values

Buffer size Total Bytes Transfer Rate (KBytes) Transferred (MB) (MB/s) CPU Load in % 100 100 16.33 26.83 256 100 15.38 29.07 512 100 14.81 26.55 1024 100 14.79 28.07 5120 100 14.34 26.27

Table 13. USB-MSC Host-DMA-VFAT Write Performance values

The performance numbers are captured using the following • Hard Disk: Western Digital, 60 GB • CPU IDLE STATE=0 • File Format = VFAT

32 OMAP35X Linux Drivers Datasheet

SPRS524 -oct 2008

2.6.4 USB-Mass Storage Class Slave Driver

2.6.4.1 Description:

User Spa ce

Kernel Space File System

Gadget Storage Driver

Gadget Controller Driver

Hardware Mentor USB OTG Controller (SLAVE)

NXP -PHY

Figure 9. USB Mass Storage Class Slave Driver

2.6.4.2 Driver Features The Driver supports the following features. • DMA and Interrupt mode. • File backed storage driver was tested with SD media as the storage medium.

2.6.4.3 Features Not Supported None

2.6.4.4 Constraints None

33 OMAP35X Linux Drivers Datasheet

SPRS524 -oct 2008

2.6.4.5 Kernel Menu Configuration Device Drivers ---> <*> Support for USB Gadgets USB Peripheral Controller (Inventra HDRC Peripheral(TI, ...)) USB Gadget Drivers File-backed Storage Gadget <*> Inventra USB Highspeed Dual Role Controller Support <*> Use Builtin Controller --- OMAP 343x high speed USB support Driver Mode (USB Peripheral (gadget stack)) ---> [ ] Disable DMA (always use PIO)

2.6.4.6 Supported System Calls NA

2.6.4.7 Supported IOCTLS NA

34 OMAP35X Linux Drivers Datasheet

SPRS524 -oct 2008

2.6.4.8 Performance Benchmarks

2.6.4.8.1 USB-Slave-DMA- Performance

10.00 9.00 8.00 7.00 6.00 DMA 5.00 Read 4.00 DMA 3.00 Write 2.00 Transfer Rate in Rate MB/sec Transfer 1.00 0.00 5*200 10*100 50*20 100*10 File Size in MB * Number of Files

Figure 10. USB-SLAVE-DMA- Performance

Bytes Transferred Total Bytes Data Rate (Mega Number of files (MB) Transferred (MB) Byte/sec)

5 200 1000 3.43 10 100 1000 2.95 50 20 1000 3.09 100 10 1000 3.10

Table 14. USB-Slave-DMA-Read Performance values

Bytes Transferred Total Bytes Data Rate (Mega Number of files (MB) Transferred (MB) Byte/sec)

5 200 1000 0.84 10 100 1000 0.75 50 20 1000 0.91 100 10 1000 0.96

Table 15. USB-Slave-DMA-Write Performance values

The performance numbers are captured using the following • MMC CARD: SanDisk ULTRAII 1 GB CARD • Default CPU IDLE STATE (C1) • File Format = VFAT, WinXP Host.

35 OMAP35X Linux Drivers Datasheet

SPRS524 -oct 2008

2.6.5 USB-CDC/RNDIS Slave Driver

2.6.5.1 Description: The CDC RNDIS gadget driver that is used to send standard Ethernet frames using USB. The driver will create an Ethernet device by the name usb0.

User Space

Kernel Space Ethernet Gadget Driver

Gadget Controller Driver

Hardware Mentor USB OTG Controller (SLAVE)

NXP -PHY

Figure 11. USB CDC/RNDIS Slave Driver

2.6.5.2 Driver Features The Driver supports the following features. • 10/100 Mbps speed.

2.6.5.3 Features Not Supported The following features are not supported by driver. • Flood ping at the maximum packet size of 64K • Interoperability issues with Linux 2.4 Host, IXIA and MAC Host.

2.6.5.4 Constraints None

36 OMAP35X Linux Drivers Datasheet

SPRS524 -oct 2008

2.6.5.5 Kernel Menu Configuration Device Drivers ---> <*> Support for USB Gadgets USB Peripheral Controller (Inventra HDRC Peripheral(TI, ...)) USB Gadget Drivers Ethernet Gadget [*] RNDIS support (EXPERIMENTAL) (NEW) <*> Inventra USB Highspeed Dual Role Controller Support <*> Use Builtin Controller --- OMAP 343x high speed USB support Driver Mode (USB Peripheral (gadget stack)) ---> [ ] Disable DMA (always use PIO)

2.6.5.6 Supported System Calls open() , close() , read() , write() , ioctl()

2.6.5.7 Supported IOCTLS None

2.6.5.8 Performance Benchmarks None.

37 OMAP35X Linux Drivers Datasheet

SPRS524 -oct 2008

2.6.6 USB-Human Interface Device Driver

2.6.6.1 Description The event sub system creates /dev/input/event* devices with the help of mdev.

Host Application User Space

Events and Input Layer Ker nel Space USB HID CLASS Layer

USB Core and Hub

USB Host Controller Driver

Hardware Mentor USB OTG Controller (Host)

NXP -PHY

Figure 12. USB Human Interface Device Driver

2.6.6.2 Driver Features • USB Mouse and Keyboards that conform to the USB HID specifications

2.6.6.3 Features Not Supported None

2.6.6.4 Constraints None

38 OMAP35X Linux Drivers Datasheet

SPRS524 -oct 2008

2.6.6.5 Kernel Menu Configuration Device Drivers ---> SCSI device support ---> <*> SCSI device support [*] legacy /proc/scsi/support --- SCSI support type (disk, tape, CD-ROM) <*> SCSI disk support USB support ---> <*> Support for Host-side USB --- Miscellaneous USB options [*] USB device filesystem [*] USB device class-devices (DEPRECATED) --- USB Host Controller Drivers <*> Inventra USB Highspeed Dual Role Controller Support <*> Use Builtin Controller --- OMAP 343x high speed USB support Driver Mode (USB Host) ---> ( X) USB Host [ ] Disable DMA (always use PIO) --- USB Input Devices <*> USB Human Interface Device(full HID) support [*] HID input layer support

2.6.6.6 Supported System Calls None

2.6.6.7 Supported IOCTLS None

2.6.6.8 Performance Benchmarks None

39

2.6.7 USB-ISO Driver

User Space Application (Eg mplayer)

Kernel Space USB ISO Driver

Host Controller Driver

Hardware Mentor USB OTG Controller (Host )

NXP -PHY

2.6.7.1 Driver Features • USB Audio and video class are supported.

2.6.7.2 Features Not Supported None

2.6.7.3 Constraints None

2.6.7.4 Kernel Menu Configuration

40 Linux Kernel Drivers

2.6.7.5 Supported System Calls None

2.6.7.6 Supported IOCTLS None

2.6.7.7 Performance Benchmarks None

41 OMAP35X Linux Drivers Datasheet

SPRS524 -oct 2008

2.7 NAND Flash Driver

2.7.1 Description The NAND flash driver is implemented as both block driver and character driver, compliant with the standard MTD driver. The NAND flash driver creates the device nodes for user space access (/dev/mtdblock0, /dev/mtdblock1,/dev/mtd0, /dev/mtd1 etc.). Currently OneNAND and Micron NAND devices are supported by the driver.

User Space User Applications, System Calls

Kernel Space Linux Kernel layer

MTD user Module

Block devices JFFS2 JFFS Char device

Memory technology device

Generic OneNAND Driver

MTD chip drivers Micron OneNAND CFI RAM, ROM Nand Flash Flash chip compliant chips etc chip driver driver Flash

Hardware GPMC Module Memory devices hardware OneNAND /Micron Nand Flash

Figure 13. Linux Kernel NAND Driver

2.7.2 Driver Features The driver supports the following features. • JFFS2 file system. • Supports Read/Write, Erase, Unlock Operations and BBM • OneNAND has been divided into 5 partitions:

42

– 512 KB read only partition for X-Loader – 1920 KB read only partition for U-Boot. – 128 KB read only for environment variables. – 5 MB read/write partition for Linux. – Remainder for file system and others (read/write). • Big block size access

2.7.3 Features Not Supported • oneNand driver operation in synchronous mode. • Micron Nand write back verify.

2.7.4 Constraints None

2.7.5 Kernel Menu configuration Device Drivers ---> Memory Technology Devices ---> <*> MTD concatenating Support <*> MTD partitioning Support [*] Command line partition table parsing <*> Direct char device access to MTD devices <*> Caching block device access to MTD devices <*> OneNAND device support > <*> Verify OneNAND page writes <*> OneNAND on OMAP2 support File systems ---> <*> Second extended fs support <*> Ext3 journalling file system support [*] file change notification support [*] Inotify support for userspace [*] Quota support <*> Quota format v2 support [*] support Pseudo filesystems ---> [*] /proc file system support Miscellaneous filesystems ---> <*> Journalling v2 (JFFS2) support [0] JFFS2 debugging verbosity (0 = quiet, 2 = noisy) [*] JFFS2 write-buffering support

2.7.6 Supported System Calls open(), close(), write(), read(), fwrite(), fread(), ioctl()

43 OMAP35X Linux Drivers Datasheet

SPRS524 -oct 2008

2.7.7 Supported IOCTLs

Table 16. List of NAND IOCTLs

Constant Description MEMGETINFO Get layout and capabilities. MEMERASE Erase flash blocks. MEMWRITEOOB Write out-of-band (OOB) info (ECC). MEMREADOOB Read out-of-band (OOB) info (ECC). MEMLOCK Lock flash blocks to disallow changes. MEMUNLOCK Unlock flash to allow changes. MEMGETBADBLOCK Check whether the specified block is bad. MEMSETBADBLOCK Set block as bad.

44 OMAP35X Linux Drivers Datasheet

SPRS524 -oct 2008

2.7.8 Performance and Benchmarks

2.7.8.1 OneNAND Write and Read Performance

Buffer size Total Bytes Transfer Rate CPU Load in % (Bytes) Transferred (MB) (MB/s) 512 100 1.47 100 1024 100 2.16 100 10240 100 7.32 100 1048576 100 7.90 100 10485760 100 7.90 100

Table 17. OneNAND Write Performance values

Buffer size Total Bytes Transfer Rate CPU Load in % (Bytes) Transferred (MB) (MB/s) 512 100 9.12 100 1024 100 18.12 100 10240 100 19.65 100 1048576 100 19.91 100 10485760 100 19.75 100

Table 18. OneNAND Read Performance values

The performance numbers are captured using the following • OneNAND PART Number: Samsung 801 K5W1GACM-DL60 • Default CPU IDLE STATE (C1) • File Format = JFFS2.

45 OMAP35X Linux Drivers Datasheet

SPRS524 -oct 2008

2.7.8.2 Micron NAND Write and Read Performance

Buffer size Total Bytes Transfer Rate CPU Load in % (Bytes) Transferred (MB) (MB/s) 512 100 1.24 100 1024 100 2.19 100 10240 100 4.33 100 1048576 100 8.46 100 10485760 100 8.60 100

Table 19. Micron NAND Write Performance values

Buffer size Total Bytes Transfer Rate CPU Load in % (Bytes) Transferred (MB) (MB/s) 512 100 9.02 100 1024 100 13.42 100 10240 100 21.27 100 1048576 100 22.73 100 10485760 100 22.53 100

Table 20. Micron NAND Read Performance values

The performance numbers are captured using the following • Micron NAND PART Number: Micron 8AA18JY192 • Default CPU IDLE STATE (C1) • File Format = JFFS2.

46 OMAP35X Linux Drivers Datasheet

SPRS524 -oct 2008

2.8 MMC/SD Driver

2.8.1 Description The MMC controller provides an interface to external MMC cards using MMC specification V4.0. Communication between the MMC controller and MMC card(s) is performed by the MMC/SD protocol. The MMC driver is implemented as a block driver. It creates the device nodes for user space access (/dev/mmcblockp1, /dev/mmcblockp2, etc.).

User Applications, System Calls User Space

Kernel Space Linux Kernel (Generic Disk Handler, File system)

BUFFER_CACHE

Generic MMC layer MMC_QUEUE MMC/SD CORE MMC_BLOCK

MMC/SD CONTROLLER DRIVER

HARDWARE (MMC/SD/SDIO CONTROLLER) Hardware

Figure 14. Linux Kernel MMC Driver

2.8.2 Driver Features The driver supports the following features • MMC/SD native protocol command/response set. • Single / Multiple block data transfers • Linux file systems and generic MMC layer abstract details of block devices (MMC). • High-speed(SDv1.1) , High Capacity SD(SDV2.0) cards. • Support for MMCV4.X(MMCPlus) • Support for 1 /4 /8 bit modes

47

• Auto detect of card • DMA for data transfer operations.

2.8.3 Features Not Supported • None

2.8.4 Constraints • MMC/SD cards should not be removed when the mount operation is in progress. If it is removed data integrity is not guaranteed.

2.8.5 Kernel Menu Configuration Device Drivers ---> <*> MMC/SD Card Support--> [ ] MMC Debugging [ ] Allow unsafe resumes ( DANGEROUS) ---MMC/SD Card Drivers <*> MMC block device driver --- MMC/SD Host controller Drivers <*> TI OMAP3430 Multimedia Card Interface Support <*> TI OMAP3430 MMC1 Support < > TI OMAP3430 MMC2 Support [*] OMAP SDIO Support [ ] Use SDIO card in non-dma mode

2.8.6 Supported System Calls open(), close(), write(), read()

48 Linux Kernel Drivers OMAP35X Linux Drivers Datasheet

SPRS524 -oct 2008

2.8.7 Performance and Benchmarks

2.8.7.1.1 SD-DMA-Ext2 Performance

20.00 18.00 16.00 14.00 DMA 12.00 Read 10.00 DMA 8.00 Write 6.00 4.00 Transfer Rate in MB/S Rate Transfer 2.00 0.00 100 250 500 1024 5120 Buffer Size in KBytes

Figure 15. SD-DMA-Ext2 Performance

Buffer size Total Bytes Transfer Rate (KBytes) Transferred (MB) (MB/s) CPU Load in % 100 100 9.27 17.14 250 100 8.98 16.18 500 100 9.28 16.12 1024 100 9.25 15.87 5120 100 9.23 16.02

Table 21. SD-DMA-Read Performance values

Buffer size Total Bytes Transfer Rate (KBytes) Transferred (MB) (MB/s) CPU Load in % 100 100 6.80 8.81 250 100 6.87 9.36 500 100 5.67 8.23 1024 100 5.78 8.76 5120 100 5.75 8.06

Table 22. SD-DMA-Write Performance values

The performance numbers are captured using the following • SD CARD: Panasonic 4GB High capacity CARD, • Default CPU IDLE STATE (C1) • File Format = Ext2

49 OMAP35X Linux Drivers Datasheet

SPRS524 -oct 2008

2.8.7.1.2 SD-DMA-Ext3 Performance

20.00 18.00 16.00 14.00 DMA 12.00 Read 10.00 DMA 8.00 Write 6.00 4.00 Transfer Rate in MB/S Rate Transfer 2.00 0.00 100 250 500 1024 5120 Buffer Size in KBytes

Figure 16. SD-DMA-Ext3 Performance

Buffer size Total Bytes Transfer Rate (KBytes) Transferred (MB) (MB/s) CPU Load in % 100 100 9.06 16.58 250 100 8.91 16.91 500 100 7.80 13.68 1024 100 9.19 15.43 5120 100 9.18 16.1

Table 23. SD-DMA-Read Performance values

Buffer size Total Bytes Transfer Rate (KBytes) Transferred (MB) (MB/s) CPU Load in % 100 100 6.76 15.46 250 100 5.07 12.81 500 100 6.39 15.3 1024 100 5.32 13.08 5120 100 5.39 13.38

Table 24. SD-DMA-Write Performance values

The performance numbers are captured using the following • SD CARD: Panasonic 4GB High capacity CARD • Default CPU IDLE STATE (C1) • File Format = Ext3

50 OMAP35X Linux Drivers Datasheet

SPRS524 -oct 2008

2.8.7.1.3 SD-DMA-VFAT Performance

20.00 18.00 16.00 14.00 DMA 12.00 Read 10.00 DMA 8.00 Write 6.00 4.00 Transfer Rate in MB/S Rate Transfer 2.00 0.00 100 250 500 1024 5120 Buffer Size in KBytes

Figure 17. SD-DMA-VFAT Performance

Buffer size Total Bytes Transfer Rate (KBytes) Transferred (MB) (MB/s) CPU Load in % 100 100 9.26 17.3 250 100 9.27 16.19 500 100 9.28 16.27 1024 100 9.28 16.12 5120 100 9.27 17.05

Table 25. SD-DMA-Read Performance values

Buffer size Total Bytes Transfer Rate (KBytes) Transferred (MB) (MB/s) CPU Load in % 100 100 6.53 13.47 250 100 7.60 17.67 500 100 7.69 18.21 1024 100 7.52 18.34 5120 100 7.45 18.61

Table 26. SD-DMA-Write Performance values

The performance numbers are captured using the following • SD CARD: Panasonic 4GB High capacity CARD, • Default CPU IDLE STATE (C1) • File Format = VFAT

51 OMAP35X Linux Drivers Datasheet

SPRS524 -oct 2008

2.9 UART Driver

2.9.1 Description

The UART driver is implemented as a serial driver, and can be accessed from user space as /dev/ttyS0. The UART Library is the module that abstracts the OMAP2x-3x UART hardware. The OMAP 3x UART controller contains three UART’s which can be used for different types of applications. All accesses to the UART hardware are done through this library. The UART Library has helper routines that are used by UART driver.

Appli cations User Space

Kernel Space Linux Kernel (Generic)

Linux Kernel (Platform Specific) HS -UART driver

UART Library

OMAP3x UART Controller

UART3 UART1 UART2

Serial Port

Figure 18. Linux UART Driver

2.9.2 Driver Features The driver supports the following features. • UART 1 instance. • Standard speeds are 110, 300, 1200, 2400, 4800, 9600, 19200, 28800, 38400, 57600, and 115200 bit/s. • UART software flow control • UART hardware flow control.

52

• Console UART shall be configured with the following parameters - 115200 baud rate, 8 bit data, no parity and 1 stop bit.

2.9.3 Features Not Supported None

2.9.4 Constraints None

53 OMAP35X Linux Drivers Datasheet

SPRS524 -oct 2008

2.9.5 Kernel Menu Configuration Device Drivers ---> Character devices ---> Serial drivers ---> <*> 8250/16550 and compatible serial support [*]Console on 8250/16550 and compatible serial port (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 System Type ---> TI OMAP Implementations ---> Low-level debug console UART (UART1) --->

2.9.6 Supported System Calls open(), close(), read(),write(), Ioctl()

54

2.9.7 Supported IOCTLs

Constant Description Get device parameters from the UART (e.g. port type, port num, baud rate, base TIOCGSERIAL divisor, etc.) Set UART device parameters (e.g port type, port num, baud rate, base divisor, TIOCSSERIAL etc.)

Table 27. Supported IOCTLs

2.9.8 Performance and Benchmarks None

55

2.10 I2C Driver

2.10.1 Description The I2C peripheral is compliant with the Philips Semiconductor I2C-bus specification version 2.1. The I2C driver is implemented as a serial driver which supports high speed and full speed clients on the same HS-I2C bus.

User applications User Space

Client Driver Kernel Space I2C -Device

I2C -Bus I2C Core Driver

I2C Algorithm Driver/ Adaptor

Hardware I2C I2C OMAP Master Sl ave 35XX

I2C Client

Figure 19. Linux Kernel I2C Driver

2.10.2 Driver Features The driver supports the following features. • 7-bit addressing mode. • 10 –bit addressing mode. • Fast mode up to 400 Kbps. • High speed mode up to 3.4 Mbps • DMA mode. • Cancel of pending read and write operation

2.10.3 Features Not Supported None

56 Linux Kernel Drivers

2.10.4 Constraints • HS operations will be successful only if the client is HS capable and the adaptor is High Speed capable. • Co-existence of HS and Fast I2C clients on a bus in which there is a HS master is subject to the hardware requirement of having a bridge between the I2C buses on which the clients reside. That part of the bus where the FS devices reside must be separated from the area where the HS clients reside.

2.10.5 Kernel Menu Configuration Device Drivers ---> I2C support ---> <*> I2C device interface I2C Hardware Bus Support ---> <*> OMAP HS I2C bus controller

2.10.6 Supported System Calls open(), close(), write(), read(), ioctl().

2.10.7 Supported IOCTLs

Constant Description Change slave address. Slave address is 7 or 10 bits. This changes the address, I2C_SLAVE_FORCE even if it is already taken. I2C_TENBIT 7- or 10-bit address. (value = 0 for 7 bits; value != 0 for 10 bits.) I2C_FUNCS Get the adapter functionality. I2C_RDWR Combined R/W transfer (one stop only).

2.10.7.1 Performance and Benchmarks None.

57 OMAP35X Linux Drivers Datasheet

SPRS524 -oct 2008

2.11 Touch screen driver

2.11.1 Description The OMAP processor includes a built in McSPI controller that interfaces with the ads7846 touchscreen controller chip. The ads7846 uses GPIO interface for sending interrupts on pen down. The touchscreen driver makes use of the McSPI interface to read the coordinates x, y and touch pressure z after receiving interrupt from ads7846.

Application User Space

Device File Kernel Space System Linux Input Subsystem

Ads7846 Touchscreen Driver

GPIO Driver OMAP McSPI Driver

Pen down Interrupt

Hardware GPIO McSPI Controller Interface (SPI1)

TSC2046 Touch Screen TS Panel Controller chip

2.11.2 Driver Features • Uses the interfaces provided by the McSPI driver for the communication with the touchscreen controller chip.

58

• Provides the functionality as expected by the Linux input subsystem in order to notify the touchscreen events to user space. • Uses GPIO interface for pen down/up interrupts.

2.11.3 Features Not Supported None

2.11.4 Constraints • Drag and draw operations are too slow on ES2.1 silicon.

2.11.5 Kernel Menu Configuration Device Drivers ---> Input device support ---> <*> Event interface [*] Touchscreens ---> <*> ADS7846/TSC2046 and ADS7843 based touchscreens

2.11.6 Supported System Calls None

2.11.7 Supported IOCTLS None

2.11.8 Performance and Benchmarks NA

59 OMAP35X Linux Drivers Datasheet

SPRS524 -oct 2008

2.12 Power Management Driver

2.12.1 Description OMAP35x silicon provides a rich set of power management features. The features include the Clock control at module level, multiple power domains, scalable voltage domains and support for transitioning power and voltage domains to retention/off. The driver adheres to the standard Linux frameworks. /sys/devices/system/cpu/cpuN/cpuidle User level Interfaces /sys/devices/system/cpu/cpuidle

menu Governors

Generic cpuidle infrastructure

acpi -cpuidle halt -idle Drivers

arch/ platfo rm specific drivers

Processor driver

2.12.2 Driver Features The driver supports the following features • The CPU Idle framework with MPU and Core transition to the Retention and OFF states • Support for 'menu' governor • Dynamic-tick framework • Low level API for controlling clock, DPLL, power domain and voltage. • Supports dynamic voltage and frequency scaling using ‘cpufreq’ framework. Only kernel space ‘ondemand’ and ‘performance’ governors are supported.

60

2.12.3 Features Not Supported • SmartReflex

2.12.4 Constraints • On ES 2.1 processor card Power management doesn't work when capture driver is enabled (Doesn’t enter CORE OFF/RET states). • The suspend and resume feature may not succeed all the times. Though the base infrastructure for this feature is implemented, all the drivers do not support this feature.

2.12.5 Kernel Menu Configuration

CPU Idle ---> CPU idle PM Support --> [*] CPU idle PM Support --- Governors < > 'menu' governor

Power Management Options ---> [*] Power Management support [ ] Legacy Power Management API (DEPRECATED) [ ] Power Management Debug Support [*] Driver model /sys/devices/.../power/state files (DEPRECATED) < > Advanced Power Management Emulation OMAP power management options ---> Choose Voltage Scale method (Voltage Scale via Smart Reflex in bypass) ---> [*] Voltage scale via smart reflex in bypass VDD1 OPP(MPU-500Mhz/DSP-360Mhz (OPP3)) ---> [*] MPU-500Mhz/DSP-360 Mhz(OPP3) VDD2 OPP (L3 166Mhz(OPP3)) ---> [*] L3 166Mhz (OPP3) [*] Enable MPU Off in suspend/resume and cpuidle [*] Enable OFF mode for 3430 [*] Enable CORE off in cpuidle [*] OMAP3430 enable H/W supervised transition for clock domains [*] Enable automatic power domain control [*] Disable h/w supervised control of EMU clock domain

2.12.6 Supported System Calls NA

2.12.7 Supported IOCTLS NA

61

2.12.8 Performance and Benchmarks

2.12.9 Power measurements for C-States at various OPPs.

OPP1 OPP2 OPP3 OPP4 OPP5 C0 Current (mA) 0.742 1.180 2.035 2.212 2.375 Voltage (V) 1.289 1.291 1.293 1.294 1.294 C1 Current (mA) 0.742 1.180 2.045 2.210 2.392 Voltage (V) 1.289 1.291 1.293 1.294 1.294 C2 Current (mA) 0.240 0.237 0.250 0.245 0.273 Voltage (V) 1.284 1.284 1.284 1.284 1.284 C3 Current (mA) 0.150 0.250 0.250 0.243 0.250 Voltage (V) 1.284 1.284 1.286 1.286 1.286 C4 Current (mA) 11.874 25.340 47.250 51.343 53.120 Voltage (V) 1.330 1.431 1.383 1.379 1.323 C5 Current (mA) 9.984 21.483 42.215 46.432 48.405 Voltage (V) 1.320 1.394 1.388 1.384 1.346 C6 Current (mA) 10.706 17.706 28.463 30.426 32.251 Voltage (V) 1.325 1.360 1.360 1.360 1.341 The above numbers are with LCD display turned off for VDD1

OPP1 OPP2 OPP3 OPP4 OPP5 C0 Current (mA) 0.756 1.194 2.063 2.233 2.414 Voltage (V) 1.288 1.290 1.292 1.292 1.292 C1 Current (mA) 0.763 1.200 2.067 2.244 2.419 Voltage (V) 1.288 1.290 1.292 1.293 1.293 C2 Current (mA) 0.286 0.297 0.310 0.317 0.317 Voltage (V) 1.283 1.285 1.285 1.285 1.285 C3 Current (mA) 0.678 0.712 0.904 0.925 0.952 Voltage (V) 1.289 1.294 1.294 1.294 1.294 The above numbers are with LCD display turned on for VDD1 OPP2 OPP3 C0 Current (mA) 7.854 15.02 Voltage (V) 1.283 1.311 C1 Current (mA) 7.84 15.00 Voltage (V) 1.283 1.311 C2 Current (mA) 1.133 1.145 Voltage (V) 1.264 1.264 C3 Current (mA) 1.265 1.350 Voltage (V) 1.264 1.264 C4 Current (mA) 7.773 14.871 Voltage (V) 1.283 1.311 C5 Current (mA) 7.322 14.220 Voltage (V) 1.282 1.308 C6 Current (mA) 8.133 15.508 Voltage (V) 1.282 1.313

62 Linux Kernel Drivers

The above numbers are with LCD display turned off for VDD2 OPP2 OPP3 C0 Current (mA) 14.01 20.900 Voltage (V) 1.307 1.350 C1 Current (mA) 12.950 20.901 Voltage (V) 1.301 1.350 C2 Current (mA) 5.880 5.914 Voltage (V) 1.277 1.277 C3 Current (mA) 6.428 7.046 Voltage (V) 1.279 1.282 The above numbers are with LCD display turned on for VDD2

63

2.13 SDIO WLAN Driver

2.13.1 Description

OMAP35x MMC Controller supports MMC/SD/SDIO/CE-ATA.The MMC driver supports MMC, SD, SD High Speed,SDHC cards,SDIO cards and CE-ATA drives.

SDIO functionality is supported for Marvel SD8686/SD8385 WLAN card.

2.13.2 Driver Features The driver supports the following features. • 802.11b and 802.11g wireless standards. • Infrastructure (Managed) and Ad-Hoc mode. • Configuration of wireless parameters using iwconfig. • WEP Key encryption based communication.

2.13.3 Features not supported The driver doesn’t support the following features. • Statistics of different kinds of packets like multicast, broadcast and different kinds of error packets. • iwlist command with parameters access points and peers • Sudden removal of the SDIO card is not supported. The card shall be removed only after bringing down the network interface and removing the modules . • Configurations of ready to send, fragmentation, transmit power and module power with iwconfig.

2.13.4 Constraints

• SDIO interrupts are not enabled in the host controller. This enables the interrupt polling method in the SDIO core. Throughput with Wireless LAN will be very low with this polling method.

2.13.5 Kernel Menu Configuration

Device Drivers ---> <*> MMC/SD Card Support--> [ ] MMC Debugging [*] Allow unsafe resumes ( DANGEROUS) ---MMC/SD/CATA Card Drivers <*> MMC block device driver <*> CEATA block device driver

64 Linux Kernel Drivers

Marvell Libertas 8385 and 8686 SDIO 802.11b/g cards < > Enable full debugging output in the Libertas module. --- MMC/SD Host controller Drivers <*> TI OMAP3430 Multimedia Card Interface Support <*> TI OMAP3430 MMC1 Support < > TI OMAP3430 MMC2 Support [*] OMAP SDIO Support [ ] Use SDIO card in non-dma mode

2.13.6 Supported System Calls None

2.13.7 Supported IOCTLS None

2.13.8 Performance and Benchmarks

Mode Up-Link in Mbps Downlink in Mbps Infrastructure- 802.11b 2.52 2.52 Ad-Hoc – 802.11b 11.85 5.85 Infrastructure- 802.11g 9.58 9.19 Ad-Hoc – 802.11g 9.22 10.78

Table 28. SDIO-WLAN Performance

• Infrastructure Mode: D-Link Wireless Access point model DWL-7100AP/Netgear Link Wireless Access point model WG602 v3. Channel 9 used for testing. • Ad-Hoc Mode : Dlink Airplus G DWL-G510 Wireless PCI adapter plugged in desktop PC used as peer. • All the tests were run using ttcp utility version 1.10 on Linux side and PCAUSA Test TCP Utility V2.01.01.08 running on WinXP side.

65 OMAP35X Linux Drivers Datasheet

SPRS524 -oct 2008

Appendix A

U-Boot Overview

Description

The U-Boot bootloader in this release is based on open-source version U-Boot 1.1.4. U-Boot 1.1.4 is executed at reset and loads the O/S kernel into DDR2 memory.

U-Boot for Nand/oneNAND: In this case U-Boot resides in Nand/OneNAND memory, along with X-loader. At Power reset, X- Loader is executed, which is responsible for loading the U-Boot from Nand/oneNAND to DDR2 memory. U-Boot then gets executed from DDR2.

The U-Boot is responsible for the following functions: • Initializes the OMAP EVM hardware • Provides boot parameters to the Linux kernel • Starts the Linux kernel • Uploads new binary images to memory via serial port or Ethernet • Supports bad block management on oneNand/Micron Nand.

66