background image

Daughter Card Module

Mass Market Daughter Card

144

Platform Support Products

Version 02.01.01.08

8.1. Mass Market Daughter Card

8.1.1. Acronyms & Definitions

Acronym

Definition

MMDC

Multi-Media  Daughter  Card/Customer  Daughter
Card

Table 8.1. MMDC Acronyms

8.1.2. Introduction

OMAP35x  daughter-card  (MMDC)  supports  following  features  which  are  not
available on the main EVM.

1.

TVP5146 decoder interface supporting BT656 format.

2.

Supports 3 types of video input types - S-Video, Composite and component.

3.

Supports 8/10 bit output interface from TVP5146.

4.

Supports interface for Micron sensor.

5.

HSUSB TRANSCEIVER- USB83320 supporting EHCI on port 2

Summary of Contents for OMAP35 Series

Page 1: ...OMAP35x EVM Linux PSP User Guide 02 01 01 08 Published 22 May 2009 ...

Page 2: ...2 Platform Support Products Version 02 01 01 08 ...

Page 3: ...ated TI product or service and is an unfair and deceptive business practice TI is not responsible or liable for any such statements TI products are not authorized for use in safety critical applications such as life support where a failure of the TI product would reasonably be expected to cause severe personal injury or death unless officers of the parties have executed an agreement specifically g...

Page 4: ...OMAP35x EVM Linux PSP 2 Platform Support Products Version 02 01 01 08 ...

Page 5: ... Compiling X Loader 11 2 3 Signing x load bin 12 2 4 Flashing x loader 13 2 4 1 OneNAND 13 2 4 2 NAND 13 2 5 Preparing MMC SD for boot 14 2 5 1 Creating bootable partition 14 2 5 2 Copying x loader 14 3 U Boot 15 3 1 Compiling U Boot 17 3 2 Flashing U Boot 18 3 2 1 OneNAND 18 3 2 2 Micron NAND 18 3 3 Configuring U Boot 19 3 3 1 Using ramdisk image 19 3 3 2 Using NFS Default U Boot configuration 19...

Page 6: ...to NAND 26 3 5 5 Reading from NAND 27 3 5 6 Unlocking NAND address space 27 3 5 7 NAND ECC algorithm selection 28 4 Kernel 29 4 1 Compiling Linux Kernel 30 4 2 Configuring Linux Kernel 31 4 2 1 Build configuration for OMAP35x 31 4 3 Booting Linux Kernel 34 4 3 1 Selecting boot mode 34 5 Audio Driver 37 5 1 Introduction 39 5 1 1 References 39 5 1 2 Acronyms Definitions 40 5 2 Features 41 5 2 1 Feat...

Page 7: ...ion History 70 6 Display Driver 71 6 1 Introduction 73 6 1 1 References 73 6 1 2 Acronyms Definitions 73 6 1 3 Hardware Overview 73 6 2 Features 74 6 2 1 Overview 74 6 2 2 Usage 74 6 3 Architecture 100 6 3 1 Driver Architecture 100 6 3 2 Software Design Interfaces 100 6 4 Software Interfaces 102 6 4 1 fbdev Driver Interface 102 6 4 2 V4L2 Driver Interface 103 6 4 3 SYSFS Software Design Interfaces...

Page 8: ...are Interface 127 7 4 1 Application Programming Interface 127 7 4 2 IOCTLs 128 7 4 3 Data Structures 132 7 5 Driver Configuration 137 7 5 1 Configuration Steps 137 7 6 Sample Application Flow 140 7 7 Revision History 141 8 Daughter Card Module 143 8 1 Mass Market Daughter Card 144 8 1 1 Acronyms Definitions 144 8 1 2 Introduction 144 8 2 Block Diagram 145 8 3 Board Illustration 146 8 4 Features su...

Page 9: ...179 9 5 2 Hardware Setup 179 9 5 3 Provided Sample Applications 179 10 USB Driver 181 10 1 Introduction 183 10 1 1 References 183 10 1 2 Hardware Overview 183 10 2 Features 185 10 2 1 Supported 185 10 2 2 Not supported 185 10 3 Driver configuration 186 10 3 1 USB phy selection for MUSB OTG port 186 10 3 2 USB controller in host mode 186 10 3 3 MUSB OTG controller in gadget mode 187 10 3 4 MUSB OTG...

Page 10: ...11 1 Introduction 200 11 1 1 References 200 11 1 2 Acronyms Definitions 200 11 2 Features 201 11 2 1 Features Supported 201 11 2 2 Features Not Supported 201 11 2 3 Limitations 201 11 3 Revision History 202 12 Power Management 203 12 1 Introduction 205 12 1 1 References 205 12 2 Features 206 12 2 1 Supported 206 12 2 2 Not Supported 206 12 2 3 Limitations 206 12 3 Architecture 207 12 3 1 cpuidle 2...

Page 11: ...x PSP Version 02 01 01 08 Platform Support Products ix 12 4 2 cpufreq 211 12 4 3 SmartReflex 211 12 5 Software Interface 213 12 5 1 cpuidle 213 12 5 2 Suspend Resume 214 12 5 3 SmartReflex 214 12 6 Revision History 216 ...

Page 12: ...Version 02 01 01 08 Platform Support Products x ...

Page 13: ...re ALSA Driver Step 12 55 5 13 OMAP3 ALSA Driver Half duplex playback 58 5 14 OMAP3 ALSA Driver Half duplex record 58 5 15 State Diagram 61 5 16 Data flow path 62 6 1 Video source color Keying 83 6 2 Video destination color Keying 84 6 3 Alpha blending with almost 50 transparency 87 6 4 Alpha blending with almost 100 transparency 88 6 5 Alpha blending with almost 0 transparency 88 6 6 1 BPP Data M...

Page 14: ... 3 109 6 26 configure Graphics display Driver Step 4 109 6 27 configure Graphics display Driver Step 5 110 6 28 Select TV as default output device Step 6 110 6 29 Select NTSC_M as TV mode Step 6 111 6 30 Application for v4l2 driver using MMAP buffers 113 6 31 Application for FBDEV driver 114 7 1 OMAP Resizer HW Block Diagram 118 7 2 Basic Architecture of Resizer Driver 126 7 3 Configure omap resiz...

Page 15: ...er Step 5 174 9 8 Configure Capture Driver Step 6 174 9 9 Configure Capture Driver Step 7 175 9 10 Configure Capture Driver Step 8 176 9 11 Configure Capture Driver Step 9 177 10 1 MUSB OTG Location of Mini AB receptacle on the EVM 184 10 2 MUSB OTG Location of USB PHY from NXP on the EVM 184 10 3 USB Driver Illustration of Mass Storage Class 189 10 4 USB Driver Illustration of HID Class 190 12 1 ...

Page 16: ...Version 02 01 01 08 Platform Support Products xiv ...

Page 17: ...s 129 7 7 Resizer ioctl RSZ_G_PARAMS arguments 129 7 8 Resizer ioctl RSZ_G_STATUS argument 130 7 9 Resizer ioctl RSZ_S_EXP argument 130 7 10 Resizer ioctl RSZ_RESIZE arguments 131 7 11 Resizer ioctl RSZ_REQBUF arguments 131 7 12 Resizer ioctl RSZ_QUERYBUF arguments 132 7 13 Resizer ioctl RSZ_QUEUEBUF arguments 132 7 14 Resizer Parameters Configuration Structure fields 133 7 15 Resizer Request Buff...

Page 18: ...OMAP35x EVM Linux PSP xvi Platform Support Products Version 02 01 01 08 12 1 C states in OMAP3 208 ...

Page 19: ...his platform In this context the document contains instructions to Install the release Build the sources contained in the release The document also provides detailed overview of specific drivers and modules contained in the PSP package Audio Driver Video Display Driver Resizer Driver Video Capture Driver USB Driver MMC Driver Power Management How to Use This Manual This document includes the follo...

Page 20: ...eo capture driver Chapter 10 USB Driver describes the implementation of USB driver Chapter 11 MMC Driver describes the implementation of MMC driver Chapter 12 Power Management describes the power management frameworks Please go through the Release Notes document available in the release package before starting the installation Notation of information elements The document may contain these additio...

Page 21: ...ts xix Tip This is an example of a useful tip If You Need Assistance For any assistance please send an mail to software support mailto softwaresupport ti com Trademarks OMAP is a trademark of Texas Instruments Incorporated All other trademarks are the property of the respective owner ...

Page 22: ...Version 02 01 01 08 Platform Support Products xx ...

Page 23: ...tract This chapter describes the layout of the Linux PSP package for OMAP35x EVM and steps to install on your development host Table of Contents 1 1 System Requirements 2 1 2 Installation 3 1 3 Installation Steps 5 1 4 Environment Setup 6 1 5 Setup NFS filesystem 7 ...

Page 24: ...Products Version 02 01 01 08 1 1 System Requirements Hardware Requirements OMAP EVM Main Board REV C or later and OMAP35XX Processor Board with OMAP35x ES 2 1 3 1 Processor REV B or later Software Requirements Code Sourcery ARM tool chain version 2008 q1 ...

Page 25: ...RootFs Arago html DataSheet MM mm pp bb pdf GettingStarted pdf MigrationGuide MM mm pp bb pdf ReleaseNotes MM mm pp bb pdf UserGuide MM mm pp bb pdf host tools linux signGP src signGP c windows PumpKIN exe PumpKIN hlp peripheral boot images Readme txt dnld_startup_omap3_evm bin peripheral u boot bin utilities CommunicationInterface dll CoreEngine dll DownloadUtility exe DownloadUtility ini images ...

Page 26: ...adme txt ChangeLog MM mm pp bb ShortLog Unified patch MM mm pp bb gz diffstat MM mm pp bb kernel patches MM mm pp bb tar gz linux MM mm pp bb tar gz u boot Readme txt ChangeLog MM mm pp bb ShortLog Unified patch MM mm pp bb gz diffstat MM mm pp bb u boot MM mm pp bb tar gz uboot patches MM mm pp bb tar gz utils Readme txt ITBOK AND UBOOT tar bz2 dnld util target tar bz2 test suite lftb MM mm pp bb...

Page 27: ...tup of the EVM are contained in the OMAP3 EVM Users Guide included with the EVM kit Refer section 2 1 for the detailed instructions to bring up the EVM To use the pre built binaries included in the release skip to section 2 4 You can always return to section 2 1 for instructions on how to build the x loader u boot and Linux kernel ...

