Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp4476848pxv; Tue, 20 Jul 2021 04:46:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJze3LcpdnOYPc/Wc8a85drqVCWJDvyqvoFVLzRf1hiGZ8OHwyQyyQgu4uu/An1XFSqdFN1L X-Received: by 2002:a05:6e02:525:: with SMTP id h5mr19679944ils.205.1626781617915; Tue, 20 Jul 2021 04:46:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626781617; cv=none; d=google.com; s=arc-20160816; b=WlLdxUMAKMZsPFQMbo2yantimSTH2JZzoEx9f1GkRR9jeOPjwSIwVPKYZvoyIr0LNo jp7chSM6nuUT6XQVS0MBUSgIZ+JNtIi4RSmFNaHF8CU2w56+WXM9ZlERuImMkM3OzRZy fSFQl3P3e2E6zfbWkTC+Bbg17u3165EwRBAJpG2IyEAaK1AUNmY4hl4zN00h6S1Y99G+ BfJ/8RAupNm1KoJILZmgwtbq6KVUyal2a4NJRnRvY+Gq0qIo5uCBNNanq+loAnRUkLtI XtGcBK3EoMDX2YTaLFooDncmHb8+fJXZuNeq0Y0mAi038+3+xnhbuTszIhe2pUoxAUDy wBLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=VzNlM90LFASdsen4+tqEIpsi/WJLp9aoLc1vU7ZbtMA=; b=RZHFn8SByomORo8CIjp4IkkqyT3qS62OWzNhNHrib5/qcVCdfKkRmbcYo/8bPmbLyu 37oSGAnchrhxb0+PT1D5N1Dv7rWT6T+Ht8uGXSvDN/i2uzNuwZ90NsqOJhscxE+mdLi/ 1AqKmaGTFpxBr+M8KMmIMIpY2oW+UWAeDg2R0KIpnHFJ0mH29aUi1Pw2x0qimdHBeKpv /D5NJ11mLZs3QbxmSEq/tvbv+KV7iivn6qSZuwNVDdvXElnInYur8jv8/SuXmr1PfcEu 7/wxEjaw7cQ6f9ZkSjUicDrNVziSfgLDJ+BjZm39JHjEeh+i8VLtWvkhLng3qMJxPDbA GDLQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p16si13914194jan.14.2021.07.20.04.46.46; Tue, 20 Jul 2021 04:46:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238119AbhGTLFR (ORCPT + 99 others); Tue, 20 Jul 2021 07:05:17 -0400 Received: from mga05.intel.com ([192.55.52.43]:30646 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236913AbhGTLB7 (ORCPT ); Tue, 20 Jul 2021 07:01:59 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10050"; a="296781289" X-IronPort-AV: E=Sophos;i="5.84,254,1620716400"; d="scan'208";a="296781289" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jul 2021 04:41:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,254,1620716400"; d="scan'208";a="510723733" Received: from coresw01.iind.intel.com ([10.223.252.64]) by fmsmga002.fm.intel.com with ESMTP; 20 Jul 2021 04:41:44 -0700 From: rashmi.a@intel.com To: linux-drivers-review-request@eclists.intel.com, michal.simek@xilinx.com, ulf.hansson@linaro.org, linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kishon@ti.com, vkoul@kernel.org, andriy.shevchenko@linux.intel.com, linux-phy@lists.infradead.org Cc: mgross@linux.intel.com, kris.pan@linux.intel.com, furong.zhou@intel.com, mallikarjunappa.sangannavar@intel.com, adrian.hunter@intel.com, mahesh.r.vaidya@intel.com, nandhini.srikandan@intel.com, kenchappa.demakkanavar@intel.com, rashmi.a@intel.com Subject: =?utf-8?q?=5B=E2=80=9CPATCH=E2=80=9D=202/3=5D=20mmc=3A=20sdhci-of-arasan=3A=20Add=20intel=20Thunder=20Bay=20SOC=20support=20to=20the=20arasan=20eMMC=20driver?= Date: Tue, 20 Jul 2021 17:11:32 +0530 Message-Id: <20210720114133.8936-3-rashmi.a@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210720114133.8936-1-rashmi.a@intel.com> References: <20210720114133.8936-1-rashmi.a@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rashmi A Intel Thunder Bay SoC eMMC controller is based on Arasan eMMC 5.1 host controller IP Signed-off-by: Rashmi A Reviewed-by: Adrian Hunter --- drivers/mmc/host/sdhci-of-arasan.c | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-of-arasan.c b/drivers/mmc/host/sdhci-of-arasan.c index 839965f7c717..6f202fb7a546 100644 --- a/drivers/mmc/host/sdhci-of-arasan.c +++ b/drivers/mmc/host/sdhci-of-arasan.c @@ -185,6 +185,13 @@ static const struct sdhci_arasan_soc_ctl_map intel_lgm_sdxc_soc_ctl_map = { .hiword_update = false, }; +static const struct sdhci_arasan_soc_ctl_map thunderbay_soc_ctl_map = { + .baseclkfreq = { .reg = 0x0, .width = 8, .shift = 14 }, + .clockmultiplier = { .reg = 0x4, .width = 8, .shift = 14 }, + .support64b = { .reg = 0x4, .width = 1, .shift = 24 }, + .hiword_update = false, +}; + static const struct sdhci_arasan_soc_ctl_map intel_keembay_soc_ctl_map = { .baseclkfreq = { .reg = 0x0, .width = 8, .shift = 14 }, .clockmultiplier = { .reg = 0x4, .width = 8, .shift = 14 }, @@ -430,6 +437,15 @@ static const struct sdhci_pltfm_data sdhci_arasan_cqe_pdata = { SDHCI_QUIRK2_CLOCK_DIV_ZERO_BROKEN, }; +static const struct sdhci_pltfm_data sdhci_arasan_thunderbay_pdata = { + .ops = &sdhci_arasan_cqe_ops, + .quirks = SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN | SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC, + .quirks2 = SDHCI_QUIRK2_PRESET_VALUE_BROKEN | + SDHCI_QUIRK2_CLOCK_DIV_ZERO_BROKEN | + SDHCI_QUIRK2_STOP_WITH_TC | + SDHCI_QUIRK2_CAPS_BIT63_FOR_HS400, +}; + #ifdef CONFIG_PM_SLEEP /** * sdhci_arasan_suspend - Suspend method for the driver @@ -1098,6 +1114,12 @@ static struct sdhci_arasan_of_data sdhci_arasan_generic_data = { .clk_ops = &arasan_clk_ops, }; +static const struct sdhci_arasan_of_data sdhci_arasan_thunderbay_data = { + .soc_ctl_map = &thunderbay_soc_ctl_map, + .pdata = &sdhci_arasan_thunderbay_pdata, + .clk_ops = &arasan_clk_ops, +}; + static const struct sdhci_pltfm_data sdhci_keembay_emmc_pdata = { .ops = &sdhci_arasan_cqe_ops, .quirks = SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN | @@ -1231,6 +1253,10 @@ static const struct of_device_id sdhci_arasan_of_match[] = { .compatible = "intel,keembay-sdhci-5.1-sdio", .data = &intel_keembay_sdio_data, }, + { + .compatible = "intel,thunderbay-sdhci-5.1", + .data = &sdhci_arasan_thunderbay_data, + }, /* Generic compatible below here */ { .compatible = "arasan,sdhci-8.9a", @@ -1582,7 +1608,8 @@ static int sdhci_arasan_probe(struct platform_device *pdev) if (of_device_is_compatible(np, "intel,keembay-sdhci-5.1-emmc") || of_device_is_compatible(np, "intel,keembay-sdhci-5.1-sd") || - of_device_is_compatible(np, "intel,keembay-sdhci-5.1-sdio")) { + of_device_is_compatible(np, "intel,keembay-sdhci-5.1-sdio") || + of_device_is_compatible(np, "intel,thunderbay-sdhci-5.1")) { sdhci_arasan_update_clockmultiplier(host, 0x0); sdhci_arasan_update_support64b(host, 0x0); -- 2.17.1