From patchwork Mon Mar 26 17:59:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Tomsich X-Patchwork-Id: 891161 X-Patchwork-Delegate: philipp.tomsich@theobroma-systems.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=theobroma-systems.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40923F2ynsz9ryr for ; Tue, 27 Mar 2018 04:59:37 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 0DE5AC21F5B; Mon, 26 Mar 2018 17:59:28 +0000 (UTC) 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=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id E2C61C21E76; Mon, 26 Mar 2018 17:59:25 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 45BB2C21EA2; Mon, 26 Mar 2018 17:59:24 +0000 (UTC) Received: from mail.theobroma-systems.com (vegas.theobroma-systems.com [144.76.126.164]) by lists.denx.de (Postfix) with ESMTPS id E4F7BC21E76 for ; Mon, 26 Mar 2018 17:59:23 +0000 (UTC) Received: from [86.59.122.178] (port=37031 helo=android.lan) by mail.theobroma-systems.com with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA256:128) (Exim 4.80) (envelope-from ) id 1f0WOu-0000bl-IB; Mon, 26 Mar 2018 19:59:20 +0200 From: Philipp Tomsich To: u-boot@lists.denx.de Date: Mon, 26 Mar 2018 19:59:08 +0200 Message-Id: <1522087150-21556-2-git-send-email-philipp.tomsich@theobroma-systems.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1522087150-21556-1-git-send-email-philipp.tomsich@theobroma-systems.com> References: <1522087150-21556-1-git-send-email-philipp.tomsich@theobroma-systems.com> Cc: Klaus Goger , Jakob Unterwurzacher Subject: [U-Boot] [PATCH 1/3] rockchip: defconfig: puma-rk3399: enable DMA for SDHCI controller X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" For the RK3399-Q7, we have a fast eMMC connected in an 8 bit wide configuration to the SDHCI controller (sdhci@fe330000). Enable DMA within the SDHCI driver to get the best performance out of it. Signed-off-by: Philipp Tomsich --- configs/puma-rk3399_defconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/puma-rk3399_defconfig b/configs/puma-rk3399_defconfig index a8b4bac..32aa72c 100644 --- a/configs/puma-rk3399_defconfig +++ b/configs/puma-rk3399_defconfig @@ -56,6 +56,7 @@ CONFIG_ROCKCHIP_EFUSE=y CONFIG_MMC_DW=y CONFIG_MMC_DW_ROCKCHIP=y CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_SDMA=y CONFIG_MMC_SDHCI_ROCKCHIP=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_WINBOND=y From patchwork Mon Mar 26 17:59:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Tomsich X-Patchwork-Id: 891166 X-Patchwork-Delegate: philipp.tomsich@theobroma-systems.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=theobroma-systems.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40925p5KbQz9s0b for ; Tue, 27 Mar 2018 05:01:50 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 66092C21F84; Mon, 26 Mar 2018 18:00:18 +0000 (UTC) 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=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 04519C21F63; Mon, 26 Mar 2018 17:59:31 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 825BFC21E76; Mon, 26 Mar 2018 17:59:25 +0000 (UTC) Received: from mail.theobroma-systems.com (vegas.theobroma-systems.com [144.76.126.164]) by lists.denx.de (Postfix) with ESMTPS id 30D66C21D4A for ; Mon, 26 Mar 2018 17:59:25 +0000 (UTC) Received: from [86.59.122.178] (port=37031 helo=android.lan) by mail.theobroma-systems.com with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA256:128) (Exim 4.80) (envelope-from ) id 1f0WOv-0000bl-1q; Mon, 26 Mar 2018 19:59:21 +0200 From: Philipp Tomsich To: u-boot@lists.denx.de Date: Mon, 26 Mar 2018 19:59:09 +0200 Message-Id: <1522087150-21556-3-git-send-email-philipp.tomsich@theobroma-systems.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1522087150-21556-1-git-send-email-philipp.tomsich@theobroma-systems.com> References: <1522087150-21556-1-git-send-email-philipp.tomsich@theobroma-systems.com> Cc: Alexander Graf , Heinrich Schuchardt , Klaus Goger , Eugeniy Paltsev , Jakob Unterwurzacher Subject: [U-Boot] [PATCH 2/3] rockchip: mmc: update MAINTAINERS X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" The Rockchip-specific wrappers to the DW-MMC and the SDHCI driver were not covered as part of what's maintained by the architecture maintainers. Add them here. Signed-off-by: Philipp Tomsich --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 6c7f3ae..976341c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -159,6 +159,8 @@ F: board/rockchip/ F: drivers/clk/rockchip/ F: drivers/gpio/rk_gpio.c F: drivers/misc/rockchip-efuse.c +F: drivers/mmc/rockchip_sdhci.c +F: drivers/mmc/rockchip_dw_mmc.c F: drivers/pinctrl/rockchip/ F: drivers/ram/rockchip/ F: drivers/sysreset/sysreset_rockchip.c From patchwork Mon Mar 26 17:59:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Tomsich X-Patchwork-Id: 891164 X-Patchwork-Delegate: philipp.tomsich@theobroma-systems.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=theobroma-systems.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 40925H5z1lz9ryr for ; Tue, 27 Mar 2018 05:01:23 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 8C4C4C21E76; Mon, 26 Mar 2018 18:00:00 +0000 (UTC) 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=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id D17EEC21F1D; Mon, 26 Mar 2018 17:59:27 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id CE9A1C21D4A; Mon, 26 Mar 2018 17:59:24 +0000 (UTC) Received: from mail.theobroma-systems.com (vegas.theobroma-systems.com [144.76.126.164]) by lists.denx.de (Postfix) with ESMTPS id 900E8C21E76 for ; Mon, 26 Mar 2018 17:59:24 +0000 (UTC) Received: from [86.59.122.178] (port=37031 helo=android.lan) by mail.theobroma-systems.com with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA256:128) (Exim 4.80) (envelope-from ) id 1f0WOv-0000bl-JP; Mon, 26 Mar 2018 19:59:21 +0200 From: Philipp Tomsich To: u-boot@lists.denx.de Date: Mon, 26 Mar 2018 19:59:10 +0200 Message-Id: <1522087150-21556-4-git-send-email-philipp.tomsich@theobroma-systems.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1522087150-21556-1-git-send-email-philipp.tomsich@theobroma-systems.com> References: <1522087150-21556-1-git-send-email-philipp.tomsich@theobroma-systems.com> Cc: Klaus Goger , Jakob Unterwurzacher Subject: [U-Boot] [PATCH 3/3] rockchip: sdhci: support 8bit bus-width X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" The Rockchip-specific SDHCI wrapper does not process the 'bus-width' property in the SDHCI node. Consequently, the bus is always kept in 4bit mode, even if 8bit wide operation is available, supported and requested in the DTS. This change adds processing of the 'bus-width' property and sets the host capability flag for an 8bit wide bus, if set to 8. As the logic in sdhci.c does not support clearing the 4bit capability, we assume that 4bit operation is always supported. Signed-off-by: Philipp Tomsich --- drivers/mmc/rockchip_sdhci.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/mmc/rockchip_sdhci.c b/drivers/mmc/rockchip_sdhci.c index be6edb2..ab89be4 100644 --- a/drivers/mmc/rockchip_sdhci.c +++ b/drivers/mmc/rockchip_sdhci.c @@ -62,6 +62,13 @@ static int arasan_sdhci_probe(struct udevice *dev) host->quirks = SDHCI_QUIRK_WAIT_SEND_CMD; host->max_clk = max_frequency; + /* + * The sdhci-driver only supports 4bit and 8bit, as sdhci_setup_cfg + * doesn't allow us to clear MMC_MODE_4BIT. Consequently, we don't + * check for other bus-width values. + */ + if (host->bus_width == 8) + host->host_caps |= MMC_MODE_8BIT; ret = sdhci_setup_cfg(&plat->cfg, host, 0, EMMC_MIN_FREQ); @@ -82,6 +89,7 @@ static int arasan_sdhci_ofdata_to_platdata(struct udevice *dev) host->name = dev->name; host->ioaddr = dev_read_addr_ptr(dev); + host->bus_width = dev_read_u32_default(dev, "bus-width", 4); #endif return 0;