Top Banner
Introduction to OMAP4 Pad Configuration Jiahe Jou 2012/12/13
25

Introduction to omap4 pad configuration

May 13, 2015

Download

Documents

Johnson Chou

Introduction to omap4 pad configuration
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Introduction to omap4 pad configuration

Introduction to OMAP4 Pad Configuration

Jiahe Jou

2012/12/13

Page 2: Introduction to omap4 pad configuration

RevisionsDATE AUTHOUR DESCRIPTION

2012/12/03 Jiahe Jou Draft.

Page 3: Introduction to omap4 pad configuration

Outline● Overview

● Pad Configuration

● Off Mode Control

● Wake Up Detection

● Power Optimization

● Configuration How To

● Case Study - Talos7

Page 4: Introduction to omap4 pad configuration

Overview● Configure pads to desired values according to device configuration

● Two sets of 32-bit pad configuration register

○ CORE power domain

○ WKUP power domain

● Each register has two pads with five fields functional bits

○ MUXMODE (3 bits)

○ PULL (2 bits)

○ INPUT ENABLE (1 bits)

○ OFF MODE VALUE (5 bits)

○ WAKE UP (2 bits)

Page 5: Introduction to omap4 pad configuration

Overview● Pad configuration register

2

Page 6: Introduction to omap4 pad configuration

Pad Configuration● Mode selection

○ MUXMODE (3 bits), 0b000 ~ 0b111

○ Functional modes, 0b000 ~ 0b110

MUXMODE Selected Mode

0b000 Mode 0, primary mode

0b001 Mode 1

0b010 Mode 2

0b011 Mode 3

0b100 Mode 4

0b101 Mode 5

0b110 Mode 6

0b111 Mode 7, safe mode

Page 7: Introduction to omap4 pad configuration

Pad Configuration● Examples

Page 8: Introduction to omap4 pad configuration

Pad Configuration● Pull selection

○ PULL (2 bits), 0b00 ~ 0b11

PULLBehavior

PULL TYPE PULL ENABLE

0b0 0b0 Pull Down, Not Activated

0b0 0b1 Pull Down, Activated

0b1 0b0 Pull Up, Not Activated

0b1 0b1 Pull Up, Activated

● Input enable

○ 0, input disable, output mode

○ 1, input enable, bidirectional mode

Page 9: Introduction to omap4 pad configuration

Pad Configuration● Off mode value

○ OFFMODEENABLE, off mode override control, 1 enable 0 disable

○ OFFMODEOUTENABLE, off mode output enable, 0 enable 1 disable

○ OFFMODEOUTVALUE, off mode output value

○ OFFMODEPULLUDENABLE, off mode pull up/down enable

○ OFFMODEPULLTYPESELECT, off mode pull type select

● Wake Up

○ WAKEUPENABLE, wake up detect enable

○ WAKEUPEVENT, wake up event status

Page 10: Introduction to omap4 pad configuration

Pad Configuration

Page 11: Introduction to omap4 pad configuration

Off Mode Control● Off mode selected

○ PRM_DEVICE_OFF_CTRL[0] DEVICE_OFF_ENABLE

○ CONTROL_PADCONF_GLOBAL[31] FORCE_OFFMODE_ENABLE

Page 12: Introduction to omap4 pad configuration

Wake Up Dectection● Wake up enabled

○ PRM_IO_PMCTRL[16]GLOBAL_WUEN

Page 13: Introduction to omap4 pad configuration

Power Optimization● Pin types

● Avoid unconnected or incorrectly pulled pins

○ For input, use pull up/down when possible

○ For output, avoid pull conflicts

○ For bi-direction, reconfigure the pin as an output driving 0

Page 14: Introduction to omap4 pad configuration

Power Optimization

Page 15: Introduction to omap4 pad configuration

Pad Configuration● Avoid unconnected pin (1)

○ If not driven externally, pull up/down is required

● Avoid pull conflict (2)

○ Prevent different pulls on the same line

● Avoid logic conflict (3)

○ if no external device drive the line, set the value as 0

○ else same value must

Page 16: Introduction to omap4 pad configuration

Pad Configuration● Recommended configuration for unconnected pads

Page 17: Introduction to omap4 pad configuration

Pad Configuration● Ball Characteristics

Page 18: Introduction to omap4 pad configuration

Configuration How To● Boot-loader

