From: NeilBrown <neil@brown.name>
To: Ulf Hansson <ulf.hansson@linaro.org>,
Chaotian Jing <chaotian.jing@mediatek.com>
Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
thirtythreeforty@gmail.com
Subject: [PATCH 1/5] mmc: mtk-sd: support "voltage-ranges" setting.
Date: Tue, 16 Apr 2019 14:47:29 +1000 [thread overview]
Message-ID: <155539004920.25108.9476903376124066171.stgit@noble.brown> (raw)
In-Reply-To: <155538933003.25108.3338569916935462285.stgit@noble.brown>
If the mtk-sd silicon is used in a context where there is no explicit
regulator, it is not currently possible to specify the voltage
ranges. This is true for the MT7621 MIPS Soc.
So add a called to mmc_of_parse_voltage() so that voltage-ranges can
be given.
Signed-off-by: NeilBrown <neil@brown.name>
---
Documentation/devicetree/bindings/mmc/mtk-sd.txt | 6 ++++--
drivers/mmc/host/mtk-sd.c | 3 +++
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.txt b/Documentation/devicetree/bindings/mmc/mtk-sd.txt
index f5bcda3980cc..ed61cd5a5b8f 100644
--- a/Documentation/devicetree/bindings/mmc/mtk-sd.txt
+++ b/Documentation/devicetree/bindings/mmc/mtk-sd.txt
@@ -27,10 +27,12 @@ Required properties:
- pinctrl-names: should be "default", "state_uhs"
- pinctrl-0: should contain default/high speed pin ctrl
- pinctrl-1: should contain uhs mode pin ctrl
-- vmmc-supply: power to the Core
-- vqmmc-supply: power to the IO
Optional properties:
+- vmmc-supply: power to the Core
+- vqmmc-supply: power to the IO
+- voltage-ranges: if vmmc-supply not present, this can specify pairs
+ of millivolt numbers to describe available ranged.
- assigned-clocks: PLL of the source clock
- assigned-clock-parents: parent of source clock, used for HS400 mode to get 400Mhz source clock
- hs400-ds-delay: HS400 DS delay setting
diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
index 0798f0ba6d34..4492a4465c0e 100644
--- a/drivers/mmc/host/mtk-sd.c
+++ b/drivers/mmc/host/mtk-sd.c
@@ -2125,6 +2125,9 @@ static int msdc_drv_probe(struct platform_device *pdev)
ret = mmc_of_parse(mmc);
if (ret)
goto host_free;
+ ret = mmc_of_parse_voltage(pdev->dev.of_node, &mmc->ocr_avail);
+ if (ret < 0)
+ goto host_free;
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
host->base = devm_ioremap_resource(&pdev->dev, res);
next prev parent reply other threads:[~2019-04-16 4:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-16 4:47 [PATCH 0/5] mtk-sd enhancement to support MT7621 NeilBrown
2019-04-16 4:47 ` NeilBrown [this message]
2019-04-16 4:47 ` [PATCH 5/5] mmc: mtk-sd: enable internal write-protect logic NeilBrown
2019-04-16 4:47 ` [PATCH 4/5] mmc: mtk-sd: enable internal card-detect logic NeilBrown
2019-04-18 6:39 ` Chaotian Jing
2019-05-04 8:18 ` NeilBrown
2019-04-16 4:47 ` [PATCH 2/5] mmc: mtk-sd: don't hard-code interrupt trigger type NeilBrown
2019-04-16 8:11 ` Chaotian Jing
2019-04-16 22:12 ` NeilBrown
2019-04-18 6:36 ` Chaotian Jing
2019-04-16 4:47 ` [PATCH 3/5] mmc: mtk-sd: add support for config found in mt7620 family SOCs NeilBrown
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=155539004920.25108.9476903376124066171.stgit@noble.brown \
--to=neil@brown.name \
--cc=chaotian.jing@mediatek.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=thirtythreeforty@gmail.com \
--cc=ulf.hansson@linaro.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).