Page 28: ...ain the binaries of the CodeSourcery cross compiler tool chain 2 For example in bash export PATH opt toolchain 2008 q1 bin PATH Add location of u boot tools to the PATH environment variable 3 For example in bash export PATH opt u boot tools PATH Note Actual instructions and the path setting will depend upon your shell and location of the tools ...

Page 29: ...tep is required when root filesystem is mounted from an NFS location Extract the contents of the NFS image nfs tar bz2 to a directory exported via NFS cd opt nfs target tar xjfv nfs tar bz2 Important Execute this command as root user Some of the files included in this archive require root permissions for creation ...

Page 30: ...Version 02 01 01 08 Platform Support Products 8 ...

Page 31: ...e steps required to build and execute the x loader Table of Contents 2 1 Introduction 10 2 2 Compiling X Loader 11 2 3 Signing x load bin 12 2 4 Flashing x loader 13 2 4 1 OneNAND 13 2 4 2 NAND 13 2 5 Preparing MMC SD for boot 14 2 5 1 Creating bootable partition 14 2 5 2 Copying x loader 14 ...

Page 32: ...x loader Introduction 10 Platform Support Products Version 02 01 01 08 2 1 Introduction X loader is loaded by ROM boot loader into internal RAM X loader support boot from OneNAND NAND MMC SD ...

Page 33: ...ed during build This step is not necessary when building for the first time make CROSS_COMPILE arm none linux gnueabi ARCH arm distclean Choose the configuration for OMAP3 EVM make CROSS_COMPILE arm none linux gnueabi ARCH arm omap3evm_config Initiate the build make CROSS_COMPILE arm none linux gnueabi ARCH arm On successful completion file x load bin will be created in the current directory ...

Page 34: ... 08 2 3 Signing x load bin The file x load bin needs to be signed before it can be used by the ROM bootloader To sign the X Loader binary look for signGP tool under host tools linux folder signGP x load bin The signing utility creates x load bin ift in the current directory ...

Page 35: ...ite erase operation For subsequent releases of u boot this step is not required OMAP3EVM onenand unlock 0x000000 0x20000 OMAP3EVM onenand erase 0x00000000 0x00080000 OMAP3EVM onenand write 0x80000000 0x0 0x10000 2 4 2 NAND To flash the x loader into Micron NAND execute following commands at the U Boot prompt OMAP3EVM mw b 0x80000000 0xFF 0x100000 OMAP3EVM tftp 0x80000000 x load bin ift OMAP3EVM na...

Page 36: ...sanalyser com sp27213 exe and follow the steps below Connect the card reader to the Windows machine where the formatting tool has been installed Insert MMC SD card into the card reader Launch the HP USB Disk Storage Format Tool Select FAT32 as File System Click on Start After formatting is done Click OK 2 5 2 Copying x loader Copy the x load bin ift to the MMC SD card and rename it as MLO Once the...

Page 37: ...f Contents 3 1 Compiling U Boot 17 3 2 Flashing U Boot 18 3 2 1 OneNAND 18 3 2 2 Micron NAND 18 3 3 Configuring U Boot 19 3 3 1 Using ramdisk image 19 3 3 2 Using NFS Default U Boot configuration 19 3 3 3 Using NFS with no DHCP in Linux 20 3 4 Managing OneNAND 22 3 4 1 Marking a bad block 22 3 4 2 Erasing OneNAND 22 3 4 3 Writing to OneNAND 23 3 4 4 Reading from OneNAND 23 3 4 5 Scrubbing OneNAND ...

Page 38: ...rm Support Products Version 02 01 01 08 3 5 2 Viewing bad blocks 25 3 5 3 Erasing NAND 25 3 5 4 Writing to NAND 26 3 5 5 Reading from NAND 27 3 5 6 Unlocking NAND address space 27 3 5 7 NAND ECC algorithm selection 28 ...

Page 39: ...ry when building for the first time make CROSS_COMPILE arm none linux gnueabi ARCH arm distclean Choose the configuration for OMAP3 EVM make CROSS_COMPILE arm none linux gnueabi ARCH arm omap3_evm_config Initiate the build make CROSS_COMPILE arm none linux gnueabi ARCH arm On successful completion file u boot bin will be created in the current directory Note The u boot build commands have changed ...

Page 40: ...n For subsequent releases of u boot this step is not required OMAP3EVM onenand unlock 0x000000 0x300000 OMAP3EVM onenand erase 0x00080000 0x001C0000 OMAP3EVM onenand write 0x80000000 0x80000 0x1C0000 3 2 2 Micron NAND To flash u boot bin to the Micron NAND execute the commands listed below OMAP3EVM mw b 0x80000000 0xFF 0x100000 OMAP3EVM tftp 0x80000000 u boot bin OMAP3EVM nand unlock OMAP3EVM nand...

Page 41: ...e command text may appear wrapped in the document Wherever indicated these commands must be entered in a single line 3 3 1 Using ramdisk image Set the bootargs OMAP3EVM setenv bootargs mem 128M console ttyS0 115200n8 root dev ram0 rw initrd 0x81600000 16M ip dhcp Note The entire command should be entered in a single line Set the bootcmd OMAP3EVM setenv bootcmd dhcp tftp 0x80000000 uImage tftp 0x81...

Page 42: ...cp tftp 0x80000000 uImage bootm 3 3 3 Using NFS with no DHCP in Linux Disable the DHCP support in the build configuration Device Drivers Networking Support Networking options IP DHCP Support Set the bootargs OMAP3EVM setenv bootargs console ttyS0 115200n8 noinitrd rw root dev nfs nfsroot 192 168 1 101 opt nfs target nolock rsize 4096 wsize 4096 proto tcp mem 128M Set the bootcmd OMAP3EVM setenv bo...

Page 43: ...U Boot Using NFS with no DHCP in Linux Version 02 01 01 08 Platform Support Products 21 Important To save the variables on the flash use the u boot command saveenv ...

Page 44: ...erase block size of 128Kbytes as bad block offset blocknum 128 1024 OMAP3EVM onenand markbad 0x400000 3 4 2 Erasing OneNAND To erase OneNAND blocks in the address range OMAP3EVM onenand erase stoffaddr endoffaddr or OMAP3EVM onenand erase block stblknum endblknum Note The behavior of this command was modified This commands skips bad blocks both factory or user marked encountered within the specifi...

Page 45: ...m next good block Important If the write fails on ECC check the block where the failure occurred is marked bad and write operation is aborted The command needs to be re executed to complete the write operation The offset and length for reading have to be page aligned else the command will abort For example to write 0x40000 bytes from memory buffer at address 0x80000000 to OneNAND starting at block...

Page 46: ... at block 32 offset 0x400000 to memory buffer at address 0x80000000 OMAP3EVM onenand read 0x80000000 0x400000 0x40000 3 4 5 Scrubbing OneNAND This command operation is similar to the erase command with a difference that it doesn t care for bad blocks It attempts to erase all blocks in the specified address range To scrub OneNAND blocks in the address range OMAP3EVM onenand scrub stoffaddr eoffaddr...

Page 47: ...This is a new command For example to mark block 32 assuming erase block size of 128Kbytes as bad block offset blocknum 128 1024 OMAP3EVM nand markbad 0x400000 3 5 2 Viewing bad blocks Gives a list of bad blocks in NAND OMAP3EVM nand bad Note The user marked bad blocks can be viewed by using this command only after a reset 3 5 3 Erasing NAND To erase NAND blocks in the address range or using block ...

Page 48: ...o NAND To write len bytes of data from a memory buffer located at addrto the NAND block offset OMAP3EVM nand write addr offset len Note The behavior of this command was modified If a bad block is encountered during the write operation it is skipped and the write operation continues from next good block Important If the write fails on ECC check the block where the failure occurred is marked bad and...

Page 49: ... ECC check the block where the failure occurred is marked bad and read operation is aborted The command needs to be re executed to complete the read operation But the data in just marked bad block is irrecoverably lost The offset and length for reading have to be page aligned else the command will abort For example to read 0x40000 bytes from NAND starting at block 32 offset 0x400000 to memory buff...

Page 50: ...0 3 5 7 NAND ECC algorithm selection To select ECC algorithm for NAND OMAP3EVM nandecc sw hw Note To write X loader from U Boot ECC algorithm to be selected is HW since bootrom uses this algorithm for reading To write U Boot from U Boot ECC algorithm to be selected is SW OMAP3EVM nandecc hw or OMAP3EVM nandecc sw ...

Page 51: ...he steps required to build and configure the Linux kernel It also provides basic steps to boot kernel on the EVM Table of Contents 4 1 Compiling Linux Kernel 30 4 2 Configuring Linux Kernel 31 4 2 1 Build configuration for OMAP35x 31 4 3 Booting Linux Kernel 34 4 3 1 Selecting boot mode 34 ...

Page 52: ...ne linux gnueabi ARCH arm omap3_evm_defconfig Initiate the build Note For the kernel image uImage to be built mkimage utility must be included in the path mkimage utility is generated under tools folder while building u boot bin make CROSS_COMPILE arm none linux gnueabi ARCH arm uImage On successful completion file uImage will be created in the directory arch arm boot Copy this file to the root di...

Page 53: ...de USB EHCI Ethernet MMC SD Video Display Audio NAND and OneNAND Touchscreen 4 2 1 Build configuration for OMAP35x The default configuration included in the release contains all default values to build Linux kernel for OMAP35x EVM The specific processor type OMAP3503 OMAP3515 OMAP3525 and OMAP3530 is detected at runtime This section illustrates these configuration items for reference To create def...

Page 54: ...pport OMAP35x Family OMAP Board Type OMAP3 LDP board OMAP 3430 SDP board OMAP 3530 EVM board OMAP 3530 EVM daughter card board Choose Exit to return to the previous menu 4 2 1 1 Power module PR785 The OMAP3EVM ships with power module using TPS65950 PMIC If the board uses PR785 power module following changes are necessary From the onscreen menu select System Type Code maturity level options General...

Page 55: ...oard selection for OMAP3 EVM Power board for OMAP3 EVM OMAP3 BEAGLE board Now select Power board for OMAP3 EVM Return back to main menu and select Device Drivers Now select Multifunction device drivers From this sub menu deselect Texas Instruments TWL4030 TPS659x0 Support Return back to main menu and select Device Drivers Now select Voltage and Current Regulator Support From this sub menu select T...

