From patchwork Mon Feb 5 12:50:15 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: 126849 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp1942093ljc; Mon, 5 Feb 2018 04:51:44 -0800 (PST) X-Google-Smtp-Source: AH8x226tKwVR50oseKXjb6RXla0+npVdLb8Y2ZSnrAHhkW5sApwy6nmWnzaPYna8K8+XbKQcugi5 X-Received: by 10.101.87.132 with SMTP id b4mr38102353pgr.332.1517835104421; Mon, 05 Feb 2018 04:51:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517835104; cv=none; d=google.com; s=arc-20160816; b=Q7LpzXR9imoAqnn8AUKEF37srlGSRhCHFV1tM1t8fqYdA6QOCMDZQEuZYzMyDcNqHm jQ3PTF9Nd6RLfEQKWbULIrasdoqNN4COA1Bco1tO6dgouPjxVoNJ8UjlK2y7iWih0r2Y DoEkir53CaLbYrTvVDafjNkeIrXcpKcWSXm0cuN0T4rc9emMiK0HmN3x6KK8EeAK8wR0 aShPZUC6hJiXmIMP9w6Hsb0ZnLA/kIIoBvxeW6nluNgByYOKKDYV4QwI2mHnhLCfI1rb gLfsNEvBP0fA4NcKCLwENy3AhEzxm7kDCsYd+v8diatXkv+/5OxkIj14Fxaol7n+tgVu ikag== 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=43+C8fUYxsWpDsW2PmYCXjqc6+nA+LsBPy1Xx5dN0uk=; b=0NsXxln29dCFLwQfdF0OuPgdhQEqVJ9bgwIJX5Y+fuvo9fNHTSLZTnfBfNaeuIB0mq hMgy17SQYfV/vnWCjZQazvWm/YDQpGNOmYja0We+wz23lgOIkryFL4cGKfHYyPgd6iBa 3JRlhHKorckaGviAIrY+kKJhaemD6LJoJzbA0fg9pUhG88Y4QKCAqXq9dqiOZRNF3jWd 8FSMxOegDhy4yasg1vNAbWwQB+FbKbKSLPX05ouSTWFbauyorcDrTL7clA9ITUVghR8D RzzZk8O8t3Nf3rbvwdSQCI9MPvR+2vNyeZ1jNmhU7BfkcaBqAqmMW+hWcAt8+CjMLHuN 6JdA== 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=Grz4b8Mz; spf=pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-mmc-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 q23si727871pff.403.2018.02.05.04.51.44; Mon, 05 Feb 2018 04:51:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-mmc-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=Grz4b8Mz; spf=pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-mmc-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 S1753069AbeBEMvl (ORCPT + 6 others); Mon, 5 Feb 2018 07:51:41 -0500 Received: from lelnx193.ext.ti.com ([198.47.27.77]:63857 "EHLO lelnx193.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752986AbeBEMv3 (ORCPT ); Mon, 5 Feb 2018 07:51:29 -0500 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by lelnx193.ext.ti.com (8.15.1/8.15.1) with ESMTP id w15Comua011236; Mon, 5 Feb 2018 06:50:48 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1517835048; bh=dSvUAyWQITYffHWTaBPkMuwbxExOhl29rE6BsCK5oFw=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=Grz4b8Mz6v4vxlLgY+ANaSfjsupYC6ykNTqLeNhvEMrk3C9ZYR4iA4o3AaDENftMk DuPgbj+gbJ6QES3dQNVr+V4t4bSYuNh1sq+B9ALkMaSjddijX60u1ueS//P+oEeS8J bteOo7n+RB0Nf12vG+DTu8IOuwqVveiZYwZH6NmE= Received: from DFLE104.ent.ti.com (dfle104.ent.ti.com [10.64.6.25]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w15Com90019683; Mon, 5 Feb 2018 06:50:48 -0600 Received: from DFLE100.ent.ti.com (10.64.6.21) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Mon, 5 Feb 2018 06:50:47 -0600 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Mon, 5 Feb 2018 06:50:47 -0600 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id w15CoaGX023963; Mon, 5 Feb 2018 06:50:44 -0600 From: Kishon Vijay Abraham I To: Ulf Hansson , Tony Lindgren , Adrian Hunter CC: Rob Herring , Mark Rutland , Russell King , Kishon Vijay Abraham I , , , , , Subject: [PATCH v2 02/16] mmc: sdhci-omap: Add card_busy host ops Date: Mon, 5 Feb 2018 18:20:15 +0530 Message-ID: <20180205125029.21570-3-kishon@ti.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180205125029.21570-1-kishon@ti.com> References: <20180205125029.21570-1-kishon@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org Add card_busy host ops in sdhci_omap to check card busy status. The voltage switching sequence for AM572x platform is mentioned in Figure 25-48. eMMC/SD/SDIO Power Switching Procedure of AM572x Sitara Processors Silicon Revision 2.0, 1.1 TRM (SPRUHZ6I - October 2014–Revised April 2017 [1]). In the voltage switching sequence, CLKEXTFREE bit in MMCHS_CON should also be set after switching to 1.8v which is also taken care in the card_busy ops. [1] -> http://www.ti.com/lit/ug/spruhz6i/spruhz6i.pdf Signed-off-by: Kishon Vijay Abraham I --- drivers/mmc/host/sdhci-omap.c | 52 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) -- 2.11.0 -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" 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 96985786cadf..df927f3faaf6 100644 --- a/drivers/mmc/host/sdhci-omap.c +++ b/drivers/mmc/host/sdhci-omap.c @@ -31,11 +31,17 @@ #define SDHCI_OMAP_CON 0x12c #define CON_DW8 BIT(5) #define CON_DMA_MASTER BIT(20) +#define CON_CLKEXTFREE BIT(16) +#define CON_PADEN BIT(15) #define CON_INIT BIT(1) #define CON_OD BIT(0) #define SDHCI_OMAP_CMD 0x20c +#define SDHCI_OMAP_PSTATE 0x0224 +#define PSTATE_DLEV_DAT0 BIT(20) +#define PSTATE_DATI BIT(1) + #define SDHCI_OMAP_HCTL 0x228 #define HCTL_SDBP BIT(8) #define HCTL_SDVS_SHIFT 9 @@ -191,6 +197,51 @@ static void sdhci_omap_conf_bus_power(struct sdhci_omap_host *omap_host, } } +static int sdhci_omap_card_busy(struct mmc_host *mmc) +{ + u32 reg, ac12; + int ret = false; + struct sdhci_host *host = mmc_priv(mmc); + struct sdhci_pltfm_host *pltfm_host; + struct sdhci_omap_host *omap_host; + u32 ier = host->ier; + + pltfm_host = sdhci_priv(host); + omap_host = sdhci_pltfm_priv(pltfm_host); + + reg = sdhci_omap_readl(omap_host, SDHCI_OMAP_CON); + ac12 = sdhci_omap_readl(omap_host, SDHCI_OMAP_AC12); + reg &= ~CON_CLKEXTFREE; + if (ac12 & AC12_V1V8_SIGEN) + reg |= CON_CLKEXTFREE; + reg |= CON_PADEN; + sdhci_omap_writel(omap_host, SDHCI_OMAP_CON, reg); + + disable_irq(host->irq); + ier |= SDHCI_INT_CARD_INT; + sdhci_writel(host, ier, SDHCI_INT_ENABLE); + sdhci_writel(host, ier, SDHCI_SIGNAL_ENABLE); + + /* + * Delay is required for PSTATE to correctly reflect + * DLEV/CLEV values after PADEN is set. + */ + usleep_range(50, 100); + reg = sdhci_omap_readl(omap_host, SDHCI_OMAP_PSTATE); + if ((reg & PSTATE_DATI) || !(reg & PSTATE_DLEV_DAT0)) + ret = true; + + reg = sdhci_omap_readl(omap_host, SDHCI_OMAP_CON); + reg &= ~(CON_CLKEXTFREE | CON_PADEN); + sdhci_omap_writel(omap_host, SDHCI_OMAP_CON, reg); + + sdhci_writel(host, host->ier, SDHCI_INT_ENABLE); + sdhci_writel(host, host->ier, SDHCI_SIGNAL_ENABLE); + enable_irq(host->irq); + + return ret; +} + static int sdhci_omap_start_signal_voltage_switch(struct mmc_host *mmc, struct mmc_ios *ios) { @@ -562,6 +613,7 @@ static int sdhci_omap_probe(struct platform_device *pdev) host->mmc_host_ops.start_signal_voltage_switch = sdhci_omap_start_signal_voltage_switch; host->mmc_host_ops.set_ios = sdhci_omap_set_ios; + host->mmc_host_ops.card_busy = sdhci_omap_card_busy; sdhci_read_caps(host); host->caps |= SDHCI_CAN_DO_ADMA2; From patchwork Mon Feb 5 12:50:16 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: 126846 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp1941926ljc; Mon, 5 Feb 2018 04:51:27 -0800 (PST) X-Google-Smtp-Source: AH8x224jCcKwA+IliFMtUGNUPFlFSO9L1HE/xZeKEY5kBKBZXW7KVANNXiZ1u4MoG3VdB3oYhX+h X-Received: by 10.99.55.1 with SMTP id e1mr3343773pga.237.1517835087504; Mon, 05 Feb 2018 04:51:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517835087; cv=none; d=google.com; s=arc-20160816; b=kXmGOjWM4Frf/b/iptdPFKLB0P9saJYNCd3aAv3o+qi5xb9R7Ug3u9Kgf//n37JAMC RyiUL4PZCZFHGmiFfELUwT15fCALm0uxawIvu6CsTNQBoEs//6/YDaVI5OJ8zqsNTrJG aBo/BPDl40+I077SXiMfm4nWYCe/nLmq7y9B2oe3cjfakIVjcvXRtMZL0E0+Nre2ge6U KoIvPjqab4HemzkYm7peb0jHaqP018kgZaoxK4p4A5bl0sSV1qztCGkL0b/Zc2MEIGz/ px+2g21vrMHKKwZDDsc4kvSjSw2APz+CrXH2dguQX+t7EKgwu5NJypK1QvKeX9RmjFk8 QzlQ== 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=2Pggypr2F7LkEvZ1Gw0smpxXIinUjgE6D8HvxGn/T10=; b=PkqJY45BPdGdHM/MttKXi23PFSvNTIAjc7ocZLe35x8jbH7JDmviC9RL0BqwZO+9vg 990pMpSuTXp5ahg8ITqxPBswrccdYhdOCwHg8PM+gqaUpQKZSC/MYYCzS/ViEQmla2F4 4vnWIRBwJZZeTEvbOw65VYP6iajI2ZQp7q0xrPFbogVeh08a9C9UJPc6ETHHcmnWhfT+ w5rfnH8bb7tMbgF3VxIF5ABUnN5sw6hsY2ILQ45fWSzbhmomXh0qgej9W7v7c08eTfpP 1ZmpuQhVTEV6QkqURHLkWsNyveQmSAEc0njKg8iEaVrj49nPGG7mrbiJrDvIpsTXqtKK zTDw== 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=ohzvNRZe; spf=pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-mmc-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 u5-v6si6870758pls.791.2018.02.05.04.51.27; Mon, 05 Feb 2018 04:51:27 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-mmc-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=ohzvNRZe; spf=pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-mmc-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 S1752844AbeBEMvZ (ORCPT + 6 others); Mon, 5 Feb 2018 07:51:25 -0500 Received: from fllnx209.ext.ti.com ([198.47.19.16]:29225 "EHLO fllnx209.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752710AbeBEMvX (ORCPT ); Mon, 5 Feb 2018 07:51:23 -0500 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by fllnx209.ext.ti.com (8.15.1/8.15.1) with ESMTP id w15CopWq010644; Mon, 5 Feb 2018 06:50:51 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1517835051; bh=rhq1UgDeYXGmwkXgj61euVRB2BeHSvMpe/lz1CD6Si8=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=ohzvNRZen3fKaDCzQHKBpZOh8lFjwhOmYVxH9t/WUtqHsWQsgsfWx9zQ3tz3bwQCO NvJxYHDlSr7VdOXN/m/nkxyZzGIo6o6kc+ycKLscE/O1QfmA4GGajqgu33+PBVrEmd cNVFrldyzGP4aXRCYxJ2UhdID9GDfYQZ6ogm0go8= Received: from DFLE104.ent.ti.com (dfle104.ent.ti.com [10.64.6.25]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id w15CopTd019716; Mon, 5 Feb 2018 06:50:51 -0600 Received: from DFLE115.ent.ti.com (10.64.6.36) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Mon, 5 Feb 2018 06:50:51 -0600 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Mon, 5 Feb 2018 06:50:51 -0600 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id w15CoaGY023963; Mon, 5 Feb 2018 06:50:48 -0600 From: Kishon Vijay Abraham I To: Ulf Hansson , Tony Lindgren , Adrian Hunter CC: Rob Herring , Mark Rutland , Russell King , Kishon Vijay Abraham I , , , , , Subject: [PATCH v2 03/16] mmc: sdhci-omap: Add custom set_uhs_signaling sdhci_host ops Date: Mon, 5 Feb 2018 18:20:16 +0530 Message-ID: <20180205125029.21570-4-kishon@ti.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180205125029.21570-1-kishon@ti.com> References: <20180205125029.21570-1-kishon@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org UHS-1 DDR50 and MMC DDR52 mode require DDR bit to be set in the configuration register (MMCHS_CON). Add sdhci-omap specific set_uhs_signaling ops to set this bit. Also while setting the UHSMS bit, clock should be disabled. Signed-off-by: Kishon Vijay Abraham I Acked-by: Adrian Hunter --- drivers/mmc/host/sdhci-omap.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) -- 2.11.0 -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" 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 df927f3faaf6..86b6cc0a5380 100644 --- a/drivers/mmc/host/sdhci-omap.c +++ b/drivers/mmc/host/sdhci-omap.c @@ -31,6 +31,7 @@ #define SDHCI_OMAP_CON 0x12c #define CON_DW8 BIT(5) #define CON_DMA_MASTER BIT(20) +#define CON_DDR BIT(19) #define CON_CLKEXTFREE BIT(16) #define CON_PADEN BIT(15) #define CON_INIT BIT(1) @@ -461,6 +462,26 @@ static void sdhci_omap_init_74_clocks(struct sdhci_host *host, u8 power_mode) enable_irq(host->irq); } +static void sdhci_omap_set_uhs_signaling(struct sdhci_host *host, + unsigned int timing) +{ + u32 reg; + struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); + struct sdhci_omap_host *omap_host = sdhci_pltfm_priv(pltfm_host); + + sdhci_omap_stop_clock(omap_host); + + reg = sdhci_omap_readl(omap_host, SDHCI_OMAP_CON); + if (timing == MMC_TIMING_UHS_DDR50 || timing == MMC_TIMING_MMC_DDR52) + reg |= CON_DDR; + else + reg &= ~CON_DDR; + sdhci_omap_writel(omap_host, SDHCI_OMAP_CON, reg); + + sdhci_set_uhs_signaling(host, timing); + sdhci_omap_start_clock(omap_host); +} + static struct sdhci_ops sdhci_omap_ops = { .set_clock = sdhci_omap_set_clock, .set_power = sdhci_omap_set_power, @@ -470,7 +491,7 @@ static struct sdhci_ops sdhci_omap_ops = { .set_bus_width = sdhci_omap_set_bus_width, .platform_send_init_74_clocks = sdhci_omap_init_74_clocks, .reset = sdhci_reset, - .set_uhs_signaling = sdhci_set_uhs_signaling, + .set_uhs_signaling = sdhci_omap_set_uhs_signaling, }; static int sdhci_omap_set_capabilities(struct sdhci_omap_host *omap_host) From patchwork Mon Feb 5 12:50:26 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: 126855 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp1942472ljc; Mon, 5 Feb 2018 04:52:14 -0800 (PST) X-Google-Smtp-Source: AH8x227zrJ0xWFcR8ya/KKVhst1dwS5PxpYNho++a7zAhD5i5DPVpG7tT7e1Jtum9EsI81dN828/ X-Received: by 2002:a17:902:7082:: with SMTP id z2-v6mr13756828plk.244.1517835134355; Mon, 05 Feb 2018 04:52:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517835134; cv=none; d=google.com; s=arc-20160816; b=Z6QsDDqouV0SEVlduJ1Q3OYJNHQyLLuB9+GdkUAwrFts0Fm7mR1T3J4hIwEML1gDXX x3JqNalAxY9T6v7GrGohIUAOMurxT6oV4W3jff4ym33HZfE5M9LKa2orWJAOKkU+UlLy t80qI+AEJfeHJJdaTU53VEwa9ZCGY6DIaEZb5ARzvpniHp2dYiXjLBeNJqzuGmOaZMhP 3ojKGZHNJ4Bj/K6rLmdq47SEi1y91N6CFmCJO+U1cJycdFp6gJXCusENIujLA4ZFBUDM 4THakkQcTt9Gr83pE+uEyXSs3P85R1/zVbQOTRqlM4aFStcltk/rzsphyDNP2WxJ80A+ sQ2w== 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=zb2TpyrI2iJgf88pU2+8WcmqZaw2NmeMCEUnTnVIWPc=; b=JmcbBdkuE1nezBdM2O1FHFzDVJGkr56gZfJCRtBFahvXyyfR/6jUcpSf2ECdsMJR9b rfYoMjAlnnYFVFEqHy0XT88LvjaiuY/BUIGi5I3REZW7qT3r4sg2XWNrg0RGFyurt61O ED3L6XbGT2Im2x7gCcg5fHTdN+Fwe1Aw9MGG+aSej/kRQ2MYJ+fEBHfl1T+AIbAPqR0C 3IkjVYWltdAYjApElkwikGXzIwAZR3Gt1anjD9ulX3CUquxSms1VFN3SI8q9tZwNL64t OYwPQf0nnHubqlHFu1mzl36rRCenEdjvm3T/kgrFe+ph+WUiP4t0opbKkSldMfIUDZGl y6gA== 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=jOGSPiEG; spf=pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-mmc-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 j11si4433170pff.406.2018.02.05.04.52.14; Mon, 05 Feb 2018 04:52:14 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-mmc-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=jOGSPiEG; spf=pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-mmc-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 S1753155AbeBEMwL (ORCPT + 6 others); Mon, 5 Feb 2018 07:52:11 -0500 Received: from lelnx193.ext.ti.com ([198.47.27.77]:63881 "EHLO lelnx193.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753135AbeBEMvz (ORCPT ); Mon, 5 Feb 2018 07:51:55 -0500 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by lelnx193.ext.ti.com (8.15.1/8.15.1) with ESMTP id w15CpSdd011298; Mon, 5 Feb 2018 06:51:28 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1517835088; bh=77oywQEqkuBA+0emxZpt5wTJCqT69AFTyPApfY1PN74=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=jOGSPiEGD5c0GENu0MtOxbh/9nn7paE4i1R1xZYEJ1j1RU3dnkDn4spDOeMNQdh0F JsVumWnlf+EYniBDmNCHvp3ZYi9A3dXzeBFZdzRNe8Ebq35YFIFVv8rkoxFfUnd5TY AZ8SRcBKih4hC7Y6OYQBxDV2pmwUWvvbMBucaxK8= Received: from DLEE101.ent.ti.com (dlee101.ent.ti.com [157.170.170.31]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id w15CpSli007773; Mon, 5 Feb 2018 06:51:28 -0600 Received: from DLEE112.ent.ti.com (157.170.170.23) by DLEE101.ent.ti.com (157.170.170.31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Mon, 5 Feb 2018 06:51:27 -0600 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Mon, 5 Feb 2018 06:51:27 -0600 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id w15CoaGi023963; Mon, 5 Feb 2018 06:51:24 -0600 From: Kishon Vijay Abraham I To: Ulf Hansson , Tony Lindgren , Adrian Hunter CC: Rob Herring , Mark Rutland , Russell King , Kishon Vijay Abraham I , , , , , Subject: [PATCH v2 13/16] dt-bindings: sdhci-omap: Add K2G specific binding Date: Mon, 5 Feb 2018 18:20:26 +0530 Message-ID: <20180205125029.21570-14-kishon@ti.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180205125029.21570-1-kishon@ti.com> References: <20180205125029.21570-1-kishon@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org Add binding for the TI's sdhci-omap controller present in K2G. Signed-off-by: Kishon Vijay Abraham I Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/mmc/sdhci-omap.txt | 2 ++ 1 file changed, 2 insertions(+) -- 2.11.0 -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" 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/Documentation/devicetree/bindings/mmc/sdhci-omap.txt b/Documentation/devicetree/bindings/mmc/sdhci-omap.txt index 51775a372c06..8d09b837e350 100644 --- a/Documentation/devicetree/bindings/mmc/sdhci-omap.txt +++ b/Documentation/devicetree/bindings/mmc/sdhci-omap.txt @@ -4,7 +4,9 @@ Refer to mmc.txt for standard MMC bindings. Required properties: - compatible: Should be "ti,dra7-sdhci" for DRA7 and DRA72 controllers + Should be "ti,k2g-sdhci" for K2G - ti,hwmods: Must be "mmc", is controller instance starting 1 + (Not required for K2G). Example: mmc1: mmc@4809c000 { From patchwork Mon Feb 5 12:50:27 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: 126856 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp1942602ljc; Mon, 5 Feb 2018 04:52:24 -0800 (PST) X-Google-Smtp-Source: AH8x225nCKuLsgxhOyjdh68ViGvzgKaiIRlGd8r0m1M9WQei5+Rw11FCuga8bO4ArvQCLBa/ii9d X-Received: by 2002:a17:902:3103:: with SMTP id w3-v6mr14177971plb.3.1517835144247; Mon, 05 Feb 2018 04:52:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517835144; cv=none; d=google.com; s=arc-20160816; b=L6o57WLX6aFUa6pZF9VFngZzFTJ8XkXve8Nt0wvnzlJ63DS1f+gaxthTorYYLnSxBc tGZOyEMN/eJe/bmCN1Szkl9vMxLyO1jiD/QOSyRr09h8lv1X6Ps23Qmzao5jERhzW0gu J+AZTWgHjCTzy0iSavvpGAEiqlZvpVqZl6aoUpVM61U1eq6BfUrAAk0ac+JEvVg2XqWU 8eH1OMrgCB2t1fMDdMeFkS6mAWx/MKRLp88gbOrq9B0MJ/eV8RuuTuxP2ofRpmYezkww nVdw9cTy88Ro29w0MQa4H4Yp0ENVA+QolJb5ih/LFf2bqbRLwkACG1AvOk8bInbK2awC N9pQ== 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=y4eCksbveeevR1Zxw290292ghZmaBpl7VSpCjjnwh1A=; b=D16BXjLHW6oKsGAnhpPQXflo8L44FurwOyMYP/eNfba88VGQ2juNXa9UxdJF30NWv4 q2EA2Vr9LNgGitDHOOs9nFz6G8SmXLK7mi+Rih8FF3KdIr9mV0gCogFf3soXdlxC7xNw dHCSqpdX+F4u5Ao/f8Z+RNkjF1fGPb8siwnowoKqvJLpqkt/LGI34YmRRIByo2yGR38r Ztc/9fntBJQHsDMDB1FnEj/AfvAEQTFoFQcsj/OHNLmcECiIH7nCqkT259qA3DQKI+md F6iZoAbBjYWn/DtnAd3el7sDaeUj42wp4Vmtfbu7pgi407pbElI0HUZn9q95ZDs79GXD rg0g== 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=GcPf4h2t; spf=pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-mmc-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 d7si3622715pgf.470.2018.02.05.04.52.24; Mon, 05 Feb 2018 04:52:24 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-mmc-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=GcPf4h2t; spf=pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-mmc-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 S1753221AbeBEMwV (ORCPT + 6 others); Mon, 5 Feb 2018 07:52:21 -0500 Received: from fllnx210.ext.ti.com ([198.47.19.17]:11999 "EHLO fllnx210.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753137AbeBEMv5 (ORCPT ); Mon, 5 Feb 2018 07:51:57 -0500 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by fllnx210.ext.ti.com (8.15.1/8.15.1) with ESMTP id w15CpVbi023525; Mon, 5 Feb 2018 06:51:31 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1517835091; bh=KQhdrXKTyj9CoZKY5RkGJFLzrHLL0usW21WquQOUQcI=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=GcPf4h2tzQynYd1r8aXSBUGN2MCGRHq26o0IG8cVzK68y7HVXoO20uDgW4GWM/HJ7 ZMtl2MTFJp8ZggIYK9nQowWLKqqmgx/hRebQDgGkJDF6n1vFY3bAqdPe1kSj4WCn5H 6YAuqLskYY1HjmHscijFiU/8LbIuw/Qi5iEmVJSQ= Received: from DLEE103.ent.ti.com (dlee103.ent.ti.com [157.170.170.33]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id w15CpV2n007830; Mon, 5 Feb 2018 06:51:31 -0600 Received: from DLEE106.ent.ti.com (157.170.170.36) by DLEE103.ent.ti.com (157.170.170.33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1261.35; Mon, 5 Feb 2018 06:51:31 -0600 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE106.ent.ti.com (157.170.170.36) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1261.35 via Frontend Transport; Mon, 5 Feb 2018 06:51:31 -0600 Received: from a0393678ub.india.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id w15CoaGj023963; Mon, 5 Feb 2018 06:51:28 -0600 From: Kishon Vijay Abraham I To: Ulf Hansson , Tony Lindgren , Adrian Hunter CC: Rob Herring , Mark Rutland , Russell King , Kishon Vijay Abraham I , , , , , Subject: [PATCH v2 14/16] mmc: sdhci-omap: Add support for MMC/SD controller in k2g SoC Date: Mon, 5 Feb 2018 18:20:27 +0530 Message-ID: <20180205125029.21570-15-kishon@ti.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180205125029.21570-1-kishon@ti.com> References: <20180205125029.21570-1-kishon@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org Add support for the new compatible added specifically to support k2g's MMC/SD controller. Signed-off-by: Kishon Vijay Abraham I Acked-by: Adrian Hunter --- drivers/mmc/host/sdhci-omap.c | 9 +++++++++ 1 file changed, 9 insertions(+) -- 2.11.0 -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" 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 db487b77fbcc..863f6736c2fe 100644 --- a/drivers/mmc/host/sdhci-omap.c +++ b/drivers/mmc/host/sdhci-omap.c @@ -719,6 +719,10 @@ static const struct sdhci_pltfm_data sdhci_omap_pdata = { .ops = &sdhci_omap_ops, }; +static const struct sdhci_omap_data k2g_data = { + .offset = 0x200, +}; + static const struct sdhci_omap_data dra7_data = { .offset = 0x200, .flags = SDHCI_OMAP_REQUIRE_IODELAY, @@ -726,6 +730,7 @@ static const struct sdhci_omap_data dra7_data = { static const struct of_device_id omap_sdhci_match[] = { { .compatible = "ti,dra7-sdhci", .data = &dra7_data }, + { .compatible = "ti,k2g-sdhci", .data = &k2g_data }, {}, }; MODULE_DEVICE_TABLE(of, omap_sdhci_match); @@ -846,6 +851,7 @@ static int sdhci_omap_probe(struct platform_device *pdev) int ret; u32 offset; struct device *dev = &pdev->dev; + struct device_node *node = dev->of_node; struct sdhci_host *host; struct sdhci_pltfm_host *pltfm_host; struct sdhci_omap_host *omap_host; @@ -872,6 +878,9 @@ static int sdhci_omap_probe(struct platform_device *pdev) return PTR_ERR(host); } + if (of_device_is_compatible(node, "ti,k2g-sdhci")) + host->quirks2 |= SDHCI_QUIRK2_NO_1_8_V; + pltfm_host = sdhci_priv(host); omap_host = sdhci_pltfm_priv(pltfm_host); omap_host->host = host;