@@ -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
@@ -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);
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(-)