151d401
From patchwork Sun Jul 22 12:54:07 2018
151d401
Content-Type: text/plain; charset="utf-8"
151d401
MIME-Version: 1.0
151d401
Content-Transfer-Encoding: 7bit
151d401
X-Patchwork-Submitter: Icenowy Zheng <icenowy@aosc.io>
151d401
X-Patchwork-Id: 10539291
151d401
Return-Path: <linux-mmc-owner@kernel.org>
151d401
Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org
151d401
 [172.30.200.125])
151d401
	by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 86834112B
151d401
	for <patchwork-linux-mmc@patchwork.kernel.org>;
151d401
 Sun, 22 Jul 2018 12:54:34 +0000 (UTC)
151d401
Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1])
151d401
	by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 684332808F
151d401
	for <patchwork-linux-mmc@patchwork.kernel.org>;
151d401
 Sun, 22 Jul 2018 12:54:34 +0000 (UTC)
151d401
Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486)
151d401
	id 5959228372; Sun, 22 Jul 2018 12:54:34 +0000 (UTC)
151d401
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
151d401
	pdx-wl-mail.web.codeaurora.org
151d401
X-Spam-Level: 
151d401
X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI,
151d401
	RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1
151d401
Received: from vger.kernel.org (vger.kernel.org [209.132.180.67])
151d401
	by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F3C822808F
151d401
	for <patchwork-linux-mmc@patchwork.kernel.org>;
151d401
 Sun, 22 Jul 2018 12:54:33 +0000 (UTC)
151d401
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
151d401
        id S1728446AbeGVNvI (ORCPT
151d401
        <rfc822;patchwork-linux-mmc@patchwork.kernel.org>);
151d401
        Sun, 22 Jul 2018 09:51:08 -0400
151d401
Received: from hermes.aosc.io ([199.195.250.187]:56330 "EHLO hermes.aosc.io"
151d401
        rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
151d401
        id S1728438AbeGVNvI (ORCPT <rfc822;linux-mmc@vger.kernel.org>);
151d401
        Sun, 22 Jul 2018 09:51:08 -0400
151d401
Received: from localhost (localhost [127.0.0.1]) (Authenticated sender:
151d401
 icenowy@aosc.io)
151d401
        by hermes.aosc.io (Postfix) with ESMTPSA id 04DFE9F3AA;
151d401
        Sun, 22 Jul 2018 12:54:27 +0000 (UTC)
151d401
From: Icenowy Zheng <icenowy@aosc.io>
151d401
To: Ulf Hansson <ulf.hansson@linaro.org>,
151d401
        Maxime Ripard <maxime.ripard@bootlin.com>,
151d401
        Chen-Yu Tsai <wens@csie.org>
151d401
Cc: linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
151d401
        linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com,
151d401
        Icenowy Zheng <icenowy@aosc.io>
151d401
Subject: [PATCH] mmc: sunxi: allow 3.3V DDR when DDR is available
151d401
Date: Sun, 22 Jul 2018 20:54:07 +0800
151d401
Message-Id: <20180722125407.43107-1-icenowy@aosc.io>
151d401
Sender: linux-mmc-owner@vger.kernel.org
151d401
Precedence: bulk
151d401
List-ID: <linux-mmc.vger.kernel.org>
151d401
X-Mailing-List: linux-mmc@vger.kernel.org
151d401
X-Virus-Scanned: ClamAV using ClamSMTP
151d401
151d401
Some Allwinner boards feature an on-board eMMC with fixed 3.3V voltage
151d401
(e.g. Banana Pi M2+), and in this case both the eMMC and the SoC are
151d401
capable of doing 3.3V DDR transmission.
151d401
151d401
Add capability of 3.3V DDR when DDR is available (extra clock or new
151d401
timing).
151d401
151d401
Signed-off-by: Icenowy Zheng <icenowy@aosc.io>
151d401
Acked-by: Maxime Ripard <maxime.ripard@bootlin.com>
151d401
---
151d401
 drivers/mmc/host/sunxi-mmc.c | 2 +-
151d401
 1 file changed, 1 insertion(+), 1 deletion(-)
151d401
151d401
diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c
151d401
index 8e7f3e35ee3d..4ea8e2611079 100644
151d401
--- a/drivers/mmc/host/sunxi-mmc.c
151d401
+++ b/drivers/mmc/host/sunxi-mmc.c
151d401
@@ -1388,7 +1388,7 @@ static int sunxi_mmc_probe(struct platform_device *pdev)
151d401
 				  MMC_CAP_ERASE | MMC_CAP_SDIO_IRQ;
151d401
 
151d401
 	if (host->cfg->clk_delays || host->use_new_timings)
151d401
-		mmc->caps      |= MMC_CAP_1_8V_DDR;
151d401
+		mmc->caps      |= MMC_CAP_1_8V_DDR | MMC_CAP_3_3V_DDR;
151d401
 
151d401
 	ret = mmc_of_parse(mmc);
151d401
 	if (ret)