Page 56: ...apped for other pins Figure 4 1 Boot switch position Note This selection identifies the location from where the x loader and u boot binaries are executed Power on EVM and wait for u boot to come up Important Ensure that u boot environment variables bootargs and bootcmd are properly set See section 3 3 for more details In addition set these environment variables with correct values a serverip b boo...

Page 57: ...ment variable as follows only an illustration substitute with actual image path and load address for your system OMAP3EVM setenv mmcboot mmcinit fatload mmc 0 0x82000000 uImage bootm 0x82000000 OMAP3EVM saveenv Once setup the mmcboot variable can be exercised as follows OMAP3EVM run mmcboot Once the Linux kernel boots login as root No password is required ...

Page 58: ...Version 02 01 01 08 Platform Support Products 36 ...

Page 59: ...able of Contents 5 1 Introduction 39 5 1 1 References 39 5 1 2 Acronyms Definitions 40 5 2 Features 41 5 2 1 Features Supported 41 5 2 2 Constraints 42 5 3 Architecture 43 5 3 1 ALSA SoC Layer 43 5 3 2 Design 43 5 4 Driver Configuration 45 5 4 1 Configuration Steps 45 5 4 2 Installation 55 5 5 Software Interfaces 56 5 5 1 Application Interface 56 5 5 2 Driver Interface 59 5 6 Sample Applications 6...

Page 60: ...Audio Driver 38 Platform Support Products Version 02 01 01 08 5 6 2 A minimal playback application 63 5 6 3 A minimal record application 67 5 7 Revision History 70 ...

Page 61: ...Cs and other serially connected A D and D A devices Inter IC Sound I2S compliant devices Pulse Code Modulation PCM devices Time Division Multiplexed TDM bus devices The TWL4030 audio module is controlled by internal registers that can be accessed by the high speed I2C control interface This user manual defines and describes the usage of user level and platform level interfaces of the ALSA SoC Audi...

Page 62: ...itions Acronym Definition ALSA Advanced Linux Sound Architecture ALSA SoC ALSA System on Chip DMA Direct Memory Access I2C Inter Integrated Circuit McBSP Multi channel Buffered Serial Port PCM Pulse Code Modulation TDM Time Division Multiplexing OSS Open Sound System I2S Inter IC Sound Table 5 1 Acronyms ...

Page 63: ...des Multiple sample rate support 8 KHz 11 025 KHz 12 KHz 16 KHz 22 05 KHz 24 KHz 32 KHz 44 1 KHz and 48 KHz for both capture and playback Supports simultaneous playback and record full duplex mode 16 Bit Little Endian Signed PCM data I2S mode of operation Interleaved access mode Start stop pause and resume feature Supports mixer interface for TWL4030 audio codec McBSP is configured as slave and TW...

Page 64: ...will support a single input RECORD and a single output stream PLAY The audio driver will not allow opening the same stream Play Record multiple times concurrently Configuration of McBSP as Master TWL4030 codec needs to be configured in Master mode only and therefore McBSP can only be used as slave along with this codec Configuration of capture and playback streams in different sampling rates TWL40...

Page 65: ...ese issues and provide the following features Codec independence Allows reuse of codec drivers on other platforms and machines Easy I2S PCM audio interface setup between codec and SoC Each SoC interface and codec registers it s audio interface capabilities with the core and are subsequently matched and configured when the application hw params are known Dynamic Audio Power Management DAPM DAPM aut...

Page 66: ... 01 01 08 Machine driver The machine driver handles any machine specific controls and audio events i e turing on an amp at start of playback Following architecture diagram shows all the components and the interactions among them Figure 5 1 ALSA SoC Architecture ...

Page 67: ... 5 4 Driver Configuration 5 4 1 Configuration Steps To enable audio driver support in the kernel 1 Open menuconfig options from kernel command prompt 2 Select Device Drivers as shown here Figure 5 2 Configure ALSA Driver Step 2 3 Select Device Drivers Sound card support as shown here ...

Page 68: ... Driver Configuration Steps 46 Platform Support Products Version 02 01 01 08 Figure 5 3 Configure ALSA Driver Step 3 4 Select Device Drivers Sound card support Advanced Linux Sound Architecture as shown here ...

Page 69: ...ion 02 01 01 08 Platform Support Products 47 Figure 5 4 Configure ALSA Driver Step 4 5 Select Device Drivers Advanced Linux Sound Architecture OSS PCM digital audio API and OSS PCM digital audio API Include plugin system NEW as shown here ...

Page 70: ...Configuration Steps 48 Platform Support Products Version 02 01 01 08 Figure 5 5 Configure ALSA Driver Step 5 6 Select Device Drivers Advanced Linux Sound Architecture Dynamic device file minor numbers as shown here ...

Page 71: ...ver Configuration Steps Version 02 01 01 08 Platform Support Products 49 Figure 5 6 Configure ALSA Driver Step 6 7 Select Device Drivers Sound Advanced Linux Sound Architecture Support old ALSA API as shown here ...

Page 72: ... Configuration Steps 50 Platform Support Products Version 02 01 01 08 Figure 5 7 Configure ALSA Driver Step 7 8 Select Device Drivers Sound Advanced Linux Sound Architecture ALSA for SoC audio support as shown here ...

Page 73: ...tform Support Products 51 Figure 5 8 Configure ALSA Driver Step 8 9 Select Device Drivers Sound Advanced Linux Sound Architecture ALSA for SoC audio support SoC Audio for the Texas Instruments OMAP chips and SoC Audio support for OMAP3EVM board as shown here ...

Page 74: ...Audio Driver Configuration Steps 52 Platform Support Products Version 02 01 01 08 Figure 5 9 Configure ALSA Driver Step 9 10 To enable McBSP hardware select System Type as shown here ...

Page 75: ...Audio Driver Configuration Steps Version 02 01 01 08 Platform Support Products 53 Figure 5 10 Configure ALSA Driver Step 10 11 Select System Type TI OMAP Implementations as shown here ...

Page 76: ...Audio Driver Configuration Steps 54 Platform Support Products Version 02 01 01 08 Figure 5 11 Configure ALSA Driver Step 11 12 Select System Type TI OMAP Implementations McBSP Support as shown here ...

Page 77: ...rm Support Products 55 Figure 5 12 Configure ALSA Driver Step 12 5 4 2 Installation 5 4 2 1 Driver built statically If the audio driver is built statically into the kernel it is activated during boot up There is no special procedure to install the driver ...

Page 78: ... alsa doc alsa lib 5 5 1 1 Device Interface The operational interface in dev contains three main types of devices a PCM devices for recording or playing digitized sound samples b CTL devices that allow manipulating the internal mixer and routing of the card and c MIDI devices to control the MIDI port of the card if any Name Description dev snd controlC0 Control devices i e mixer etc dev snd pcmC0D...

Page 79: ...cm_close Closes a previously opened PCM stream snd_pcm_hw_params_any Fill params with a full configuration space for a PCM snd_pcm_hw_params_test_ parameter Test the availability of important parameters like number of channels sample rate etc snd_pcm_hw_params_test_format snd_pcm_hw_params_test_rate etc snd_pcm_hw_params_set_ parameter Set the different configuration parameters snd_pcm_hw_params_s...

Page 80: ... Products Version 02 01 01 08 5 5 1 4 User Space Interactions This section depicts the sequence of operations for a simple playback and capture application Figure 5 13 OMAP3 ALSA Driver Half duplex playback Figure 5 14 OMAP3 ALSA Driver Half duplex record ...

Page 81: ...tion hooks for the core ALSA layer to probe it and handle correctly codec_clock_on Initializes the McBSP peripheral and the TWL4030 audio codec codec_clock_off Used for cleanup codec_configure_dev Used to configure the TWL4030 codec codec_set_samplerate Used to set the desired sample rate codec_set_stereomode Used to set the desired mode mono or stereo Moreover as mentioned above while probing the...

Page 82: ...ce when the buffer size the period size the format etc are defined for the pcm substream Many hardware setups should be done in this callback including the allocation of buffers hw_free This is called to release the resources allocated via hw_params prepare This callback is called when the PCM is prepared You can set the format type sample rate etc here The difference from hw_params is that the pr...

Page 83: ... sent to the driver These would include the volume control settings the sampling rate information whether the data is to be read played to the device etc On completion of the default configuration of the driver the driver enters in to ready state where the driver is ready for data transfer The application may now initiate data read write operations based on which DMA is used to transfer the data t...

Page 84: ...rs into suspended state after shutting down the codec On resumption the driver moves into ready state after re initializing the codec awaiting further data transfers to happen When the driver is being shutdown the data structures if any are cleaned up and the driver exits 5 5 2 3 Data Flow The data transfer flow from the user space to the actual hardware is illustrated below Figure 5 16 Data flow ...

Page 85: ...load User needs to build and install them before he starts using the ALSA based applications 5 6 2 A minimal playback application This program opens an audio interface for playback configures it for stereo 16 bit 44 1kHz interleaved conventional read write access Then its delivers a chunk of random data to it and exits It represents about the simplest possible use of the ALSA Audio API and isn t m...

Page 86: ...e automatically converted This also applies to the access type and the number of channels With the hw interface you have to check whether your hardware supports the configuration you would like to use Otherwise user can use the default interface for playback by Name of the PCM device like plughw 0 0 The first number is the number of the soundcard the second number is the number of the device stati...

Page 87: ...ce to match this configuration only The access type specifies the way in which multi channel data is stored in the buffer For INTERLEAVED access each frame in the buffer contains the consecutive sample data for the channels For 16 Bit stereo data this means that the buffer contains alternating words of sample data for the left and right channel Set access type if err snd_pcm_hw_params_set_access p...

Page 88: ...prepare device if err snd_pcm_hw_params playback_handle hw_params 0 fprintf stderr cannot set parameters s n snd_strerror err exit 1 snd_pcm_hw_params_free hw_params if err snd_pcm_prepare playback_handle 0 fprintf stderr cannot prepare audio interface for use s n snd_strerror err exit 1 5 6 2 3 Writing data to the device After the PCM device is configured we can start writing PCM data to it The f...

Page 89: ...l program Note that it is not possible to use one pcm handle for both playback and capture So you have to configure two handles if you want to access the PCM device in both directions include stdio h include stdlib h include alsa asoundlib h define BUFF_SIZE 4096 int main int argc char argv int err short buf BUFF_SIZE int rate 44100 Sample rate int exact_rate Sample rate returned by snd_pcm_t capt...

