From patchwork Mon May 13 13:25:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Urja Rannikko X-Patchwork-Id: 1098859 X-Patchwork-Delegate: ykai007@gmail.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=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="b1ZvehmB"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 452hQR4BFxz9s00 for ; Mon, 13 May 2019 23:25:33 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 2388DC21F50; Mon, 13 May 2019 13:25:29 +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=FREEMAIL_FROM, RCVD_IN_MSPIKE_H2, 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 71034C21DFD; Mon, 13 May 2019 13:25:27 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 6601EC21DFD; Mon, 13 May 2019 13:25:26 +0000 (UTC) Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by lists.denx.de (Postfix) with ESMTPS id F12A5C21C57 for ; Mon, 13 May 2019 13:25:25 +0000 (UTC) Received: by mail-wr1-f68.google.com with SMTP id h4so15279494wre.7 for ; Mon, 13 May 2019 06:25:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Vf+uhsrMDeTZ9At2MiUoT+JAZ8KI9+ySQEZBNwDjTSs=; b=b1ZvehmBaDXZKEK83mOXiYGPkSnaNbfbxRZ4AiYPzEGF/oHo3VeT85fn49/TxOFBjB 7PwVdbmqm2sdZG6uR2yqnR/lSHwk3z55p2UXMTZfuewZw+UJFz5cKzAL2uwurnLb+jJY MbABn5TMOBYFGHL49x0ej05IA+5we5unAa+/CR/kw/6tIHy+jvMSpzWEFcgGotr4PsKP 1gzXxdEFptLW6NI1ib1TrHFHevrBO4Yg8b3qE+I1ztQCJxZgaYtLACaVeI9pfp8PDfnN ezYTHKcEdjNNZhD2hWnV4UtIXJ7ilhpqCLb8HWcERb94Vd7Pdt8Ikjsmnq2uZhED/RVi sP2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Vf+uhsrMDeTZ9At2MiUoT+JAZ8KI9+ySQEZBNwDjTSs=; b=Wxx27c05eozEahWNId8WC9NdzdobeIjBOhgzhJvB6fvPN7iqTxx4bZm3UEs3jqVqd7 qviDJrYKAtRkKghTVSwbTysLRUw20BTFjeknICnTgz1jHdOJcQa0FhBSzoIhNTOC51cb saJT6vnbEizoKir0vFd9orWgDbZ0pwcNzb2C8UUWhOZEA6xhYAFvaPAwWy5NAvqNCWj7 obPwtI4Ww5ns07IrD+jOX1aQoL1Wgpv5z+sGaN7wH90ASOImX7IhEf4iy4Z/l3Nc0IpI jW6wbqn5sz4xhmyTDZ3KCm/+NJPvezppkwkVgBh+pf4bAtDewWAp0UcYPLAFGeRfl62s zRRA== X-Gm-Message-State: APjAAAUqRTdvGd8TJou4ze6zuuOQasw+jHJKIluxZo/majG0Qp5JEr/N Bsc4u4n8qf47s2bVyIIxk+LQFf8HIw== X-Google-Smtp-Source: APXvYqxjl5sP/FWqqtMIsq6+scZjUP3iTC3wjrJtlYM0jXW8/SxT8P4wU7OMnxo8xT4tT160dK1R/g== X-Received: by 2002:adf:f8cf:: with SMTP id f15mr17036751wrq.238.1557753925413; Mon, 13 May 2019 06:25:25 -0700 (PDT) Received: from localhost.localdomain (esm-84-240-79-214.netplaza.fi. [84.240.79.214]) by smtp.gmail.com with ESMTPSA id y1sm2670874wma.14.2019.05.13.06.25.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 May 2019 06:25:24 -0700 (PDT) From: Urja Rannikko To: u-boot@lists.denx.de Date: Mon, 13 May 2019 13:25:27 +0000 Message-Id: <20190513132527.14933-1-urjaman@gmail.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <6364330.q6OFNDAJqT@phil> References: <6364330.q6OFNDAJqT@phil> MIME-Version: 1.0 Subject: [U-Boot] [PATCH v3] dw_mmc: turn on the IO supply 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: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Fixes the microSD slot on the ASUS C201. Signed-off-by: Urja Rannikko Reviewed-by: Simon Glass Reviewed-by: Peng Fan Reviewed-by: Peng Fan > --- v2: use #if CONFIG_IS_ENABLED(DM_REGULATOR) v3: Move ret variable inside the if block (only used there) --- drivers/mmc/dw_mmc.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c index 1992d61182..22f6c7eefd 100644 --- a/drivers/mmc/dw_mmc.c +++ b/drivers/mmc/dw_mmc.c @@ -13,6 +13,7 @@ #include #include #include +#include #define PAGE_SIZE 4096 @@ -493,6 +494,21 @@ static int dwmci_set_ios(struct mmc *mmc) if (host->clksel) host->clksel(host); +#if CONFIG_IS_ENABLED(DM_REGULATOR) + if (mmc->vqmmc_supply) { + int ret; + + if (mmc->signal_voltage == MMC_SIGNAL_VOLTAGE_180) + regulator_set_value(mmc->vqmmc_supply, 1800000); + else + regulator_set_value(mmc->vqmmc_supply, 3300000); + + ret = regulator_set_enable_if_allowed(mmc->vqmmc_supply, true); + if (ret) + return ret; + } +#endif + return 0; }