Page 17
System WakeUp................................253 35.3.1 USB Wakeup usage............................253 35.3.2 How to Enable USB WakeUp System Ability....................253 35.3.3 WakeUp Events Supported by USB........................254 35.3.4 How to Close the USB Child Device Power....................255 i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Definition Asynchronous Display Controller address Address conversion from virtual domain to physical domain translation Application Programming Interface ® Advanced RISC Machines processor architecture Table continues on the next page... i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 24
In-Circuit Emulation Intellectual Property Image Processing Unit -supports video and graphics processing functions and provides an interface to video/ still image sensors and displays Table continues on the next page... i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 25
Internal boot code encompassing the main boot flow as well as exception vectors bootstrap RTIC Real-Time Integrity Checker-a security hardware module SeCurity Controller-a security hardware module Table continues on the next page... i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 26
USBOTG devices, also known as dual-role peripherals, can act as limited hosts or peripherals themselves depending on how the cables are connected to the devices, and they also can connect to a host PC word A group of bits comprising 32-bits i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Introduction 2.1 Overview The purpose of this software package is to support Linux on the i.MX 6Solo/6DualLite family of Integrated Circuits (ICs) and their associated platforms. It provides the necessary software to interface the standard open-source Linux kernel to the i.MX hardware.
Page 28
The CPU frequency scaling device driver allows the CPU Frequency Scaling i.MX 6Solo/ Scaling clock speed of the CPUs to be changed on the fly. (CPUFREQ) Driver 6DualLite Table continues on the next page... i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 29
The SPI NOR MTD driver provides the support to the SPI NOR Flash Memory i.MX 6Solo/ Atmel data Flash using the SPI interface. Technology Device (MTD) Driver 6DualLite Table continues on the next page... i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 30
6Solo/ (UART) driver interfaces the Linux serial driver API to Transmitter (UART) Driver 6DualLite all of the UART ports. A kernel configuration parameter Table continues on the next page... i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 31
OProfile OProfile is a system-wide profiler for Linux systems, OProfile i.MX 6Solo/ capable of profiling all running code at low overhead. 6DualLite i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 32
Overview i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Because of the complexity of the SDMA module, its design is explained in SDMA relevant chapter. Each of the following sections contains an overview of the hardware operation. For more information, see the corresponding device documentation. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
The following file describes the ARM interrupt architecture. <ltib_dir>/rpm/BUILD/linux/Documentation/arm/Interrupts The software provides a processor-specific interrupt structure with callback functions defined in the irqchip structure and exports one initialization function, which is called during system startup. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
This is done with the global structure irq_desc of type struct irqdesc. After the initialization, the interrupt can be used by the drivers through the request_irq() function to register device-specific interrupt handlers. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
3.3.2 Timer Features The timer implementation supports the following features: • Functions required by Linux to provide the system timer and dynamic timers. • Generates an interrupt every 10 ms. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Manual (TRM) from ARM Limited. 3.4.2 Memory Map Software Operation A table mapping the virtual memory to physical memory is implemented for i.MX platforms as defined in the file in <ltib_dir>/rpm/BUILD/linux/arch/arm/mach-mx6/ mm.c . i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
GPIO pin. A functional pin can be subdivided into either a primary function or alternate functions. The pin operation is controlled by a i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
• SW_PAD_CTL: Controls pad slew rate, driver strength, pull-up/down resistance, and so on. 3.5.2 IOMUX Software Operation The IOMUX software implementation provides an API to set up pin functions and pad features. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
GPIO module. In addition, there are some special configurations for a GPIO pin (such as output based A_IN, B_IN, C_IN or DATA register, but input based A_OUT or B_OUT). i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
The GPIO module has a PULLUP control register (PUEN) for each GPIO port to control every pin of that port. 3.5.6.2 GPIO Software Operation (general) The GPIO software implementation provides an API to setup pin functions and pad features. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
3.6.1 GPIO Software Operation The general purpose input/output (GPIO) module provides an API to configure the i.MX processor external pins and a central place to control the GPIO interrupts. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
This GPIO implementation supports the following features: • Implementing the functions for accessing the GPIO hardware modules • Provideing a way to control GPIO signal direction and GPIO interrupts i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
GPIO public header file gpio.c Function implementation 3.6.4 GPIO Programming Interface 2 For more information, see the Documentation/gpio.txt under the Linux source code directory for the programming interface. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
RAM-located scripts. • 8-KB RAM area is divided into a processor context area and a code space area used to store channel scripts that are downloaded from the system memory. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Table 4-2. SDMA API Source Files File Description dmaengine.c SDMA management routine imx-sdma.c SDMA implement driver The following table shows the image files available in the directory /<ltib_dir>/rpm/ BUILD/linux/firmware/imx/sdma i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
For additional information, refer to the ESAI driver. 4.1.6 Usage Example Refer to one of the drivers, such as SPDIF driver, UART driver or SSI driver, that uses the SDMA API driver as a usage example. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 48
Overview i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
• Multi-channel DMA supporting up to 32 time-division multiplexed DMA channels • Powered by a 16-bit Instruction-Set micro-RISC engine • Each channel executes specific script • Very fast context-switching with preemptive multi-tasking based on two-level priority i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
5.1.3 Source Code Structure The following table shows the source files available in the directory drivers/dma/ Table 5-2. APBH DMA Source Files File Description mxs-dma.c APBH DMA implement driver i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Linux documentation package. 5.1.6 Usage Example Refer to one of the drivers, such as the GPMI NAND driver, that uses the APBH DMA driver as a usage example. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 52
Overview i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
• Current field channel of memory to video deinterlacing and viewfinder pre- processing to memory • Next field channel of memory to video deinterlacing and viewfinder pre-processing to memory • CSI to encoder pre-processing to memory i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 54
• CSI functions • Sensor interface initialization • Set sensor clock • Set capture size The higher level drivers are responsible for memory allocation, chaining of channels, and providing user-level API. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
• Display Processor (DP) • Image DMA Controller (IDMAC) • CMOS Sensor Interface (CSI) • Image Converter (IC) The following figure shows the interaction between the different graphics/video drivers and the IPU. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 56
• Low-level library routines: connect 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 directory of the Linux kernel. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
(planes, packed pixels, and so on), and address and length of the screen memory. • Requesting and changing variable information about the hardware, such as visible and virtual geometry, depth, color map format, timing. The driver suggests values to i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
• Initialization of panel interface settings • Initialization of IPU channel settings for LCD refresh • Changing the frame buffer address for double buffering support The following features are supported: • Configurable screen resolution i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
6.4 Source Code Structure Table 6-1 lists the source files associated with the IPU, Sensor, V4L2, and Panel drivers. These files are available in the following directories: <ltib_dir>/rpm/BUILD/linux/drivers/mxc/ipu3 <ltib_dir>/rpm/BUILD/linux/drivers/video/mxc <ltib_dir>/rpm/BUILD/linux/drivers/media/video/mxc <ltib_dir>/rpm/BUILD/linux/drivers/video/backlight i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Header file for the synchronous framebuffer driver ipu.h Header file for ipu basic driver 6.4.1 Menu Configuration Options The following Linux kernel configuration options are provided for the IPU module. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 62
• CONFIG_MXC_IPU_PRP_VF_SDC: option for the IPU (here the > symbols illustrates data flow direction between HW blocks): CSI > IC > MEM MEM > IC (PRP VF) > MEM i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 63
VIDEO_DEV && MXC_IPU option. In menu configuration, this option is available under: Device Drivers > Multimedia devices > Video capture adapters > MXC Video for Linux Video Output By default, this option is Y for all. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
6.5 Unit Test NOTE In order to execute the tests properly, make sure that you select the util-linux package and load the following modules: insmod ipu_prp_enc.ko insmod ipu_bg_overlay_sdc.ko insmod ipu_fg_overlay_sdc.ko i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Direct preview the camera to SDC foreground, and set frame rate to 30 fps, window interest is 640 X 480 with starting offset(0,0), the preview size is 160 X 160 with starting offset (20,20). mxc_v4l2_overlay.out -help to see the usage. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
6.5.3 IPU Device Unit test There is a test application named mxc_ipudev_test.c under the <ltib_dir>/rpm/BUILD/ imx-test-"version"/test/mxc_ipudev_test directory. Before running the ipu device test application, make sure that the /dev/mxc_ipu is created. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 69
-= 8; goto again; if (ret == IPU_CHECK_ERR_SPLIT_INPUTH_OVER) { task.input.crop.h -= 8; goto again; if (ret == IPU_CHECK_ERR_SPLIT_OUTPUTW_OVER) { task.output.crop.w -= 8; goto again; if (ret == IPU_CHECK_ERR_SPLIT_OUTPUTH_OVER) { i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 70
For example, if the input is 240x320, and the output is 1024x768 which uses rotation of 90 degree, the overlay must be the same as the output, that is, 1024x768. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
It also generates an interrupt when an error occurs. 7.2 Software Operation The MIPI DSI driver for Linux has two parts: MIPI DSI IP driver and MIPI DSI display panel driver. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
• MIPI DCS command operation NOTE The MIPI DSI driver does not support the DBI-2 mode, because the DBI-2 and DPI-2 cannot be enabled at the same time on this controller. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
The MIPI DSI Display Panel driver can use the API interface to read and write the registers of the display panel device connected to MIPI DSI link. For more information, see <ltib_dir>/rpm/BUILD/linux/driver/video/mxc/mipi_dsi.h. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
8.2.1 V4L2 Capture IOCTLs 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 i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 77
• 5-90° rotation clockwise and vertical flip • 6-90° rotation clockwise and horizontal flip • 7-90° rotation counter-clockwise The following figure shows a block diagram of V4L2 Capture API interaction. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
7. Takes the buffer from the queue by using the IOCTL VIDIOC_DQBUF. This IOCTL blocks until it has been signaled by the ISR driver. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
The following table lists the source and header files associated with the V4L2 drivers. These files are available in the following directory: <ltib_dir>/rpm/BUILD/linux/drivers/media/video/mxc Table 8-1. V2L2 Driver Files File Description capture/mxc_v4l2_capture.c V4L2 capture device driver Table continues on the next page... i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
8.4.2 V4L2 Programming Interface For more information, see the V4L2 Specification and the API Documents for the programming interface. The API Specification is available at LINUX MEDIA INFRASTRUCTURE API. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 82
Source Code Structure i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
• Support for automated full and partial screen updates through the Linux fb_deferred_io mechanism. • Support for three EPDC driver display update schemes: Snapshot, Queue, and Queue and Merge. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
(VT) console to switch from serial to graphics mode. The device is accessed through special device nodes, located in the /dev directory, as /dev/fb*. fb0 is generally the primary frame buffer. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
The EPDC driver is kept panel- agnostic through the use of an EPDC panel mode structure, mxc_epdc_fb_mode, which can be found in arch/arm/plat-mxc/include/mach/epdc.h. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
The bpp setting from this command line sets the initial bits per pixel setting for the frame buffer. A setting of 16 selects RGB565 pixel format, while a setting of 8 selects 8-bit grayscale (Y8) format. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
For example, to load the epdc_E060SCM.fw default firmware file for a Pearl panel, set the EPDC kernel command line paratmeter to the following: video=mxcepdcfb:E060SCM,bpp=16 i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
EPD panel. To initialize the EPDC hardware and E-ink panel, an FBIOPUT_VSCREENINFO ioctl call must be made, with the xres and yres fields of the i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
1. Identify the EPDC waveform file from the Linux kernel firmware directory that is the best match for the panel you are using. For the DC2/DC3 boards, that would be the waveform file /firmware/imx/epdc_E060SCM.fw.ihex. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
./ltib -c when located in the <ltib dir>. On the screen displayed, select Configure the kernel and exit. When the next screen appears select the options to configure. The following Linux kernel configuration options are provided for the EPDC module: i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
For kernel space access the functions should be called directly. For each function below both the IOCTL code and the corresponding kernel function is listed. MXCFB_SET_WAVEFORM_MODES / mxc_epdc_fb_set_waveform_modes() i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 92
MXCFB_SET_UPDATE_SCHEME / mxc_epdc_fb_set_upd_scheme Description: Select a scheme that dictates how the flow of updates within the driver. Parameters: __u32 scheme i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 93
EPDC_FLAG_ENABLE_INVERSION - Enables inversion of all pixels in the update region. EPDC_FLAG_FORCE_MONOCHROME - Enables full black/white posterization of all pixels in the update region. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 94
Input delay value in milliseconds. To disable EPDC power down altogether, use FB_POWERDOWN_DISABLE (defined below). MXCFB_GET_PWRDOWN_DELAY / mxc_epdc_fb_get_pwrdown_delay Description: Retrieve the driver's current power down delay value. Parameters: int32_t delay Output delay value in milliseconds. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
EPDC driver, V4L2 Output driver, and the PxP user-space library. 10.2 Hardware Operation The PxP driver uses PxP registers to interact with the hardware. For detailed hardware operation, please refer to the i.MX 6Solo/6DualLite Multimedia Applications Processor Reference Manual. 10.3 Software Operation 10.3.1 Key Data Structs...
The extended TX descriptor packet (pxp_tx_desc), allows the user to pass PxP configuration information to the driver. This includes everything that the PxP needs to execute a processing task. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Device Drivers ---> DMA Engine support ---> [*] MXC PxP support [*] MXC PxP Client Device 10.5 Source Code Structure The PxP driver source code is located in drivers/dma/ and include/linux/. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 100
Source Code Structure i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
• OpenGL 2.1 API defined by Khronos Group. • Automatic 3D core slowing down, when hot notification from thermal driver is active, 3D core will run at 1/64 clock. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
GC350 hal/kernel Kernel mode HAL driver hal/os os layer HAL driver 11.1.1.4 Library Structure Table below lists GPU driver user mode library structure: <ROOTFS>/usr/lib i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 103
> sudo ln -s libVIVANTE-x11.so libVIVANTE.so On directFB backend, the symbolic links to these libraries need to be redirected. This can be done using the following sequence of commands: i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
When the next screen appears, select the following options to enable the GPU driver: • Package list > gpu-viv-bin-mx6q • This package provides proprietary binary libraries, and test code built from the GPU for framebuffer i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
It is not a client/server model like X11. It provides a hardware abstraction layer for hardware graphics acceleration: Anything that is not supported by hardware and still supported by software, but uses hardware where possible. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
If you don't set the environment variable, a default configuration matrix will be used. The default configuration matrix is as follows: fillrectangle=none,xor,blend filltriangle=none,xor,blend filltriangle=none,xor,blend blit=none,xor,alphachannel,coloralpha,src_colorkey,rotate180 stretchblit=none,xor,alphachannel,coloralpha,src_colorkey,rotate180 Configuration file has higher priority. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
5. Make sure that “Configure the kernel” is selected 6. When configuring ltib, go to Package List and select • gpu-viv-bin-mx6q DirectFB DirectFB-examples zlib 7. Exit and save your configuration. 8. Run ltib i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 110
DirectFB-examples tar file. Refer to the DirectFB-examples-1.2.0.tar.gz README for more details. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
The HDMI module receives video data from the Image Processing Unit (IPU), audio data from the external memory interface, and control data from the CPU, as shown in the following figure. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 112
Figure 13-1. HDMI HW Integration For additional details of the hardware operation of the HDMI module, see the HDMI section of the i.MX 6Solo/6DualLite reference manual. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
The video input to the HDMI is configurable and may come from either of the two IPU modules in the i.MX 6Solo/6DualLite, and from either of the two Display Interface (DI) ports of the IPU, DI0 or DI1. This configuration is controlled through the IOMUX module by using the HDMI_MUX_CTRL register field.
HDMI audio DMA. 13.2.2 Video The following diagram illustrates both the interconnection between the various HDMI sub-drivers and the interconnection between the HDMI video driver and the Linux Frame Buffer subsystem. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Chapter 13 HDMI Driver Figure 13-3. HDMI Video SW Architecture The i.MX 6Solo/6DualLite supports many different types of display output devices (such as LVDS, LCD, HDMI, and MIPI displays) connected to and driven by the IPU modules. The MXC Display Driver API provides a system for registering display devices and configuring how they should be connected to each of the IPU DIs.
FB_EVENT_MODE_CHANGE has occurred. The HDMI driver configures the HDMI hardware for the new video mode.. 4. The HDMI module is enabled to generate output to the HDMI sink device. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
There would be no sound heard. The HDMI audio supports the following features: • Playback sample rate • 32k, 44.1k, 48k, 88.2k, 96k, 176.4k, 192k • capability of HDMI sink • Playback Channels: i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
The bulk of the source code for the HDMI driver is divided amongst the three software components that comprise the driver: the HDMI core driver, the HDMI display driver, and the HDMI audio driver. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 119
HDMI Audio SoC platform DMA driver implemention imx/imx-hdmi.c HDMI Audio SoC machine driver implemention The source code for the HDMI CEC driver is available in the <ltib_dir>/rpm/BUIL D/ linux/drivers/mxc/ directory. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Device Drivers > Graphics support > MXC HDMI driver support HDMI video support is dependent on support for the Synchronous Panel Framebuffer and also on the inclusion of IPUv3 support. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
2. Hotplug testing: Connect and disconnect the HDMI cable several times, from either the end attached to the i.MX board, or the end attached to the HDMI sink device. Each time the cable is reconnected, the driver should re-determine the appropriate i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
The following test can be used to simple verify HDMI CEC function: $ /unit_test/mxc_cec_test Bootup device and connect HDMI sink to board, and then run the above command. The HDMI CEC will send Poweroff command to HDMI sink. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
• Solid fill of a rectangle. • Upload image from the system memory to the video memory. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
• X-window can be composited into an X pixmap which can be used directly as any EGL surface. 14.3.1 X Windows Acceleration Architecture The following block diagram shows the components that are involved in the acceleration of X-Windows System: Figure 14-1. X Driver Architecture i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
1024x1024 pixels, in which case software failure may occur. • EXA putimage (upload into video memory) is accelerated, except for source drawables containing less than 400x400 pixels, in which case software failure may occur. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 126
Pixmap migration from system memory to GPU accessible memory is not currently implemented, but would only help in situations where there was insufficient GPU accessible memory at initial allocation. More memory, however, becomes available (through de-allocation) at a later time. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
X server process to the X client processes (GL or GLES applications) properly. • The libdri.so implements Vivante’s customized DRI protocol that passes the buffer information between X server and X clients (GL or GLES applications). i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
The following example shows a preferred configuration for using the i.MX 6 X Driver: Section "Device" Identifier "i.MX Accelerated Framebuffer Device" Driver "vivante" Option "fbdev" "/dev/fb0" Option "vivante_fbdev" "/dev/fb0" i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 129
"i.MX Accelerated Framebuffer Device" EndSection • Device Driver String The mandatory Driver entry specifies the name of the loadable i.MX X driver. Section "Device" Driver "vivante" EndSection • Device fbdevPath Strings i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
• Assuming the above steps have been performed, do the following to verify that X Window System acceleration is indeed operating. • Examine the log file and confirm that the following lines /var/log/Xorg.0.log present: 33.767] (II) LoadModule: "vivante" 33.782] (II) Loading /usr/lib/xorg/modules/drivers/vivante_drv.so i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 131
7.205] (EE) AIGLX error: vivante exports no extensions (/usr/lib/arm-linux- gnueabihf/dri/vivante_dri.so: undefined symbol: __driDriverExtensions) 7.214] (EE) AIGLX: reverting to software rendering 7.278] (II) AIGLX: Loaded and initialized swrast 7.278] (II) GLX: Initialized DRISWRAST GL provider for screen 0 i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 132
Software Operation i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Therefore, the software takes advantage of less control and effort to implement a complex and efficient multimedia codec system. The VPU hardware data flow is shown in the MPEG4 decoder example in the following figure. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
The VPU software can be divided into two parts: the kernel driver and the user-space library as well as the application in user space. The kernel driver takes responsibility for system control and reserving resources (memory/IRQ). It provides an IOCTL interface i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
• Maps and unmaps memory/register to user space • Device management 15.1.2 Source Code Structure The following table lists the kernel space source files available in the following directories: <ltib_dir>/rpm/BUILD/linux/arch/arm/plat-mxc/include/mach/ <ltib_dir>/rpm/BUILD/linux/drivers/mxc/vpu/ i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
To get to the VPU driver, use the command ./ltib -c when located in the <ltib dir>. On the displayed screen, select Configure the kernel and exit. When the next screen appears, select the following options to enable the VPU driver: i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
RetCode vpu_SWReset(DecHandle handle, int index); System I/O operations are listed below: int IOGetPhyMem(vpu_mem_desc* buff); int IOFreePhyMem(vpu_mem_desc* buff); int IOGetVirtMem (vpu_mem_desc* buff); int IOFreeVirtMem(vpu_mem_desc* buff); i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
/*virtual user space address*/ } vpu_mem_desc; For how to use API in the application, refer to i.MX 6Solo/6DualLite VPU Application Programming Interface Linux Reference Manual. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013...
Refer to OV5640 datasheet to get more information on the sensor. Refer to the i.MX 6 Multimedia Applications Processor Reference Manual for more information on MIPI CSI-2 and IPU CSI. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
• Device Drivers > Multimedia devices > Video capture adapters > MXC Video For Linux Camera > MXC Camera/V4L2 PRP Features support > OmniVision ov5640 camera support using mipi. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
• Device Drivers > Multimedia devices > Video capture adapters > MXC Video For Linux Camera > MXC Camera/V4L2 PRP Features support > OmniVision ov5640 camera support. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
MIPI CSI2 driver is invoked only by the mipi sensor driver and IPU CSI module. It is not exposed to the user space. MIPI CSI2 driver supports the following features: • Supporting 1-4 lanes • Supporting IPU(0,1) and CSI(0,1). i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
• MIPI CSI2 common APIs: exports APIs for the CSI module driver and mipi sensor driver 17.2.1 MIPI CSI2 Driver Initialize Operation The steps for MIPI CSI2 driver initialization are as follows: i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
• Enable the MIPI CSI2 interface by calling mipi_csi2_enable(). • Set the lanes by calling mipi_csi2_set_lanes(). • Reset the MIPI D-PHY by calling mipi_csi2_reset(). • Configure the MIPI sensor. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
For sample code that explains how CSI module driver uses MIPI APIs, refer to the IPU CSI module driver source code. 17.3.4 Interrupt Requirements No interrupt is needed for the MIPI CSI2 driver. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 148
Driver Features i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
• Standby: maps to STOP mode that offers significant power saving, as all blocks in the system are put into a low-power state, except for ARM core that is still powered on, and memory is placed in self-refresh mode to retain its contents. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
> /sys/devices/platform/imx-uart.'x'/tty/ttymxc'x'/power/wakeup; Here 'x' is your debug uart's index; echo +x > /sys/class/rtc/rtc0/wakealarm; RTC will wake up system after x seconds. To test this mode automatically, refer to the script in /unit_tests/suspend_auto.sh i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 152
Hardware Operation i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
PF100 is that PWRON is low. PMIC_ON_REQ pin of i.MX 6, which is controlled by SNVS block of i.MX 6, will connect with PWRON pin of PF100 to control PF100 on/off, so that system can power off. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Under this framework, most power operations can be done by the following unified API calls: • is an unified API call to lookup and obtain a reference to a regulator: regulator_get i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 155
API call to get regulator output voltage: regulator_get_voltage int regulator_get_voltage(struct regulator *regulator); You can 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.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
19.4.3 Menu Configuration Options The following are menu configuration options: 1. When located in the , to get to the PMIC power configuration, use the <ltib dir> command: ./ltib -c i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 158
2. On the configuration screen select Configure Kernel, and then exit. When the next screen appears, choose the following: Device Drivers > Voltage and Current regulator support > Support regulators on Freescale PF100 PMIC. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
/sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state To change the CPU frequency to a value that is given by using the command above (for example, to 792 MHz), use this command: i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
20.2 Menu Configuration Options The following Linux kernel configuration is provided for this module: CONFIG_CPU_FREQ: In menu configuration, this option is located under: CPU Power Management > CPU Frequency scaling i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
• Interactive CPU frequency policy governor • Conservative CPU frequency governor • CPU frequency driver for i.MX CPUs 20.2.1 Board Configuration Options There are no board configuration options for the CPUFREQ device driver. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 162
Menu Configuration Options i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
1. High Frequency Setpoint: AHB is at 132MHz, AXI is at 264Mhz and DDR is at the maximum frequency. This mode is used when most periphrals that need higher frequency for good performance are active. For ex, video playback, graphics processing etc. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
There are no menu configuration options for this driver. The Bus Frequency drivers is included and enabled by default. 21.2.1 Board Configuration Options There are no board configuration options for the Linux busfreq device driver. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
SoC's temperature reaches. 22.2 Hardware Operation The thermal driver uses an internal thermal sensor to monitor the SoC temperature. The cooling device uses the CPU frequency to protect the SoC. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Configure the Kernel and exit. When the next screen appears, select the following options to enable this module: Device Drivers > MXC support drivers > ANATOP_THERMAL > Thermal Zone i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Restore the trip point's temperature. When SoC temperature drops to below active trip point, thermal driver will remove all the protections. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 168
Unit Test i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
I/O power segments if their I/O voltage needs to be different than what is provided above. Some internal regulators can be bypassed, so that external PMIC can supply these power directly to decrease power numer, such as VDD_SOC and VDD_ARM. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
• int regulator_enable(struct regulator *regulator); • used to disable regulator output: regulator_disable • int regulator_disable(struct regulator *regulator); • is the regulator output enabled: regulator_is_enabled • int regulator_is_enabled(struct regulator *regulator); i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
To get to the Anatop regulator configuration, use the command ./ltib -c when located in the <ltib dir>. On the configuration screen, select Configure Kernel, and then exit. The following Linux kernel configurations are provided for the Anatop Regulator driver: i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 172
• Device Drivers > Voltage and Current regulator support > Anatop Regulator Support. • System Type > Freescale MXC Implementations > Internal LDO in i.MX 6Quad and i.MX 6DualLite bypass. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
The following sections describe the software operation of the SRTC driver. 24.2.1 IOCTL The SRTC driver complies with the Linux RTC driver model. See the Linux documentation in <ltib_dir>/rpm/BUILD/linux/Documentation/rtc.txt for information on the RTC API. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
• Implementing all the functions required by Linux to provide the real-time clock and alarm interrupt. • Reserveing time in power-ff state. • Alarm wakes up the system from low-power modes. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
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 SNVS Real Time Clock i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 176
Driver Features i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
DAPM guarantees the lowest audio power state at all times and is completely transparent to user space audio components. DAPM is ideal for mobile devices or devices with complex audio requirements. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 178
(including using digital mute). ASoC signals the CODEC when to change power states. • Machine specific controls, allows machines to add controls to the sound card, for example, volume control for speaker amp. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 179
Chapter 25 Advanced Linux Sound Architecture (ALSA) System on a Chip (ASoC) Sound Driver Figure 25-1. ALSA SoC Software Architecture ASoC basically splits an embedded audio system into 3 components: i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
APIs are exported to the upper layer by the structure snd_soc_dai_ops . Headphone insertion/removal can be detected through a GPIO interrupt signal. SSI dual FIFO features are enabled by default. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
The codec works in master mode as it provides the BCLK and LRCLK. The BCLK and LRCLK can be configured according to the audio sample rate. 25.4 Software Operation The following sections describe the software operation of the ASoC driver. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
CODEC layer for stereo CODEC ALSA SoC codecs/wm8962.h Header file for stereo CODEC driver The following table lists the AM/FM CODEC SoC driver source files. These files are under the <ltib_dir>/rpm/BUILD/linux/sound/soc directory. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
3. The machine layer creates the DAI link between CODEC and CPU registers the sound card and PCM devices. 25.4.3 Device Open The ALSA driver performs the following functions: i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
• : The callback function to enable or disable clock for audio CODEC. clock_enable 25.4.5 Menu Configuration Options The following Linux kernel configuration options are provided for this module: i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
• amixer sset 'MIXINR IN3R' on • amixer sset 'INPGAR IN3R' on The recording feature may be tested by the following command: • arecord [-Dplughw:0,0] -r 44100 -f S16_LE -c 2 -d 5 record.wav i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
If plug plughw is used to make a playback or record, examples are as follows: • aplay: Dplughw:0,0 audio.wav or • arecord: Dplughw:0,0 -c 4 -r 48000 -f S16_LE record.wav i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
• To set the desire frecuency, select option 3 <enter> set the frequency <9740>. • To turn off the radio, select option 4. • To Exit select, option 9. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 190
Unit Test i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
• In case of real-time streaming audio, both input and output clocks need to be available and activated. • In case of non-realtime streaming audio, the input sampling rate clocks can be avoided by setting ideal-ratio values into ASRC interface registers. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
The ASRC registers itself under /dev/mxc_asrc and creates proc file /proc/ driver/asrc when the module is inserted. proc is used to track the channel number for each i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
• The sound device (PCM) has been registered and start to enable the DMA channel in ALSA driver. • Request ASRC pair. (asrc_req_pair) • Configure ASRC pair. (asrc_config_pair) i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
ASRC according to different SOC. • channel_bits: indicates the channel bit information. • clk_map_ver: The mapping relationships in different SOC are different. This version number can be used to indicate clock map information. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Convert the input data into output data according to the parameters set by ASRC_CONFIG_PAIR. Driver would copy input_buffer_length bytes data from the input_buffer_vaddr for conversion. After conversion, the driver fills the i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 196
• output_buffer_vaddr: virtual address of output buffer. • input_buffer_length: length of input buffer(bytes). • output_buffer_length: length of output buffer(bytes). ASRC_START_CONV: Start ASRC pair convert. ASRC_STOP_CONV: Stop ASRC pair convert. ASRC_STATUS: Query ASRC pair status. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
S/PDIF channel status (CS) and User (U) data. The frequency measurement block allows the S/PDIF RX section to derive the receive clock from the incoming S/PDIF stream. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
S/PDIF transmitter. • For the S/PDIF transmitter, the audio data is provided by the processor through the SPDIFTxLeft and SPDIFTxRight registers. The Channel Status bits are provided i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
24-bit output sample file must have 32-bits in each channel per frame. Only the 24 LSBs are valid. • In the ALSA subsystem, the supported format is defined as S16_LE and S24_LE. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
FIFO are in synchronization. If not, it sets the filling pointer of the right FIFO to be equal to the filling pointer of the left FIFO and an interrupt is generated. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Subdevice #0: subdevice #0 • The ALSA utility provides a common method for user spaces to operate and use ALSA drivers. #arecord -Dplughw:1,0" -c 2 -r 44100 -f S24_LE record.wav i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
A sound control interface is provided for the user to get the status of this valid bit. 27.3.2 Provided User Interfaces The S/PDIF Rx driver provides interfaces for user application as shown in table below. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 203
4. Call the reading function to get the data. During the reading process, applications can read the U/Q bits and channel status from the driver and validates the illegal bits. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
• spdif_div_32000 : 32KHz clock division factor in the STC register. • spdif_rx_clk : rx clock source in mux in SRPC register. Leave as 0 to get clock from rx stream. • spdif_core_clk : S/PDIF core clock. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
• After finishing aplay, stop recording in WaveLab. • Play the recorded wav file in wavelab to check if it works properly. 27.8.2 Rx test step 1. Plug optical line into [optical port] of M-Audio transit. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 207
#arecord -D hw:[card id],[pcm id] -c 2 -d 20 -r [sample rate in Hz] -f S24_LE record.wav NOTE The sample rate argument in the arecord command must be consistent with the wav file played on WaveLab. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 208
Unit Test Preparation i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
1 to 256 bytes at a time using the Page Program instruction. The whole memory can be erased using the Bulk Erase instruction, or a sector at a time, using the Sector Erase instruction. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
MTD driver also provides the interfaces to read, write, and erase NOR Flash. 28.1.3 Driver Features This NOR MTD implementation supports the following features: • Provides necessary information for the upper layer MTD driver i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
The SD memory card system defines two alternative communication protocols: SD and SPI. The uSDHC only supports the SD bus protocol. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
MMC host controller interface driver to send the commands to the uSDHC. The MMC driver is responsible for implementing standard entry points for init exit , and . The driver implements the following functions: request set_ios i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 215
• handles the clock change request. esdhc_set_clock() • it's the interrupt routine for card detect. cd_irq() Figure below shows how the MMC-related drivers are layered. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
• SD3.0 cards. • Recognizes data transfer errors such as command time outs and CRC errors. • Power management. • It supports to be built as loadable or builtin module i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
To compile SDHCI driver as a loadable module, several options should be selected as indicated below: • CONFIG_MMC_SDHCI=m, it can be found at Device Drivers > MMC/SD Card Support > Secure Digital Host Controller Interface support i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
• .platform_pad_change: callback function used to change the pad settings due to different SD bus clock frequency • .keep_power_at_suspend: keep MMC/SD slot power when system enters suspend • .delay_line: delay line setting for DDR mode i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Code stored on NAND Flash can not be executed from there. Code must be loaded into RAM memory and executed from there. The i.MX 6Solo/6DualLite contains a hardware error-correcting block. 30.2 Software Operation MTDs in Linux covers all memory devices such as RAM, ROM, and different kinds of NOR/NAND Flashes.
Flash Translation Layer (FTL) with a regular file system (FAT, Ext2/3) above it. The hardware specific driver interfaces with the GPMI module on i.MX 6Solo/6DualLite. It implements the lowest level operations such as read, write and erase. If enabled, it also provides information about partitions on the NAND device-this information has to be provided by platform code.
30.3 Source Code Structure The NAND driver is located in the drivers/mtd/nand/gpmi-nfc directory. The following files are included in the NAND driver: gpmi-nfc.c hal-mx50.c hal-mxs.c gpmi-nfc.h gpmi-regs.h bch-regs.h gpmi-regs-mx50.h bch-regs-mx50.h i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
• CONFIG_MTD_PARTITIONS = y • CONFIG_MTD_CHAR = y • CONFIG_MTD_BLOCK = y In addition, these UBI options must be enabled: • CONFIG_MTD_UBI=y • CONFIG_MTD_UBI_WL_THRESHOLD=4096 • CONFIG_MTD_UBI_BEB_RESERVE=1 • CONFIG_UBIFS_FS=y • CONFIG_UBIFS_FS_LZO=y • CONFIG_UBIFS_FS_ZLIB=y i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
• Compatible with the I2C bus standard • Bit rates up to 400 Kbps • Starts and stops signal generation/detection • Acknowledge bit generation/detection • Interrupt-driven, byte-by-byte data transfer • Standard I2C master mode i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
• Address is received that matches its own specific address in slave-receive mode • Arbitration is lost 31.2 Software Operation The I2C driver for Linux has two parts: an I2C bus driver and an I2C chip driver. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
The I2C driver supports the following features: • I2C communication protocol • I2C master mode of operation NOTE The I2C driver does not support the I2C slave mode of operation. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
The highest interrupt rate is associated with the transfer complete interrupt as shown in table below. Table 31-2. I2C Interrupt Requirements Parameter Equation Typical Best Case Rate Transfer Bit Rate/8 25,000/sec 50,000/sec Latency 8/Transfer Bit Rate 40 μs 20 μs i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 229
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 I2C interface). i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 230
Driver Features i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
• Up to 32-bit programmable data transfer • 64 x 32-bit FIFO for both transmit and receive data • Configurable polarity and phase of the Chip Select (SS) and SPI Clock (SCLK) i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Only the controller driver can interact with the underlying SPI hardware module. Figure below shows how the different SPI drivers are layered in the SPI subsystem. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
• SPI setup function spi_imx_setup() initializes the current SPI device. • SPI driver ISR spi_imx_isr() is called when the data transfer operation is completed and an interrupt is generated. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
• Device Drivers > SPI Support > Freescale i.MX SPI controllers. 32.3.3 Programming Interface This driver implements all the functions that are required by the SPI core to interface with the ECSPI hardware. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
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.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 238
Driver Features i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
The CAN driver is a network device driver. For the common information on software operation, refer to the documents in the kernel source directory Documentation/ networking/can.txt. 33.1.3 Source Code Structure Table below shows the driver source file available in the directory, i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
• CONFIG_CAN_FLEXCAN - Build support for FlexCAN device driver. In menuconfig, this option is available under Networking > CAN bus subsystem support > CAN Device Driver > Freescale FlexCAN. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Media Local Bus Specification. 34.1.1 MLB Device Module The MediaLB module implements the Physical Layer and Link Layer of the MediaLB specification, interfacing the i.MX to the MediaLB controller. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
• Up to 16 logical channels and 31 physical channels running at a maximum speed of 1024Fs • Transmission of commands and data and reception of receive status when functioning as the transmitting device associated with a logical channel address i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
• The following configurations to MLB device module: • Frame rate • Device address • Channel address • MLB channel exception get interface. All the channel exceptions are sent and handled by the application. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 244
After the read completed, it updates the read position with the next available buffer node. There is no received packet in the ring buffer when the read and write position is the same. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Get MLB device module version, which is 0x02000202 by default on the i.MX35. MLB_SET_DEVADDR Argument type: unsigned char Set MLB device address, which is used by the system channel MlbScan command. MLB_CHAN_SETADDR Argument type: unsigned int i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
In the screen, select Configure Kernel, exit, and a new screen appears. This option is available under: • Device Drivers > MXC support drivers > MXC Media Local Bus Driver > MLB support. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
The USB host system is composed of a number of hardware and software layers. Figure below shows a conceptual block diagram of the building block layers in a host system that support USB 2.0. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
For the USB host, it only implements the hardware specified initialization functions. 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.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Host driver source file for IRAM support gadget/arcotg_udc.c Peripheral driver source file gadget/arcotg_udc.h USB peripheral/endpoint management registers otg/fsl_otg.c OTG driver source file Table continues on the next page... i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 250
ULPI PHY driver (USB3317 uses the same driver as ISP1504) utmixc.c Internal UTMI transceiver driver usb_hsic_xcvr.c HSIC featured phy's interface usb_common.c Common platform related part of USB driver usb_wakeup.c Handle USB wakeup events i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Device drivers > USB support > USB Mass Storage support. By default, this option is Y. • CONFIG_USB_HID-Build support for all USB HID devices. In menuconfig this option is available under i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 252
Device drivers > USB support > USB Gadget Support > Ethernet Gadget (with CDC Ethernet Support) > RNDIS support. By default, this option is Y. • CONFIG_USB_FILE_STORAGE-Build support for Mass Storage gadget. In menuconfig, this option is available under i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
USB wakeup usage is outlined in three procedures: how to enable USB wakeup system, what kinds of wakeup events USB supports, and how to close USB child device power. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
> /sys/bus/usb/devices/1-1/power/wakeup NOTE For the hub on board, it is necessary to enable hub's wakeup first. For remote wakeup, it is necessary to perform the three steps outlined below: i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
The following code string outlines 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.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 256
System WakeUp i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
• Scalable performance via aggregated Lanes from X1 to X16 • Need PCIe switch to have connection between more than two PCIe devices 36.1.2 Terminology and Conventions Following terminologies and conventions are used in this document: • Bridge i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 258
RC A defined System Element that includes a Host Bridge, zero or more Root Complex Integrated Endpoints, zero or more Root Complex Event Collectors, and one or more Root Ports i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
36.1.3 PCIe Topology on i.MX 6 in PCIe RC Mode There is one PCIe port on the i.MX 6. The following figure describes the diagram of the PCIe RC port on i.MX 6. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 260
• The upstream port of each EP can either be part of the secondary bus segment of virtual PCI-PCI Bridge representing downstream port of a switch or of the root port. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Linux was booted, for example PC scenario). • Host Controller (RC) Module handles hardware (SoC + Board) specific initialization and configuration and it invokes PCI BIOS. It should provide callback functions for i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Defined at arch/arm/mach-mx6/Kconfig:171 Depends on: ARCH_MXC [=y] && ARCH_MX6 [=y] Location: -> System Type -> Freescale MXC Implementations Selects: PCI [=y] NOTE PCI Express support can't be built as a module. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
• Used to map the configuration spaces of PCIe EP devices that are inserted to the RC downstream port. 36.3.1 System Resource: Interrupt lines i.MX 6 Root Complex driver uses interrupt line 155 for legacy interrupts. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
~$ lspci 00:00.0 PCI bridge: Unknown device 16c3:abcd (rev 01) 01:00.0 Network controller: Intel Corporation Unknown device 4237 36.4.2 Tests Run different tests according the different PCIe EP devices. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
PEX cable adaptors, and then one PCIe cable. 36.5.2 Software Configurations When building the RC image, make sure that: CONFIG_IMX_PCIE=y # CONFIG_IMX_PCIE_EP_MODE_IN_EP_RC_SYS is not set CONFIG_IMX_PCIE_RC_MODE_IN_EP_RC_SYS=y When building the EP image, make sure that: i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
32 bytes Write speed ~109 MB/s ~298 MB/s Data size in one read TLP 32 bytes 64 bytes Read speed ~29 MB/s ~100 MB/s When the cache is enabled: i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 268
PCIe EP: Data transfer is successful, tv_count1 149616us, tv_count2 552099us. PCIe EP: Data write speed is 109 MB/s. PCIe EP: Data read speed is 29 MB/s. The snapshot of the write/read log is as follows: i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 269
Chapter 36 i.MX 6 PCI Express Root Complex Driver Figure 36-4. Write/Read log for disabled cache i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 270
6Quad SD PCIe RC/EP Validation System i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
GMII operating at 125 MHz. A brief overview of the device functionality is provided here. For details see the FEC chapter of the i.MX 6 Multimedia Applications Processor Reference Manual. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 272
FEC_TX_EN and starts transmitting the preamble (PA) sequence, the start frame delimiter (SFD), and then the frame information from the FIFO. However, the controller defers the transmission if the network is busy (FEC_CRS asserts). i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 273
FEC driver and registered into the system.You can refer to Documentation/networking/ phy.txt under linux source directory for more information. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
• Device Drivers > Network device support > Ethernet (10, 100 or 1000 Mbit) > FEC Ethernet controller. • To mount NFS-rootfs through FEC, disable the other Network config in the menuconfig if need. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
ENET MAC is combined with a time-stamping module to support precise time stamping of incoming and outgoing frames. 1588 Support is enabled when the register bit ENA_1588 is set to '1'. Figure 38-1. IEEE 1588 Functions Overview i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
• Module initialization-Initializes the module with the device specific structure, and registers a character driver. • IXXAT stack interface-Respond to protocol stackís command by IOCTL routine, such as GET_TX_TIMESTAMP, SET_RTC_TIME. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
The 1588 driver complies with the IXXAT protocol stack interface. Stack-specific defines are added to the header file (fec_1588.h). 38.3.1 IXXAT Specific Data structure Defines Protocol-specific defines are added to the header file (fec_1588.h). i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Description: command provides the timestamp of the receive packet with specific PTP sequence ID and returns the timestamp, the sender port-ID, the PTP version, and the message type, through the ptp_ts_data structure. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 281
Description: command flushes the transmit and receive timestamp queues. Command: PTP_GET_ORIG_COMP Description: command provides the original frequency compensation, minimum frequency compensation, maximum frequency compensation, minimum drift and maximum drift of RTC through the ptp_get_comp structure. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 282
Programming Interface i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
The UART type should be set to 52 as defined in the serial_core.h header file. • Serial IrDA i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
RTS/CTS. 39.2 Hardware Operation Refer to the i.MX 6Solo/6DualLite 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 communication and has support for IrDA 1.0.
• Implements support for Serial IrDA • Power management • Interrupt-driven and DMA-driven data transfer 39.2.3 Source Code Structure Table below shows the UART driver source files that are available in the directory: i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Device Drivers > Character devices > Serial drivers > IMX serial port support > Console on IMX serial port By default, this option is Y. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
With the SDMA enabled, the DMA RX interrupt occurs only when the received data fills all the 4K buffer. The DMA TX interrupt occurs when the data is sent out. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 288
Programming Interface i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
The driver requires firmware that runs on the chip's network processor. The majority of it is stored in ROM. The binaries that are downloaded and executed from RAM are as follows: i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
CONFIG_ATH6K_LEGACY-Build support for AR6003 support (non mac80211). Note: There are also a few other options under CONFIG_ATH6K_LEGACY. By default you may not need to use them. Refer to the option help for details. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
SoC core. Figure below illustrates the hardware interface between i.MX 6 and the Atheros Bluetooth module. UART is used for data communication. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 292
Introduction i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
SBC encoding, and other codecs, such as MP3 and WMA, are optional. The A2DP source checks the capabilities of sink and then configures sink to select the dedicated codec. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
The minimum baud rate for the A2DP profile is 460.8 kbps; 921.6 kbps baudrate is recommended. Table below maps the relationship between the UART baud rate and maximum SBC bit rate. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
MXC processors. In the menuconfig this option is available under Device Drivers −> MXC support drivers -> MXC Bluetooth support -> MXC Bluetooth support. By default, this option is M for all architectures. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 296
Software Operation i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Linux driver that allows privileged users to control the backlight by the appropriate duty cycle of the PWM Output (PWMO) signal. 42.1.1 Hardware Operation Figure below shows the PWM block diagram. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
• Four low power and debug mode signals • Four scan signals • Standard IP slave bus signals 42.1.2 Clocks The clock that feeds the prescaler can be selected from: i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
42.1.4 Driver Features The PWM driver includes the following software and hardware support: • Duty cycle modulation • Varying output intervals • Two power management modes-full on and full of i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
• 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.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
WDOG can be suspended/resumed in STOP/DOZE and WAIT modes independently. Since some bits of the WGOD registers are only one-time programmable after booting, ensure these registers are written correctly. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
43.2.3 Source Code Structure Table below shows the source files for WDOG drivers that are in the following directory: <ltib_dir>/rpm/BUILD/linux/drivers/watchdog. Table 43-1. WDOG Driver Files File Description imx2_wdt.c WDOG function implementations i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
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.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 304
Generic WDOG Driver i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
• Performance counter support-Enables collection of various low-level data and association for particular sections of code. • Call-graph support-With an 2.6 kernel, OProfile can provide gprof-style call-graph profiling data. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
OProfile can use these interrupts to generate samples and the profile results are a statistical approximation of which code caused how many instances of the given event. 44.2 Software Operation i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
The OProfile userspace daemon takes the raw data provided by the kernel and writes it to the disk. It takes the single data stream from the kernel and logs sample data against a number of sample files (available in /var/lib/oprofile/samples/current/). For the benefit of i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
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/ 44.3.2 Menu Configuration Options The following Linux kernel configurations are provided for this module. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
The number of interrupts generated with respect to the OProfile driver are numerous. The latency requirements are not needed. The rate at which interrupts are generated depends on the event. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 310
Requirements i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
• An interface to the hwrng API supporting use of the Random Number Generator - caamrng 45.2 Configuration and Job Execution Level This section has two parts: • Control/Configuration Driver • Job Ring Driver i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
It takes care of overall management of both input and output rings and interrupt service driving the output ring. One driver call is available for higher layers to use for queueing jobs to a ring for execution: i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 313
Metadata/context pointer passed to the original request. areq Returns: • Zero on successful job submission • -EBUSY if the input ring was full • -EIO if driver could not map the job descriptor i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Single-pass authentication/encryption using SHA224 and Single-DES-CBC authenc(hmac(sha256),cbc(des)) authenc-hmac-sha256-cbcdes-caam Single-pass authentication/encryption using SHA256 and Single-DES-CBC authenc(hmac(sha384),cbc(des)) authenc-hmac-sha384-cbcdes-caam Single-pass authentication/encryption using SHA384 and Single-DES-CBC authenc(hmac(sha512),cbc(des)) authenc-hmac-sha512-cbcdes-caam Single-pass authentication/encryption using SHA512 and Single-DES-CBC i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 315
Use of these services through the API is exemplified in the common conformance/ performance testing module in the kernel's crypto subsystem, known as tcrypt, visible in the kernel source tree at crypto/tcrypt.c. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Any selection of a size greater than the job ring size will force a situation where the interrupt times out before ever raising an interrupt. The default selection is 255. CRYPTO_DEV_FSL_CAAM_INTC_TIME_THLD i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
• Upstream variants of this driver support only Power architecture. This ARM-specific port is not upstreamed at this time, although portions may be upstreamed at some point. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Future implementations of this API may provide for the installation of an alternate interface. If this occurs, an alternate to this call can be provided. void sm_init_keystore(struct device *dev); Arguments: i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Points to a struct device established to manage resources for the secure memory subsystem. One of the units detected with a call to sm_detect_keystore_units(). unit Returns: • Zero on successful return i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Pointer to the variable to receive the allocated slot number, once known. slot Returns: • Zero for successful completion. • -EKEYREJECTED if the requested size exceeds the selected slot size. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Allocated slot to hold the encapsulated output as a Secure Memory Blob. outslot Length of the secret to be encapsulated, not including any blob storage overhead secretlen (blob key, MAC, etc.). i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Key modified component specified at the time of encapsulation. keymod Lenth of key modifier in bytes. keymodlen Returns: • Zero on success • CAAM job status if a failure occurs i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Number of the allocated slot to be released back to the store. slot Returns: • Zero for successful completion. • -EINVAL if an unallocated slot is specified. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 324
32-byte key test match OK • The secure memory driver is not implemented as a kernel module at this point in time. • Implementation is presently limited to kernel-mode operations. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Returns: • Zero on success. • -EINVAL if an argument was invalid or unusable. 45.23 Remove an Installed Driver int caam_secvio_remove_handler(struct device *dev, enum secvio_cause cause); i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Enables inclusion of Security Violation driver and configuration interface as part of the build configuration. Note that the driver is not buildable as a module in its present form. i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 328
Driver Configuration CAAM/SNVS i.MX 6Solo/6DualLite Linux Reference Manual, Rev. L3.0.35_4.1.0, 09/2013 Freescale Semiconductor, Inc.
Page 329
Freescale and the Freescale logo are trademarks of Freescale Semiconductor, Inc., Reg. U.S. Pat. & Tm. Off. All other product or service names are the property of their respective owners.
Need help?
Do you have a question about the i.MX 6Solo and is the answer not in the manual?
Questions and answers