2018-07-22 12:55:43

by Icenowy Zheng

[permalink] [raw]
Subject: [PATCH] mmc: sunxi: allow 3.3V DDR when DDR is available

Some Allwinner boards feature an on-board eMMC with fixed 3.3V voltage
(e.g. Banana Pi M2+), and in this case both the eMMC and the SoC are
capable of doing 3.3V DDR transmission.

Add capability of 3.3V DDR when DDR is available (extra clock or new
timing).

Signed-off-by: Icenowy Zheng <[email protected]>
---
drivers/mmc/host/sunxi-mmc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c
index 8e7f3e35ee3d..4ea8e2611079 100644
--- a/drivers/mmc/host/sunxi-mmc.c
+++ b/drivers/mmc/host/sunxi-mmc.c
@@ -1388,7 +1388,7 @@ static int sunxi_mmc_probe(struct platform_device *pdev)
MMC_CAP_ERASE | MMC_CAP_SDIO_IRQ;

if (host->cfg->clk_delays || host->use_new_timings)
- mmc->caps |= MMC_CAP_1_8V_DDR;
+ mmc->caps |= MMC_CAP_1_8V_DDR | MMC_CAP_3_3V_DDR;

ret = mmc_of_parse(mmc);
if (ret)
--
2.18.0



2018-07-24 08:46:02

by Maxime Ripard

[permalink] [raw]
Subject: Re: [PATCH] mmc: sunxi: allow 3.3V DDR when DDR is available

On Sun, Jul 22, 2018 at 08:54:07PM +0800, Icenowy Zheng wrote:
> Some Allwinner boards feature an on-board eMMC with fixed 3.3V voltage
> (e.g. Banana Pi M2+), and in this case both the eMMC and the SoC are
> capable of doing 3.3V DDR transmission.
>
> Add capability of 3.3V DDR when DDR is available (extra clock or new
> timing).
>
> Signed-off-by: Icenowy Zheng <[email protected]>

Acked-by: Maxime Ripard <[email protected]>

Maxime

--
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com


Attachments:
(No filename) (577.00 B)
signature.asc (849.00 B)
Download all attachments

2018-07-30 15:07:48

by Ulf Hansson

[permalink] [raw]
Subject: Re: [PATCH] mmc: sunxi: allow 3.3V DDR when DDR is available

On 22 July 2018 at 14:54, Icenowy Zheng <[email protected]> wrote:
> Some Allwinner boards feature an on-board eMMC with fixed 3.3V voltage
> (e.g. Banana Pi M2+), and in this case both the eMMC and the SoC are
> capable of doing 3.3V DDR transmission.
>
> Add capability of 3.3V DDR when DDR is available (extra clock or new
> timing).
>
> Signed-off-by: Icenowy Zheng <[email protected]>

Thanks, applied for next!

Kind regards
Uffe

> ---
> drivers/mmc/host/sunxi-mmc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c
> index 8e7f3e35ee3d..4ea8e2611079 100644
> --- a/drivers/mmc/host/sunxi-mmc.c
> +++ b/drivers/mmc/host/sunxi-mmc.c
> @@ -1388,7 +1388,7 @@ static int sunxi_mmc_probe(struct platform_device *pdev)
> MMC_CAP_ERASE | MMC_CAP_SDIO_IRQ;
>
> if (host->cfg->clk_delays || host->use_new_timings)
> - mmc->caps |= MMC_CAP_1_8V_DDR;
> + mmc->caps |= MMC_CAP_1_8V_DDR | MMC_CAP_3_3V_DDR;
>
> ret = mmc_of_parse(mmc);
> if (ret)
> --
> 2.18.0
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html