From patchwork Tue Jun 4 08:14:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "\(Exiting\) Baolin Wang" X-Patchwork-Id: 165709 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp5522982ili; Tue, 4 Jun 2019 01:14:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqxFSALpZrjYExnDDIcq7CFB2cxoaemhUx0kv3s/a5VjF6fwl5wAsEb9s2+GJ6DEDRqVML31 X-Received: by 2002:a17:902:9a06:: with SMTP id v6mr18595485plp.71.1559636094759; Tue, 04 Jun 2019 01:14:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559636094; cv=none; d=google.com; s=arc-20160816; b=CJsoXfc6pGApezIBkgTXceR+tIm0j2HgjVf1WQmCU7YFn9JCF8oFUCKCQ1+EWArffn sxNZ2Gxm4Cs5rLy5fVXRgZfCA/sakJdlhmAWmtNkY/gqqNHMWXnQAkktAHRh3/R+CAv7 pfa9eE2Uw0tMqje/UCglRvEO36bUeKfuBamVAfCHm3fQxpylntg/OknXisgqMfC95/J5 A2OgoVrC4bZp5d75PwNnt9FSmPrGug4kcXQKwgYyOowGQBwj5nLMHGUDq5vn/G3iABBC 2VcZR8lyjYeRrD+Q0cQ0SGDv5zYvrWnAkBo5hxVY3LoLUjfMItZI2avB0PP09wyhKOA+ SQfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=tvMJ5s9gExvOA7lMPut++cP3zHcPvryLWLVuc4mHs3M=; b=nq43qEPUyforrp2Nl2WYAJ4AmxJ8ebezDI4XtWsQ3xSK6Ahrv5ld62pU5zR9r9AU78 FpFzgNnQO8/EzwxdXvdI+rjo90x0feZmvD+1Hq0vKaNo0mOrYKbik3sPeRcfpGQMSz+a AxNk3GY2ethEHjdFYXS3q174wFDath13XvE6XRNrUTg7P0uKfRrQGiLCz/USuoiUeUVy jeUlmYCyoj32LlM5BwtS3igZxzzyGwIVR0dSinmXtSMwKurn/Ia7QknW4BOpJTBtRQ6L qRiSsrCzJ4oe1ggWx47j/YbfUxV+Rq+pLvFPEtzS+Mvf3fqs1dsHBuO03iXplowxWU5b STdQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KvCoOxV2; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e96si22887822plb.123.2019.06.04.01.14.54; Tue, 04 Jun 2019 01:14:54 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=KvCoOxV2; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726980AbfFDIOy (ORCPT + 7 others); Tue, 4 Jun 2019 04:14:54 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:45711 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726964AbfFDIOx (ORCPT ); Tue, 4 Jun 2019 04:14:53 -0400 Received: by mail-pf1-f196.google.com with SMTP id s11so12198490pfm.12 for ; Tue, 04 Jun 2019 01:14:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=tvMJ5s9gExvOA7lMPut++cP3zHcPvryLWLVuc4mHs3M=; b=KvCoOxV2rRHo0LP8pHEGJKzTvkI2+KlTgGiFKUOXH1jmu0LkQFTIONu+GiJg50suqZ JdNVybOqlsfUGfx1mhiI2TS+zH2KLWFXdBS3LLxm8xLhFU3eGNeI6zNvWmmqeWjytp5Y 42gcvY0eJ1ul3Rn/5joOnaJZP7ozr6Y7K59xNy9vWZpUXARufZCxqXgNfpJzx/8WS7H3 NwWpPhg4ROVRzKll5FlPSOfHhuB26wbtju1fX9bkRpOkQgecgke3eOQmCZZnsJ0x/XOM SUjWi2fXYc2UWco7WrnJfyA9cyRnPH5v8KnKBromZG8cE2HtOS758i5ajacD+nXKM/QQ 6zSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=tvMJ5s9gExvOA7lMPut++cP3zHcPvryLWLVuc4mHs3M=; b=Nn9/Sj3q7zZ/cPxf082BrE/VVALygHEb3BUVLSmr7+qgA+YPh4fVSB6bVnawyDLkF2 MK6FI8yPLu7yN6r4G263N81f0bS2dEEXFX8M0jspPj7h7bIibLF0h8/cZLwEweB7G5Yw DfsNPyi9+ffa32acwq+efJcs3Ldn4sQSvWfIwd8vAIaw1BC8bbgxlUzif7VokU1pEJAI Zt+982ozNyh4LX2y50mfWSYKiyRV7OLvq6tbexJwedaa6ZCXXGcWRf5x9sizLS5CExvL JhSto8tHUYFc47+owGQ6qOhLxMrqmnk+9OuFOgiVTY3KVdflrWnltOVWpXnpyyvRY7Yo WnFg== X-Gm-Message-State: APjAAAWIzMd0jBSEFRoqma3CdznTp0uWywOpHR7EUV1NP861ZaBPw3mu cmeQlJa3f+YjXLp+ti6kBfgoSQbmazhkPg== X-Received: by 2002:aa7:8ece:: with SMTP id b14mr27207253pfr.244.1559636093172; Tue, 04 Jun 2019 01:14:53 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id j4sm14818804pgc.56.2019.06.04.01.14.48 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 04 Jun 2019 01:14:52 -0700 (PDT) From: Baolin Wang To: adrian.hunter@intel.com, ulf.hansson@linaro.org, zhang.lyra@gmail.com, orsonzhai@gmail.com, robh+dt@kernel.org, mark.rutland@arm.com, arnd@arndb.de, olof@lixom.net Cc: baolin.wang@linaro.org, vincent.guittot@linaro.org, arm@kernel.org, linux-arm-kernel@lists.infradead.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v2 1/9] mmc: sdhci-sprd: Check the enable clock's return value correctly Date: Tue, 4 Jun 2019 16:14:21 +0800 Message-Id: <9c76f06c8ba1762c9706f2c20878bf39d46370dc.1559635435.git.baolin.wang@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Missed to check the enable clock's return value, fix it. Signed-off-by: Baolin Wang Acked-by: Adrian Hunter --- drivers/mmc/host/sdhci-sprd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 1.7.9.5 diff --git a/drivers/mmc/host/sdhci-sprd.c b/drivers/mmc/host/sdhci-sprd.c index 9a822e2..e741491 100644 --- a/drivers/mmc/host/sdhci-sprd.c +++ b/drivers/mmc/host/sdhci-sprd.c @@ -368,7 +368,7 @@ static int sdhci_sprd_probe(struct platform_device *pdev) if (ret) goto pltfm_free; - clk_prepare_enable(sprd_host->clk_enable); + ret = clk_prepare_enable(sprd_host->clk_enable); if (ret) goto clk_disable; From patchwork Tue Jun 4 08:14:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "\(Exiting\) Baolin Wang" X-Patchwork-Id: 165713 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp5523290ili; Tue, 4 Jun 2019 01:15:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqyUWcbQw+RQMqvTQ4gASz03LtPRKYixHP5Y9Ui6Nb7+SR6PVKWmrnaydIUdt/PicB6az4c/ X-Received: by 2002:aa7:8dd6:: with SMTP id j22mr37765723pfr.192.1559636115412; Tue, 04 Jun 2019 01:15:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559636115; cv=none; d=google.com; s=arc-20160816; b=c/4+H7pr4QjknQi1Guya1YDo71Nn1cxwefpiY8jGG6oyMdX5ftio/VZ+HEpP8bV//T ylgR+t4Tow78OHm82gADC/bS/5LBGSQwxunu9x19gaHv2vr4Wxlid3w1Cro5n7vj5omM 6z4rlMdjLyLyC1gxzFatpw5fIyeyFrQJfZHl1Vl3bT8iIHtAkZE+MHKDobzBMeyQ2Q29 IkevclgYjcjN53DgNxz3EI7Xu1nXXmp/+y6pFlSEM8uzzSioUZKZr57QOMAscUxAhKKn oOlteyDOm/7pc1HT5DaLVEEcK40sY5J5lOg9Vpe4UUTn7WwAsy9zjpH4arIkEMOcjKNj UzrA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=1vxV7xw/5L8i8m4bOyu5pRBcqwZ6n7yFKBRMfko8eAg=; b=uPaBIUhan446MuusKS+w2DpPQGP62FLVlERJV6RAHHimpy8Rolywb/JubVVXwQq54r Jr7jywKOiR7BW4SC6QGoYJTf++kUc1uo762dltSLCudLQQKZjOIWfEZa2+4Dvpi6JACl JfnSvnTTEmtnuPX1/cpcfUP625DWrrM6Ttgbms9OI572+r3zmRBYoGR4zaWE7oW/N8uB Nf25GXATM+QPXiF43N17d6XwuM31Adqek+KPuzRD2j3DpnfPBF5ZZBktdkymBqCPEBxP hjhtiBPSsaU0udawDBFekON5kJDFTF5YowaSTre/Hn/rqr5Fv2U4YGZEINxYTlDyEYtI HHIQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="yF/IS8w7"; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g12si19304023pla.322.2019.06.04.01.15.15; Tue, 04 Jun 2019 01:15:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="yF/IS8w7"; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727083AbfFDIPO (ORCPT + 7 others); Tue, 4 Jun 2019 04:15:14 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:43608 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727091AbfFDIPM (ORCPT ); Tue, 4 Jun 2019 04:15:12 -0400 Received: by mail-pl1-f193.google.com with SMTP id cl9so2929905plb.10 for ; Tue, 04 Jun 2019 01:15:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=1vxV7xw/5L8i8m4bOyu5pRBcqwZ6n7yFKBRMfko8eAg=; b=yF/IS8w7PJss7KY8M0Wgdbhr4VXw0eZdXylHTkYXpnzppT6cn89MSsaQKKrjC+DtQN 1GtV+NlutX5shDQlf1LrHQXLzThmo4n0NLbMGxqY8RmRnIiR6hfvu8BJoPrg/+oUZHxB +S7jPtfHSDhI+jm1xYZlszQMW6y3F3wkCVj1Hun96siKj9lKc/AhwLiKhSEEM/la8VKX /dexH7LLGORAMf8idnkuxH74+l9ygl2Kvoz/7surXaj1r61Kubiw+dqSgEGF2t3/gI7E zvccHnVXEs90BwkkWUltHssENapZM1r1qHYnT69sGzuHWmyUp9oo0FJhRwKFmJ0zJhcL 3ifQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=1vxV7xw/5L8i8m4bOyu5pRBcqwZ6n7yFKBRMfko8eAg=; b=IBkvHv/4KPcvzJ3V+Gc2fpamd27gRGblTsf4naqKGXvQrGEOVUv5ejUEAFfwRGmiu2 1f71Yixx3HemBsH2Z3w/CKqWfliixuMMzs7N+zrRxAQW0dWNwQjvD//SqqK4dHpfpNOF pLzDbwhoWuSk1X4llPxwGbNEGSLk+usDOxMMJXSDYPd7SnSEmqj8w+YPz64iFzm/xQ5E mBfshwahjJ+Abr+NkaqpEmgFASFKrQPeqFUJK7Ag0e8wlJEzY600QJY48mYADiALOYtG zfRTF2nI0pa2zE4gJd6M7nZw6+cb3cTEwLVSgGopafsgcxGYpgKWDby0N7sKoXJrFd5D d7fQ== X-Gm-Message-State: APjAAAV4xUQbHKDzjE9PqYri3XBFKgkMeszeLqb9cu4YKE9BIsNslQa5 s3WyHjpTWJkVSP7F2lXhNNd+sg== X-Received: by 2002:a17:902:aa0a:: with SMTP id be10mr27683709plb.27.1559636112034; Tue, 04 Jun 2019 01:15:12 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id j4sm14818804pgc.56.2019.06.04.01.15.07 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 04 Jun 2019 01:15:11 -0700 (PDT) From: Baolin Wang To: adrian.hunter@intel.com, ulf.hansson@linaro.org, zhang.lyra@gmail.com, orsonzhai@gmail.com, robh+dt@kernel.org, mark.rutland@arm.com, arnd@arndb.de, olof@lixom.net Cc: baolin.wang@linaro.org, vincent.guittot@linaro.org, arm@kernel.org, linux-arm-kernel@lists.infradead.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v2 5/9] mmc: sdhci-sprd: Add HS400 enhanced strobe mode Date: Tue, 4 Jun 2019 16:14:25 +0800 Message-Id: X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add HS400 enhanced strobe mode support for Spreadtrum SD host controller. Signed-off-by: Baolin Wang Acked-by: Adrian Hunter --- drivers/mmc/host/sdhci-sprd.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) -- 1.7.9.5 diff --git a/drivers/mmc/host/sdhci-sprd.c b/drivers/mmc/host/sdhci-sprd.c index d91281d..edec197 100644 --- a/drivers/mmc/host/sdhci-sprd.c +++ b/drivers/mmc/host/sdhci-sprd.c @@ -41,6 +41,7 @@ /* SDHCI_HOST_CONTROL2 */ #define SDHCI_SPRD_CTRL_HS200 0x0005 #define SDHCI_SPRD_CTRL_HS400 0x0006 +#define SDHCI_SPRD_CTRL_HS400ES 0x0007 /* * According to the standard specification, BIT(3) of SDHCI_SOFTWARE_RESET is @@ -132,6 +133,15 @@ static inline void sdhci_sprd_sd_clk_off(struct sdhci_host *host) sdhci_writew(host, ctrl, SDHCI_CLOCK_CONTROL); } +static inline void sdhci_sprd_sd_clk_on(struct sdhci_host *host) +{ + u16 ctrl; + + ctrl = sdhci_readw(host, SDHCI_CLOCK_CONTROL); + ctrl |= SDHCI_CLOCK_CARD_EN; + sdhci_writew(host, ctrl, SDHCI_CLOCK_CONTROL); +} + static inline void sdhci_sprd_set_dll_invert(struct sdhci_host *host, u32 mask, bool en) { @@ -325,6 +335,26 @@ static void sdhci_sprd_request(struct mmc_host *mmc, struct mmc_request *mrq) sdhci_request(mmc, mrq); } +static void sdhci_sprd_hs400_enhanced_strobe(struct mmc_host *mmc, + struct mmc_ios *ios) +{ + struct sdhci_host *host = mmc_priv(mmc); + u16 ctrl_2; + + if (!ios->enhanced_strobe) + return; + + sdhci_sprd_sd_clk_off(host); + + /* Set HS400 enhanced strobe mode */ + ctrl_2 = sdhci_readw(host, SDHCI_HOST_CONTROL2); + ctrl_2 &= ~SDHCI_CTRL_UHS_MASK; + ctrl_2 |= SDHCI_SPRD_CTRL_HS400ES; + sdhci_writew(host, ctrl_2, SDHCI_HOST_CONTROL2); + + sdhci_sprd_sd_clk_on(host); +} + static const struct sdhci_pltfm_data sdhci_sprd_pdata = { .quirks = SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK, .quirks2 = SDHCI_QUIRK2_BROKEN_HS200 | @@ -346,6 +376,8 @@ static int sdhci_sprd_probe(struct platform_device *pdev) host->dma_mask = DMA_BIT_MASK(64); pdev->dev.dma_mask = &host->dma_mask; host->mmc_host_ops.request = sdhci_sprd_request; + host->mmc_host_ops.hs400_enhanced_strobe = + sdhci_sprd_hs400_enhanced_strobe; host->mmc->caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED | MMC_CAP_ERASE | MMC_CAP_CMD23; From patchwork Tue Jun 4 08:14:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "\(Exiting\) Baolin Wang" X-Patchwork-Id: 165715 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp5523441ili; Tue, 4 Jun 2019 01:15:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqwUaE1mQKp0DDeCHJCR9fZD+d50GphZEu4yAkY6tHHNwcfnxi8Ke3ya0K2umAibWg94CboR X-Received: by 2002:a63:231d:: with SMTP id j29mr32772222pgj.278.1559636123652; Tue, 04 Jun 2019 01:15:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559636123; cv=none; d=google.com; s=arc-20160816; b=BoMyEQpTaldk6n0U/eQTi3KWtEkUEW90A4ZqLOQUVKD8hnbnWAsy9V+ntGlTnhobxk PjW0obEmyqSadfJnlT8ywBUOwERDMmHrAt0nFdcl5LrrG2meEUATki8K9eyHx13Q5vMs JhC7zoLYQP1CPaTjuEzqO15wO3+qVtncTOZ7UUv6V27dpnGN7gKDO+bW9QTgu+uLe9iF yK5x+vYE9ct6CioJ/YpVpdAsEu1A5JD/MqZT+f6Pb+/3RxSA3htjFGyqRwO//H/rXnOh IiBI18K8LBFuSsbVoyUbYiwHvu96Ay+wPS/K5IbO2n23Zdo6XzNBkNtIhS+4bBMyOn9c BwKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=psGipp4xyvA6ITMw9MQePCESgWaNPblRsxWV83tCX+4=; b=B9WFPcV19RUGMJ6yBWsSCBmNkwma/h87LxF2lOrkJNfrd7Vs3RNWAUAUWM1Cf1BMSz QHydywsXSL7ajzcH8zBw87vfQO1DdBLDpdu03uQoWoxm1dT8GHo2eUIf5k1wWd9RpDyt Xmsyp9xAGz5240beFxszaHlukoT5EQmkQLn/a408BVXMzHXpuBUacBpOjF0povkuOswc eD8YnFzZyy8hmcEmiI7dV+C7OZBiyZq7cVFFFSugQC+368MPBDFbWTdQ9wc1TtpWcu1B EympAr5zn9KEPtB0m79UIJQ1KMisxw7wMvzL60UfeEgSRYK2HttEpNUZGeZmpJej80+D wXnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Rk1RfYD3; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v19si22021193plo.413.2019.06.04.01.15.23; Tue, 04 Jun 2019 01:15:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Rk1RfYD3; spf=pass (google.com: best guess record for domain of devicetree-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727183AbfFDIPW (ORCPT + 7 others); Tue, 4 Jun 2019 04:15:22 -0400 Received: from mail-pf1-f194.google.com ([209.85.210.194]:39421 "EHLO mail-pf1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726819AbfFDIPV (ORCPT ); Tue, 4 Jun 2019 04:15:21 -0400 Received: by mail-pf1-f194.google.com with SMTP id j2so12213053pfe.6 for ; Tue, 04 Jun 2019 01:15:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=psGipp4xyvA6ITMw9MQePCESgWaNPblRsxWV83tCX+4=; b=Rk1RfYD3O1B47PXjsboBmdlUBgc8lREPnmsvxmlZ4K8tbkh9XtlFbnik9hg4P56Aue vqCyok4QonGQdHkxZSSuuFS6jhSm/NPbnnsrHIUNGu0BDi0lEwrpQqGPtV9+JT6czANw n6jjOqhPttUEOa8TtLKAQ9Eak8U0r9YB6rMRVZz+D4bWe6j738SSpVm3TR3OKtR/ICwX FtnPJSEFPw9flefbuW7WCJ+xLAqJTcCte3FVf3L/rqnX2mYXrYhElN0tb0xYCnYU//c2 z1JGQfgT7b6nq/Z1fc3StiLbNMErzmcJ2zLaSjcx8Rswz5rPxDpQl1VFS2Oqjd5LnE6A 4nwA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=psGipp4xyvA6ITMw9MQePCESgWaNPblRsxWV83tCX+4=; b=LPz6hXgsTDzQ9TwkfkcqTJ5rEwWXoFw4rQOqOlFEN4qdbUgg+o+DrNFd9uPgSwbQFK 4MA4RgwY6fJS2tMfHPvy55QGi/Ur5pwUoTGo8NIxL44zZ0vGlYcdN5fMGA23XnVp4tTb Gn8+fCTTBcD/VwBt8v5hsWpOgh0oK7ilz8BBozxf8DcxYl7AqRyBX/dvi7PS5b0DaKhs fpWVW/Sz6NALmK4DmQNv58H+6lEnmZAhUSYhA9uW3j93RvEQqae9PLF9l0FHQe21H60H zKJq3XKlhNSXNOWuEFhkvjc4Y8jSuQAAke8B9xwOeUa6gWIBN3WK+b5EMQ4X5oSO/A/A Rsaw== X-Gm-Message-State: APjAAAXGLC+dDsD8Xye3gLoWGTRK661DdvIDBUd6g7RDVe8Pclx2wJfq wBuJBiIAZr4y7JGBJBU984Emrw== X-Received: by 2002:a63:70f:: with SMTP id 15mr17140238pgh.432.1559636120682; Tue, 04 Jun 2019 01:15:20 -0700 (PDT) Received: from baolinwangubtpc.spreadtrum.com ([117.18.48.82]) by smtp.gmail.com with ESMTPSA id j4sm14818804pgc.56.2019.06.04.01.15.16 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 04 Jun 2019 01:15:20 -0700 (PDT) From: Baolin Wang To: adrian.hunter@intel.com, ulf.hansson@linaro.org, zhang.lyra@gmail.com, orsonzhai@gmail.com, robh+dt@kernel.org, mark.rutland@arm.com, arnd@arndb.de, olof@lixom.net Cc: baolin.wang@linaro.org, vincent.guittot@linaro.org, arm@kernel.org, linux-arm-kernel@lists.infradead.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v2 7/9] dt-bindings: mmc: sprd: Add PHY DLL delay documentation Date: Tue, 4 Jun 2019 16:14:27 +0800 Message-Id: <6caaa6afd1b69fc491c36c665a954becb50d616b.1559635435.git.baolin.wang@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: In-Reply-To: References: Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Introduce some PHY DLL delays properties to help to sample the PHY clock. Signed-off-by: Baolin Wang --- .../devicetree/bindings/mmc/sdhci-sprd.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) -- 1.7.9.5 diff --git a/Documentation/devicetree/bindings/mmc/sdhci-sprd.txt b/Documentation/devicetree/bindings/mmc/sdhci-sprd.txt index a285c77..e675397 100644 --- a/Documentation/devicetree/bindings/mmc/sdhci-sprd.txt +++ b/Documentation/devicetree/bindings/mmc/sdhci-sprd.txt @@ -20,6 +20,23 @@ Optional properties: - assigned-clocks: the same with "sdio" clock - assigned-clock-parents: the default parent of "sdio" clock +PHY DLL delays are used to delay the data valid window, and align the window +to sampling clock. PHY DLL delays can be configured by following properties, +and each property contains 4 cells which are used to configure the clock data +write line delay value, clock read command line delay value, clock read data +positive edge delay value and clock read data negative edge delay value. +Each cell's delay value unit is cycle of the PHY clock. + +- sprd,phy-delay-legacy: Delay value for legacy timing. +- sprd,phy-delay-sd-highspeed: Delay value for SD high-speed timing. +- sprd,phy-delay-sd-uhs-sdr50: Delay value for SD UHS SDR50 timing. +- sprd,phy-delay-sd-uhs-sdr104: Delay value for SD UHS SDR50 timing. +- sprd,phy-delay-mmc-highspeed: Delay value for MMC high-speed timing. +- sprd,phy-delay-mmc-ddr52: Delay value for MMC DDR52 timing. +- sprd,phy-delay-mmc-hs200: Delay value for MMC HS200 timing. +- sprd,phy-delay-mmc-hs400: Delay value for MMC HS400 timing. +- sprd,phy-delay-mmc-hs400es: Delay value for MMC HS400 enhanced strobe timing. + Examples: sdio0: sdio@20600000 { @@ -33,6 +50,7 @@ sdio0: sdio@20600000 { assigned-clocks = <&ap_clk CLK_EMMC_2X>; assigned-clock-parents = <&rpll CLK_RPLL_390M>; + sprd,phy-delay-sd-uhs-sdr104 = <0x3f 0x7f 0x2e 0x2e>; bus-width = <8>; non-removable; no-sdio;