diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2016-01-10 14:11:44 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2016-01-10 14:11:44 +0000 |
commit | 1cd3de15c529b8ff28faf3dd166b6c0b152a55dc (patch) | |
tree | 736bbeb3b570c9f63cafd74ac16562183407a7ce /sys/arch | |
parent | 8234c650dfd9324e5ad665576479d6da21fea2db (diff) |
Seems the voltage bit defenitions in sdmmcreg.h for voltages below 2V
are not quite right. At least I can't find them in any of the MMC and
SD card documentation I can find on the interwebs. Instead there is a
single "low voltage bit" that indicates support for the 1.65-1.95V or
1.70-1.95V range depending on the document you're reading. Go with the
1.65-1.95V range as that is what Linux does.
Necessary (but not sufficient) to make the eMMC on the ASUS X205TA work.
ok jsg@ (who did the armv7 bits)
Diffstat (limited to 'sys/arch')
-rw-r--r-- | sys/arch/armv7/exynos/exesdhc.c | 4 | ||||
-rw-r--r-- | sys/arch/armv7/imx/imxesdhc.c | 4 | ||||
-rw-r--r-- | sys/arch/armv7/omap/ommmc.c | 6 |
3 files changed, 7 insertions, 7 deletions
diff --git a/sys/arch/armv7/exynos/exesdhc.c b/sys/arch/armv7/exynos/exesdhc.c index b5da2c23673..5d9ea8e5067 100644 --- a/sys/arch/armv7/exynos/exesdhc.c +++ b/sys/arch/armv7/exynos/exesdhc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exesdhc.c,v 1.3 2015/05/30 02:17:36 jsg Exp $ */ +/* $OpenBSD: exesdhc.c,v 1.4 2016/01/10 14:11:43 kettenis Exp $ */ /* * Copyright (c) 2009 Dale Rahn <drahn@openbsd.org> * Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org> @@ -331,7 +331,7 @@ exesdhc_attach(struct device *parent, struct device *self, void *args) * Determine SD bus voltage levels supported by the controller. */ if (caps & SDHC_HOST_CTRL_CAP_VS18) - SET(sc->ocr, MMC_OCR_1_7V_1_8V | MMC_OCR_1_8V_1_9V); + SET(sc->ocr, MMC_OCR_1_65V_1_95V); if (caps & SDHC_HOST_CTRL_CAP_VS30) SET(sc->ocr, MMC_OCR_2_9V_3_0V | MMC_OCR_3_0V_3_1V); if (caps & SDHC_HOST_CTRL_CAP_VS33) diff --git a/sys/arch/armv7/imx/imxesdhc.c b/sys/arch/armv7/imx/imxesdhc.c index 432bcd733b1..f55b41f65e2 100644 --- a/sys/arch/armv7/imx/imxesdhc.c +++ b/sys/arch/armv7/imx/imxesdhc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: imxesdhc.c,v 1.12 2015/05/30 03:20:54 jsg Exp $ */ +/* $OpenBSD: imxesdhc.c,v 1.13 2016/01/10 14:11:43 kettenis Exp $ */ /* * Copyright (c) 2009 Dale Rahn <drahn@openbsd.org> * Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org> @@ -281,7 +281,7 @@ imxesdhc_attach(struct device *parent, struct device *self, void *args) * Determine SD bus voltage levels supported by the controller. */ if (caps & SDHC_HOST_CTRL_CAP_VS18) - SET(sc->ocr, MMC_OCR_1_7V_1_8V | MMC_OCR_1_8V_1_9V); + SET(sc->ocr, MMC_OCR_1_65V_1_95V); if (caps & SDHC_HOST_CTRL_CAP_VS30) SET(sc->ocr, MMC_OCR_2_9V_3_0V | MMC_OCR_3_0V_3_1V); if (caps & SDHC_HOST_CTRL_CAP_VS33) diff --git a/sys/arch/armv7/omap/ommmc.c b/sys/arch/armv7/omap/ommmc.c index 03040e9c6fc..5363ce5fb67 100644 --- a/sys/arch/armv7/omap/ommmc.c +++ b/sys/arch/armv7/omap/ommmc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ommmc.c,v 1.14 2015/05/30 02:17:36 jsg Exp $ */ +/* $OpenBSD: ommmc.c,v 1.15 2016/01/10 14:11:43 kettenis Exp $ */ /* * Copyright (c) 2009 Dale Rahn <drahn@openbsd.org> @@ -353,7 +353,7 @@ ommmc_attach(struct device *parent, struct device *self, void *args) * Determine SD bus voltage levels supported by the controller. */ if (caps & MMCHS_CAPA_VS18) - SET(sc->ocr, MMC_OCR_1_7V_1_8V | MMC_OCR_1_8V_1_9V); + SET(sc->ocr, MMC_OCR_1_65V_1_95V); if (caps & MMCHS_CAPA_VS30) SET(sc->ocr, MMC_OCR_2_9V_3_0V | MMC_OCR_3_0V_3_1V); if (caps & MMCHS_CAPA_VS33) @@ -570,7 +570,7 @@ ommmc_bus_power(sdmmc_chipset_handle_t sch, uint32_t ocr) vdd = MMCHS_HCTL_SDVS_V33; else if (ISSET(ocr, MMC_OCR_2_9V_3_0V | MMC_OCR_3_0V_3_1V)) vdd = MMCHS_HCTL_SDVS_V30; - else if (ISSET(ocr, MMC_OCR_1_7V_1_8V | MMC_OCR_1_8V_1_9V)) + else if (ISSET(ocr, MMC_OCR_1_65V_1_95V)) vdd = MMCHS_HCTL_SDVS_V18; else { /* Unsupported voltage level requested. */ |