From patchwork Mon Jun 11 19:00:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlo Caione X-Patchwork-Id: 927850 X-Patchwork-Delegate: philipp.tomsich@theobroma-systems.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=caione.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="Nc+NAr3O"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 414Mpt2pnnz9rvt for ; Tue, 12 Jun 2018 05:03:02 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 23F1DC21C6A; Mon, 11 Jun 2018 19:02:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 99576C21D4A; Mon, 11 Jun 2018 19:01:29 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 68F4CC21CB6; Mon, 11 Jun 2018 19:01:13 +0000 (UTC) Received: from mail-pg0-f66.google.com (mail-pg0-f66.google.com [74.125.83.66]) by lists.denx.de (Postfix) with ESMTPS id 9CEC4C21DB5 for ; Mon, 11 Jun 2018 19:01:09 +0000 (UTC) Received: by mail-pg0-f66.google.com with SMTP id l2-v6so10186495pgc.7 for ; Mon, 11 Jun 2018 12:01:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=fGY315k/LSKCUv+GLdAVq3yYFZtAv8is/vFJerm6pOg=; b=Nc+NAr3OQxh7js1mhCcZcgSdamGdIGYiNMo7vL5eK1/SYN9gsr2v1FXE7X8xGQJBHA 9W3xMut3dq5lrM2gB/UQSE2Ymv+Bd14ZuhuEycK3xnKlEQxjDh/fuCsbW1nydY4oPfzz FnO18BYraH7uE0ylyMmOKFZaXHFLsPRgltvbaKA/mFNcWojeY3dIZ5ACTZGiUp8yBoDI YGTRJjE2SOZ+L5ZrGJ0C/9r7onrDpQtjWhMjr2gD8amVSQPjhPkLPodE4pv+kDhjlW78 0m49JbRnHhiHMwa1t2Q9JIrbl4BOwTz0pM/8CzgcdXHmD6IOSCCq3OcYt7Ns2c/yB2mv H+Jw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=fGY315k/LSKCUv+GLdAVq3yYFZtAv8is/vFJerm6pOg=; b=ssy5TEd7JQgigQTmWi9LgWBBKyk56EQ8NCD7IIz3/xDDKUbb7kUrYAB4mh1nG+iXzx HPWf+QwAsq/0oAvd8hOvpzSdxnMedomVPGm24QxqTped7syygSTziA+SIm5U7lbMrAv5 kI994YXkU49npfrlzQh4p23/5urtzG8kZ6CdW1nqMFzZYVQOPpoNHmfRJG+UXB9nkqtH 29VzON4/UX5LQ2dux7lVBZ2xb2habYb29i6b0D1+j7Soqwumx81s0He2RjBCHsdFERK1 9HgSb/WEdsLtESu9QX5TXn6g5r7sJ+ZxGjS0Evwxton4uvvc8Zt5RNBCzvZAzOvcHqXh hXPg== X-Gm-Message-State: APt69E1oBTgqS0UPWXPGlBuQOWey/ZBakmUAWflp8G0oVywJ/zluvyL4 1czek2LLruiLhqMtjLBP37Y= X-Google-Smtp-Source: ADUXVKJz1JR6XkDZTZ9wtTuYaROFdcDYoMQ9CFI0d2cSa3Z4fS6cXZArlyBQnsbmffwF2hjtJygWKw== X-Received: by 2002:a65:4a04:: with SMTP id s4-v6mr327358pgq.376.1528743668052; Mon, 11 Jun 2018 12:01:08 -0700 (PDT) Received: from localhost.localdomain ([2a00:23c4:f78b:2a00:4533:23a5:db75:b5ae]) by smtp.gmail.com with ESMTPSA id h10-v6sm44920834pgc.28.2018.06.11.12.01.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Jun 2018 12:01:07 -0700 (PDT) From: Carlo Caione To: sjg@chromium.org, philipp.tomsich@theobroma-systems.com, albert.u.boot@aribaud.net, u-boot@lists.denx.de, linux@endlessm.com Date: Mon, 11 Jun 2018 20:00:50 +0100 Message-Id: <20180611190051.6897-4-carlo@caione.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180611190051.6897-1-carlo@caione.org> References: <20180611190051.6897-1-carlo@caione.org> Cc: Carlo Caione Subject: [U-Boot] [PATCH v3 3/4] rockchip: veyron: Set vcc33_sd regulator value X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" From: Carlo Caione 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 Reviewed-by: Simon Glass Reviewed-by: Philipp Tomsich Acked-by: Philipp Tomsich --- 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__);