From patchwork Fri May 19 08:15:38 2017 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: 100169 Delivered-To: patch@linaro.org Received: by 10.140.96.100 with SMTP id j91csp202069qge; Fri, 19 May 2017 01:19:36 -0700 (PDT) X-Received: by 10.84.174.197 with SMTP id r63mr9950907plb.67.1495181976870; Fri, 19 May 2017 01:19:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1495181976; cv=none; d=google.com; s=arc-20160816; b=W5+Yh7UioAOzcUOQwkYLU1wVuKCVfkkSljoBn6OxT7oVOEFz845ojS9zSlRPJz7Wjv 5PsltSFl2fPYTYplN1Vp/jZ8v5240NroiKE+mtAn9xZmwRT25jYaS/78bo9ABcwYCb0E DDiQnCCpNdUVhb3uSSkgpEVtntIOhg/bflwh2OzGB/JeRlR1IUj5vrZvRIH38Fo9blcx Qrwha+sN6Psv8xUGGSaKpZ4qVvCl133d77N4+pXtY3/SBRhoG23qZZu3YQYxIUp2b1mJ Bf/sPL+DgrqOZzUwlGKeVPmpsXI9y6d2uIFPx7mxELKBK3lQXrxWyr2F+f8CdqRTf5F7 JYKA== 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=LhKDGhkTyVDiVJZjYdOhS21p59fNJdIEEhxZ/rM3fvc=; b=RoL+Dr7fk76Kq5PEybhL35zDqG4YVXuPHZCXmqYniUD1jAa9r4J5D3yf1QmCGjJ3kI dUy4F84c/ZPpPrk6nSjx1PihpxriXZOHKsMZl7YumVndckxMylxYpUZG2oG4HbapuwH8 IchYGsA+BSpUvMTJTnO65aLb/ix2m4AjPrbslxf8BuVCP2jp4m/+Z3XyOkCDQoGIwECp LKSHlyA9h7+a64R4ZIpKD0rUzcMAsNZScfzPSbTdmjB5WP1GFTD32VY1Wu/DdwtlRy5J 88EXqpPH5y1Ay41iTg1iq3p4qdDV+eZogLo3mdHrK6hiiatRmJ5H7uAoQqaxZeEIWp4v +kQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) 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 1si7674039pgp.311.2017.05.19.01.19.36; Fri, 19 May 2017 01:19:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=@ti.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755370AbdESITa (ORCPT + 25 others); Fri, 19 May 2017 04:19:30 -0400 Received: from fllnx210.ext.ti.com ([198.47.19.17]:50362 "EHLO fllnx210.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753420AbdESITT (ORCPT ); Fri, 19 May 2017 04:19:19 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by fllnx210.ext.ti.com (8.15.1/8.15.1) with ESMTP id v4J8IbwQ024681; Fri, 19 May 2017 03:18:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1495181917; bh=MF0V9peq6EMW9tO4//NREZber61OWzvjQ2PpTS6VWyg=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=vEDwgwz65BlE4TvUjjB624AVZU635dBguaQdowvzDrckLtRvxfUtKQMgGoITUapvv aPNKGb67fIkZzgfLoe978Rre0OfvTzNIK9G7x2Z78HEZygNz8F4tX6+rMrVfDvXcy5 VasNLAzkRO11JYFrwUUBAYzggv5KeFVXVmTrG9/I= Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id v4J8Ib71030214; Fri, 19 May 2017 03:18:37 -0500 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.3.294.0; Fri, 19 May 2017 03:18:37 -0500 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id v4J8FfQj009185; Fri, 19 May 2017 03:18:33 -0500 From: Kishon Vijay Abraham I To: Ulf Hansson , Rob Herring , Tony Lindgren CC: , , , , , , Jonathan Corbet , Mark Rutland , Russell King , , Subject: [PATCH 38/41] ARM: OMAP2+: Add pdata-quirks for MMC/SD on DRA74x EVM Date: Fri, 19 May 2017 13:45:38 +0530 Message-ID: <20170519081541.26753-39-kishon@ti.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170519081541.26753-1-kishon@ti.com> References: <20170519081541.26753-1-kishon@ti.com> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sekhar Nori DRA74x EVM Rev H EVM comes with revision 2.0 silicon. However, earlier versions of EVM can come with either revision 1.1 or revision 1.0 of silicon. The device-tree file is written to support rev 2.0 of silicon. pdata quirks are used to then override the settings needed for PG 1.1 silicon. PG 1.1 silicon has limitations w.r.t frequencies at which MMC1/2/3 can operate as well as different IOdelay numbers. Signed-off-by: Kishon Vijay Abraham I Signed-off-by: Sekhar Nori --- arch/arm/mach-omap2/pdata-quirks.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) -- 2.11.0 diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c index 9700a8ef0f16..6b433fce65a5 100644 --- a/arch/arm/mach-omap2/pdata-quirks.c +++ b/arch/arm/mach-omap2/pdata-quirks.c @@ -434,6 +434,26 @@ static void __init omap5_uevm_legacy_init(void) } #endif +#ifdef CONFIG_SOC_DRA7XX +static struct omap_hsmmc_platform_data dra7_hsmmc_data_mmc1; +static struct omap_hsmmc_platform_data dra7_hsmmc_data_mmc2; +static struct omap_hsmmc_platform_data dra7_hsmmc_data_mmc3; + +static void __init dra7x_evm_mmc_quirk(void) +{ + if (omap_rev() == DRA752_REV_ES1_1 || omap_rev() == DRA752_REV_ES1_0) { + dra7_hsmmc_data_mmc1.version = "rev11"; + dra7_hsmmc_data_mmc1.max_freq = 96000000; + + dra7_hsmmc_data_mmc2.version = "rev11"; + dra7_hsmmc_data_mmc2.max_freq = 48000000; + + dra7_hsmmc_data_mmc3.version = "rev11"; + dra7_hsmmc_data_mmc3.max_freq = 48000000; + } +} +#endif + static struct pcs_pdata pcs_pdata; void omap_pcs_legacy_init(int irq, void (*rearm)(void)) @@ -561,6 +581,14 @@ static struct of_dev_auxdata omap_auxdata_lookup[] __initdata = { OF_DEV_AUXDATA("ti,omap4-iommu", 0x55082000, "55082000.mmu", &omap4_iommu_pdata), #endif +#ifdef CONFIG_SOC_DRA7XX + OF_DEV_AUXDATA("ti,dra7-hsmmc", 0x4809c000, "4809c000.mmc", + &dra7_hsmmc_data_mmc1), + OF_DEV_AUXDATA("ti,dra7-hsmmc", 0x480b4000, "480b4000.mmc", + &dra7_hsmmc_data_mmc2), + OF_DEV_AUXDATA("ti,dra7-hsmmc", 0x480ad000, "480ad000.mmc", + &dra7_hsmmc_data_mmc3), +#endif /* Common auxdata */ OF_DEV_AUXDATA("pinctrl-single", 0, NULL, &pcs_pdata), { /* sentinel */ }, @@ -590,6 +618,9 @@ static struct pdata_init pdata_quirks[] __initdata = { #ifdef CONFIG_SOC_OMAP5 { "ti,omap5-uevm", omap5_uevm_legacy_init, }, #endif +#ifdef CONFIG_SOC_DRA7XX + { "ti,dra7-evm", dra7x_evm_mmc_quirk, }, +#endif { /* sentinel */ }, };