All of lore.kernel.org
 help / color / mirror / Atom feed
From: Carlo Caione <carlo@caione.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 3/4] rockchip: veyron: Set vcc33_sd regulator value
Date: Mon, 11 Jun 2018 20:00:50 +0100	[thread overview]
Message-ID: <20180611190051.6897-4-carlo@caione.org> (raw)
In-Reply-To: <20180611190051.6897-1-carlo@caione.org>

From: Carlo Caione <carlo@endlessm.com>

On the veyron board the vcc33_sd regulator is used as vmmc-supply for
the SD card. This regulator is powered in the MMC core during power on
but its value is never actually set.

In the veyron platform the reset value for the LDO output is 1.8V while
the standard (min and max) value for this regulator defined in the DTS
is 3.3V. When the MMC core enable the regulator without setting its
value, the output is automatically set to 1.8V instead of 3.3V.

With this patch we preemptively set the value to 3.3V.

Signed-off-by: Carlo Caione <carlo@endlessm.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
---
 arch/arm/mach-rockchip/rk3288-board.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm/mach-rockchip/rk3288-board.c b/arch/arm/mach-rockchip/rk3288-board.c
index bf24d8e074..0e83c0a947 100644
--- a/arch/arm/mach-rockchip/rk3288-board.c
+++ b/arch/arm/mach-rockchip/rk3288-board.c
@@ -122,6 +122,16 @@ static int veyron_init(void)
 	if (IS_ERR_VALUE(ret))
 		return ret;
 
+	ret = regulator_get_by_platname("vcc33_sd", &dev);
+	if (ret) {
+		debug("Cannot get regulator name\n");
+		return ret;
+	}
+
+	ret = regulator_set_value(dev, 3300000);
+	if (ret)
+		return ret;
+
 	ret = regulators_enable_boot_on(false);
 	if (ret) {
 		debug("%s: Cannot enable boot on regulators\n", __func__);
-- 
2.17.1

  parent reply	other threads:[~2018-06-11 19:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-11 19:00 [U-Boot] [PATCH v3 0/4] rk3288: veyron: Enable SDMMC when booting from SPI Carlo Caione
2018-06-11 19:00 ` [U-Boot] [PATCH v3 1/4] rk3288: veyron: Init boot-on regulators Carlo Caione
2018-07-13 10:25   ` [U-Boot] [U-Boot, v3, " Philipp Tomsich
2018-06-11 19:00 ` [U-Boot] [PATCH v3 2/4] rk3288: Disable JTAG function from sdmmc0 IO Carlo Caione
2018-07-13 10:25   ` [U-Boot] [U-Boot, v3, " Philipp Tomsich
2018-06-11 19:00 ` Carlo Caione [this message]
2018-07-13 10:25   ` [U-Boot] [U-Boot, v3, 3/4] rockchip: veyron: Set vcc33_sd regulator value Philipp Tomsich
2018-06-11 19:00 ` [U-Boot] [PATCH v3 4/4] rk3288: Convert register defines to const uintptr_t Carlo Caione
2018-07-09  3:05   ` Simon Glass
2018-07-13 10:26     ` Dr. Philipp Tomsich
2018-06-24  9:06 ` [U-Boot] [PATCH v3 0/4] rk3288: veyron: Enable SDMMC when booting from SPI Carlo Caione

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180611190051.6897-4-carlo@caione.org \
    --to=carlo@caione.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.