* [U-Boot] [RFC Patch V2] drivers: mmc: omap_hsmmc: Fix IO Buffer on OMAP36XX
@ 2017-01-11 21:07 ` Adam Ford
2017-01-19 11:30 ` Jaehoon Chung
0 siblings, 1 reply; 2+ messages in thread
From: Adam Ford @ 2017-01-11 21:07 UTC (permalink / raw)
To: u-boot
On the OMAP36xx (and 37xx) the CONTROL_WKUP_CTRL register has
a field (bit 6) named GPIO_IO_PWRDNZ. If 0, the IO buffers which
are related to the MMC are disabled. After the PBIAS is configured,
this bit should be set high to enable the MMC port.
V2: Make this feature a config option and add it to the MMC section
of the Kconfig. This allows the precompiler to only include it
in a small handfull of OMAP36XX and 37XX boards using MMC1.
V1: Original submission
Signed-off-by: Adam Ford <aford173@gmail.com>
diff --git a/configs/omap3_logic_defconfig b/configs/omap3_logic_defconfig
index ac1a6a3..bd5f1a8 100644
--- a/configs/omap3_logic_defconfig
+++ b/configs/omap3_logic_defconfig
@@ -15,6 +15,7 @@ CONFIG_CMD_BOOTZ=y
CONFIG_CMD_ASKENV=y
# CONFIG_CMD_FLASH is not set
CONFIG_CMD_MMC=y
+CONFIG_MMC_OMAP36XX_PINS=y
CONFIG_CMD_SPI=y
CONFIG_CMD_I2C=y
# CONFIG_CMD_FPGA is not set
diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig
index c3462ab..d6fcf7f 100644
--- a/drivers/mmc/Kconfig
+++ b/drivers/mmc/Kconfig
@@ -204,6 +204,17 @@ config MMC_SDHCI_SPEAR
If unsure, say N.
+config MMC_OMAP36XX_PINS
+ bool "Enable MMC1 on OMAP36XX/37XX"
+ depends on OMAP34XX
+ help
+ This enables extended-drain in the MMC/SD/SDIO1I/O and
+ GPIO-associated I/O cells (gpio_126, gpio_127, and gpio_129)
+ specific to the OMAP36XX/37XX using MMC1
+
+ If you have a controller with this interface, say Y here.
+
+ If unsure, say N.
endif
endmenu
diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c
index 0a1ee40..a4720e1 100644
--- a/drivers/mmc/omap_hsmmc.c
+++ b/drivers/mmc/omap_hsmmc.c
@@ -38,6 +38,7 @@
#include <asm/arch/sys_proto.h>
#endif
#include <dm.h>
+#include <asm/arch-omap3/mux.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -115,6 +116,13 @@ static unsigned char mmc_board_init(struct mmc *mmc)
PBIASSPEEDCTRL0 | PBIASLITEPWRDNZ0,
&t2_base->pbias_lite);
+#ifdef CONFIG_MMC_OMAP36XX_PINS
+ if (get_cpu_family() == CPU_OMAP36XX)
+ writel(readl(OMAP34XX_CTRL_WKUP_CTRL) |
+ OMAP34XX_CTRL_WKUP_CTRL_GPIO_IO_PWRDNZ,
+ OMAP34XX_CTRL_WKUP_CTRL);
+#endif
+
writel(readl(&t2_base->devconf0) | MMCSDIO1ADPCLKISEL,
&t2_base->devconf0);
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] [RFC Patch V2] drivers: mmc: omap_hsmmc: Fix IO Buffer on OMAP36XX
2017-01-11 21:07 ` [U-Boot] [RFC Patch V2] drivers: mmc: omap_hsmmc: Fix IO Buffer on OMAP36XX Adam Ford
@ 2017-01-19 11:30 ` Jaehoon Chung
0 siblings, 0 replies; 2+ messages in thread
From: Jaehoon Chung @ 2017-01-19 11:30 UTC (permalink / raw)
To: u-boot
Hi Adam,
On 01/12/2017 06:07 AM, Adam Ford wrote:
> On the OMAP36xx (and 37xx) the CONTROL_WKUP_CTRL register has
> a field (bit 6) named GPIO_IO_PWRDNZ. If 0, the IO buffers which
> are related to the MMC are disabled. After the PBIAS is configured,
> this bit should be set high to enable the MMC port.
>
> V2: Make this feature a config option and add it to the MMC section
> of the Kconfig. This allows the precompiler to only include it
> in a small handfull of OMAP36XX and 37XX boards using MMC1.
>
> V1: Original submission
>
> Signed-off-by: Adam Ford <aford173@gmail.com>
Sorry for late, Could you resend the patch on latest?
Current patch has conflict..
Best Regards,
Jaehoon Chung
>
> diff --git a/configs/omap3_logic_defconfig b/configs/omap3_logic_defconfig
> index ac1a6a3..bd5f1a8 100644
> --- a/configs/omap3_logic_defconfig
> +++ b/configs/omap3_logic_defconfig
> @@ -15,6 +15,7 @@ CONFIG_CMD_BOOTZ=y
> CONFIG_CMD_ASKENV=y
> # CONFIG_CMD_FLASH is not set
> CONFIG_CMD_MMC=y
> +CONFIG_MMC_OMAP36XX_PINS=y
> CONFIG_CMD_SPI=y
> CONFIG_CMD_I2C=y
> # CONFIG_CMD_FPGA is not set
> diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig
> index c3462ab..d6fcf7f 100644
> --- a/drivers/mmc/Kconfig
> +++ b/drivers/mmc/Kconfig
> @@ -204,6 +204,17 @@ config MMC_SDHCI_SPEAR
>
> If unsure, say N.
>
> +config MMC_OMAP36XX_PINS
> + bool "Enable MMC1 on OMAP36XX/37XX"
> + depends on OMAP34XX
> + help
> + This enables extended-drain in the MMC/SD/SDIO1I/O and
> + GPIO-associated I/O cells (gpio_126, gpio_127, and gpio_129)
> + specific to the OMAP36XX/37XX using MMC1
> +
> + If you have a controller with this interface, say Y here.
> +
> + If unsure, say N.
> endif
>
> endmenu
> diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c
> index 0a1ee40..a4720e1 100644
> --- a/drivers/mmc/omap_hsmmc.c
> +++ b/drivers/mmc/omap_hsmmc.c
> @@ -38,6 +38,7 @@
> #include <asm/arch/sys_proto.h>
> #endif
> #include <dm.h>
> +#include <asm/arch-omap3/mux.h>
>
> DECLARE_GLOBAL_DATA_PTR;
>
> @@ -115,6 +116,13 @@ static unsigned char mmc_board_init(struct mmc *mmc)
> PBIASSPEEDCTRL0 | PBIASLITEPWRDNZ0,
> &t2_base->pbias_lite);
>
> +#ifdef CONFIG_MMC_OMAP36XX_PINS
> + if (get_cpu_family() == CPU_OMAP36XX)
> + writel(readl(OMAP34XX_CTRL_WKUP_CTRL) |
> + OMAP34XX_CTRL_WKUP_CTRL_GPIO_IO_PWRDNZ,
> + OMAP34XX_CTRL_WKUP_CTRL);
> +#endif
> +
> writel(readl(&t2_base->devconf0) | MMCSDIO1ADPCLKISEL,
> &t2_base->devconf0);
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-01-19 11:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20170111210900epcas3p155c551121596da89dc836554313dc227@epcas3p1.samsung.com>
2017-01-11 21:07 ` [U-Boot] [RFC Patch V2] drivers: mmc: omap_hsmmc: Fix IO Buffer on OMAP36XX Adam Ford
2017-01-19 11:30 ` Jaehoon Chung
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.