{"id":814365,"url":"http://patchwork.ozlabs.org/api/1.2/patches/814365/?format=json","web_url":"http://patchwork.ozlabs.org/project/uboot/patch/20170915191054.28337-1-marek.vasut+renesas@gmail.com/","project":{"id":18,"url":"http://patchwork.ozlabs.org/api/1.2/projects/18/?format=json","name":"U-Boot","link_name":"uboot","list_id":"u-boot.lists.denx.de","list_email":"u-boot@lists.denx.de","web_url":null,"scm_url":null,"webscm_url":null,"list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20170915191054.28337-1-marek.vasut+renesas@gmail.com>","list_archive_url":null,"date":"2017-09-15T19:10:54","name":"[U-Boot] mmc: uniphier-sd: Add vqmmc regulator support","commit_ref":"9f13021f81009449c869ea441620cdc77146dee8","pull_url":null,"state":"accepted","archived":false,"hash":"b7462f20d369e2fe1af4cc6e60b082a1b1a8e052","submitter":{"id":1124,"url":"http://patchwork.ozlabs.org/api/1.2/people/1124/?format=json","name":"Marek Vasut","email":"marek.vasut@gmail.com"},"delegate":{"id":12423,"url":"http://patchwork.ozlabs.org/api/1.2/users/12423/?format=json","username":"Jaehoon","first_name":"Jaehoon","last_name":"Chung","email":"jh80.chung@samsung.com"},"mbox":"http://patchwork.ozlabs.org/project/uboot/patch/20170915191054.28337-1-marek.vasut+renesas@gmail.com/mbox/","series":[{"id":3359,"url":"http://patchwork.ozlabs.org/api/1.2/series/3359/?format=json","web_url":"http://patchwork.ozlabs.org/project/uboot/list/?series=3359","date":"2017-09-15T19:10:54","name":"[U-Boot] mmc: uniphier-sd: Add vqmmc regulator support","version":1,"mbox":"http://patchwork.ozlabs.org/series/3359/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/814365/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/814365/checks/","tags":{},"related":[],"headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"bd+z8e6d\"; dkim-atps=neutral"],"Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xv4l617yMz9s7g\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat, 16 Sep 2017 05:11:45 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid 774CBC21E84; Fri, 15 Sep 2017 19:11:35 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 0BC4DC21E76;\n\tFri, 15 Sep 2017 19:11:33 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid DEADDC21E55; Fri, 15 Sep 2017 19:11:01 +0000 (UTC)","from mail-wm0-f68.google.com (mail-wm0-f68.google.com\n\t[74.125.82.68])\n\tby lists.denx.de (Postfix) with ESMTPS id 301C7C21EBE\n\tfor <u-boot@lists.denx.de>; Fri, 15 Sep 2017 19:10:57 +0000 (UTC)","by mail-wm0-f68.google.com with SMTP id r136so3540539wmf.3\n\tfor <u-boot@lists.denx.de>; Fri, 15 Sep 2017 12:10:57 -0700 (PDT)","from kurokawa.lan (ip-86-49-107-50.net.upcbroadband.cz.\n\t[86.49.107.50]) by smtp.gmail.com with ESMTPSA id\n\tb125sm1846017wma.29.2017.09.15.12.10.55\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tFri, 15 Sep 2017 12:10:56 -0700 (PDT)"],"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,\n\tRCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,\n\tT_DKIM_INVALID\n\tautolearn=unavailable autolearn_force=no version=3.4.0","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=from:to:cc:subject:date:message-id;\n\tbh=e+dIk88d0tl3i0dOOcE5DjnXBUnESXRk8sfewicRF+U=;\n\tb=bd+z8e6d7MMH7+uYnRyROeJE4wprbzOJav7B/VhsKetc1xr1KPUPeXoVGi+1UYjvlG\n\tnRWVLj/Ixn8hSYtZdpVV0++D8BpX+9P6ewzOU04llLPvir9iTN81MwEhn83EVMIPY7jj\n\t94kXAlnkMoxG7dRdI9SrQXhmaXRvccav2HjT+qlTiiUuahPSJ+4eWxEqlOTr4ID4q4qp\n\tGQ42hBpzSFpisPloCEhYiLutflFLLFRYchqwPkPS+7PAa7ZRBVqZ9CboxRK9Wh+q2xHr\n\tVhFAJstTi/brsYnWvYztBQeNKWFQ1uHf6qItjORltmcCKtceEqcPoVql3Ej1YS+RqpqU\n\tw+cg==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:from:to:cc:subject:date:message-id;\n\tbh=e+dIk88d0tl3i0dOOcE5DjnXBUnESXRk8sfewicRF+U=;\n\tb=WdYuNg5N3s3W3GFvifn6ZQT3h1iMaoRVibmtSLPXtdE55c8ihAh5RrRU6IcDIuOZlf\n\tZHqWM39U1ooFIHKUHnhHuiQ/YutbP7g5k2Ts3lnynriH29LDgjQznT2zcJjlTBAY0UAQ\n\tbWUtSqMwvrMAGapsHJpBntO04G0n/vXhDl+/fxukpsLtoQIYbdLNK7Whw/B/1pO050k4\n\t17s+DvKraVLBrVW6SLfn2YZTBMaxHj5NTzzrPhvt+RTKe/L28UHrMTGMH8Xk2xDqTv/w\n\t6GRfp1rsmdaScDgKy0STtVyxDCsdSq96Ps4gBt0ZIURDjr1nVaDk62xcfZup41qFF+Qf\n\tSfDA==","X-Gm-Message-State":"AHPjjUjEIo78yY6US9SgbBY4PVBzo6MF2s5wMn3zseaVNb/br/q/Bk/f\n\tpdF6C1P260HA3ru5E/Q=","X-Google-Smtp-Source":"AOwi7QA8qSfI300+Nc9vgZwN5HlIsEyjxDkz9Rp2pl+1IytRBMCBcSvBbhKiJNgl/92ZtLgwJLiCEg==","X-Received":"by 10.28.142.82 with SMTP id q79mr3724973wmd.106.1505502656637; \n\tFri, 15 Sep 2017 12:10:56 -0700 (PDT)","From":"Marek Vasut <marek.vasut@gmail.com>","X-Google-Original-From":"Marek Vasut <marek.vasut+renesas@gmail.com>","To":"u-boot@lists.denx.de","Date":"Fri, 15 Sep 2017 21:10:54 +0200","Message-Id":"<20170915191054.28337-1-marek.vasut+renesas@gmail.com>","X-Mailer":"git-send-email 2.11.0","Cc":"Marek Vasut <marek.vasut+renesas@gmail.com>","Subject":"[U-Boot] [PATCH] mmc: uniphier-sd: Add vqmmc regulator support","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.18","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<http://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>"},"content":"Add initial support for setting the vqmmc regulator. Since we do not\nsupport 1V8 modes, set the regulator to 3V3 and enable it.\n\nSigned-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>\nCc: Masahiro Yamada <yamada.masahiro@socionext.com>\nCc: Jaehoon Chung <jh80.chung@samsung.com>\n---\n drivers/mmc/uniphier-sd.c | 13 +++++++++++++\n 1 file changed, 13 insertions(+)","diff":"diff --git a/drivers/mmc/uniphier-sd.c b/drivers/mmc/uniphier-sd.c\nindex 3c52161067..0d1203cb76 100644\n--- a/drivers/mmc/uniphier-sd.c\n+++ b/drivers/mmc/uniphier-sd.c\n@@ -14,6 +14,7 @@\n #include <linux/dma-direction.h>\n #include <linux/io.h>\n #include <linux/sizes.h>\n+#include <power/regulator.h>\n #include <asm/unaligned.h>\n \n DECLARE_GLOBAL_DATA_PTR;\n@@ -756,6 +757,9 @@ static int uniphier_sd_probe(struct udevice *dev)\n \tfdt_addr_t base;\n \tstruct clk clk;\n \tint ret;\n+#ifdef CONFIG_DM_REGULATOR\n+\tstruct udevice *vqmmc_dev;\n+#endif\n \n \tbase = devfdt_get_addr(dev);\n \tif (base == FDT_ADDR_T_NONE)\n@@ -765,6 +769,15 @@ static int uniphier_sd_probe(struct udevice *dev)\n \tif (!priv->regbase)\n \t\treturn -ENOMEM;\n \n+#ifdef CONFIG_DM_REGULATOR\n+\tret = device_get_supply_regulator(dev, \"vqmmc-supply\", &vqmmc_dev);\n+\tif (!ret) {\n+\t\t/* Set the regulator to 3.3V until we support 1.8V modes */\n+\t\tregulator_set_value(vqmmc_dev, 3300000);\n+\t\tregulator_set_enable(vqmmc_dev, true);\n+\t}\n+#endif\n+\n \tret = clk_get_by_index(dev, 0, &clk);\n \tif (ret < 0) {\n \t\tdev_err(dev, \"failed to get host clock\\n\");\n","prefixes":["U-Boot"]}