Page 90: ...et access type if err snd_pcm_hw_params_set_access capture_handle hw_params SND_PCM_ACCESS_RW_INTERLEAVED 0 fprintf stderr cannot set access type s n snd_strerror err exit 1 Set sample format if err snd_pcm_hw_params_set_format capture_handle hw_params SND_PCM_FORMAT_S16_LE 0 fprintf stderr cannot set sample format s n snd_strerror err exit 1 Set sample rate If the exact rate is not supported by t...

Page 91: ...ice if err snd_pcm_hw_params capture_handle hw_params 0 fprintf stderr cannot set parameters s n snd_strerror err exit 1 snd_pcm_hw_params_free hw_params if err snd_pcm_prepare capture_handle 0 fprintf stderr cannot prepare audio interface for use s n snd_strerror err exit 1 Read data into the buffer if err snd_pcm_readi capture_handle buf 128 128 fprintf stderr read from audio interface failed s ...

Page 92: ...ice related information and reorganized the content 0 97p1 Added constraint that configuration of capture and playback streams in different sampling rates is not possible because of McBSP instance 2 limitation 02 00 00 Moved to kernel version 2 6 26 and alsa core version 1 0 16 02 01 00 Moved to ALSA SoC layer v1 0 18a and kernel version 2 6 29 ...

Page 93: ...6 1 1 References 73 6 1 2 Acronyms Definitions 73 6 1 3 Hardware Overview 73 6 2 Features 74 6 2 1 Overview 74 6 2 2 Usage 74 6 3 Architecture 100 6 3 1 Driver Architecture 100 6 3 2 Software Design Interfaces 100 6 4 Software Interfaces 102 6 4 1 fbdev Driver Interface 102 6 4 2 V4L2 Driver Interface 103 6 4 3 SYSFS Software Design Interfaces 105 6 5 Driver Configuration 106 6 5 1 Configuration S...

Page 94: ...Display Driver 72 Platform Support Products Version 02 01 01 08 6 6 Sample Application Flow 113 6 7 Revision History 115 ...

Page 95: ...m Committee PAL Phase Alternating Line LCD Liquid Crystal Display Table 6 1 Acronyms 6 1 3 Hardware Overview The display subsystem provides the logic to display a video frame from the memory frame buffer either SDRAM or SRAM on a liquid crystal display LCD panel or a TV set The display subsystem integrates the following elements Display controller DISPC module Remote frame buffer interface RFBI mo...

Page 96: ...V or LCD Through syfs for OSD and compile time option for video pipelines Supports buffer management through memory mapped and user pointer buffer exchange for application usage mmaped Supports rotation 0 90 180 and 270 degrees on LCD and TV output Supports destination and source colorkeying on Video pipelines through V4L2 Supports alpha blending through ARGB pixel format on Video2 pipeline and RG...

Page 97: ...e limitation of the VRFB engine these buffers are quite big in size Size of the VRFB buffers is listed in buffer managment section VRFB buffers are allocated by driver during vidioc_reqbufs ioctl if the rotation is enabled and freed during vidioc_streamoff But under heavy system load memory fragmentation may occur and VFRB buffer allocation may fail To address this issue V4L2 driver provides comma...

Page 98: ...These command line arguments can only be used with boot time arguments as FBDEV driver only supports static build Following example shows how to specify 90 degree rotation in boot time argument Set the bootargs for enabling rotation setenv bootargs console ttyS0 115200n8 mem 128M noinitrd root dev nfs nfsroot 172 24 133 229 home user remote _install nolock rsize 4096 wsize 4096 proto tcp ip dhcp o...

Page 99: ...E defined in driver header files and is limited by the available memory in the kernel If driver is not able to allocate the requested number of buffer it will return the number of buffer it is able to allocate The main steps that the application must perform for buffer allocation are 1 Allocating Memory This ioctl is used to allocate memory for frame buffers This is a necessary ioctl for streaming...

Page 100: ...annot allocate memory n close fd return 1 2 Getting physical address This ioctl is used to query buffer information like buffer size and buffer physical address This physical address is used in m mapping the buffers This ioctl is necessary for driver buffer mode as it provides the physical address of buffers which are used to mmap system call the buffers Ioctl VIDIOC_QUERYBUF It takes a pointer to...

Page 101: ...ats supported If rotation is enabled driver allocates single buffer of maximum resolution for the VRFB memory space Following steps are required to map buffers in application memory space 1 Getting fix screen information FBIOGET_FSCREENINFO ioctl is used to get the not changing screen information like physical address of the buffer size of the buffer line length Getting fix screen information stru...

Page 102: ...tation engine The buffer size for this physical buffer should be large enough to store the image to be rotated When program writes to the virtual address of the context rotation engine write to this memory space and when program reads image from virtual address rotation engine reads image from this buffer with rotation angle V4L2 Driver V4L2 driver supports rotation by using rotation engine in the...

Page 103: ...ument of the kernel for FBDEV driver One of the fields in the fb_var_screeninfo structure has been used for rotate field Applications can thus use the FBIOPUT_VSCREENINFO ioctl to set the rotation angle Applications have to set this rotate field in the fb_var_screeninfo structure equal to the angle of rotation 0 90 180 or 270 and call this ioctl Frame buffer driver also supports the rotation throu...

Page 104: ...tcp ip dhcp omapfb rotate 1 omapfb rotate_type 1 Note This whole command should written in single line Following code listings demos how to set the rotation in frame buffer driver using ioctl and sysfs entry struct fb_var_screeninfo var Set the rotation through ioctl Get the Variable screen info through FBIOGET_VSCREENINFO var rotate 1 To set rotation angle to 90 degree if ioctl fb FBIOPUT_VSCREEN...

Page 105: ...Display Driver Usage Version 02 01 01 08 Platform Support Products 83 Figure 6 1 Video source color Keying ...

Page 106: ...caling cases The Graphics destination color key allows defining a color that the nonmatching pixels in the graphics pipelines prevent video overlay The destination transparency color key is applicable only in the graphics region when graphics and video overlap Otherwise the destination transparency color key is ignored One of the colors keys can be activated at a time This implies both key cannot ...

Page 107: ...1 if framebuffer capability V4L2_FBUF_CAP_SRC_CHROMAKEY framebuffer flags V4L2_FBUF_FLAG_SRC_CHROMAKEY ret ioctl fd VIDIOC_S_FBUF framebuffer if ret 0 perror VIDIOC_S_FBUF exit 1 Below example show how to enable destination color keying struct v4l2_framebuffer framebuffer ret ioctl fd VIDIOC_G_FBUF framebuffer if ret 0 perror VIDIOC_G_FBUF exit 1 Set SRC_COLOR_KEYING if device supports that if fra...

Page 108: ...keying Overlay manager should not be changed between the setting up of chroma key and enabling the chroma keying struct v4l2_format fmt u8 chromakey 0xF800 Red color RGB565 format fmt type V4L2_BUF_TYPE_VIDEO_OVERLAY ret ioctl fd VIDIOC_G_FMT fmt if ret 0 perror VIDIOC_G_FMT n close fd exit 0 fmt fmt win chromakey chromakey ret ioctl fd VIDIOC_S_FMT fmt if ret 0 perror VIDIOC_G_FMT n close fd exit...

Page 109: ...r depends on the transparency factor referred to as alpha factor of the foreground color If the alpha factor is 100 then blended image will have only foreground color If the alpha factor is 0 blended image will have only back ground color Any value between 0 to 100 will blend the foreground and background color to produce new blended color depending upon the alpha factor Figure 6 3 Alpha blending ...

Page 110: ...pha blending with almost 0 transparency Overlay manager of DSS is capable of supporting the alpha blending This is done by displaying more that one layer video and graphics to the same output device TV or LCD Overlay manager supports normal mode and alpha mode of operation In normal mode graphics plane is at bottom on top of it is video1 ...

Page 111: ...d on pixel format for video2 and graphics pipeline respectively Global alpha blending is also supported through V4L2 and Fbdev ioctls Before using any of the alpha blending methods alpha blending needs to be enabled on the selected output device through V4L2 ioctl Alpha blending will be enabled on the output device to which video pipeline is connected Following program listing will enable alpha bl...

Page 112: ...l ret ioctl fd VIDIOC_S_FMT fmt if ret 0 perror VIDIOC_S_FMT n close fd exit 0 Setting the global alpha value is supported through V4L2_BUF_TYPE_VIDEO_OVERLAY format type Below programlisting shows how to set the global alpha value for video2 pipeline struct v4l2_format fmt u8 global_alpha 128 fmt type V4L2_BUF_TYPE_VIDEO_OVERLAY ret ioctl fd VIDIOC_G_FMT fmt if ret 0 perror VIDIOC_G_FMT n close f...

Page 113: ...SCREENINFO n exit 4 Below programlisting shows how to set the global alpha value for graphics pipeline struct fb_var_screeninfo var int global_alpha 128 if ioctl fb FBIOGET_VSCREENINFO var perror Error reading variable information n exit 3 var reserved 0 global_alpha if ioctl fb FBIOPUT_VSCREENINFO var perror Error writing variable information n exit 3 Note Before using the global alpha or pixel b...

Page 114: ...EV driver by using bpp red green and blue fields of fb_vscreeninfo structure and ioctl FBIOPUT_VSCREENINFO Application needs to specify bits per pixel and length and offset of red green and blue component Bits per pixel and color depth in the pixel aren t quite the same thing The display controller supports color depths of 1 2 4 8 12 16 24 and 32 bits Color depth and bits per pixel are the same fo...

Page 115: ... Platform Support Products 93 Figure 6 6 1 BPP Data Memory Organization Figure 6 7 2 BPP Data Memory Organization Figure 6 8 4 BPP Data Memory Organization Figure 6 9 8 BPP Data Memory Organization Figure 6 10 12 BPP Data Memory Organization ...

Page 116: ...rsion 02 01 01 08 Figure 6 11 16 BPP Data Memory Organization Figure 6 12 24 BPP Data Memory Organization Figure 6 13 ARGB 32 BPP Data Memory Organization Figure 6 14 RGBA 32 BPP Data Memory Organization Figure 6 15 24 BPP Packed Data Memory Organization ...

Page 117: ...ol with the V4L2_BUF_TYPE_VIDEO_OVERLAY buffer type When a switch from LCD to TV or from TV to LCD happens an application is expected to adjust the display window V4L2 driver only supports change of display window Following example shows how to change display window size struct v4l2_format fmt Fmt type V4L2_BUF_TYPE_VIDEO_OVERLAY fmt fmt win w left 0 fmt fmt win w top 0 fmt fmt win w width 200 fmt...

