Table of Contents

Advertisement

Quick Links

i.MX51 EVK Linux
Reference Manual
Part Number: 924-76374
Rev.10.11.01
11/2010

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the i.MX51 EVK and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Freescale Semiconductor i.MX51 EVK

  • Page 1 EVK Linux Reference Manual Part Number: 924-76374 Rev.10.11.01 11/2010...
  • Page 2 Headquarters surgical implant into the body, or other applications intended to support or sustain life, ARCO Tower 15F or for any other application in which the failure of the Freescale Semiconductor product 1-8-1, Shimo-Meguro, Meguro-ku Tokyo 153-0064 could create a situation where personal injury or death may occur. Should Buyer...
  • Page 3: Table Of Contents

    IOMUX Source Code Structure ..........1-6 i.MX51 EVK Linux Reference Manual...
  • Page 4 Software Operation ............5-2 i.MX51 EVK Linux Reference Manual...
  • Page 5 Software Operation ............10-2 i.MX51 EVK Linux Reference Manual...
  • Page 6 Defining an Application ............14-6 i.MX51 EVK Linux Reference Manual...
  • Page 7 Menu Configuration Options ..........18-4 i.MX51 EVK Linux Reference Manual...
  • Page 8 Security Policy ............22-5 i.MX51 EVK Linux Reference Manual...
  • Page 9 I2C Bus Driver Software Operation ......... . 24-2 i.MX51 EVK Linux Reference Manual...
  • Page 10 Software Operation ............28-2 i.MX51 EVK Linux Reference Manual...
  • Page 11 Menu Configuration Options ..........30-3 i.MX51 EVK Linux Reference Manual...
  • Page 12 NFS Mounting Root File System ..........34-2 i.MX51 EVK Linux Reference Manual...
  • Page 13 How to Make Software Workable when JTAG is Attached......34-4 i.MX51 EVK Linux Reference Manual...
  • Page 14 EVK Linux Reference Manual Freescale Semiconductor...
  • Page 15 Pin Usage in MII and SNI Modes ..................21-1 21-2 FEC Driver Files ........................21-3 22-1 SCCDriver Files ........................22-7 23-1 Blocking/Non-Blocking Definitions ..................23-5 23-2 Sahara Source Files ....................... 23-8 23-3 Sahara Header Files ......................23-8 i.MX51 EVK Linux Reference Manual Freescale Semiconductor...
  • Page 16 Default USB Settings ......................29-7 30-1 RTC Driver Files ........................30-2 31-1 WDOG Driver Files ......................31-2 32-1 PWM Driver Summary ......................32-2 32-2 PWM Driver Files ......................... 32-3 33-1 OProfile Source Files ......................33-3 i.MX51 EVK Linux Reference Manual Freescale Semiconductor...
  • Page 17 Layering of SPI Drivers in SPI Subsystem ................26-2 26-3 CSPI Synchronous Operation ....................26-4 27-1 MMC Drivers Layering ......................27-3 29-1 USB Block Diagram ......................29-2 32-1 PWM Block Diagram......................32-1 i.MX51 EVK Linux Reference Manual Freescale Semiconductor xvii...
  • Page 18 EVK Linux Reference Manual xviii Freescale Semiconductor...
  • Page 19: About This Book

    The percentage of time a bus is busy CODEC Coder/decoder or compression/decompression algorithm—used to encode and decode (or compress and decompress) various types of data Central Processing Unit—generic term used to describe a processing core i.MX51 EVK Linux Reference Manual Freescale Semiconductor...
  • Page 20 Image Processing Unit —supports video and graphics processing functions and provides an interface to video/still image sensors and displays IrDA Infrared Data Association—a nonprofit organization whose goal is to develop globally adopted specifications for infrared wireless communication Interrupt Service Routine i.MX51 EVK Linux Reference Manual Freescale Semiconductor...
  • Page 21 PNG is the best known image format that uses the RGBA color space RNGA Random Number Generator Accelerator—a security hardware module that produces 32-bit pseudo random numbers as part of the security module Read Only Memory i.MX51 EVK Linux Reference Manual Freescale Semiconductor...
  • Page 22: Suggested Reading

    Hardware User’s GuideMCIMX51 Multimedia Applications Processor Reference Manual (MCIMX51RM) • [KERN] Linux kernel coding style. This is included in Linux distributions as the file Documentation/CodingStyle • [WSAS] WSAS Coding Conventions, version 0.4 • [ASM] WSAS Assembly Code Conventions i.MX51 EVK Linux Reference Manual xxii Freescale Semiconductor...
  • Page 23 • [DOXY] WSAS Guidelines for Writing Doxygen CommentsMCIMX51 Multimedia Applications Processor Reference Manual (MCIMX51RM) i.MX51 EVK Linux Reference Manual Freescale Semiconductor xxiii...
  • Page 24 EVK Linux Reference Manual xxiv Freescale Semiconductor...
  • Page 25: Introduction

    Software Base The i.MX BSP is based on version 2.6.35.3 of the Linux kernel from the official Linux kernel web site (http://www.kernel.org). It is enhanced with the features provided by Freescale. i.MX51 EVK Linux Reference Manual Freescale Semiconductor...
  • Page 26: Features

    Power Management IC (PMIC) Drivers MC13892 MC13892 regulator driver provides the low-level control Chapter 3, “MC13892 Regulator i.MX51 Regulator of the power supply regulators, setting voltage level and Driver” enable/disable regulators. i.MX51 EVK Linux Reference Manual Freescale Semiconductor...
  • Page 27 The overlay interface displays the preview video. The Video Processing Unit (VPU) is a multi-standard Chapter 14, “Video Processing i.MX51 video decoder and encoder that can perform decoding Unit (VPU) Driver” and encoding of various video formats. i.MX51 EVK Linux Reference Manual Freescale Semiconductor...
  • Page 28 The FEC requires an external interface adaptor and transceiver function to complete the interface to the Ethernet media. It supports half or full-duplex operation on 10 Mbps- or 100 Mbps-related Ethernet networks. i.MX51 EVK Linux Reference Manual Freescale Semiconductor...
  • Page 29 1-Wire peripheral for read/write bit and read/write byte operations • 1-Wire peripheral in the product for single device detection and selection • Interface to the 1-Wire peripheral at the read/write block and read/write page level. i.MX51 EVK Linux Reference Manual Freescale Semiconductor...
  • Page 30 Network Object Model Environment See Gnome mobile Note i.MX51 supported by the GUN. Tools OProfile OProfile is a system-wide profiler for Linux systems, Chapter 33, “OProfile” i.MX51 capable of profiling all running code at low overhead. i.MX51 EVK Linux Reference Manual Freescale Semiconductor...
  • Page 31: Machine Specific Layer (Msl)

    Enable/Disable Number Registers. When an interrupt source is enabled and the corresponding interrupt source is asserted, the Interrupt Controller asserts a normal or a fast interrupt request depending on the associated Interrupt Type Register setting. i.MX51 EVK Linux Reference Manual Freescale Semiconductor...
  • Page 32: Interrupt Software Operation

    Table 2-1. Interrupt Files File Description hardware.h Register descriptions irqs.h Declarations for number of interrupts supported tzic.c Actual interrupt functions for TZIC modules tzic.c Actual interrupt functions for TZIC modules i.MX51 EVK Linux Reference Manual Freescale Semiconductor...
  • Page 33: Interrupt Programming Interface

    The interrupt service routine is required to service the OS for the purposes mentioned in Section 2.2, “Timer.” Another function provides the time elapsed as the last timer interrupt. 2.2.3 Timer Features The timer implementation supports the following features: i.MX51 EVK Linux Reference Manual Freescale Semiconductor...
  • Page 34: Timer Source Code Structure

    <ltib_dir>/rpm/BUILD/linux/arch/arm/plat-mxc/include/mach <ltib_dir>/rpm/BUILD/linux/arch/arm/mach-mx5 Table 2-2 lists the source file for the memory map. Table 2-2. Memory Map Files File Description mx5x.h Header files for the IO module physical addresses mm.c Memory map definition file i.MX51 EVK Linux Reference Manual Freescale Semiconductor...
  • Page 35: Memory Map Programming Interface

    • SW_PAD_CTL—Control pad slew rate, driver strength, pull-up/down resistance, and so on. 2.4.2 IOMUX Software Operation The IOMUX software implementation provides an API to set up pin functionality and pad features. i.MX51 EVK Linux Reference Manual Freescale Semiconductor...
  • Page 36: Iomux Features

    • An API for registering an interrupt service routine to a GPIO interrupt. This is made possible as the number of interrupts defined by is expanded to accommodate all the possible GPIO NR_IRQS i.MX51 EVK Linux Reference Manual Freescale Semiconductor...
  • Page 37: Gpio Features

    Table 2-4. GPIO Files File Description gpio.h GPIO public header file gpio.c Function implementation 2.5.4 GPIO Programming Interface For more information, see the API documents and for the programming Documentation/gpio.txt interface. i.MX51 EVK Linux Reference Manual Freescale Semiconductor...
  • Page 38 Machine Specific Layer (MSL) i.MX51 EVK Linux Reference Manual Freescale Semiconductor...
  • Page 39: Smart Direct Memory Access (Sdma) Api

    The driver provides an API for other drivers to control SDMA channels. SDMA channels run dedicated scripts, according to peripheral and transfer types. The SDMA API driver is responsible for loading the scripts into SDMA memory, initializing the channel descriptors, and controlling the buffer descriptors and SDMA registers. i.MX51 EVK Linux Reference Manual Freescale Semiconductor...
  • Page 40: Sdma Block Diagram

    A driver can specify the SDMA channel number that it wishes to use (static channel allocation) or can have the SDMA driver provide a free SDMA channel for the driver to use (dynamic channel i.MX51 EVK Linux Reference Manual Freescale Semiconductor...
  • Page 41: Source Code Structure

    CONFIG_MXC_SDMA_API—This is the configuration option for the SDMA API driver. In menuconfig, this option is available under System type > Freescale MXC implementations > MX5x Options: > Use SDMA API. By default, this option is Y. i.MX51 EVK Linux Reference Manual Freescale Semiconductor...
  • Page 42: Programming Interface

    (in the doxygen folder of the documentation package). Usage Example Refer to one of the drivers from Table 3-1 that uses the SDMA API driver for a usage example. i.MX51 EVK Linux Reference Manual Freescale Semiconductor...
  • Page 43: Mc13892 Regulator Driver

    PMIC, then turning off or adjusting the PMIC voltage regulators has no effect. Conversely, if the system is powered by the PMIC, then any i.MX51 EVK Linux Reference Manual Freescale Semiconductor...
  • Page 44: Regulator Apis

    *regulator, int uV); • regulator_get_voltage—get regulator output voltage int regulator_get_voltage(struct regulator *regulator); Find more APIs and details in the regulator core source code inside the Linux kernel at: <ltib_dir>/rpm/BUILD/linux/drivers/regulator/core.c i.MX51 EVK Linux Reference Manual Freescale Semiconductor...
  • Page 45: Driver Architecture

    GPOx, where x = 1–4 All of the regulator functions are handled by setting the appropriate PMIC hardware register values. This is done by calling the PMIC protocol driver APIs to access the PMIC hardware registers. i.MX51 EVK Linux Reference Manual Freescale Semiconductor...
  • Page 46: Source Code Structure

    . On the ./ltib -c <ltib dir> configuration screen select Configure Kernel, exit, and when the next screen appears, choose. • Device Drivers > Voltage and Current regulator support > MC13892 Regulator Support. i.MX51 EVK Linux Reference Manual Freescale Semiconductor...
  • Page 47: Mc13892 Rtc Driver

    To access this driver, open the device to allow application-level access to the device driver using /dev/rtcN the IOCTL interface, where the is the RTC number. /sys/class/rtc/rtcN sysfs attributes support read only access to some RTC attributes. i.MX51 EVK Linux Reference Manual Freescale Semiconductor...
  • Page 48: Source Code Structure

    ./ltib -c when located in the . In the screen, select Configure <ltib dir> Kernel, exit, and a new screen appears. • Device Drivers > Realtime Clock > Freescale MC13892 Real Time Clock. i.MX51 EVK Linux Reference Manual Freescale Semiconductor...
  • Page 49: Mc13892 Digitizer Driver

    The PMIC Digitizer Driveris a client of the PMIC protocol driver. The PMIC protocol driver provides hardware control register reads and writes through the SPI bus interface and also register/deregister event notification callback functions. The PMIC protocol driver requires access to ADC-specific event notifications. i.MX51 EVK Linux Reference Manual Freescale Semiconductor...
  • Page 50: Software Operation

    Therefore, all ADC conversion requests must be placed i.MX51 EVK Linux Reference Manual Freescale Semiconductor...
  • Page 51: Source Code Structure

    Device Drivers > MXC Support Drivers > MXC PMIC Support > MC13892 ADC support • Driver for the MXC touch screen. In menuconfig, this option is available under: Device Drivers > Input device support > Touchscreens > MXC touchscreen input driver i.MX51 EVK Linux Reference Manual Freescale Semiconductor...
  • Page 52 MC13892 Digitizer Driver i.MX51 EVK Linux Reference Manual Freescale Semiconductor...
  • Page 53: Cpu Frequency Scaling (Cpufreq) Driver

    The maximum frequency can be checked using this command: cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq Use the following command to view the current CPU frequency in KHz: cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq Source Code Structure Table 6-1 shows the source files and headers available in the following directory: i.MX51 EVK Linux Reference Manual Freescale Semiconductor...
  • Page 54: Menu Configuration Options

    — Userspace governor for userspace frequency scaling — Conservative CPU frequency governor — CPU frequency driver for i.MX CPUs 6.3.1 Board Configuration Options There are no board configuration options for the CPUFREQ device driver. i.MX51 EVK Linux Reference Manual Freescale Semiconductor...
  • Page 55: Low-Level Power Management (Pm) Driver

    Program CCM CLPCR register to set low power control register. b) Request switching off ARM/NENO power when pdn_req is asserted. c) Request switching off embedded memory peripheral power when pdn_req is asserted. i.MX51 EVK Linux Reference Manual Freescale Semiconductor...
  • Page 56: Source Code Structure

    Power management options > Suspend to RAM and standby Programming Interface API in the function is provided for low-power modes. This implements all mxc_cpu_ip_set system.c the steps required to put the system into WAIT and STOP modes. i.MX51 EVK Linux Reference Manual Freescale Semiconductor...
  • Page 57: Dynamic Voltage Frequency Scaling (Dvfs) Driver

    CPU frequency which can be changed using the clock command in RedBoot. To Enable the DVFS core use this command: echo 1 > /sys/devices/platform/mxc_dvfs_core.0/enable To Disable The DVFS core use this command: echo 0 > /sys/devices/platform/mxc_dvfs_core.0/enable i.MX51 EVK Linux Reference Manual Freescale Semiconductor...
  • Page 58: Source Code Structure

    There are no menu configuration options for this driver. The DVFS core is included by default. 8.4.1 Board Configuration Options There are no board configuration options for the Linux DVFS core device driver. i.MX51 EVK Linux Reference Manual Freescale Semiconductor...
  • Page 59: Software Based Peripheral Domain Frequency Scaling

    If any driver that needs the higher AHB clock enables its clock, LPAPM mode will be exited. Entry and exit from the LPAPM mode does not require the Bus Frequency Scaling driver to be enabled. i.MX51 EVK Linux Reference Manual Freescale Semiconductor...
  • Page 60: Medium Frequency Setpoint

    There is no option for the SW based Bus Frequency Scaling driver, it included by default. 9.3.1 Board Configuration Options There are no board configuration options for the Linux Bus Frequency Scaling device driver. i.MX51 EVK Linux Reference Manual Freescale Semiconductor...
  • Page 61: Tv Encoder (Tve) Driver

    – S-video (Y/C), composite video and S-video signals may be output simultaneously – YPrPb component – RGB component — Programmable notch/pre-comb filter for CVBS — Switchable pedestal — Copy Generation Management System (CGMS) support according to – EIA-608b – IEC 61880-1 i.MX51 EVK Linux Reference Manual Freescale Semiconductor 10-1...
  • Page 62: Hardware Operation

    U:720x576i-50 > /sys/class/graphics/fb1/mode root@ubuntu-desktop:~# echo 0 > /sys/class/graphics/fb1/blank • 720p 60: — Add "hdtv" in the boot command line; — After the system boot up, execute: #>echo U:1280x720p-60 > /sys/class/graphics/fb1/mode #>echo 0 > /sys/class/graphics/fb1/blank i.MX51 EVK Linux Reference Manual 10-2 Freescale Semiconductor...
  • Page 63: Source Code Structure

    ./ltib -c <ltib dir> displayed, select Configure the kernel and exit. When the next screen appears select the following options: • Device Drivers > Graphics support > MXC TVE TV Out Encoder i.MX51 EVK Linux Reference Manual Freescale Semiconductor 10-3...
  • Page 64 TV Encoder (TVE) Driver i.MX51 EVK Linux Reference Manual 10-4 Freescale Semiconductor...
  • Page 65: Image Processing Unit (Ipu) Drivers

    IPU sub-module. The types of functions for the IPU sub-modules are as follows: • Synchronous frame buffer functions — Panel interface initialization — Set foreground and background plane positions — Set local/global alpha and color key — Set backlight level • CSI functions i.MX51 EVK Linux Reference Manual Freescale Semiconductor 11-1...
  • Page 66: Hardware Operation

    The IPU driver is a self-contained driver module in the Linux kernel. It consists of a custom kernel-level API for the following blocks: • Synchronous frame buffer driver • Display Interface (DI) • Image DMA Controller (IDMAC) • CMOS Sensor Interface (CSI) • Image Converter (IC) i.MX51 EVK Linux Reference Manual 11-2 Freescale Semiconductor...
  • Page 67: Graphics/Video Drivers Software Interaction

    Low-level library routines—interface to the IPU hardware registers. They take input from the high-level device drivers and communicate with the IPU hardware. The low-level libraries are available in the <ltib_dir>/rpm/BUILD/linux/drivers/mxc/ipu3 directory of the Linux kernel. i.MX51 EVK Linux Reference Manual Freescale Semiconductor 11-3...
  • Page 68: Ipu Frame Buffer Drivers Overview

    The MXC frame buffer driver ( <ltib_dir>/rpm/BUILD/linux/drivers/video/mxc/mxc_ipuv3_fb.c interacts closely with the generic Linux frame buffer driver <ltib_dir>/rpm/BUILD/linux/drivers/video/fbmem.c i.MX51 EVK Linux Reference Manual 11-4 Freescale Semiconductor...
  • Page 69: Synchronous Frame Buffer Driver

    Obtaining screen information, such as the resolution or scan length • Allocating user space memory using for performing direct blitting operations mmap A second frame buffer driver supports a second video/graphics plane. i.MX51 EVK Linux Reference Manual Freescale Semiconductor 11-5...
  • Page 70: Source Code Structure

    ./ltib -c <ltib dir> the kernel and exit. When the next screen appears select the options to configure. • CONFIG_MXC_IPU—Includes support for the Image Processing Unit. In menuconfig, this option is available under: i.MX51 EVK Linux Reference Manual 11-6 Freescale Semiconductor...
  • Page 71 Device Drivers > Multimedia Devices > Video capture adapters > MXC Video For Linux Camera > MXC Camera/V4L2 PRP Features support > Pre-processor Encoder library By default, this option is set to M for all. i.MX51 EVK Linux Reference Manual Freescale Semiconductor 11-7...
  • Page 72 TVOUT Encoder. This option is dependent on CONFIG_FB_MXC_SYNC_PANEL and CONFIG_MXC_IPU_V3 options. In menuconfig, this option is available under: Device Drivers > Graphics support > MXC Framebuffer support > Synchronous Panel Framebuffer > MXC TVE TV Out Encoder. i.MX51 EVK Linux Reference Manual 11-8 Freescale Semiconductor...
  • Page 73: Programming Interface

    Device Drivers > Graphics support > MXC Framebuffer support > Synchronous Panel Framebuffer > FS453 TV Out Encoder 11.5 Programming Interface For more information, see the API Documents for the programming interface. i.MX51 EVK Linux Reference Manual Freescale Semiconductor 11-9...
  • Page 74 Image Processing Unit (IPU) Drivers i.MX51 EVK Linux Reference Manual 11-10 Freescale Semiconductor...
  • Page 75: Video For Linux Two (V4L2) Driver

    Programmable input and output pixel format and size • Programmable scaling and frame rate • RGB 16, 24, and 32-bit, YUV 4:2:0 and 4:2:2 planar, and YUV 4:2:2 interleaved input formats • TV output i.MX51 EVK Linux Reference Manual Freescale Semiconductor 12-1...
  • Page 76: V4L2 Capture Device

    Currently, the memory map stream API is supported. Supported V4L2 IOCTLs include the following: • VIDIOC_QUERYCAP • VIDIOC_G_FMT • VIDIOC_S_FMT • VIDIOC_REQBUFS • VIDIOC_QUERYBUF • VIDIOC_QBUF • VIDIOC_DQBUF • VIDIOC_STREAMON • VIDIOC_STREAMOFF • VIDIOC_OVERLAY • VIDIOC_G_FBUF • VIDIOC_S_FBUF • VIDIOC_G_CTRL • VIDIOC_S_CTRL i.MX51 EVK Linux Reference Manual 12-2 Freescale Semiconductor...
  • Page 77 0—Normal operation • 1—Vertical flip • 2—Horizontal flip • 3—180° rotation • 4—90° rotation clockwise • 5—90° rotation clockwise and vertical flip • 6—90° rotation clockwise and horizontal flip • 7—90° rotation counter-clockwise i.MX51 EVK Linux Reference Manual Freescale Semiconductor 12-3...
  • Page 78: Use Of The V4L2 Capture Apis

    7. Takes the buffer from the queue using the IOCTL VIDIOC_DQBUF. This IOCTL blocks until it has been signaled by the ISR driver. 8. Stores the buffer to a YCrCb file. 9. Replaces the buffer in the queue of the V4L2 driver by executing VIDIOC_QBUF again. i.MX51 EVK Linux Reference Manual 12-4 Freescale Semiconductor...
  • Page 79: V4L2 Output Device

    The V4L2 control code has been extended to provide support for rotation. For this use, the ID is V4L2_CID_PRIVATE_BASE. Supported values include the following: • 0—Normal operation • 1—Vertical flip • 2—Horizontal flip i.MX51 EVK Linux Reference Manual Freescale Semiconductor 12-5...
  • Page 80: Use Of The V4L2 Output Apis

    Header file for V4L2 output device driver capture/ipu_prp_enc.c Pre-processing encoder driver capture/ipu_prp_vf_adc.c Pre-processing view finder (asynchronous) driver capture/ipu_prp_vf_sdc.c Pre-processing view finder (synchronous foreground) driver capture/ipu_prp_vf_sdc_bg.c Pre-processing view finder (synchronous background) driver capture/ipu_still.c Pre-processing still image capture driver i.MX51 EVK Linux Reference Manual 12-6 Freescale Semiconductor...
  • Page 81: Menu Configuration Options

    The Linux kernel configuration options are provided in the chapter on the IPU module. See Section 11.4, “Menu Configuration Options.” 12.5 V4L2 Programming Interface For more information, see the V4L2 Specification and the API Documents for the programming interface. The API Specification is available at http://v4l2spec.bytesex.org/spec/. i.MX51 EVK Linux Reference Manual Freescale Semiconductor 12-7...
  • Page 82 Video for Linux Two (V4L2) Driver i.MX51 EVK Linux Reference Manual 12-8 Freescale Semiconductor...
  • Page 83: I.mx5 Dual Display

    TV Encoder(TVE) is the only embedded device which connects with DI1 in i.MX51 chips. One LVDS chip, one DVI chip and one VGA chip are integrated in i.MX51 EVK platform to convert the legacy parallel signals to related display signal. As there are two DIs within IPUv3, we can support dual-display feature, i.e., each of the two DIs can support an externel display device simultanously.
  • Page 84 To switch the primary display device and secondary display device, the user may use these command lines: 1)echo 1 > /sys/class/graphics/fb0/blank 2)echo 1 > /sys/class/graphics/fb1/blank 3)echo 1 > /sys/class/graphics/fb2/blank 4)echo 1-layer-fb > /sys/class/graphics/fb0/fsl_disp_property i.MX51 EVK Linux Reference Manual 13-2 Freescale Semiconductor...
  • Page 85: Examples

    4)echo 1-layer-fb > /sys/class/graphics/fb1/fsl_disp_property 5)echo 0 > /sys/class/graphics/fb0/blank 6)echo 0 > /sys/class/graphics/fb1/blank <ltib_dir>/rpm/BUILD/linux/drivers/video/mxc/mxc_ipuv3_fb.c, <ltib_dir>/rpm/BUILD/linux/arch/arm/mach-mx5/mx51_babbage.c and <ltib_dir>/rpm/BUILD/linux/arch/arm/mach-mx5/mx53_evk.c for details or refer to i.MX51 EVK and i.MX53 EVK release notes for details. 13.3 Examples Examples for i.MX51 EVK platform: 1) DI0: XGA DVI monitor(primary), DI1:CLAA-WVGA LCD display panel...
  • Page 86 Dual Display i.MX51 EVK Linux Reference Manual 13-4 Freescale Semiconductor...
  • Page 87: Video Processing Unit (Vpu) Driver

    – Supports all VC-1 main profile features (SMPTE Proposed SMPTE Standard for Television: VC-1 Compressed Video Bitstream format and Decoding Process) – Supports Simple/Main/Advanced Profile – Multi-resolution (Dynamic resolution) is not processed inside of VPU i.MX51 EVK Linux Reference Manual Freescale Semiconductor 14-1...
  • Page 88: Hardware Operation

    The VPU hardware performs all of the codec computation and most of the bitstream parsing/packeting. Therefore, the software takes advantage of less control and effort to implement a complex and efficient multimedia codec system. i.MX51 EVK Linux Reference Manual 14-2 Freescale Semiconductor...
  • Page 89: Vpu Hardware Data Flow

    (memory/IRQ). It provides an IOCTL interface for the application layer in user-space as a path to access system resources. The application in user-space calls related IOCTLs and codec library functions to implement a complex codec system. i.MX51 EVK Linux Reference Manual Freescale Semiconductor 14-3...
  • Page 90: Source Code Structure

    <ltib_dir>/rpm/BUILD/linux/arch/arm/plat-mxc/include/mach/ <ltib_dir>/rpm/BUILD/linux/drivers/mxc/vpu/ Table 14-1. VPU Driver Files File Description mxc_vpu.h Header file defining IOCTLs and memory structures mxc_vpu.c Device management and file operation interface implementation i.MX51 EVK Linux Reference Manual 14-4 Freescale Semiconductor...
  • Page 91: Menu Configuration Options

    The VPU library access the kernel driver interface for users. The codec library APIs are listed below: RetCode vpu_EncOpen(EncHandle* pHandle, EncOpenParam* pop); RetCode vpu_EncClose(EncHandle encHandle); RetCode vpu_EncGetInitialInfo(EncHandle encHandle, EncInitialInfo* initialInfo); RetCode vpu_EncRegisterFrameBuffer(EncHandle encHandle, FrameBuffer* pBuffer, int num, i.MX51 EVK Linux Reference Manual Freescale Semiconductor 14-5...
  • Page 92: Defining An Application

    /*physical memory get from system*/ unsigned long cpu_addr; /*address for system usage while freeing, user doesn't need to handle or use it*/ unsigned long virt_uaddr; /*virtual user space address*/ } vpu_mem_desc; i.MX51 EVK Linux Reference Manual 14-6 Freescale Semiconductor...
  • Page 93: Graphics Processing Unit (Gpu)

    APIs to the upper layer applications: • OpenGL ES 1.1 and 2.0 API • EGL 1.3 API • OpenVG 1.1 API i.MX51 EVK Linux Reference Manual Freescale Semiconductor 15-1...
  • Page 94: Source Code Structure

    This package provides proprietary binary kernel modules, libraries, and test code built from the GPU for framebuffer • Package list > amd-gpu-x11-bin-mx51 This package provides proprietary binary kernel modules, libraries, and test code built from the GPU for X-Window i.MX51 EVK Linux Reference Manual 15-2 Freescale Semiconductor...
  • Page 95: Windows Acceleration

    X window can be composited into an X pixmap which can be used directly as any EGL surface 16.2.1 X Windows Acceleration Architecture The following block diagram shows the components that are involved in the acceleration of X Windows: i.MX51 EVK Linux Reference Manual Freescale Semiconductor 16-1...
  • Page 96 The EGL-X library module ( ) contains the X Windows implementation of the low level EGL libEGL.so plarform-specific support functions. This allows X window and X pixmap objects to be used as EGL i.MX51 EVK Linux Reference Manual 16-2 Freescale Semiconductor...
  • Page 97: I.mx X Driver Details

    The buffer pitch alignment for the Z430 is 32 bytes while the buffer pitch alignment for the Z160 is 4 bytes. Because X pixmaps can be allocated from the frame buffer memory and these X pixmaps i.MX51 EVK Linux Reference Manual Freescale Semiconductor...
  • Page 98: Egl-X Details

    (and XRenderComposite convert) the X pixmap to the window. 16.2.4 Setup X Windows Acceleration • Verify that the following packages are available and installed: kernel_<kernel-version>-imx_<bsp-version>_armel.deb i.MX51 EVK Linux Reference Manual 16-4 Freescale Semiconductor...
  • Page 99 (II) EXA(0): Offscreen pixmap area of 15062K bytes This would indicate the number of bytes available for X pixmaps that can be allocated in the off-screen frame buffer memory. In this example, there is almost 15MB of available memory. i.MX51 EVK Linux Reference Manual Freescale Semiconductor 16-5...
  • Page 100 X Windows Acceleration i.MX51 EVK Linux Reference Manual 16-6 Freescale Semiconductor...
  • Page 101: Advanced Linux Sound Architecture (Alsa)

    The stereo sound card supports stereo playback and mono capture. The 5.1 sound card supports up to six channels of audio playback. The 4-channel sound card supports up to four channels of i.MX51 EVK Linux Reference Manual Freescale Semiconductor...
  • Page 102: Stereo Codec Features

    17-1, is shared by the stereo ALSA SoC driver, the 5.1 ALSA SoC driver imx-pcm.c and the Bluetooth codec driver. This file is responsible for preallocating DMA buffers and managing DMA channels. i.MX51 EVK Linux Reference Manual 17-2 Freescale Semiconductor...
  • Page 103: Alsa Soc Source File Relationship

    Figure 17-2 shows the ALSA SoC source file relationship. Figure 17-2. ALSA Soc Source FIle Relationship i.MX51 EVK Linux Reference Manual Freescale Semiconductor 17-3...
  • Page 104: Menu Configuration Options

    It does not contains code that is specific to the target platform or machine. The codec driver handles: • Codec DAI and PCM configuration • Codec control I/O—using I • Mixers and audio controls • Codec audio operations • DAC Digital mute control i.MX51 EVK Linux Reference Manual 17-4 Freescale Semiconductor...
  • Page 105: Software Operation

    Configures CPU DAI and codec DAI interface. • Configures codec hardware • Triggers the transfer After triggering for the first time, the subsequent DMA read/write operations are configured by the DMA callback. i.MX51 EVK Linux Reference Manual Freescale Semiconductor 17-5...
  • Page 106 Advanced Linux Sound Architecture (ALSA) System on a Chip (ASoC) Sound Driver i.MX51 EVK Linux Reference Manual 17-6 Freescale Semiconductor...
  • Page 107: The Sony/Philips Digital Interface (S/Pdif) Tx Driver

    (CS) and User (U) data and includes a frequency measurement block that allows the precise measurement of an incoming sampling frequency. 18.1 S/PDIF Overview Figure 18-1 shows the block diagram of the S/PDIF interface. Figure 18-1. S/PDIF Transceiver Data Interface Block Diagram i.MX51 EVK Linux Reference Manual Freescale Semiconductor 18-1...
  • Page 108: Hardware Overview

    After the module had been installed, the S/PDIF ALSA driver information can be exported to user by /sys and /proc file system — Get card ID and name For example: #cat /proc/asound/cards i.MX51 EVK Linux Reference Manual 18-2 Freescale Semiconductor...
  • Page 109 /* AES/IEC958 channel status bits */ unsigned char subcode[147]; /* AES/IEC958 subcode bits */ unsigned char pad; /* nothing */ unsigned char dig_subframe[4]; /* AES/IEC958 subframe bits */ • i.MX51 EVK Linux Reference Manual Freescale Semiconductor 18-3...
  • Page 110: S/Pdif Driver Files

    CONFIG_SND option. In the menuconfig this option is available under Device Drivers > Sound card support > Advanced Linux Sound Architecture > ARM sound devices > MXC SPDIF sound card support By default, this option is M. i.MX51 EVK Linux Reference Manual 18-4 Freescale Semiconductor...
  • Page 111: Spi Nor Flash Memory Technology Device (Mtd) Driver

    Figure 19-1. Components of a Flash-Based File System The MTD subsystem for Linux is a generic interface to memory devices, such as Flash and RAM, providing simple read, write and erase access to physical memory devices. Devices called mtdblock i.MX51 EVK Linux Reference Manual Freescale Semiconductor 19-1...
  • Page 112: Driver Features

    FSL SPI. In menuconfig, this option is available under Device Drivers > Memory Technology Device (MTD) support > Self-contained MTD device drivers > Support for AT DataFlash via FSL SPI interface i.MX51 EVK Linux Reference Manual 19-2 Freescale Semiconductor...
  • Page 113: Low-Level Keypad Driver

    3. The keypad scan timer function is called every 10 ms to scan for any keypress or release on the keypad 4. The scan-code for the keypress or release is generated by the function mxc_kpp_scan_matrix 5. The generated scancodes are converted to input device keycodes using the array mxckpd_keycodes i.MX51 EVK Linux Reference Manual Freescale Semiconductor 20-1...
  • Page 114: Keypad Driver State Machine

    Blocking reads, non-blocking reads and can be done on select() /dev/input/event0 The structure of is as follows: input_event struct input_event { struct timeval time; unsigned short type; unsigned short code; unsigned int value; i.MX51 EVK Linux Reference Manual 20-2 Freescale Semiconductor...
  • Page 115: Reassigning Keycodes

    Table 20-1. Keypad Driver Files File Description mxc_keyb.c Low-level driver implementation mxc_keyb.h Driver structures, control register address definitions input.h Generic Linux keycode definitions arch/arm/mach-mx5/mx51_b Contains the platform-specific keymapping keycode array abbage.c arch/arm/mach-mx5/device.c i.MX51 EVK Linux Reference Manual Freescale Semiconductor 20-3...
  • Page 116: Menu Configuration Options

    Table 20-3. Key Connections for Keypad Column Scancode Linux Key Code Platform KEY_1 i.MX51 KEY_2 i.MX51 KEY_3 i.MX51 i.MX51 EVK Linux Reference Manual 20-4 Freescale Semiconductor...
  • Page 117 KEY_SELECT i.MX51 RIGHT KEY_RIGHT i.MX51 KEY_7 i.MX51 KEY_8 i.MX51 KEY_9 i.MX51 KEY_F3 i.MX51 DOWN KEY_DOWN i.MX51 KEY_F4 i.MX51 KEY_0 i.MX51 KEY_OK i.MX51 KEY_ESC i.MX51 KEY_ENTER i.MX51 MENU KEY_MENU i.MX51 BACK KEY_BACK i.MX51 i.MX51 EVK Linux Reference Manual Freescale Semiconductor 20-5...
  • Page 118 Low-Level Keypad Driver i.MX51 EVK Linux Reference Manual 20-6 Freescale Semiconductor...
  • Page 119: Fast Ethernet Controller (Fec) Driver

    Data out, bit 0 FEC_TXD[1] Data out, bit 1 General output Data out, bit 1 FEC_TXD[2] Data out, bit 2 General output Not Used FEC_TXD[3] Data out, bit 3 General output Not Used i.MX51 EVK Linux Reference Manual Freescale Semiconductor 21-1...
  • Page 120 During reception, the Ethernet controller checks for various error conditions and once the entire frame is written into the FIFO, a 32-bit frame status word is written into the FIFO. This i.MX51 EVK Linux Reference Manual 21-2 Freescale Semiconductor...
  • Page 121: Software Operation

    Table 21-2. FEC Driver Files File Description fec.h Header file defining registers fec.c Linux driver for Ethernet LAN controller For more information about the generic Linux driver, see the source file. <ltib_dir>/rpm/BUILD/linux/drivers/net/fec.c i.MX51 EVK Linux Reference Manual Freescale Semiconductor 21-3...
  • Page 122: Menu Configuration Options

    0x144 /* FIFO transmit water mark */ #define FEC_R_BOUND 0x14c /* FIFO receive bound reg */ #define FEC_R_FSTART 0x150 /* FIFO receive start reg */ #define FEC_R_DES_START 0x180 /* Receive descriptor ring */ i.MX51 EVK Linux Reference Manual 21-4 Freescale Semiconductor...
  • Page 123: Getting A Mac Address

    0x308 /* MIIGSK enable register */ 21.5.2 Getting a MAC Address The MAC address can be set through bootloader such as u-boot.FEC driver will use it to confiure the MAC address for network devices. i.MX51 EVK Linux Reference Manual Freescale Semiconductor 21-5...
  • Page 124 Fast Ethernet Controller (FEC) Driver i.MX51 EVK Linux Reference Manual 21-6 Freescale Semiconductor...
  • Page 125: Security Drivers

    During boot, the boot pins must be set to enable the processor to boot. The SCC module must be enabled by blowing specific fuses. By booting in this manner, the integrity of the data in the Flash (kernel image) can be assured. Any violation in the data integrity raises an alarm. i.MX51 EVK Linux Reference Manual Freescale Semiconductor 22-1...
  • Page 126: Secure Ram

    Secure RAM state and the host read and write accesses. When zeroing sections of memory, only the memory controller has access. When encrypting or decrypting, only the KEM module i.MX51 EVK Linux Reference Manual 22-2 Freescale Semiconductor...
  • Page 127: Security Key Interface Module

    SCC. The Security Monitor consists of five main sub-blocks: • Secure State Controller • Security Policy • Algorithm Integrity Checker (AIC) • Security Timer • Debug Detector i.MX51 EVK Linux Reference Manual Freescale Semiconductor 22-3...
  • Page 128: Secure State Controller

    Figure 22-2. Security Monitor Block Diagram 22.1.8 Secure State Controller The Secure State Controller, shown in Figure 22-3, is a state machine that controls the security states of the chip. Figure 22-3. Secure State Controller State Diagram i.MX51 EVK Linux Reference Manual 22-4 Freescale Semiconductor...
  • Page 129: Security Policy

    These key modifications ensure that data owned and exported by one domain cannot bedecrypted and placed within a partition owned by the other domain, or in a partition with less restricted access permissions. i.MX51 EVK Linux Reference Manual Freescale Semiconductor 22-5...
  • Page 130: Software Operation

    Configures the Red and Black memory area addresses and number of blocks to be encrypted/decrypted • Loads the data to be encrypted • Loads the data to be decrypted • Starts the Ciphering mechanism i.MX51 EVK Linux Reference Manual 22-6 Freescale Semiconductor...
  • Page 131: Source Code Structure

    By default, this option is Y • CONFIG_MXC_SECURITY_CORE—Use the security core module API. In menuconfig, it is available under MXC Support drivers > MXC Security Drivers By default, this option is Y i.MX51 EVK Linux Reference Manual Freescale Semiconductor 22-7...
  • Page 132: Source Code Configuration Options

    1 1 1 blow_fuse 1 1 2 blow_fuse 1 1 4 blow_fuse 1 1 5 blow_fuse 1 1 6 3. Issue this command: sense_fuse bank row bit This command reads the desired fuse value. i.MX51 EVK Linux Reference Manual 22-8 Freescale Semiconductor...
  • Page 133 4. Write the following ASC Sequence in the debugger script (init_sdram.txt) setmem /32 0x53FAD008 =0x00005CAA setmem /32 0x53FAD00C =0x00002E55 setmem /32 0x53FAD010 =0x00002E55 5. Configure the boot mode pins SW7-1 and SW7-2 to Internal Boot. i.MX51 EVK Linux Reference Manual Freescale Semiconductor 22-9...
  • Page 134 Security Drivers i.MX51 EVK Linux Reference Manual 22-10 Freescale Semiconductor...
  • Page 135: Symmetric/Asymmetric Hashing And Random Accelerator (Sahara) Drivers

    The conceptual model is shown in Figure 23-1. All of the processes in Figure 23-1 are implemented as common code, except for the following platform-centric processes: • UM Extension • Init/Cleanup • Translator • Completion Notification i.MX51 EVK Linux Reference Manual Freescale Semiconductor 23-1...
  • Page 136: Registration List

    The command queue maintains a list of commands (pointers to descriptor chains and their associated user) destined for the Sahara hardware. A pointer is maintained to the current (active) command as well as where the next command is to be entered into the queue. i.MX51 EVK Linux Reference Manual 23-2 Freescale Semiconductor...
  • Page 137: Result Pools

    11. If a failure is encountered anywhere within the Init subprocess, it is terminated, the Cleanup subprocess is initiated and an error is returned to the OS The following steps are used to clean up a process: 1. Unregister as a device (to IOCTL) i.MX51 EVK Linux Reference Manual Freescale Semiconductor 23-3...
  • Page 138: Sahara Public Interface

    If this is a registration request, do the following: — Enter user information in Registration List, such as: ID, maximum number of outstanding commands possible (Result Pool size requested) — Populate its User Context Object i.MX51 EVK Linux Reference Manual 23-4 Freescale Semiconductor...
  • Page 139: Command

    User waits for request completion. Driver never User waits for request completion. Driver queues gives up processor. request, suspends calling task, and releases processor (on completion the Driver un-suspends task / returns) i.MX51 EVK Linux Reference Manual Freescale Semiconductor 23-5...
  • Page 140: 23.2.2.10 Translator

    Using compiler switches, this runs as a tasklet or is invoked as a function as follows: 1. Invoke callback function, available in UCO, if in interrupt mode and callbacks are not suppressed by user i.MX51 EVK Linux Reference Manual 23-6 Freescale Semiconductor...
  • Page 141: 23.2.2.13 Get Results

    Wrapped keys (hiding keys in the SCC), using the SCC key to encrypt or decrypt, HMAC functions, or CCM • Generation of an arbitrary number of bytes of random data • User mode and kernel mode; callbacks and non-callback non-blocking i.MX51 EVK Linux Reference Manual Freescale Semiconductor 23-7...
  • Page 142: Source Code Structure

    Provides a hardware interrupt handling mechanism for device driver sah_kernel.h Provides definitions for items that user-space and kernel-space share sah_memory_mapper.h Re-creates SAHARA Data structures in kernel memory such that they are suitable for DMA i.MX51 EVK Linux Reference Manual 23-8 Freescale Semiconductor...
  • Page 143: Menu Configuration Options

    Sahara driver. It implements and provides a set of control methods to the core Sahara driver present in Linux. Refer to the API document (included doxygen document) for more information on the methods implemented in the driver. i.MX51 EVK Linux Reference Manual Freescale Semiconductor 23-9...
  • Page 144: Interrupt Requirements

    Symmetric/Asymmetric Hashing and Random Accelerator (Sahara) Drivers 23.7 Interrupt Requirements There is no interrupt requirement in this module. i.MX51 EVK Linux Reference Manual 23-10 Freescale Semiconductor...
  • Page 145: Inter-Ic (I2C) Driver

    • Read function to read the device registers • Write function to write to the device registers The camera driver uses the APIs provided by this driver to interact with the camera. i.MX51 EVK Linux Reference Manual Freescale Semiconductor 24-1...
  • Page 146: Hardware Operation

    When the I C bus driver is loaded, this driver stores the structure associated with this i2c_adapter bus driver so that it can use the appropriate methods to transfer data. i.MX51 EVK Linux Reference Manual 24-2 Freescale Semiconductor...
  • Page 147: Driver Features

    20 µs The typical value of the transfer bit-rate is 200 Kbps. The best case values are based on a baud rate of 400 Kbps (the maximum supported by the I C interface). i.MX51 EVK Linux Reference Manual Freescale Semiconductor 24-3...
  • Page 148 Inter-IC (I2C) Driver i.MX51 EVK Linux Reference Manual 24-4 Freescale Semiconductor...
  • Page 149: 1-Wire Driver

    The 1-Wire master module is implemented in <ltib_dir>/rpm/BUILD/linux/drivers/w1/masters Table 25-1. 1-Wire Driver Files File Description mxc_w1.c 1-Wire function implementation The 1-Wire slave driver is located in <ltib_dir>/rpm/BUILD/linux/drivers/w1/slaves/w1_ds2438.c. The DS2438 battery driver is located in <ltib_dir>/rpm/BUILD/linux/drivers/power/ds2438_battery.c i.MX51 EVK Linux Reference Manual Freescale Semiconductor 25-1...
  • Page 150: Menu Configuration Options

    Device Driver > Dallas's 1-wire support > 1-wire Slaves > Smart Battery Monitor (DS2438) • Enable DS2438 battery. In menuconfig, this option is available under Device Driver > Power supply class support > DS2438 battery driver i.MX51 EVK Linux Reference Manual 25-2 Freescale Semiconductor...
  • Page 151: Configurable Serial Peripheral Interface (Cspi) Driver

    SPI subsystem in Linux. The SPI requests go into I/O queues. Requests for a given SPI device are executed in FIFO order, and complete asynchronously through completion callbacks. There are also some simple synchronous i.MX51 EVK Linux Reference Manual Freescale Semiconductor 26-1...
  • Page 152: Spi Subsystem

    Controller Driver SPI Bus Interface SPI Bus Interface CSPI Controller CSPI Controller Electrical Interface Electrical Interface SPI Slave SPI Slave PMIC(MC13783) PMIC(MC13783) (PMIC) (PMIC) Figure 26-2. Layering of SPI Drivers in SPI Subsystem i.MX51 EVK Linux Reference Manual 26-2 Freescale Semiconductor...
  • Page 153: Software Limitations

    —Handles data transfers operations. mxc_spi_transfer() • SPI setup function —Initializes the current SPI device. mxc_spi_setup() • SPI driver ISR —Called when the data transfer operation is completed and an mxc_spi_isr() interrupt is generated. i.MX51 EVK Linux Reference Manual Freescale Semiconductor 26-3...
  • Page 154: Cspi Synchronous Operation

    <ltib dir> the Kernel and exit. When the next screen appears, select the following options to enable this module: • CONFIG_SPI—Build support for the SPI core. In menuconfig, this option is available under i.MX51 EVK Linux Reference Manual 26-4 Freescale Semiconductor...
  • Page 155: Programming Interface

    The typical values are based on a baud rate of 1 Mbps with a receiver trigger level (Rxtl) of 1 and a 32-bit transfer length. The worst-case is based on a baud rate of 12 Mbps (max supported by the SPI interface) with a 8-bits transfer length. i.MX51 EVK Linux Reference Manual Freescale Semiconductor 26-5...
  • Page 156 Configurable Serial Peripheral Interface (CSPI) Driver i.MX51 EVK Linux Reference Manual 26-6 Freescale Semiconductor...
  • Page 157: Mmc/Sd/Sdio Host Driver

    RD_WML register 2. Upon receiving this request, DMA engine starts transferring data from the eSDHC FIFO to system memory by reading the data buffer access register i.MX51 EVK Linux Reference Manual Freescale Semiconductor 27-1...
  • Page 158: Software Operation

    CRC or buffer underrun or overflow occurs. • DMA completion routine —Called after completion of a DMA transfer. Informs sdhci_dma_irq() the MMC core driver of a request completion by calling API. mmc_request_done() i.MX51 EVK Linux Reference Manual 27-2 Freescale Semiconductor...
  • Page 159: Driver Features

    Provides all the entry points to interface with the Linux MMC core driver • MMC and SD cards • Recognizes data transfer errors such as command time outs and CRC errors • Power management i.MX51 EVK Linux Reference Manual Freescale Semiconductor 27-3...
  • Page 160: Source Code Structure

    This driver implements the functions required by the MMC bus protocol to interface with the i.MX eSDHCmodule. See the BSP API document (in the doxygen folder of the documentation package), for additional information. i.MX51 EVK Linux Reference Manual 27-4 Freescale Semiconductor...
  • Page 161: Universal Asynchronous Receiver/Transmitter (Uart) Driver

    Hardware Operation Refer to the i.MX51 Multimedia Applications Processor Reference Manual to determine the number of UART modules available in the device. Each UART hardware port is capable of standard RS-232 serial i.MX51 EVK Linux Reference Manual Freescale Semiconductor 28-1...
  • Page 162: Software Operation

    Recognizes frame and parity errors only in interrupt-driven mode; does not recognize these errors in DMA-driven mode • Sends, receives and appropriately handles break characters • Recognizes the modem control signals • Ignores characters with frame, parity and break errors if requested to do so i.MX51 EVK Linux Reference Manual 28-2 Freescale Semiconductor...
  • Page 163: Uart Driver Files

    Kernel and exit. When the next screen appears, select the following options to enable this module: • CONFIG_SERIAL_MXC—Used for the UART driver for the UART ports. In menuconfig, this option is available under i.MX51 EVK Linux Reference Manual Freescale Semiconductor 28-3...
  • Page 164 API document. 28.7 Interrupt Requirements The UART driver interface generates many kinds of interrupts. The highest interrupt rate is associated with transmit and receive interrupt. i.MX51 EVK Linux Reference Manual 28-4 Freescale Semiconductor...
  • Page 165: Uart Interrupt Requirements

    UART4 UART5 UART6 i.MX51 NO_IRDA NO_IRDA NO_IRDA NO_IRDA NO_IRDA — Table 28-7. UART Mode Configuration Platform UART1 UART2 UART3 UART4 UART5 UART6 i.MX51 MODE_DCE MODE_DCE MODE_DTE — i.MX51 MODE_DCE MODE_DCE MODE_DTE — i.MX51 EVK Linux Reference Manual Freescale Semiconductor 28-5...
  • Page 166: Uart Shared Peripheral Configuration

    Table 28-15. UART Interrupt Mux Configuration Platform UART1 UART2 UART3 UART4 UART5 UART6 i.MX51 INTS_MUXED INTS_MUXED INTS_MUXED — Table 28-16. UART Interrupt 1 Configuration Platform UART1 UART2 UART3 UART4 UART5 UART6 i.MX51 MXC_INT_UART1 MXC_INT_UART2 MXC_INT_UART3 — i.MX51 EVK Linux Reference Manual 28-6 Freescale Semiconductor...
  • Page 167: Uart Interrupt 2 Configuration

    The kernel immediately starts logging messages, if the user supplies an argument as follows: console=mxcuart,0xphy_addr,115200n8 Where represents the physical address of the UART on which the console is to be used and phy_addr represents the baud rate supported. 115200n8 i.MX51 EVK Linux Reference Manual Freescale Semiconductor 28-7...
  • Page 168 Universal Asynchronous Receiver/Transmitter (UART) Driver i.MX51 EVK Linux Reference Manual 28-8 Freescale Semiconductor...
  • Page 169 High speed and Full Speed OTG core • Host mode—Supports HID (Human Interface Devices), MSC (Mass Storage Class), and PTP (Still Image) drivers • Peripheral mode—Supports MSC, and CDC (Communication Devices Class) drivers • Embedded DMA controller i.MX51 EVK Linux Reference Manual Freescale Semiconductor 29-1...
  • Page 170: Usb Block Diagram

    For the USB peripheral, it implements the gadget framework. static struct usb_ep_ops fsl_ep_ops = { .enable = fsl_ep_enable, .disable = fsl_ep_disable, .alloc_request = fsl_alloc_request, .free_request = fsl_free_request, i.MX51 EVK Linux Reference Manual 29-2 Freescale Semiconductor...
  • Page 171 Mass storage device profile—subclass 8-1 (RBC set) • USB host mode • HID host profile—subclasses 3-1-1 and 3-1-2. (USB mouse and keyboard) • Mass storage host profile—subclass 8-1 • Ethernet USB profile—subclass 2 • DC PTP transfer i.MX51 EVK Linux Reference Manual Freescale Semiconductor 29-3...
  • Page 172: Usb Driver Files

    FSL USB specific structures and enums Table 29-3 shows the platform-related source files in the directory: <ltib_dir>/rpm/BUILD/linux/arch/arm/mach-mx5/ Table 29-3. USB Platform Header Files File Description usb_dr.c Platform-related initialization usb_h1.c Platform-related initialization i.MX51 EVK Linux Reference Manual 29-4 Freescale Semiconductor...
  • Page 173: Usb Common Platform Files

    Device drivers > USB support > Root Hub Transaction Translators. By default, this option is Y selected by USB_EHCI_FSL && USB_SUPPORT. • CONFIG_USB_STORAGE—Build support for USB mass storage devices. In menuconfig, this option is available under i.MX51 EVK Linux Reference Manual Freescale Semiconductor 29-5...
  • Page 174 CONFIG_USB_G_SERIAL—Build support for ACM gadget. In menuconfig, this option is available under Device drivers > USB support > USB Gadget Support > Serial Gadget (with CDC ACM support). By default, this option is M. i.MX51 EVK Linux Reference Manual 29-6 Freescale Semiconductor...
  • Page 175: Default Usb Settings

    Remote WakeUp • OTG device do not support SET/CLEAR_FEATURE Remote-wakeup • HOST support Remote-wakeup by usb device 29.10 System WakeUp • Both host and device connect/disconnect event can be system wakeup source i.MX51 EVK Linux Reference Manual Freescale Semiconductor 29-7...
  • Page 176 NOTE: For the hub on board, it needs to enable hub's wakeup first. for remote wakeup, it needs to do below three steps: echo enabled > /sys/devices/platform/fsl-usb2-otg/power/wakeup (enable the roothub's wakeup) echo enabled > /sys/bus/usb/devices/1-1/power/wakeup (enable the second level hub's wakeup) (1-1 is the hub name) i.MX51 EVK Linux Reference Manual 29-8 Freescale Semiconductor...
  • Page 177 (1-1.1 is the usb device name) 29.11.3 How to close the usb child device power echo auto > /sys/bus/usb/devices/1-1/power/control echo auto > /sys/bus/usb/devices/1-1.1/power/control (If there is a hub at usb device) i.MX51 EVK Linux Reference Manual Freescale Semiconductor 29-9...
  • Page 178 ARC USB Driver i.MX51 EVK Linux Reference Manual 29-10 Freescale Semiconductor...
  • Page 179 RTC_WAIT_FOR_TIME_SET: allows user thread to block until 47-bit LP time counter is set. At which point, the user thread is woken up and is provided the SRTC offset (which is the difference between the new and old LP counter) i.MX51 EVK Linux Reference Manual Freescale Semiconductor 30-1...
  • Page 180: Rtc Driver Files

    The RTC module is implemented in the following directory: <ltib_dir>/rpm/BUILD/linux/drivers/rtc Table 30-1 shows the RTC module files. Table 30-1. RTC Driver Files File Description rtc-mxc_v2.c SRTC driver implementation file The source file for the SRTC specifies the SRTC function implementations. i.MX51 EVK Linux Reference Manual 30-2 Freescale Semiconductor...
  • Page 181 Configure the kernel and exit. When the next screen appears select the following options to enable the SRTC driver: • Device Drivers > Real Time Clock > Freescale MXC Secure Real Time Clock i.MX51 EVK Linux Reference Manual Freescale Semiconductor 30-3...
  • Page 182 Secure Real Time Clock (SRTC) Driver i.MX51 EVK Linux Reference Manual 30-4 Freescale Semiconductor...
  • Page 183 . On the screen displayed, select Configure the ./ltib -c <ltib dir> Kernel and exit. When the next screen appears, select the following option to enable this module: i.MX51 EVK Linux Reference Manual Freescale Semiconductor 31-1...
  • Page 184: Wdog Driver Files

    31.3.4 Programming Interface The following IOCTLs are supported in the WDOG driver: • WDIOC_GETSUPPORT • WDIOC_GETSTATUS • WDIOC_GETBOOTSTATUS • WDIOC_KEEPALIVE • WDIOC_SETTIMEOUT • WDIOC_GETTIMEOUT For detailed descriptions about these IOCTLs, see <ltib_dir>/rpm/BUILD/linux/Documentation/watchdog. i.MX51 EVK Linux Reference Manual 31-2 Freescale Semiconductor...
  • Page 185: Pwm Block Diagram

    The software module is composed of a Linux driver that allows privileged users to control the backlight by the appropriate duty cycle of the PWM Output (PWMO) signal. 32.1 Hardware Operation Figure 32-1 shows the PWM block diagram. Figure 32-1. PWM Block Diagram i.MX51 EVK Linux Reference Manual Freescale Semiconductor 32-1...
  • Page 186: Pwm Driver Summary

    PWM module, including the pwm_config() clock source option, and period and duty cycle of the PWM output signal. It is recommended to select the i.MX51 EVK Linux Reference Manual 32-2 Freescale Semiconductor...
  • Page 187: Pwm Driver Files

    System Type > Enable PWM driver • Select the following option to enable the Backlight driver: Device Drivers > Graphics support > Backlight & LCD device support > Generic PWM based Backlight Driver i.MX51 EVK Linux Reference Manual Freescale Semiconductor 32-3...
  • Page 188 Pulse-Width Modulator (PWM) Driver i.MX51 EVK Linux Reference Manual 32-4 Freescale Semiconductor...
  • Page 189 OProfile achieves this by taking the stream of sampled PC values, along with the detail of which task was running at the time of the interrupt, and converting the values into a file offset against a particular binary i.MX51 EVK Linux Reference Manual Freescale Semiconductor...
  • Page 190 OProfile operates in the kernel. The generic kernel driver takes samples delivered from the architecture-specific code (through ()), and buffers this data (in a transformed oprofile_add_sample configuration) until releasing the data to the userspace daemon through the /dev/oprofile/buffer character device. i.MX51 EVK Linux Reference Manual 33-2 Freescale Semiconductor...
  • Page 191: Oprofile Source Files

    Table 33-1. OProfile Source Files File Description op_arm_model.h Header File with the register and bit definitions common.c Source file with the implementation required for all platforms The generic kernel driver for Oprofile is located under <ltib_dir>/rpm/BUILD/linux/drivers/oprofile/ i.MX51 EVK Linux Reference Manual Freescale Semiconductor 33-3...
  • Page 192 CPU: ARM V7 PMNC, speed 0 MHz (estimated) Counted CPU_CYCLES events (Number of CPU cycles) with a unit mask of 0x00 (No un it mask) count 100000 CPU_CYCLES:100000| samples| ------------------ 4 22.2222 grep CPU_CYCLES:100000| i.MX51 EVK Linux Reference Manual 33-4 Freescale Semiconductor...
  • Page 193 OProfile samples| ------------------ 4 100.000 libc-2.9.so 2 11.1111 cat CPU_CYCLES:100000| samples| ------------------ 1 50.0000 ld-2.9.so 1 50.0000 libc-2.9.so root@ubuntu:/boot# opcontrol --stop Stopping profiling. i.MX51 EVK Linux Reference Manual Freescale Semiconductor 33-5...
  • Page 194 OProfile i.MX51 EVK Linux Reference Manual 33-6 Freescale Semiconductor...
  • Page 195 --pad=0x400000 0xff The output file is fs.jffs2 NOTE • Make sure the file is within this size limit of 4 Mbyte. fs.jffs2 • Download the prebuilt version of the from mkfs.jffs2 ftp://sources.redhat.com/pub/jffs2/mkfs.jffs2. i.MX51 EVK Linux Reference Manual Freescale Semiconductor 34-1...
  • Page 196 /tmp/fs *(rw,no_root_squash) 2. Make sure the NFS service is started on the Linux host machine. To start it on the host machine, issue: service nfs start InstallNFS RPM if not already installed. i.MX51 EVK Linux Reference Manual 34-2 Freescale Semiconductor...
  • Page 197 [-8 | -16 | -32] addr=value If a size parameter is not specified, the default size is 32-bit access. All parameters are in hexadecimal. i.MX51 EVK Linux Reference Manual Freescale Semiconductor 34-3...
  • Page 198 Frequently Asked Questions 34.7 How to Make Software Workable when JTAG is Attached When the JTAG is attached, add option in the command line when launching the kernel. jtag=on i.MX51 EVK Linux Reference Manual 34-4 Freescale Semiconductor...

Table of Contents