diff mbox series

[U-Boot] mmc: omap_hsmmc: Fix pbias for omap3_logic to enable CD pin

Message ID 20180905091108.26266-1-aford173@gmail.com
State Accepted
Commit 03190a7888493058c3a0fd6c50fd0b8dadd165ee
Delegated to: Tom Rini
Headers show
Series [U-Boot] mmc: omap_hsmmc: Fix pbias for omap3_logic to enable CD pin | expand

Commit Message

Adam Ford Sept. 5, 2018, 9:11 a.m. UTC
The MMC card detect pin is connected to gpio127 on omap3_logic.
When setting up the pbias register for MMC, let's also enable
gpio_127 for the card detect.  As part of the package deal,
gpio_126 and gpio_129 are also enabled.

Signed-off-by: Adam Ford <aford173@gmail.com>

Comments

Tom Rini Sept. 26, 2018, 12:49 p.m. UTC | #1
On Wed, Sep 05, 2018 at 04:11:08AM -0500, Adam Ford wrote:

> The MMC card detect pin is connected to gpio127 on omap3_logic.
> When setting up the pbias register for MMC, let's also enable
> gpio_127 for the card detect.  As part of the package deal,
> gpio_126 and gpio_129 are also enabled.
> 
> Signed-off-by: Adam Ford <aford173@gmail.com>
> 
> diff --git a/arch/arm/include/asm/arch-omap3/mmc_host_def.h b/arch/arm/include/asm/arch-omap3/mmc_host_def.h
> index 9f2896c4b9..39a7cba0f6 100644

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/arch/arm/include/asm/arch-omap3/mmc_host_def.h b/arch/arm/include/asm/arch-omap3/mmc_host_def.h
index 9f2896c4b9..39a7cba0f6 100644
--- a/arch/arm/include/asm/arch-omap3/mmc_host_def.h
+++ b/arch/arm/include/asm/arch-omap3/mmc_host_def.h
@@ -51,6 +51,7 @@  typedef struct t2 {
 #define PBIASLITEPWRDNZ0		(1 << 1)
 #define PBIASSPEEDCTRL0			(1 << 2)
 #define PBIASLITEPWRDNZ1		(1 << 9)
+#define PBIASLITEVMODE1			(1 << 8)
 #define PBIASLITEVMODE0			(1 << 0)
 
 #define CTLPROGIO1SPEEDCTRL		(1 << 20)
diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c
index 4d171f457e..8ab56d247d 100644
--- a/drivers/mmc/omap_hsmmc.c
+++ b/drivers/mmc/omap_hsmmc.c
@@ -216,6 +216,10 @@  static unsigned char mmc_board_init(struct mmc *mmc)
 	/* for cairo board, we need to set up 1.8 Volt bias level on MMC1 */
 	pbias_lite &= ~PBIASLITEVMODE0;
 #endif
+#ifdef CONFIG_TARGET_OMAP3_LOGIC
+	/* For Logic PD board, 1.8V bias to go enable gpio127 for mmc_cd */
+	pbias_lite &= ~PBIASLITEVMODE1;
+#endif
 #ifdef CONFIG_MMC_OMAP36XX_PINS
 	if (get_cpu_family() == CPU_OMAP36XX) {
 		/* Disable extended drain IO before changing PBIAS */