From patchwork Fri Apr 27 11:47:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 134586 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp617441lji; Fri, 27 Apr 2018 04:47:51 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpN2dGS48v45FycKjd6JezSdVNptqVqF4My6j54XuWdbwIqCgMouRB58/gz3Fj6KQYhqx+Y X-Received: by 2002:a17:902:8ec4:: with SMTP id x4-v6mr2005583plo.370.1524829670870; Fri, 27 Apr 2018 04:47:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524829670; cv=none; d=google.com; s=arc-20160816; b=YUMCuQ4OvdhJQc60/hJ0LZYPOCitJHl+y68up5QkeqKN2DZ4roEuAVl1kL3GUB2zvB fwGn+Aq8DzlyMIHCJ/1gEBF43ZxeKm91i4sHpqhEIt9XThDdBWejbCvAC15MQ9g0Sc7w KX/uPfS2fKgBawaRFOpcR9o1VqndVDuU8AhN8dhAXyiV3J9USFX8tsqjyTIL0zL097AK s3hm1tCmatBxFDXyz3kyg1ps6Vi1esAhZqb7Y8wb+GoRYcD3bxQmLLnm9jIhMoLMbgV2 KAmIM5Q59bYdS8I2ChNuukPebpyrnysN5AGkj7tONqldGG7Jfc5zQNKu5nhlDnF3iDoU yLBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=IghhexPMLh+MvvMySoxllQZcK+gFYmc+/KBWR2hvIqY=; b=eh4Bqx3eiiZIg2CsAD424K4qmaRAz6GmjUpMwXhze0BXT4ilCNeBuWS1GaCR/HnYBA ckCCpSrdtfOuvU3jwqFqox1zsSTn4cJcaPhSNUmkSa5QVviu7vj5gDAeKw0eceIQCmPa ywatSPqGAETyfMgS74aJptSZXBqMo6w5FvzechgEys9n6IYbzKqGeykjVZucbNQlygYC MSYyp0ZIB0AaH3uFjygO6bmkWAhsI+QUcT4CKhz8pFz6QTHHCC9j09jzWYuyUNWFTla7 pgzRwafgi2+c0YJUN7zrIdTKVwqeOIuMjc7Nz7/KDJf27EP6/27SX3DhOqWpu8YN0jDA UQew== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=b/y69oFd; 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=fail (p=QUARANTINE sp=NONE dis=QUARANTINE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e2si1172813pfm.220.2018.04.27.04.47.50; Fri, 27 Apr 2018 04:47:50 -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=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=b/y69oFd; 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=fail (p=QUARANTINE sp=NONE dis=QUARANTINE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757704AbeD0Lrs (ORCPT + 6 others); Fri, 27 Apr 2018 07:47:48 -0400 Received: from lelnx193.ext.ti.com ([198.47.27.77]:48807 "EHLO lelnx193.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758002AbeD0Lrp (ORCPT ); Fri, 27 Apr 2018 07:47:45 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by lelnx193.ext.ti.com (8.15.1/8.15.1) with ESMTP id w3RBleMs026207; Fri, 27 Apr 2018 06:47:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1524829660; bh=1DgvGqliqEtndAXzto+TEDn8+jvjWYQ+fGgP7bvn/Qg=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=b/y69oFdx1JGVypB4fzns7ZTQ5lCxGu9W3gVCcYulshg1q8Q03f1KK8mvXYlaa73Z BmJUTn00dHVEhHj2DWa3KdyV2O9cS64O5r0xkUKeYScCOugxaOgljf5P5tqqMYZBh3 lhJQlWceHlNWBOF9sqEEnbrNnF41DE5ggDNwUzgY= Received: from DFLE100.ent.ti.com (dfle100.ent.ti.com [10.64.6.21]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w3RBldl2014791; Fri, 27 Apr 2018 06:47:39 -0500 Received: from DFLE103.ent.ti.com (10.64.6.24) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Fri, 27 Apr 2018 06:47:40 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Fri, 27 Apr 2018 06:47:39 -0500 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id w3RBlRSH014207; Fri, 27 Apr 2018 06:47:37 -0500 From: Kishon Vijay Abraham I To: Ulf Hansson , Adrian Hunter CC: Rob Herring , Mark Rutland , , , , , Subject: [PATCH v5 03/14] mmc: sdhci-omap: Workaround for Errata i843 Date: Fri, 27 Apr 2018 17:17:12 +0530 Message-ID: <20180427114723.2687-4-kishon@ti.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180427114723.2687-1-kishon@ti.com> References: <20180427114723.2687-1-kishon@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Errata i843 in AM572x Sitara Processors Silicon Revision 2.0, 1.1 (SPRZ429K July 2014–Revised March 2017 [1]) mentions PG 1.0/1.1 silicon has limitations w.r.t frequencies at which MMC1/2/3 can operate. Use soc_device_match() to identify rev 1.0/1.1 silicon and override mmc->f_max according to the errata workaround. "max-frequency" dt property cannot be used since the device tree is added for rev 2.0 silicon. soc_device_match() is also used in order to get the IODelay values for rev 1.0/1.1 silicon. [1] -> http://www.ti.com/lit/er/sprz429k/sprz429k.pdf Signed-off-by: Kishon Vijay Abraham I Acked-by: Adrian Hunter Acked-by: Tony Lindgren --- drivers/mmc/host/sdhci-omap.c | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) -- 2.17.0 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/mmc/host/sdhci-omap.c b/drivers/mmc/host/sdhci-omap.c index 78f3ceea570e..b3dc7f1466e5 100644 --- a/drivers/mmc/host/sdhci-omap.c +++ b/drivers/mmc/host/sdhci-omap.c @@ -26,6 +26,7 @@ #include #include #include +#include #include "sdhci-pltfm.h" @@ -100,6 +101,7 @@ struct sdhci_omap_data { }; struct sdhci_omap_host { + char *version; void __iomem *base; struct device *dev; struct regulator *pbias; @@ -733,12 +735,21 @@ static struct pinctrl_state u32 *caps, u32 capmask) { struct device *dev = omap_host->dev; + char *version = omap_host->version; struct pinctrl_state *pinctrl_state = ERR_PTR(-ENODEV); + char str[20]; if (!(*caps & capmask)) goto ret; - pinctrl_state = pinctrl_lookup_state(omap_host->pinctrl, mode); + if (version) { + snprintf(str, 20, "%s-%s", mode, version); + pinctrl_state = pinctrl_lookup_state(omap_host->pinctrl, str); + } + + if (IS_ERR(pinctrl_state)) + pinctrl_state = pinctrl_lookup_state(omap_host->pinctrl, mode); + if (IS_ERR(pinctrl_state)) { dev_err(dev, "no pinctrl state for %s mode", mode); *caps &= ~capmask; @@ -830,6 +841,16 @@ static int sdhci_omap_config_iodelay_pinctrl_state(struct sdhci_omap_host return 0; } +static const struct soc_device_attribute sdhci_omap_soc_devices[] = { + { + .machine = "DRA7[45]*", + .revision = "ES1.[01]", + }, + { + /* sentinel */ + } +}; + static int sdhci_omap_probe(struct platform_device *pdev) { int ret; @@ -841,6 +862,7 @@ static int sdhci_omap_probe(struct platform_device *pdev) struct mmc_host *mmc; const struct of_device_id *match; struct sdhci_omap_data *data; + const struct soc_device_attribute *soc; match = of_match_device(omap_sdhci_match, dev); if (!match) @@ -875,6 +897,17 @@ static int sdhci_omap_probe(struct platform_device *pdev) if (ret) goto err_pltfm_free; + soc = soc_device_match(sdhci_omap_soc_devices); + if (soc) { + omap_host->version = "rev11"; + if (!strcmp(dev_name(dev), "4809c000.mmc")) + mmc->f_max = 96000000; + if (!strcmp(dev_name(dev), "480b4000.mmc")) + mmc->f_max = 48000000; + if (!strcmp(dev_name(dev), "480ad000.mmc")) + mmc->f_max = 48000000; + } + pltfm_host->clk = devm_clk_get(dev, "fck"); if (IS_ERR(pltfm_host->clk)) { ret = PTR_ERR(pltfm_host->clk); From patchwork Fri Apr 27 11:47:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 134590 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp617720lji; Fri, 27 Apr 2018 04:48:09 -0700 (PDT) X-Google-Smtp-Source: AB8JxZo13fQVp1eD9LNcFFSPale1jfyvPn07A5ixlClMj27Waf8DfibC4/HmeFEb2TC/CPD0E2kd X-Received: by 2002:a17:902:868b:: with SMTP id g11-v6mr1969095plo.305.1524829689087; Fri, 27 Apr 2018 04:48:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524829689; cv=none; d=google.com; s=arc-20160816; b=VX6FLTUSiSfDWtiU+LOfpazG9gxhAsbTfrueA2G5kt0X6M2rE+dyh6tL97lHxM9vSx MNVGVrn6Cj+fXFRy8qCeZviRxuD72S27SP8uRRJx6YSwcFyE2eEc6AhnXgfFq073T50N LPLoCvnQJPfKVCcxY7w8wFMcLKSV2qn0OBinuyT049XHc8RRR4myvjX/qYXZ52Xq2FVR 7A3L3rV8CN3Ghnd81eKsCrklodo7yMu5WUtmH7RA5N2/fzjd3WNF1oTxja2GDP9CPBq5 1CMqdHtkFs0iS0KGaLWtsL50d8UXXDlV2JBZH+bXe8jYDky+PEoYptS7tSpS+X0lFUF3 G+xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=5pVTaGs65GMidl9/GsFQUSSI+qn/2OOqeudcQfCD2/I=; b=ahHBlMIMB1qyLTZrdtgH3iDVXilvIRK5bs/03iZfxFyKiHrcvGU7oI9ePBOO2yf8er FRS2aaLi5kI7p7zGA96YSoasHixvtWtOZ5hE/KXmeQ3jtqaqwslTj3P1VLYWvsv5kwez p5ZtXC/fbr9MYioSF9/8xN4OsLre5BtfIQ8aznJtQj8bWWnVnVy2ybjRxQ2IMNMyWPkK /cAQjgOyaJziMpX3UAFH/FxeohBTtHvi7affebY4r9DheorG0/R/0dvWeskuxMG2yFY8 pW305dOv950SwTRwfePxNH5woy1HiCdAG9z5w1rma/Z15fdzKmYVpC+aoUKx5jtEzfbq dUnw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=tzXUVZDl; 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=fail (p=QUARANTINE sp=NONE dis=QUARANTINE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j63-v6si1083786pgc.474.2018.04.27.04.48.08; Fri, 27 Apr 2018 04:48:09 -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=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=tzXUVZDl; 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=fail (p=QUARANTINE sp=NONE dis=QUARANTINE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758058AbeD0LsG (ORCPT + 6 others); Fri, 27 Apr 2018 07:48:06 -0400 Received: from fllnx210.ext.ti.com ([198.47.19.17]:46580 "EHLO fllnx210.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757530AbeD0LsD (ORCPT ); Fri, 27 Apr 2018 07:48:03 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by fllnx210.ext.ti.com (8.15.1/8.15.1) with ESMTP id w3RBlwiN009529; Fri, 27 Apr 2018 06:47:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1524829678; bh=7RKtm3IgZmFXw1m8UKpmbnoldiSremxlXF6AJdShW9E=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=tzXUVZDlAaomZfwRXLuJkayQWgChqqzxNkuQqc4nH0eEhrZ6JJGiKal1foxf9R8G2 vv21X38wt+ChzQQjOGVr8OQRd5JOGG6Rm45WaYqA6cwbnk6XCAumBRHKVVz2QRY+NX 2/VyJTPBmOLCsjQ5r2rPSt5yY5hE1A7UWhVVlXCM= Received: from DLEE107.ent.ti.com (dlee107.ent.ti.com [157.170.170.37]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w3RBlw6d015129; Fri, 27 Apr 2018 06:47:58 -0500 Received: from DLEE113.ent.ti.com (157.170.170.24) by DLEE107.ent.ti.com (157.170.170.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Fri, 27 Apr 2018 06:47:57 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Fri, 27 Apr 2018 06:47:57 -0500 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id w3RBlRSN014207; Fri, 27 Apr 2018 06:47:55 -0500 From: Kishon Vijay Abraham I To: Ulf Hansson , Adrian Hunter CC: Rob Herring , Mark Rutland , , , , , Subject: [PATCH v5 09/14] mmc: sdhci-omap: Workaround for Errata i834 Date: Fri, 27 Apr 2018 17:17:18 +0530 Message-ID: <20180427114723.2687-10-kishon@ti.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180427114723.2687-1-kishon@ti.com> References: <20180427114723.2687-1-kishon@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Errata i834 in AM572x Sitara Processors Silicon Revision 2.0, 1.1 (SPRZ429K July 2014–Revised March 2017 [1]) mentions the maximum obtainable timeout through MMC host controller is 700ms. And for commands taking longer than 700ms, hardware timeout should be disabled and software timeout should be used. The workaround for Errata i834 can be achieved by adding SDHCI_QUIRK2_DISABLE_HW_TIMEOUT quirk in sdhci-omap. [1] -> http://www.ti.com/lit/er/sprz429k/sprz429k.pdf Signed-off-by: Kishon Vijay Abraham I Acked-by: Tony Lindgren Acked-by: Adrian Hunter --- drivers/mmc/host/sdhci-omap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.17.0 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/mmc/host/sdhci-omap.c b/drivers/mmc/host/sdhci-omap.c index d5c1a9c71f95..2232a9974b21 100644 --- a/drivers/mmc/host/sdhci-omap.c +++ b/drivers/mmc/host/sdhci-omap.c @@ -715,7 +715,8 @@ static const struct sdhci_pltfm_data sdhci_omap_pdata = { SDHCI_QUIRK_BROKEN_ADMA_ZEROLEN_DESC, .quirks2 = SDHCI_QUIRK2_ACMD23_BROKEN | SDHCI_QUIRK2_PRESET_VALUE_BROKEN | - SDHCI_QUIRK2_RSP_136_HAS_CRC, + SDHCI_QUIRK2_RSP_136_HAS_CRC | + SDHCI_QUIRK2_DISABLE_HW_TIMEOUT, .ops = &sdhci_omap_ops, }; From patchwork Fri Apr 27 11:47:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kishon Vijay Abraham I X-Patchwork-Id: 134593 Delivered-To: patch@linaro.org Received: by 10.46.151.6 with SMTP id r6csp618048lji; Fri, 27 Apr 2018 04:48:30 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpa18QV3dRcenF/EiwgVIu8wieoI4QpwOBG2erAuxy0eGba/VqZOWZZgRIvpDm0FYKIQcnR X-Received: by 2002:a63:7443:: with SMTP id e3-v6mr1849389pgn.369.1524829710831; Fri, 27 Apr 2018 04:48:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524829710; cv=none; d=google.com; s=arc-20160816; b=AjUqo1rm3zD36G1ghFQ4nvkpT7ir13iHLp7QWzYh+P8dDFQJthZn1u9w4x9SNAF8kb tmEUURglj3jbdnlIOpBxkWRd6PTRVlhGeub52YIlMTGjn/Nu8QZwRbm+bsnjA3oqvC1Y DK2OvAnSE2cyit6HuFvnzgcOwAEkF8AJ72+43EAdSvp9jELjkw/qrAF70+pcnrDnE379 CH1jTzNif6voWDKyCVk7VOZ3pKijsvBFUc2lQz3XtV0T3x9F5uPlozYhU6isCu1ypCuZ poZWMLul5Sx3ti09bNGe3sCjkVIqNm9K/23/XHMraxWCOlMPmCc0jUiOTMhQBLejUzSR REbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=VR5Q5T5/C2MBsCsgzwHe/hitYr5Nv5+LkY2Qc7oWUrg=; b=px6gzU5xeKYSqWw/J0pd18KqHM7oo0xyCFkaWlfgl73Mzzz24UfNm3dmvHnEXJGVd7 7hme//5UTMWU3ksT0kj65YFE7i4sYQk+eL7on0QKfTOo8zPQfLukAiSLXuMFtPmmanVa U7lqrj7OPIucPx9ncSdMIZTaDz+VjKwhJc6RLLEqPNkzjUi/VZMNo3rQD2Luq10kMT2j RlEH55QzF84L55AcUhDMyaAXg6pkixCIrX86WRt5ndf8/fwcuFDtRt99O/S3R/lxZUBJ oJCGFKGZ8GX6CA+vQl2i53r1O9y20tnd+NAKPgjUvxthsFGb1nIzMnEKWfcOM2rpvpOD 5aKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=jBefi7qs; 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=fail (p=QUARANTINE sp=NONE dis=QUARANTINE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h3-v6si1138333pld.137.2018.04.27.04.48.30; Fri, 27 Apr 2018 04:48:30 -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=neutral (body hash did not verify) header.i=@ti.com header.s=ti-com-17Q1 header.b=jBefi7qs; 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=fail (p=QUARANTINE sp=NONE dis=QUARANTINE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758161AbeD0Ls2 (ORCPT + 6 others); Fri, 27 Apr 2018 07:48:28 -0400 Received: from fllnx209.ext.ti.com ([198.47.19.16]:61748 "EHLO fllnx209.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758151AbeD0LsU (ORCPT ); Fri, 27 Apr 2018 07:48:20 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by fllnx209.ext.ti.com (8.15.1/8.15.1) with ESMTP id w3RBmEC7002373; Fri, 27 Apr 2018 06:48:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1524829694; bh=NFBabPHv0STdBAP28nM1CMtlVlFOc2W9SkWwtHoKEcw=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=jBefi7qsimX4Gv9esbMU4Yqu+/QmA/wZe4PMTmfajeCndrBmk45SWGy/wCnUjPqDP 8nw9qKW6cTYF4zoBiyjsokOyNpcOd16P8y7hrzzO31k0YoCnbeE3fDglDhUeIzxE/S VJYb+AD+1A37LbEcp+2oAE4JbFkcz5fW61J7cakE= Received: from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id w3RBmEKW021525; Fri, 27 Apr 2018 06:48:14 -0500 Received: from DFLE106.ent.ti.com (10.64.6.27) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1466.3; Fri, 27 Apr 2018 06:48:13 -0500 Received: from dflp33.itg.ti.com (10.64.6.16) by DFLE106.ent.ti.com (10.64.6.27) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1466.3 via Frontend Transport; Fri, 27 Apr 2018 06:48:13 -0500 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp33.itg.ti.com (8.14.3/8.13.8) with ESMTP id w3RBlRSS014207; Fri, 27 Apr 2018 06:48:11 -0500 From: Kishon Vijay Abraham I To: Ulf Hansson , Adrian Hunter CC: Rob Herring , Mark Rutland , , , , , Subject: [PATCH v5 14/14] mmc: sdhci-omap: Get IODelay values for 3.3v DDR mode Date: Fri, 27 Apr 2018 17:17:23 +0530 Message-ID: <20180427114723.2687-15-kishon@ti.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180427114723.2687-1-kishon@ti.com> References: <20180427114723.2687-1-kishon@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org commit 8d20b2eae6c47b095523 ("mmc: sdhci_omap: Add support to set IODELAY values") stored IODelay values for all MM/SD modes in pinctrl_state structure member of sdhci_omap_host. However for DDR mode it gets IODelay values only for 1.8v DDR mode. Since some of the platforms which uses sdhci-omap has IO lines connected to 3.3v, get IODelay values for 3.3v DDR mode. Signed-off-by: Kishon Vijay Abraham I --- drivers/mmc/host/sdhci-omap.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) -- 2.17.0 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/mmc/host/sdhci-omap.c b/drivers/mmc/host/sdhci-omap.c index bd5e03d177e0..f3a7c8ece4be 100644 --- a/drivers/mmc/host/sdhci-omap.c +++ b/drivers/mmc/host/sdhci-omap.c @@ -842,8 +842,15 @@ static int sdhci_omap_config_iodelay_pinctrl_state(struct sdhci_omap_host state = sdhci_omap_iodelay_pinctrl_state(omap_host, "ddr_1_8v", caps, MMC_CAP_1_8V_DDR); - if (!IS_ERR(state)) + if (!IS_ERR(state)) { pinctrl_state[MMC_TIMING_MMC_DDR52] = state; + } else { + state = sdhci_omap_iodelay_pinctrl_state(omap_host, "ddr_3_3v", + caps, + MMC_CAP_3_3V_DDR); + if (!IS_ERR(state)) + pinctrl_state[MMC_TIMING_MMC_DDR52] = state; + } state = sdhci_omap_iodelay_pinctrl_state(omap_host, "hs", caps, MMC_CAP_SD_HIGHSPEED);