struct pad_conf_entry {

u16 offset;

u16 val;

};

● Kernel/* omap_mux_init_gpio - initialize a signal based on the GPIO number */

int omap_mux_init_gpio(int gpio, int val);

/* omap_mux_init_signal - initialize a signal based on the signal name */

int omap_mux_init_signal(const char *muxname, int val);

Page 19: Introduction to omap4 pad configuration

Configuration How To● Kernel

/* Centralized control for pad init, suspend and shutdown */

struct omap_pad_state_description {

char *init_mux_name;

u16 init_config;

char *suspend_mux_name;

u16 suspend_config;

char *shutdown_mux_name;

u16 shutdown_config;

u8 flags;

};

Page 20: Introduction to omap4 pad configuration

Case Study - Talos7

{GPMC_AD0, (PTU | IEN | OFF_EN | OFF_PD | OFF_IN | M1)}, /* sdmmc2_dat0: eMMC_AD0 */

{GPMC_AD1, (PTU | IEN | OFF_EN | OFF_PD | OFF_IN | M1)}, /* sdmmc2_dat1: eMMC_AD1 */

{GPMC_AD2, (PTU | IEN | OFF_EN | OFF_PD | OFF_IN | M1)}, /* sdmmc2_dat2: eMMC_AD2 */

{GPMC_AD3, (PTU | IEN | OFF_EN | OFF_PD | OFF_IN | M1)}, /* sdmmc2_dat3: eMMC_AD3 */

{GPMC_AD4, (PTU | IEN | OFF_EN | OFF_PD | OFF_IN | M1)}, /* sdmmc2_dat4: eMMC_AD4 */

{GPMC_AD5, (PTU | IEN | OFF_EN | OFF_PD | OFF_IN | M1)}, /* sdmmc2_dat5: eMMC_AD5 */

{GPMC_AD6, (PTU | IEN | OFF_EN | OFF_PD | OFF_IN | M1)}, /* sdmmc2_dat6: eMMC_AD6 */

{GPMC_AD7, (PTU | IEN | OFF_EN | OFF_PD | OFF_IN | M1)}, /* sdmmc2_dat7: eMMC_AD7 */

Page 21: Introduction to omap4 pad configuration

Case Study - Talos7

{SDMMC1_DAT4, (PTD | IDIS | M7)}, /* sdmmc1_dat4: NC: SafeMode */

{SDMMC1_DAT5, (PTD | IDIS | M7)}, /* sdmmc1_dat5: NC: SafeMode */

{SDMMC1_DAT6, (PTD | IDIS | M7)}, /* sdmmc1_dat6: NC: SafeMode */

{SDMMC1_DAT7, (PTD | IDIS | M7)}, /* sdmmc1_dat7: NC: SafeMode */

Page 22: Introduction to omap4 pad configuration

Case Study - Talos7omap_mux_init_gpio(GPIO_WIFI_IRQ, OMAP_PIN_INPUT | OMAP_PIN_OFF_WAKEUPENABLE);

omap_mux_init_gpio(GPIO_WIFI_PMENA, OMAP_PIN_OUTPUT);

omap_mux_init_signal("sdmmc5_cmd", OMAP_PIN_INPUT_PULLUP);

omap_mux_init_signal("sdmmc5_clk", OMAP_PIN_INPUT_PULLUP);

omap_mux_init_signal("sdmmc5_dat0", OMAP_PIN_INPUT_PULLUP);

omap_mux_init_signal("sdmmc5_dat1", OMAP_PIN_INPUT_PULLUP);

omap_mux_init_signal("sdmmc5_dat2", OMAP_PIN_INPUT_PULLUP);

omap_mux_init_signal("sdmmc5_dat3", OMAP_PIN_INPUT_PULLUP);

Page 23: Introduction to omap4 pad configuration

Case Study - Talos7static struct omap_pad_state_description talos_dynamic_pads[] __initdata = {

...

/*sdmmc2_clk */

{

.init_mux_name = "gpmc_noe.sdmmc2_clk",

.init_config = OMAP_PIN_INPUT_PULLUP,

},

/*sdmmc2_cmd */

{

.init_mux_name = "gpmc_nwe.sdmmc2_cmd",

.init_config = OMAP_PIN_INPUT_PULLUP,

}

...

}

Page 24: Introduction to omap4 pad configuration

Q&A

Page 25: Introduction to omap4 pad configuration

The End