Page 118: ...e LCD panel or the TV set The scaling unit consists of two scaling blocks The vertical scaling block followed by the horizontal scaling block The two scaling units are independent Neither of them only one or both can be used simultaneously As scaling unit is on video pipeline scaling is only supported in V4L2 driver Scaling is not explicitly exposed at the API level Instead the horizontal and vert...

Page 119: ...it wide CLUT value 1 BPP pixels address 2 entries 2 BPP pixels address 4 entries 4 BPP pixels address 16 entries and 8 BPP pixels address 256 entries Driver supports 1 2 4 and 8 bits per pixel image format using color lookup table FBIOPUTCMAP and FBIOGETCMAP can be used to set and get the color map table When CLUT is set the driver makes the hardware to reload the CLUT Following example shows how ...

Page 120: ...IDIOC_STREAMOFF ioctl to stop streaming Following example shows how to do streaming with V4l2 driver Initially fill the buffer struct v4l2_requestbuffers req struct v4l2_buffer buf struct v4l2_format fmt Fill the buffers with the image Enqueue buffers for i 0 i req count i buf type V4L2_BUF_TYPE_VIDEO_OUTPUT buf index i buf memory V4L2_MEMORY_MMAP ret ioctl fd VIDIOC_QBUF buf if ret 0 perror VIDIO...

Page 121: ...art fmt fmt pix width fmt fmt pix height 0 Queue the buffer again ret ioctl fd VIDIOC_QBUF buf if ret 0 perror VIDIOC_QBUF n for j 0 j req count j Unmap all the buffers if call fails exit 0 Streaming off ret ioctl fd VIDIOC_STREAMOFF a if ret 0 perror VIDIOC_STREAMOFF n for i 0 i req count i Unmap all the buffers if call fails exit 0 ...

Page 122: ...functionality of the display driver is to provide interfaces to user level applications and management to OMAP35x display hardware This includes but is not limited to GUI rendering through the graphics pipeline Static image or video rendering through two video pipelines Connecting each of three pipelines to either LCD or TV output so the display layer is presented on the selected output path Image...

Page 123: ...r is registered with the FBDEV subsystem and is responsible for managing the graphics layer frame buffer Driver creates dev fb0 as the device node Application can open this device node to open the driver and negotiate parameters with the driver through frame buffer ioctls Application maps driver allocated buffers in the application memory space and fills them for the driver to display Video Applic...

Page 124: ...y or change the display mode including the color depth resolution timing etc These I O controls accept a pointer to a struct fb_var_screeninfo structure The video mode data supplied in the fb_var_screeninfo struct is translated to values loaded into the display controller registers FBIOGET_FSCREENINFO This I O control can be used by applications to get the fixed properties of the display e g the s...

Page 125: ...ructure is used to get set the color map for the framebuffer 6 4 2 V4L2 Driver Interface 6 4 2 1 Application Interface open To open a video device close To close a video device ioctl To send ioctl commands to the display driver mmap To memory map a driver allocated buffer to user space 6 4 2 2 Supported Standard IOCTLs Note This section describes the standard V4L2 IOCTLs supported by the Display D...

Page 126: ...he buffer type The driver may change the passed values if they are not supported Application should check what is granted if VIDIOC_TRY_FMT is not used first VIDIOC_CROPCAP This is used to get the default cropping rectangle based on the current image size and the current display panel size The driver fills a v4l2_cropcap struct VIDIOC_G_CROP This is used to get the current cropping rectangle The d...

Page 127: ...TRL VIDIOC_QUERYCTRL These ioctls are used to set get and query various V4L2 controls like rotation mirror and background color Currently only rotation is supported VIDIOC_STREAMOFF This is used to turn off streaming 6 4 3 SYSFS Software Design Interfaces Currently we are not supporting the sysfs interfaces for functions like changing the output changing the mode and alpha blending But bulk of sys...

Page 128: ...1 Configuration Steps To enable V4L2 video driver 1 Open menuconfig options from kernel command prompt 2 Select Device Drivers as shown here Figure 6 19 Configure V4L2 video Driver Step 2 3 Select Device Drivers Multimedia devices as shown here Figure 6 20 configure V4L2 video Driver Step 3 4 Select Video For Linux ...

Page 129: ...ure V4L2 video Driver Step 4 5 Select Device Drivers Multimedia devices Video capture adapaters as shown here and go inside the main menu Figure 6 22 Configure V4L2 video Driver Step 5 6 Select OMAP2 OMAP3 V4L2 DSS Drivers Select Videoout library Videoout driver support under OMAP2 OMAP3 V4L2 DSS Drivers ...

Page 130: ...1 08 Figure 6 23 Configure V4L2 video Driver Step 6 To enable Frame buffer driver 1 Open menuconfig options from kernel command prompt 2 Select Device Drivers as shown here Figure 6 24 Configure Graphics display Driver Step 2 3 Select Device Drivers Graphics Supports as shown here ...

Page 131: ...river Step 4 5 Select OMAP2 3 Frame buffer support EXPERIMENTAL and 1 as Number of Frame buffers Select 1 will allow the Graphics pipeline of the DSS to be controlled by FBDEV interface and both video pipelines by V4L2 interface Selecting 2 will allow graphic pipeline and 1 video pipeline to be controlled by FBDEV interface and one video pipeline by V4L2 interface Selecting 3 will allow all the th...

Page 132: ...ode for TV Without this default mode will be PAL_BDGHI 1 Open menuconfig options from kernel command prompt Select Device Drivers Multimedia devices Video capture adapaters as mentioned in section V4L2 video driver 2 Select Use TV Managaer under the VID1 Overlay manager for selecting TV as default output for Video1 or under VID2 Overlay manager for selecting the TV as default output for video2 Fig...

Page 133: ...uilt statically it gets activated during bootup Modular build of frame buffer is not supported 6 5 2 2 Driver built as loadable module If the video driver and video library has been configured to be a loadable modules then the driver are built as a modules with the name omap_vout ko and omap_voutlib ko which will be placed under directory drivers media video omap in the kernel tree Copy this drive...

Page 134: ...Display Driver Installation 112 Platform Support Products Version 02 01 01 08 rmmod omap_vout ko rmmod omap_voutlib ko ...

Page 135: ...lication Flow Version 02 01 01 08 Platform Support Products 113 6 6 Sample Application Flow This chapter describes the application flow using the V4l2 and FBDEV drivers Figure 6 30 Application for v4l2 driver using MMAP buffers ...

Page 136: ...Display Driver Sample Application Flow 114 Platform Support Products Version 02 01 01 08 Figure 6 31 Application for FBDEV driver ...

Page 137: ...Display Driver Revision History Version 02 01 01 08 Platform Support Products 115 6 7 Revision History 02 01 00 Created for the first git release 02 01 01 Updated for the second snapshot release ...

Page 138: ...Version 02 01 01 08 Platform Support Products 116 ...

Page 139: ...on 118 7 1 1 References 118 7 1 2 Acronyms 118 7 1 3 Hardware Overview 118 7 2 Features 119 7 2 1 Overview of features supported 119 7 2 2 Usage of Features 119 7 2 3 Constraints 125 7 3 Architecture 126 7 4 Software Interface 127 7 4 1 Application Programming Interface 127 7 4 2 IOCTLs 128 7 4 3 Data Structures 132 7 5 Driver Configuration 137 7 5 1 Configuration Steps 137 7 6 Sample Application ...

Page 140: ...s YUV422 image and stores output image in the RAM The following figure shows the block diagram for Resizer module Figure 7 1 OMAP Resizer HW Block Diagram The Resizer module performs digital zoom either up sampling or down sampling on image video data within a range of 0 25x to 4x resizing The input source can be sent to either the preview engine CCDC or memory and the output is sent to memory The...

Page 141: ...name and mode of operation as parameters Mode can be blocking non blocking and readwrite Application can open the driver in either blocking mode or non blocking mode If driver is opened in blocking mode RSZ_RESIZE ioctl will block until resizing task is over for that channel If the driver is opened in non blocking mode RSZ_RESIZE ioctl returns if hardware is busy serving other channel Driver can b...

Page 142: ... buffers as it wants Buffer with the index 0 is always used as the input buffer and other buffer can be used as the output buffer The main steps that the application must perform for buffer allocation are Allocating Memory Getting Physical Address Mapping Kernel Space Address to User Space Allocating Memory Application can allocate buffers using RSZ_REQBUF IOCTL While allocating the buffers the ap...

Page 143: ... the kernel buffer to the user space is done via the Linux mmap system call Application must pass the buffer size and buffer s physical address for getting the user mapped address allocate buffer by RSZ_REQBUF query the buffer using RSZ_REQBUF addr hold the user space address unsigned long addr addr mmap NULL buffer size PROT_READ PROT_WRITE MAP_SHARED rszfd buffer offset buffer offset is same as ...

Page 144: ...ampler The polyphase filter coefficients are programmable so that any user specified filter can be implemented For horizontal and vertical direction application has to provide 32 coefficients These coefficient values are dependent on resizing ratio The Resizer hardware uses 4 taps and 8 phases filters for the resizing range of 1 2x to 4x and 7 taps and 4 phases filters for a resizing range of 1 4x...

Page 145: ...ocking mode If it is opened in non blocking mode it will simply return with busy if the hardware is busy Before submitting resizing task the input and output buffers must be en queued to the driver so the drive will come to know which buffers to be used as input and output Also resize ioctl as an side effect removed buffers from the queue So if resizing task required to be re submitted buffers mus...

Page 146: ...sed this field is ignored 7 2 2 3 5 Luma Enhancement Edge enhancement can be applied to the horizontally resized luminance component before the output of the horizontal stage is sent to the line memories and the vertical stage type member of rsz_yenh member of rsz_params structure can be set to disable edge enhancement or to select a 3 tap or a 5 tap horizontal high pass filter HPF for luminance e...

Page 147: ...et_val printf nUnable to set the read cycle expand register n return ret_val The default configuration of read cycle is 0xE 7 2 3 Constraints For driver allocated buffers driver allocates maximum size of buffers for both input and output All input output buffers addresses and pitch must be 32 bytes aligned Output image size cannot be more than 2047x2047 Output width must be even Output width must ...

