From patchwork Thu Sep 10 10:54:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jeffery X-Patchwork-Id: 295388 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 45854C43461 for ; Thu, 10 Sep 2020 11:00:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CB8CF20C09 for ; Thu, 10 Sep 2020 11:00:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=aj.id.au header.i=@aj.id.au header.b="arHubH2L"; dkim=temperror (0-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="JmXCTbHa" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730449AbgIJK7j (ORCPT ); Thu, 10 Sep 2020 06:59:39 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:52467 "EHLO out4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730312AbgIJKy4 (ORCPT ); Thu, 10 Sep 2020 06:54:56 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 3A21E5C10C4; Thu, 10 Sep 2020 06:54:55 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Thu, 10 Sep 2020 06:54:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aj.id.au; h=from :to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm3; bh=f4VdJeRI0UCiq PdXh4f/FQzWUUOhHo9nR21AJ+6YsDk=; b=arHubH2L2KBiTXNVUo3PegTxuNBPJ Tl8pr+vwFnoOGAelQoIr6qsaOeVYjvh/XYanZ2fmHx8c2AFPKYUv6dssDyv2VkIY 8jC0sDOmw1CI6G1Gza/0SHAPXx/9SpnGzv5g4NMiXzOk4Anm9ZbfJYnpfz+Eyr76 202p5s93JvZzdTwLoLfYVFHKVRVVYEukGa8Tz8oP9nf/IwBl31T6Xl3APVvT2ov0 UDKYIcbQHm6mHQPPq/KAutPMoCRWKJUkJhDgKpnlwp7ZQ8TOTSrt9jJeNFsI2Qu8 0ZVxXPNSMHXI5hjHmH+neGzXQUiksk4sByBrr7e0ECNWSCLz0ljBgcYAw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=f4VdJeRI0UCiqPdXh4f/FQzWUUOhHo9nR21AJ+6YsDk=; b=JmXCTbHa /9ICQ2jVjnKTg32/593Nhf8i5blW8TfQED872BKJsP/c/Bkm9gWi3iqDhrGhP4Y7 MlgIrtv2gyOURGnWIMF8pS3qAO4jrttEb3L8OQnJk0MEw0E8celcKXZ+MfmhcIkg yanrYxLJ+GBQkacA4g2zWZneGzGCYAK3gZjVsrNSrTd/T6R+b1qPfGRRrW/hV/q7 Z9Ogc5HkgcbxqKEZRTHpReH5aaMNQ+ziui+ofjns0M2cRj3mGVcOumakxYV/7jiu tCmkWohFVI481das5+jPqY3hBlTnOill0JqvA9Joey6scU6GiT0Nj/x2I0lraiyh ZTHG3nJEE8q3tg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrudehjedgvdejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomheptehnughrvgifucflvghffhgvrhihuceorghnughrvgifsegr jhdrihgurdgruheqnecuggftrfgrthhtvghrnhepjefgvdevheetkeevgeegleelgfelte etjeffleffvdduudevieffgeetleevhfetnecukfhppedugedrvddruddtledrkeehnecu vehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghnughrvg ifsegrjhdrihgurdgruh X-ME-Proxy: Received: from localhost.localdomain (ppp14-2-109-85.adl-apt-pir-bras32.tpg.internode.on.net [14.2.109.85]) by mail.messagingengine.com (Postfix) with ESMTPA id 35C81306467D; Thu, 10 Sep 2020 06:54:51 -0400 (EDT) From: Andrew Jeffery To: linux-mmc@vger.kernel.org Cc: adrian.hunter@intel.com, ulf.hansson@linaro.org, joel@jms.id.au, robh+dt@kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] dt: bindings: mmc: Add phase control properties for the Aspeed SDHCI Date: Thu, 10 Sep 2020 20:24:38 +0930 Message-Id: <20200910105440.3087723-2-andrew@aj.id.au> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200910105440.3087723-1-andrew@aj.id.au> References: <20200910105440.3087723-1-andrew@aj.id.au> MIME-Version: 1.0 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org Add properties to control the phase delay for input and output data sampling. Signed-off-by: Andrew Jeffery --- Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml b/Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml index 987b287f3bff..75effd411554 100644 --- a/Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml +++ b/Documentation/devicetree/bindings/mmc/aspeed,sdhci.yaml @@ -61,6 +61,14 @@ patternProperties: sdhci,auto-cmd12: type: boolean description: Specifies that controller should use auto CMD12 + "aspeed,input-phase": + $ref: '/schemas/types.yaml#/definitions/uint32' + description: + The input clock phase delay value. + "aspeed,output-phase": + $ref: '/schemas/types.yaml#/definitions/uint32' + description: + The output clock phase delay value. required: - compatible - reg From patchwork Thu Sep 10 10:54:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jeffery X-Patchwork-Id: 295389 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A2C10C43461 for ; Thu, 10 Sep 2020 10:58:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 410D42145D for ; Thu, 10 Sep 2020 10:58:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=aj.id.au header.i=@aj.id.au header.b="mL8RVif4"; dkim=temperror (0-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="apAmQtO0" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730635AbgIJK47 (ORCPT ); Thu, 10 Sep 2020 06:56:59 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:50435 "EHLO out4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730547AbgIJKzA (ORCPT ); Thu, 10 Sep 2020 06:55:00 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id B70615C10CE; Thu, 10 Sep 2020 06:54:58 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Thu, 10 Sep 2020 06:54:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aj.id.au; h=from :to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm3; bh=b39hUoDApUyJA sbeVSdyaxD9TS5GPbpLnEK8vl0nBW0=; b=mL8RVif4AlcH7g62bVChFe9+3EHaU hfOR3CuxTrbpgVHX8RdVchbQ2i68oD+038UHyJ8fgFPehxpzmg8rUCUUGkI3/uAw kk7AosWdq80dwo4wYk5TUt3tJkOhG7Kz8piQky+prycD6uoap/2QTwc53ujk5RaU SQjtAV5Cel4gT1apqujstWcZzqjwSkRcEqICjK7U9VeHx3rKvupwFckXVmK41U3U Q8ncF+ArqlN3QfbqGhuVOi6jPJElNVuUQjrZM2jXUSggQL8SrRzBfdpMrQurwsbQ KsUK9Mb7y8V/4dm9Y9+6xA94zXfJqkk3/rW8ATwa5ytI0uBjKS0Fsj9AQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=b39hUoDApUyJAsbeVSdyaxD9TS5GPbpLnEK8vl0nBW0=; b=apAmQtO0 iDUFkxg6MPUCP3N7fSNcfLzF0zR7fAbNkCkMOIgY0fRPOKO0PUsfHkkPkF3Eg69W Tr8rYK28OiAYTHYVJDDlXdhL+c+1gEULoqcKnARc/wnEHI7VuKXsPbQn8zOTxlW7 F9RtXYCRJ/UOG7BL5D07zfVXGLIX26cQgPH2hABGt7gb8NB6wFbygky8D98uf4WQ 3SAbWNE5NsbJ7OSvqGyEmZIKP9Urr880UD6MErXnLymb8vKNn1zuI1WHv2x7URjF R/VRXFPmKknHYCvhk3DU5Fpz3/bmE3Aoq/OAXKjlURBSkqmQGfQdR7eREmfyu+0s lOVjQ5Z1oepqYg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrudehjedgvdejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomheptehnughrvgifucflvghffhgvrhihuceorghnughrvgifsegr jhdrihgurdgruheqnecuggftrfgrthhtvghrnhepjefgvdevheetkeevgeegleelgfelte etjeffleffvdduudevieffgeetleevhfetnecukfhppedugedrvddruddtledrkeehnecu vehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghnughrvg ifsegrjhdrihgurdgruh X-ME-Proxy: Received: from localhost.localdomain (ppp14-2-109-85.adl-apt-pir-bras32.tpg.internode.on.net [14.2.109.85]) by mail.messagingengine.com (Postfix) with ESMTPA id 9D38D306467D; Thu, 10 Sep 2020 06:54:55 -0400 (EDT) From: Andrew Jeffery To: linux-mmc@vger.kernel.org Cc: adrian.hunter@intel.com, ulf.hansson@linaro.org, joel@jms.id.au, robh+dt@kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/3] mmc: sdhci-of-aspeed: Expose data sample phase delay tuning Date: Thu, 10 Sep 2020 20:24:39 +0930 Message-Id: <20200910105440.3087723-3-andrew@aj.id.au> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200910105440.3087723-1-andrew@aj.id.au> References: <20200910105440.3087723-1-andrew@aj.id.au> MIME-Version: 1.0 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org Allow sample phase adjustment to deal with layout or tolerance issues. Signed-off-by: Andrew Jeffery --- drivers/mmc/host/sdhci-of-aspeed.c | 137 +++++++++++++++++++++++++++-- 1 file changed, 132 insertions(+), 5 deletions(-) diff --git a/drivers/mmc/host/sdhci-of-aspeed.c b/drivers/mmc/host/sdhci-of-aspeed.c index 4f008ba3280e..641accbfcde4 100644 --- a/drivers/mmc/host/sdhci-of-aspeed.c +++ b/drivers/mmc/host/sdhci-of-aspeed.c @@ -16,9 +16,18 @@ #include "sdhci-pltfm.h" -#define ASPEED_SDC_INFO 0x00 -#define ASPEED_SDC_S1MMC8 BIT(25) -#define ASPEED_SDC_S0MMC8 BIT(24) +#define ASPEED_SDC_INFO 0x00 +#define ASPEED_SDC_S1_MMC8 BIT(25) +#define ASPEED_SDC_S0_MMC8 BIT(24) +#define ASPEED_SDC_PHASE 0xf4 +#define ASPEED_SDC_S1_PHASE_IN GENMASK(25, 21) +#define ASPEED_SDC_S0_PHASE_IN GENMASK(20, 16) +#define ASPEED_SDC_S1_PHASE_OUT GENMASK(15, 11) +#define ASPEED_SDC_S1_PHASE_IN_EN BIT(10) +#define ASPEED_SDC_S1_PHASE_OUT_EN GENMASK(9, 8) +#define ASPEED_SDC_S0_PHASE_OUT GENMASK(7, 3) +#define ASPEED_SDC_S0_PHASE_IN_EN BIT(2) +#define ASPEED_SDC_S0_PHASE_OUT_EN GENMASK(1, 0) struct aspeed_sdc { struct clk *clk; @@ -28,9 +37,21 @@ struct aspeed_sdc { void __iomem *regs; }; +struct aspeed_sdhci_phase_desc { + u32 value_mask; + u32 enable_mask; + u8 enable_value; +}; + +struct aspeed_sdhci_phase { + struct aspeed_sdhci_phase_desc in; + struct aspeed_sdhci_phase_desc out; +}; + struct aspeed_sdhci { struct aspeed_sdc *parent; u32 width_mask; + const struct aspeed_sdhci_phase *phase; }; static void aspeed_sdc_configure_8bit_mode(struct aspeed_sdc *sdc, @@ -50,6 +71,25 @@ static void aspeed_sdc_configure_8bit_mode(struct aspeed_sdc *sdc, spin_unlock(&sdc->lock); } +static void +aspeed_sdc_configure_phase(struct aspeed_sdc *sdc, + const struct aspeed_sdhci_phase_desc *phase, + uint8_t value, bool enable) +{ + u32 reg; + + spin_lock(&sdc->lock); + reg = readl(sdc->regs + ASPEED_SDC_PHASE); + reg &= ~phase->enable_mask; + if (enable) { + reg &= ~phase->value_mask; + reg |= value << __ffs(phase->value_mask); + reg |= phase->enable_value << __ffs(phase->enable_mask); + } + writel(reg, sdc->regs + ASPEED_SDC_PHASE); + spin_unlock(&sdc->lock); +} + static void aspeed_sdhci_set_clock(struct sdhci_host *host, unsigned int clock) { struct sdhci_pltfm_host *pltfm_host; @@ -155,8 +195,58 @@ static inline int aspeed_sdhci_calculate_slot(struct aspeed_sdhci *dev, return (delta / 0x100) - 1; } +static int aspeed_sdhci_configure_of(struct platform_device *pdev, + struct aspeed_sdhci *sdhci) +{ + u32 iphase, ophase; + struct device_node *np; + struct device *dev; + int ret; + + if (!sdhci->phase) + return 0; + + dev = &pdev->dev; + np = dev->of_node; + + ret = of_property_read_u32(np, "aspeed,input-phase", &iphase); + if (ret < 0) { + aspeed_sdc_configure_phase(sdhci->parent, &sdhci->phase->in, 0, + false); + dev_dbg(dev, "Input phase configuration disabled"); + } else if (iphase >= (1 << 5)) { + dev_err(dev, + "Input phase value exceeds field range (5 bits): %u", + iphase); + return -ERANGE; + } else { + aspeed_sdc_configure_phase(sdhci->parent, &sdhci->phase->in, + iphase, true); + dev_info(dev, "Input phase relationship: %u", iphase); + } + + ret = of_property_read_u32(np, "aspeed,output-phase", &ophase); + if (ret < 0) { + aspeed_sdc_configure_phase(sdhci->parent, &sdhci->phase->out, 0, + false); + dev_dbg(dev, "Output phase configuration disabled"); + } else if (ophase >= (1 << 5)) { + dev_err(dev, + "Output phase value exceeds field range (5 bits): %u", + iphase); + return -ERANGE; + } else { + aspeed_sdc_configure_phase(sdhci->parent, &sdhci->phase->out, + ophase, true); + dev_info(dev, "Output phase relationship: %u", ophase); + } + + return 0; +} + static int aspeed_sdhci_probe(struct platform_device *pdev) { + const struct aspeed_sdhci_phase *phase; struct sdhci_pltfm_host *pltfm_host; struct aspeed_sdhci *dev; struct sdhci_host *host; @@ -181,7 +271,10 @@ static int aspeed_sdhci_probe(struct platform_device *pdev) return -EINVAL; dev_info(&pdev->dev, "Configuring for slot %d\n", slot); - dev->width_mask = !slot ? ASPEED_SDC_S0MMC8 : ASPEED_SDC_S1MMC8; + dev->width_mask = !slot ? ASPEED_SDC_S0_MMC8 : ASPEED_SDC_S1_MMC8; + phase = of_device_get_match_data(&pdev->dev); + if (phase) + dev->phase = &phase[slot]; sdhci_get_of_property(pdev); @@ -195,6 +288,10 @@ static int aspeed_sdhci_probe(struct platform_device *pdev) goto err_pltfm_free; } + ret = aspeed_sdhci_configure_of(pdev, dev); + if (ret) + goto err_sdhci_add; + ret = mmc_of_parse(host->mmc); if (ret) goto err_sdhci_add; @@ -230,10 +327,40 @@ static int aspeed_sdhci_remove(struct platform_device *pdev) return 0; } +static const struct aspeed_sdhci_phase ast2600_sdhci_phase[] = { + /* SDHCI/Slot 0 */ + [0] = { + .in = { + .value_mask = ASPEED_SDC_S0_PHASE_IN, + .enable_mask = ASPEED_SDC_S0_PHASE_IN_EN, + .enable_value = 1, + }, + .out = { + .value_mask = ASPEED_SDC_S0_PHASE_OUT, + .enable_mask = ASPEED_SDC_S0_PHASE_OUT_EN, + .enable_value = 3, + }, + }, + /* SDHCI/Slot 1 */ + [1] = { + .in = { + .value_mask = ASPEED_SDC_S1_PHASE_IN, + .enable_mask = ASPEED_SDC_S1_PHASE_IN_EN, + .enable_value = 1, + }, + .out = { + .value_mask = ASPEED_SDC_S1_PHASE_OUT, + .enable_mask = ASPEED_SDC_S1_PHASE_OUT_EN, + .enable_value = 3, + }, + }, +}; + +/* If supported, phase adjustment fields are stored in the data pointer */ static const struct of_device_id aspeed_sdhci_of_match[] = { { .compatible = "aspeed,ast2400-sdhci", }, { .compatible = "aspeed,ast2500-sdhci", }, - { .compatible = "aspeed,ast2600-sdhci", }, + { .compatible = "aspeed,ast2600-sdhci", .data = ast2600_sdhci_phase }, { } }; From patchwork Thu Sep 10 10:54:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jeffery X-Patchwork-Id: 256330 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F35FCC433E2 for ; Thu, 10 Sep 2020 10:59:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9ADEB20BED for ; Thu, 10 Sep 2020 10:59:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=aj.id.au header.i=@aj.id.au header.b="esbEhAYA"; dkim=temperror (0-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="a6Ib4TWa" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730616AbgIJK4w (ORCPT ); Thu, 10 Sep 2020 06:56:52 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:56179 "EHLO out4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730277AbgIJKzD (ORCPT ); Thu, 10 Sep 2020 06:55:03 -0400 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 4607E5C10C1; Thu, 10 Sep 2020 06:55:02 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Thu, 10 Sep 2020 06:55:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aj.id.au; h=from :to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm3; bh=sL1+RarEw/M9r JBb5UPxjs0rtv85M8sBG+GXBnTRj30=; b=esbEhAYArRbdZBpvZ8fBIJUSgz8PB UkvMvKRCsBLYipmil3rMY1HE+q/ON8txHsN/z2QbGBOpn/IHVI2RuDJTyK5AVFCw yi8KQojSOsXuPTLbYD8Fg6Kn34ul8YLQwje/4rsd/zyCiNSWLGgLp1mi5l3sq5Fw xeTNsRck6/zghjf8vgavXe31T2b2gh2yd30nGMW18QrRjuV8z26didwhxS9geYcD Dx3NpDM9tY9sdg77LJlwMqYKBrnnd9a7Bd9ztr8mHJuIGbFaqzv22bRHcWASCRYK pWWB+1UJTKW3fekzeCK7U6crHn1hqDzC5BOGvxcvfYEi9Lr4gpAXjzTfQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=sL1+RarEw/M9rJBb5UPxjs0rtv85M8sBG+GXBnTRj30=; b=a6Ib4TWa 0KsKGVwBorqP+i122RuauIYgmPu7q4kjbag9g1cwWH24s+Nay6jWFr8Q2gaX8xxK mRpHo1kTSWfk5qImSc5hBmQnQn1iIG3YBH4G4/y/5IHW5kX6214ei1EBpo0pOlpo s1gxJdYLJUhgMiLja1mXReMvHL4yr9H353j7RL+QM7kmPaAdyUhT3ZC3vmDXdESm 2VTjCWvg0jhSs6g1TJr3ueHusxxuCYAd+3vkDAZwPnFqem+sCLp8FsdhNwJw1K3e t6CjiUJx8mnQ93JvdxK78SSHxwcb5GupgmhFBhDVb9hut19ajlFfrJfPcUtDJeHR 8nzo0anIe4xKYw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrudehjedgvdejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomheptehnughrvgifucflvghffhgvrhihuceorghnughrvgifsegr jhdrihgurdgruheqnecuggftrfgrthhtvghrnhepjefgvdevheetkeevgeegleelgfelte etjeffleffvdduudevieffgeetleevhfetnecukfhppedugedrvddruddtledrkeehnecu vehluhhsthgvrhfuihiivgepvdenucfrrghrrghmpehmrghilhhfrhhomheprghnughrvg ifsegrjhdrihgurdgruh X-ME-Proxy: Received: from localhost.localdomain (ppp14-2-109-85.adl-apt-pir-bras32.tpg.internode.on.net [14.2.109.85]) by mail.messagingengine.com (Postfix) with ESMTPA id 15D673064674; Thu, 10 Sep 2020 06:54:58 -0400 (EDT) From: Andrew Jeffery To: linux-mmc@vger.kernel.org Cc: adrian.hunter@intel.com, ulf.hansson@linaro.org, joel@jms.id.au, robh+dt@kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] ARM: dts: tacoma: Add data sample phase delay for eMMC Date: Thu, 10 Sep 2020 20:24:40 +0930 Message-Id: <20200910105440.3087723-4-andrew@aj.id.au> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200910105440.3087723-1-andrew@aj.id.au> References: <20200910105440.3087723-1-andrew@aj.id.au> MIME-Version: 1.0 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org Adjust the phase delay to avoid data timeout splats like the following: [ 731.368601] mmc0: Timeout waiting for hardware interrupt. [ 731.374644] mmc0: sdhci: ============ SDHCI REGISTER DUMP =========== [ 731.381828] mmc0: sdhci: Sys addr: 0x00000020 | Version: 0x00000002 [ 731.389012] mmc0: sdhci: Blk size: 0x00007200 | Blk cnt: 0x00000020 [ 731.396194] mmc0: sdhci: Argument: 0x00462a18 | Trn mode: 0x0000002b [ 731.403377] mmc0: sdhci: Present: 0x01f70106 | Host ctl: 0x00000017 [ 731.410559] mmc0: sdhci: Power: 0x0000000f | Blk gap: 0x00000000 [ 731.417733] mmc0: sdhci: Wake-up: 0x00000000 | Clock: 0x00000107 [ 731.424915] mmc0: sdhci: Timeout: 0x0000000e | Int stat: 0x00000000 [ 731.432098] mmc0: sdhci: Int enab: 0x03ff008b | Sig enab: 0x03ff008b [ 731.439282] mmc0: sdhci: ACmd stat: 0x00000000 | Slot int: 0x00000000 [ 731.446464] mmc0: sdhci: Caps: 0x01f80080 | Caps_1: 0x00000007 [ 731.453647] mmc0: sdhci: Cmd: 0x0000193a | Max curr: 0x001f0f08 [ 731.460829] mmc0: sdhci: Resp[0]: 0x00000900 | Resp[1]: 0xffffffff [ 731.468013] mmc0: sdhci: Resp[2]: 0x320f5913 | Resp[3]: 0x00000900 [ 731.475195] mmc0: sdhci: Host ctl2: 0x0000008b [ 731.480139] mmc0: sdhci: ADMA Err: 0x00000000 | ADMA Ptr: 0xbe040200 [ 731.487321] mmc0: sdhci: ============================================ Signed-off-by: Andrew Jeffery --- arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts b/arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts index 5f4ee67ac787..94ec301ceb73 100644 --- a/arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts +++ b/arch/arm/boot/dts/aspeed-bmc-opp-tacoma.dts @@ -179,6 +179,8 @@ &emmc_controller { &emmc { status = "okay"; + aspeed,input-phase = <0x7>; + aspeed,output-phase = <0x1f>; }; &fsim0 {