diff options
Diffstat (limited to 'arch/arm/mach-omap2/control.c')
| -rw-r--r-- | arch/arm/mach-omap2/control.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/control.c b/arch/arm/mach-omap2/control.c index 2adb2683f07..ab5ec4b28ab 100644 --- a/arch/arm/mach-omap2/control.c +++ b/arch/arm/mach-omap2/control.c @@ -235,6 +235,32 @@ void omap3_ctrl_write_boot_mode(u8 bootmode) __raw_writel(l, OMAP2_L4_IO_ADDRESS(OMAP343X_SCRATCHPAD + 4)); } +/** + * omap3_enable_usim_IO - enable USIM block input/output buffers + * + * Enable USIM block input/output buffers. By default the buffers are + * not enabled. Once vdds is stable, they can be enabled. They must + * be enabled before using any GPIOs from this block. + */ +void omap3_enable_usim_buffer(void) +{ + u32 reg; + /* + * Configure USIM pins for 1.8V control and disable high-z state + * CTRL_PBIAS_LITE = 0x20b + */ + reg = omap_ctrl_readl(OMAP343X_CONTROL_PBIAS_LITE); + reg |= (OMAP2_PBIASLITEVMODE0 | OMAP2_PBIASLITEPWRDNZ0); + reg |= OMAP343X_PBIASLITEPWRDNZ1; + reg &= ~OMAP343X_PBIASLITEVMODE1; + reg &= ~OMAP2_PBIASSPEEDCTRL0; + omap_ctrl_writel(reg, OMAP343X_CONTROL_PBIAS_LITE); + + reg = omap_ctrl_readl(OMAP343X_CONTROL_WKUP_CTRL); + reg |= OMAP343X_USIM_IO_PWRDNZ; + omap_ctrl_writel(reg, OMAP343X_CONTROL_WKUP_CTRL); +} + #endif /** |