Page 148: ...Driver Figure 7 2 Basic Architecture of Resizer Driver Resizer Driver provides Resizer Hardware access to a channel by using Linux Character driver interface Driver supports all the features supported by the hardware It provides easy way of configuring the hardware To understand this that the hardware module driver implements is briefly described in this section ...

Page 149: ...driver for processing Prototype int fd open device_name mode Field Description device_name It is dev omap resizer mode O_RDWR or ORed with O_NONBLOCK Table 7 2 Resizer open System Call arguments Return Values Zero on success or negative if an error has occurred 7 4 1 2 close Description Close the device Prototype close fd Field Description fd File descriptor returned from open call Table 7 3 Resiz...

Page 150: ...offset Physical address of the buffer Table 7 4 Resizer mmap system call arguments Return Values Zero on success EAGAIN if the address is not found 7 4 1 4 munmap Description Unmap the frame buffers that were previously mapped to user space using mmap system call Prototype void munmap void start_addr size_t length Field Description start_addr Start address of buffer which is to be unmapped length ...

Page 151: ...RAMS arguments Return Values Zero on success EINVAL if parameters are incorrect EINTR if device is in use by the same channel handle 7 4 2 2 RSZ_G_PARAMS Description Get the Resizer parameters that are previously being set Prototype int ioctl int fd RSZ_G_PARAMS struct rsz_params argp Field Description fd File handle associated with fd cmd RSZ_G_PARAMS ioctl command argp Pointer to rsz_params stru...

Page 152: ...argument Return Values Zero on success 7 4 2 4 RSZ_S_EXP Description Configure the Read cycle required for Resizer module This configuration is provided per channel Prototype int ioctl int fd RSZ_S_EXP unsigned int argp Field Description fd File handle associated with fd cmd RSZ_S_EXP ioctl command argp Pointer to unsigned int Table 7 9 Resizer ioctl RSZ_S_EXP argument Return Values Zero on succes...

Page 153: ...F Description Request to allocate buffers Prototype int ioctl int fd RSZ_REQBUF struct v4l2_requestbuffers argp Field Description fd File handle associated with fd cmd RSZ_REQBUF ioctl command argp Pointer to v4l2_requestbuffers structure Table 7 11 Resizer ioctl RSZ_REQBUF arguments Return Values Zero on success ENOMEM if memory is not available EINTR if device is in use by the same channel handl...

Page 154: ...hannel handle 7 4 2 8 RSZ_QUEUEBUF Description Queue the buffer for resize operation Prototype int ioctl int fd RSZ_QUEUEBUF struct v4l2_buffer argp Field Description fd File handle associated with fd cmd RSZ_QUEUEBUF ioctl command argp Pointer to v4l2_buffer structure Table 7 13 Resizer ioctl RSZ_QUEUEBUF arguments Return Values Zero on success EINVAL EFAULT if parameters are incorrect EINTR if d...

Page 155: ...ert_starting_pixel Vertical starting pixel horz_starting_pixel Horizontal starting pixel cbilin Chroma resizing algorithm pix_fmt Image Pixel format for YUV422 image out_hsize Width of the output image in pixels out_vsize Height of the output image in pixels out_pitch Pitch of the output image in bytes hstph Horizontal starting phase vstph Vertical starting phase tap4filt_coeffs Set of coefficient...

Page 156: ...num v4l2_memory memory union unsigned long offset unsigned long userptr m Name Description index Index of the input output buffer type Type of the buffer is V4L2_BUF_TYPE_VIDEO_CAPTURE offset userptr Physical virtual address of the buffer memory Type of memory V4L2_MEMORY_MMAP or V4L2_MEMORY_USERPTR Table 7 16 Resizer Buffer structure fields 7 4 3 4 Luma enhancement structure struct rsz_yenh __s32...

Page 157: ...s cropped in horizontal direction vcrop Number of pixels cropped in vertical direction Table 7 19 Resizer Crop Size structure fields 7 4 3 7 Input Output image format This describes the input and output image format which can be YUV interleaved 16 bit or planar 8 bit This can be specified in inptype field of the rsz_params structure define RSZ_INTYPE_YCBCR422_16BIT 0 define RSZ_INTYPE_PLANAR_8BIT ...

Page 158: ...Resizer Driver Data Structures 136 Platform Support Products Version 02 01 01 08 ...

Page 159: ...Configuration Steps To enable OMAP Resizer driver 1 Open menuconfig options from kernel command prompt 2 Select Device Drivers as shown here Figure 7 3 Configure omap resizer Driver Step 2 3 Select Device Drivers Multimedia devices as shown here Figure 7 4 configure omap resizer Driver Step 3 4 Select Video For Linux ...

Page 160: ...02 01 01 08 Figure 7 5 Configure omap resizer Driver Step 4 5 Select Device Drivers Multimedia devices Video capture adapaters as shown here and go inside the main menu Figure 7 6 Configure omap resizer Driver Step 5 6 Select OMAP ISP Resizer option to enable resizer driver ...

Page 161: ...Resizer Driver Configuration Steps Version 02 01 01 08 Platform Support Products 139 Figure 7 7 Configure omap resizer Driver Step 6 ...

Page 162: ...r Sample Application Flow 140 Platform Support Products Version 02 01 01 08 7 6 Sample Application Flow This section shows application flow diagram for resizer application Figure 7 8 Resizer Sample Application Flow ...

Page 163: ...izer Driver Revision History Version 02 01 01 08 Platform Support Products 141 7 7 Revision History 0 97 Initial Draft 02 00 00 Moved to GIT kernel basline 02 00 01 Updated for the second snapshot release ...

Page 164: ...Version 02 01 01 08 Platform Support Products 142 ...

Page 165: ...er provides detailed description of feature set supported on Daughter Card and software package Table of Contents 8 1 Mass Market Daughter Card 144 8 1 1 Acronyms Definitions 144 8 1 2 Introduction 144 8 2 Block Diagram 145 8 3 Board Illustration 146 8 4 Features supported under software 147 ...

Page 166: ...ughter Card Table 8 1 MMDC Acronyms 8 1 2 Introduction OMAP35x daughter card MMDC supports following features which are not available on the main EVM 1 TVP5146 decoder interface supporting BT656 format 2 Supports 3 types of video input types S Video Composite and component 3 Supports 8 10 bit output interface from TVP5146 4 Supports interface for Micron sensor 5 HSUSB TRANSCEIVER USB83320 supporti...

Page 167: ...Daughter Card Module Block Diagram Version 02 01 01 08 Platform Support Products 145 8 2 Block Diagram The top level block depicts the features supported on the daughter card Figure 8 1 Block Diagram ...

Page 168: ...Board Illustration 146 Platform Support Products Version 02 01 01 08 8 3 Board Illustration The various connectors and hardware modules on the daughter card are illustrated in the picture below Figure 8 2 Board Illustration ...

Page 169: ...oftware Version 02 01 01 08 Platform Support Products 147 8 4 Features supported under software Video capture BT656 interface using the TVP5146 decoder Support Composite and S video interface only EHCI on USB port 2 using HSUSB TRANSCEIVER USB83320 ...

Page 170: ...Version 02 01 01 08 Platform Support Products 148 ...

Page 171: ...50 9 1 1 References 151 9 1 2 Acronyms Definitions 152 9 2 Features 153 9 2 1 Supported features 153 9 2 2 Constraints Limitations 153 9 2 3 Known Issues 153 9 3 Architecture 155 9 3 1 System Diagram 155 9 3 2 Software Design Interfaces 157 9 4 Driver Configuration 172 9 4 1 Configuration Steps 172 9 4 2 Installation 177 9 5 Sample Applications 179 9 5 1 Introduction 179 9 5 2 Hardware Setup 179 9...

Page 172: ...t RAW image sensor modules and video decoders to the OMAP35x device The capture module consists of the following interfaces One S video SD input in BT 656 format One Composite SD input in BT 656 format Both these video inputs are connected to one TVP5146 decoder and the application can select between these two inputs using standard V4L2 interface Note Only one input can be captured or selected at ...

Page 173: ...idely used across many platforms in the Linux community V4L2 provides good streaming support and support for many buffer formats It also has its own buffer management mechanism that can be used 9 1 1 References 1 OMAP35x Camera Interface Subsystem ISP TRM Author Texas Instruments Inc Literature Number SPRUFA2 2 OOMAP35x Memory Management Units MMUs TRM Author Texas Instruments Inc Literature Numbe...

Page 174: ...ughter Card 3A Auto White Balance Auto Focus Auto Exposure API Application Programming Interface CCDC Input interface block of ISP DMA Direct Memory Access I O Input Output IOCTL Input Output Control MMU Memory Management Unit V4L2 Video for Linux specification version 2 YUV Luminance 2 Chrominance Difference Signals Y Cr Cb Color Encoding Table 9 1 Capture Driver Acronyms ...

Page 175: ... gain control TVP5146 TVP514x decoder driver module can be used statically or dynamically insmod and rmmod supported 9 2 2 Constraints Limitations Following are the constraints for ISP Capture Driver The camera ISP driver supports only static module build Dynamic switching of resolution and dynamic switching of interfaces is not supported when streaming is on Driver buffer addresses and pitch must...

Page 176: ...Capture Driver Known Issues 154 Platform Support Products Version 02 01 01 08 Video quality issues observed with video test patterns Buffer Constraints IO mapped buffer is not supported ...

Page 177: ...ications refer to any application that accesses the device node that is served by the Camera Driver These applications are not in the scope of this design They are here to present the environment in which the Camera Driver is used V4L2 Subsystem The Linux V4L2 subsystem is used as an infrastructure to support the operation of the Camera Driver Camera applications mainly use the V4L2 API to access ...

Page 178: ...river based on the sensor decoder attached and desired output from the camera driver MMU library MMU is a HW block in Camera ISP that handles the translation from virtual into physical addresses The camera subsystem issues virtual addresses to the ISP MMU and the ISP MMU translates these virtual addresses into physical addresses to access the actual memory Using this the camera driver captures vid...

Page 179: ...contiguous and pass this directly to driver for capture operation The only restriction for the user buffer is that the buffer should be aligned to 32 bytes boundary The driver supports both memory usage modes 1 Memory map buffer mode 2 User Pointer mode In Memory map buffer mode application can request memory from the driver by calling VIDIOC_REQBUFS IOCTL In user buffer mode application needs to ...

