Introduction to omap4 pad configuration

1,551 views

Published on

Introduction to omap4 pad configuration

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,551
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
19
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Introduction to omap4 pad configuration

  1. 1. Introduction toOMAP4 Pad Configuration Jiahe Jou 2012/12/13
  2. 2. Revisions DATE AUTHOUR DESCRIPTION2012/12/03 Jiahe Jou Draft.
  3. 3. Outline● Overview● Pad Configuration● Off Mode Control● Wake Up Detection● Power Optimization● Configuration How To● Case Study - Talos7
  4. 4. 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)
  5. 5. Overview● Pad configuration register 2
  6. 6. 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
  7. 7. Pad Configuration● Examples
  8. 8. Pad Configuration● Pull selection ○ PULL (2 bits), 0b00 ~ 0b11 PULL Behavior 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
  9. 9. 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
  10. 10. Pad Configuration
  11. 11. Off Mode Control● Off mode selected ○ PRM_DEVICE_OFF_CTRL[0] DEVICE_OFF_ENABLE ○ CONTROL_PADCONF_GLOBAL[31] FORCE_OFFMODE_ENABLE
  12. 12. Wake Up Dectection● Wake up enabled ○ PRM_IO_PMCTRL[16]GLOBAL_WUEN
  13. 13. 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
  14. 14. Power Optimization
  15. 15. 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
  16. 16. Pad Configuration● Recommended configuration for unconnected pads
  17. 17. Pad Configuration● Ball Characteristics
  18. 18. 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);
  19. 19. 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; };
  20. 20. 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 */
  21. 21. 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 */
  22. 22. 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);
  23. 23. 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, }...}
  24. 24. Q&A
  25. 25. The End

×