Page 180: ...close fd return 1 printf Number of buffers allocated d n reqbuf count 2 Getting Physical Address This IOCTL is used to query buffer information like buffer size and buffer physical address This physical address is used in mmapping the buffers This IOCTL is necessary for driver buffer mode as it provides the physical address of buffers which are used to mmap system call the buffers Ioctl VIDIOC_QUE...

Page 181: ...r size PROT_READ PROT_WRITE MAP_SHARED fd buffer m offset buffer m offset is same as returned from VIDIOC_QUERYBUF 9 3 2 3 Query Capabilities This IOCTL is used to verify kernel devices compatibility with V4L2 specification and to obtain information about individual hardware capabilities In this case it will return capabilities provided by ISP capture driver and current decoder driver Ioctl VIDIOC...

Page 182: ...input structure Application provides the index number for which it requires the information in index member of v4l2_input structure Index with value zero indicates first input type of the decoder It returns combination of the standards supported on this input in the std member of v4l2_input structure Example struct v4l2_input input i 0 while 1 input index i ret ioctl fd VIDIOC_ENUMINPUT input if r...

Page 183: ...s used to get the current input type analog interface type Ioctl VIDIOC_G_INPUT This IOCTL takes pointer to integer using which the detected inputs will be returned It will return the first detected inputs If no inputs are detected it returns an error to the application Application will provide the index number as an output argument It will set the detected input as the current input Example int i...

Page 184: ...he respective decoder header files which were not available in standard V4L2 header files and numerator and denominator values for frame period and frame lines It takes index as an argument as a part of v4l2_standard structure Index with value zero provides information for the first standard among all the standards of all the registered decoders If the index value exceeds the number of supported s...

Page 185: ...ct v4l2_standard standard ret ioctl fd VIDIOC_QUERYSTD std if ret 0 perror VIDIOC_QUERYSTD n close fd return 1 while 1 standard index i ret ioctl fd VIDIOC_ENUMSTD standard if ret 0 break if standard std std printf s standard detected n standard name break i 9 3 2 9 Set Standard This IOCTL is used to set the standard in the decoder Ioctl VIDIOC_S_STD It takes a pointer to v4l2_std_id instance as a...

Page 186: ...lose fd return 1 while 1 standard index i ret ioctl fd VIDIOC_ENUMSTD standard if ret 0 break if standard std std printf s standard is selected n break i 9 3 2 10 Get Standard This IOCTL is used to get the current standard in the current decoder Ioctl VIDIOC_G_STD It takes a pointer to v4l2_std_id instance as an output argument Standard IDs are defined in the V4L2 header files Example v4l2_std_id ...

Page 187: ...TYPE_VIDEO_CAPTURE and index member of this structure as zero Example struct v4l2_fmtdesc fmt i 0 while 1 fmt index i ret ioctl fd VIDIOC_ENUM_FMT fmt if ret 0 break printf description s n fmt description if fmt type V4L2_BUF_TYPE_VIDEO_CAPTURE printf Video capture type n if fmt pixelformat V4L2_PIX_FMT_YUYV printf V4L2_PIX_FMT_YUYV n i 9 3 2 12 Set Format This IOCTL is used to set the format para...

Page 188: ...culating offsets for storing video data This IOCTL is a necessary IOCTL for the user buffer mode because driver will know the buffer size for user buffer mode If it not called for the user buffer mode driver assumes the default buffer size and calculates offsets accordingly Ioctl VIDIOC_S_FMT It will take pointer to instance of v4l2_format structure as an input parameter If the type member is V4L2...

Page 189: ...V4L2_FIELD_INTERLACED printf Storate format is interlaced frame format 9 3 2 14 Try Format This IOCTL is used to validate the format parameters provided by the application It checks parameters and returns the correct parameter if any parameter is incorrect It returns error only if the parameters passed are ambiguous Ioctl VIDIOC_TRY_FMT It takes a pointer to instance of v4l2_format structure as an...

Page 190: ...decoder driver will return an error Example struct v4l2_queryctrl ctrl ctrl id V4L2_CID_CONTRAST ret ioctl fd VIDIOC_QUERYCTRL ctrl if ret 0 perror VIDIOC_QUERYCTRL n close fd return 1 printf name s n ctrl name printf min d max d step d default d n ctrl minimum ctrl maximum ctrl step ctrl default_value 9 3 2 16 Set Control This IOCTL is used to set the value for a particular control in current dec...

Page 191: ...rol structure Example struct v4l2_control ctrl ctrl id V4L2_CID_CONTRAST ret ioctl fd VIDIOC_G_CTRL ctrl if ret 0 perror VIDIOC_G_CTRL n close fd return 1 printf value x n ctrl value 9 3 2 18 Queue Buffer This IOCTL is used to enqueue the buffer in buffer queue This IOCTL will enqueue an empty buffer in the driver buffer queue This IOCTL is one of necessary IOCTL for streaming IO If no buffer is e...

Page 192: ...ne of necessary IOCTL for the streaming IO This IOCTL can be used only after streaming is started This IOCTL will block until an empty buffer is available Note The application can dequeue all buffers from the driver the driver will not hold the last buffer to itself In this case the driver will disable the capture operation and the capture operation resumes when a buffer is queued to the driver ag...

Page 193: ...tarted this IOCTL call returns an error Example v4l2_buf_type buftype V4L2_BUF_TYPE_VIDEO_CAPTURE ret ioctl fd VIDIOC_STREAMON buftype if ret 0 perror VIDIOC_STREAMON n close fd return 1 9 3 2 21 Stream Off This IOCTL is used to stop video capture functionality Ioctl VIDIOC_STREAMOFF If streaming is not started this IOCTL call returns an error Example v4l2_buf_type buftype V4L2_BUF_TYPE_VIDEO_CAPT...

Page 194: ...er Configuration 9 4 1 Configuration Steps To enable capture driver support in the kernel 1 Open menuconfig options from kernel command prompt 2 Select System Type as shown here Figure 9 4 Configure Capture Driver Step 2 3 Select System Type OMAP 3530 EVM daughter card board option as shown here ...

Page 195: ...2 01 01 08 Platform Support Products 173 Figure 9 5 Configure Capture Driver Step 3 4 Go back to Main Menu and select Device Drivers as shown here Figure 9 6 Configure Capture Driver Step 4 5 Select Device Drivers Multimedia devices as shown here ...

Page 196: ...tion Steps 174 Platform Support Products Version 02 01 01 08 Figure 9 7 Configure Capture Driver Step 5 6 Select Device Drivers Multimedia devices Video capture adapters as shown here Figure 9 8 Configure Capture Driver Step 6 ...

Page 197: ...oducts 175 7 Select Device Drivers Multimedia devices Video capture adapters OMAP 3 Camera support as shown here Figure 9 9 Configure Capture Driver Step 7 8 Select Device Drivers Multimedia devices Video capture adapters Encoders decoders and other helper chips as shown here ...

Page 198: ...orm Support Products Version 02 01 01 08 Figure 9 10 Configure Capture Driver Step 8 9 Select Device Drivers Multimedia devices Video capture adapters Encoders decoders and other helper chips Texas Instruments TVP514x video decoder as shown here ...

Page 199: ... 2 2 Driver built as loadable module The OMAP35x Camera driver and OMAP35x daughter card driver cannot be build as a loadable module Only the TVP514x driver can be build as a module If the driver has been configured to be a loadable module then the driver is built as a module with the name tvp514x ko which will be placed under the directory drivers media video in the kernel tree Copy this driver f...

Page 200: ...Capture Driver Installation 178 Platform Support Products Version 02 01 01 08 rmmod tvp514x ko ...

Page 201: ... from the device Close the device 9 5 2 Hardware Setup Following are the steps required to run the capture sample application Connect the OMAP35x daughter card module containing the TVP5146 deocoder to the OMAP35x main board Connect a DVD player camera generating a NTSC video signal to the S Video or Composite jack of the daughter card Run the sample application after booting the kernel 9 5 3 Prov...

Page 202: ...Version 02 01 01 08 Platform Support Products 180 ...

Page 203: ...orted 185 10 2 2 Not supported 185 10 3 Driver configuration 186 10 3 1 USB phy selection for MUSB OTG port 186 10 3 2 USB controller in host mode 186 10 3 3 MUSB OTG controller in gadget mode 187 10 3 4 MUSB OTG controller in OTG mode 188 10 3 5 Host mode applications 189 10 3 6 USB Controller and USB MSC HOST 189 10 3 7 USB HID Class 190 10 3 8 USB Controller and USB HID 191 10 3 9 USB Audio 191...

Page 204: ...iver 182 Platform Support Products Version 02 01 01 08 10 3 12 CDC RNDIS gadget 194 10 3 13 USB OTG HNP SRP testing 195 10 4 Software Interface 197 10 4 1 sysfs 197 10 4 2 procfs 197 10 5 Revision history 198 ...

Page 205: ...multi point USB system when connected via hub USB On The Go compliant USB controller 15 Transmit and 15 Receive Endpoints other than the mandatory Control Endpoint 0 16 Kilobytes of Endpoint FIFO RAM for USB packet buffering Double buffering FIFO Support for Bulk split and Bulk combine Support for high bandwidth Isochronous transfer Dual Mode HS DMA controller with 8 channels 10 1 1 References 1 O...

Page 206: ...i AB receptacle on the EVM Figure 10 2 MUSB OTG Location of USB PHY from NXP on the EVM The OMAP35x HS USB port2 is connected to SMSC USB83320 high speed phy in ULPI mode on Mistral Multimedia daughter card thus only EHCI controller can be supported on port2 Port1 and Port3 are not available on Mistral daughter card ...

Page 207: ...eo Class in Host mode Mass Storage Class in Host mode Mass Storage Class in Gadget mode Hub Class in Host mode Human Interface Devices HID in Host mode Communication Device Class CDC in Gadget mode Remote Network Driver Interface Specification RNDIS Gadget support OTG support which includes support for Host Negotiation Protocol HNP and Session Request Protocol SRP 10 2 2 Not supported The followin...

Page 208: ...r Philips ISP1301 with OMAP OTG TWL4030 USB Transceiver Driver NOP USB Transceiver Driver 10 3 2 USB controller in host mode 10 3 2 1 MUSB OTG Host Configuration Device Drivers USB support Support for Host side USB Miscellaneous USB options USB device filesystem USB device class devices DEPRECATED USB Host Controller Drivers Inventra Highspeed Dual Role Controller TI OMAP 343x high speed USB suppo...

Page 209: ... gadget support as given below Device Drivers USB support USB Gadget Support Debugging messages DEVELOPMENT NEW Debugging information files DEVELOPMENT NEW 2 Maximum VBUS power usage 2 500mA NEW USB Peripheral Controller Inventra HDRC Peripheral TI M USB Gadget Drivers M File backed Storage Gadget Please make sure that Inventra HDRC is selected as USB peripheral controller which will appear only w...

Page 210: ...e gadget support as given below Device Drivers USB support USB Gadget Support Debugging messages DEVELOPMENT NEW Debugging information files DEVELOPMENT NEW 2 Maximum VBUS power usage 2 500mA NEW USB Peripheral Controller Inventra HDRC Peripheral TI M USB Gadget Drivers M File backed Storage Gadget Please make sure that Inventra HDRC is selected as USB peripheral controller which will appear only ...

Page 211: ...am of the system with USB Mass Storage class Figure 10 3 USB Driver Illustration of Mass Storage Class 10 3 6 USB Controller and USB MSC HOST 10 3 6 1 Configuration Device Drivers SCSI device support SCSI device support legacy proc scsi support SCSI support type disk tape CD ROM SCSI disk support USB support Support for Host side USB Miscellaneous USB options USB device filesystem ...

Page 212: ...ivers USB Mass Storage support 10 3 6 2 Device nodes The SCSI sub system creates dev sd devices with help of mdev 10 3 6 3 Limitations USB Mass Storage Class gadget devices that do not respond to HS PING command during control transfer will not work with this host controller Some USB MSC devices from Transcend behave this way idVendor 0x0ea0 idProduct 0x2168 from the USB device descriptor 10 3 7 U...

Page 213: ... Devices Generic HID Support USB Input Devices USB Human Interface Device full HID support 10 3 8 2 Device nodes The event sub system creates dev input event devices with the help of mdev 10 3 9 USB Audio 10 3 9 1 Configuration Device Drivers Sound Sound card support Advanced Linux Sound Architecture Advanced Linux Sound Architecture Dynamic device file minor number Support old ALSA API USB device...

Page 214: ...ia Drivers Video capture adapters V4L USB devices USB Video Class UVC USB Support Support for Host side USB Miscellaneous USB options USB device filesystem USB device class devices DEPRECATED USB Host Controller Drivers Inventra Highspeed Dual Role Controller TI OMAP 343x high speed USB support Driver Mode USB Host Disable DMA always use PIO Use System DMA for Rx endpoints Enable debugging message...

Page 215: ...File backed Storage Gadget Inventra Highspeed Dual Role Controller TI OMAP 343x high speed USB support Driver Mode USB Peripheral gadget stack Disable DMA always use PIO Use System DMA for Rx endpoints Enable debugging messages 10 3 11 2 Installation of File Storage Gadget Driver Let us assume that we are interested in exposing dev mmcblk0 block device to the file storage gadget driver To that eff...

Page 216: ...r TI OMAP 343x high speed USB support Driver Mode USB Peripheral gadget stack Disable DMA always use PIO Use System DMA for Rx endpoints Enable debugging messages Please do not select RNDIS support for testing ethernet gadget with Linux 2 4 IXIA and MACOS host machine USB Peripheral Controller Inventra HDRC Peripheral TI M USB Gadget Drivers M Ethernet Gadget RNDIS support EXPERIMENTAL NEW 10 3 12...

Page 217: ...us power can be switched on from A device or from B device using SRP 4 Request to switch on the Vbus power using below command on any EVM echo F proc driver musb_hdrc If this command is executed on B device then SRP protocol will be used to request A device to switch on the Vbus power 5 Now the connect event occurs enumeration will complete and gadget driver on B device will be ready to use if thi...

Page 218: ... USB OTG HNP SRP testing 196 Platform Support Products Version 02 01 01 08 echo S proc driver musb_hdrc It will suspend the bus and role switch will follow after that 8 Repeat step 4 5 6 and 7 for further testing ...

Page 219: ...ly the states like A_HOST B_PERIPHERAL that makes sense for non OTG will show up vbus The entry sys devices platform musb_hdrc 0 vbus is a write only entry It is used to set the VBUS timeout value during OTG If the current OTG state is a_wait_bcon then then urb submission is disabled Table 10 1 OMAP3 USB Driver sysfs attributes 10 4 2 procfs The profcs entry proc driver musb_hdrc is used to contro...

Page 220: ...USB Driver Revision history 198 Platform Support Products Version 02 01 01 08 10 5 Revision history 02 00 00 Initial release 02 01 00 Update for OTG and EHCI support ...

Page 221: ...er describes set of features supported by the MMC driver Table of Contents 11 1 Introduction 200 11 1 1 References 200 11 1 2 Acronyms Definitions 200 11 2 Features 201 11 2 1 Features Supported 201 11 2 2 Features Not Supported 201 11 2 3 Limitations 201 11 3 Revision History 202 ...

Page 222: ...controller are Full compliance with MMC SD command response sets as defined in the Specification Support 1 bit or 4 bit transfer mode specifications for SD and SDIO cards 1 bit 4 bit or 8 bit transfer mode specifications for MMC cards Built in 1024 byte buffer for read or write 32 bit wide access bus to maximize bus throughput Single interrupt line for multiple interrupt source events Two slave DM...

Page 223: ...gh Speed and SDHC cards Uses block bounce buffer to aggregate scatterred blocks 11 2 2 Features Not Supported The following features are not currently supported by driver SDIO functionality is not supported MMC 8 bit mode is not supported MMC SD cards cannot be removed while mount operation is in progress If the card is removed data integrity cannot be guaranteed 11 2 3 Limitations The driver some...

Page 224: ...MMC Driver Revision History 202 Platform Support Products Version 02 01 01 08 11 3 Revision History 0 97 Document Created 02 00 00 Moved to open source kernel version 2 6 26 ...

Page 225: ...this release Table of Contents 12 1 Introduction 205 12 1 1 References 205 12 2 Features 206 12 2 1 Supported 206 12 2 2 Not Supported 206 12 2 3 Limitations 206 12 3 Architecture 207 12 3 1 cpuidle 207 12 3 2 Dynamic Tick Suppression 209 12 3 3 Suspend Resume 209 12 4 Configuration 210 12 4 1 cpuidle 210 12 4 2 cpufreq 211 12 4 3 SmartReflex 211 12 5 Software Interface 213 12 5 1 cpuidle 213 12 5...

Page 226: ...Power Management 204 Platform Support Products Version 02 01 01 08 12 5 3 SmartReflex 214 12 6 Revision History 216 ...

Page 227: ...s of one or more hardware modules sharing same power source Control of scalable voltage domains Independent scaling of OPPs for the VDD1 and VDD2 MPU and IVA in case of OMAP3530 share the voltage domain VDD1 Other modules are located in VDD2 Support for transitioning power and voltage domains to retention off and wakeup on event 12 1 1 References 1 Proceedings of the Linux Symposium June 27 30 200...

Page 228: ...on for cpufreq Support SmartReflex with automatic hardware controlled mode of operation 12 2 2 Not Supported This is list of features not supported in the current release Allow drivers and applications to limit the idle state that can be entered Support for SmartReflex with manual software controlled mode of operation 12 2 3 Limitations This is list of limitations that exist in the current release...

Page 229: ...s no thread to run When the idle loop is executed current governor is called to decide the target C state Governor decides whether to continue in current state transition to a different state Current driver is called to transition to the selected state 12 3 1 2 C states A C state is used to identify the power state supported through the cpu idle loop Each C state is characterized by its Power cons...

Page 230: ... bus monitoring interface to be checked In the OMAP3 implementation this flag is used to identify the C states that require CORE domain activity to be checked Once the governor has decided the target C state the control reaches the function omap3_enter_idle Here the C state is adjusted based on the value of valid flag corresponding to the chosen state Note The value of valid flag for the idle stat...

Page 231: ...suppression is achieved through generic Linux framework for the same A 32K timer HZ 128 is used by the tick suppression algorithm 12 3 3 Suspend Resume The suspend operation results in the system transitioning to the lowest power state being supported The drivers implement the suspend function defined in the LDM When the suspend for the system is asserted the suspend function is called for all dri...

Page 232: ...t Floating point emulation Userspace binary formats Power management options Networking support Device Drivers Select Power Management support to toggle the power management support Power Management support Power Management Debug Support Suspend to RAM and standby Advanced Power Management Emulation 12 4 1 cpuidle Start the Linux Kernel Configuration tool make menuconfig Select CPU Power Managemen...

Page 233: ...tart the Linux Kernel Configuration tool make menuconfig Select CPU Power Management from the main menu System Type Bus support Kernel Features Boot options CPU Power Management Floating point emulation Userspace binary formats Select CPU idle PM support to enable the cpuidle driver CPU Frequency scaling CPU idle PM support 12 4 3 SmartReflex Start the Linux Kernel Configuration tool make menuconf...

Page 234: ...support Boot options CPU Power Management Select TI OMAP Implementations from the menu ARM system type TI OMAP TI OMAP Implementations OMAP34xx Based System OMAP3430 support OMAP35x Family Select SmartReflex support from the menu Emit debug messages from clockdomain layer SmartReflex support SmartReflex testing support ...

Page 235: ..._governor_ro current_governor_ro lists the current governor cat sys devices system cpu cpuidle current_governor_ro menu current_driver lists the current driver cat sys devices system cpu cpuidle current_driver omap3_idle The cpuidle interface also exports information about each idle state This information is organized in a directory corresponding to each idle state ls 1 sys devices system cpu cpu0...

Page 236: ...nabled disabled execute these commands echo 1 sys power clocks_off_while_idle echo 0 sys power clocks_off_while_idle To allow prevent transition to OFF mode echo 1 sys power enable_off_mode echo 0 sys power enable_off_mode 12 5 2 Suspend Resume The suspend for device can be asserted as follows echo n mem sys power state To wakeup press a key on the OMAP3EVM keypad or tap any on the serial console ...

Page 237: ...Power Management SmartReflex Version 02 01 01 08 Platform Support Products 215 echo 1 sys power sr_vdd2_autocomp echo 0 sys power sr_vdd2_autocomp ...

Page 238: ...port Products Version 02 01 01 08 12 6 Revision History 02 00 00 Initial version for this GIT based release 02 01 00 Updated C state definition 02 01 01 Updated C state definition Moved configuration information from DataSheet Release specific updates ...

Reviews: