Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp6702140pxv; Thu, 29 Jul 2021 23:35:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwDbnnwKpfqSZtcFf/nOQT4Z48yiARApunFHXDJokIkqEj+HePz+to794si9BFucQLptBoD X-Received: by 2002:a50:d651:: with SMTP id c17mr1171006edj.69.1627626944414; Thu, 29 Jul 2021 23:35:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627626944; cv=none; d=google.com; s=arc-20160816; b=NwIUFLQ3RudZl0axZYzcItDGbOPjW3ca2PJbDsEYtXy7/0czFNfoaxgBDkLgU0bddb 3zBHTG4woog3+eLmcwsbI/qyyK5Q3wexANDD4RHKsjG0Xa4bgjpHM1ysrBtUbYD1B/wD Zybx35cJ6cBRSrX5Z5XmQb9GKimGDNjj60dNZfYn34PCRG1c4WzRjwo9VB6h9hUNM+q/ Evwt7ZB8vB6umhzIO/XPwNFyVdmqaylMF2DDXqgU7QfAP7W+6kKTYA0Z2A+2DTe4GRC7 t+OEkQtQY3+wklTQNaQjlUnlKmNZueHVODZaLFtNpOUBCyQBjYipe1wxb22RYLHpM7E5 Uupw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from; bh=VzNlM90LFASdsen4+tqEIpsi/WJLp9aoLc1vU7ZbtMA=; b=GkMmPZ+O4eY9vF4wZeDgewDl5lU17dkQtqsU1IK3qTJCTB98oVPpkv9ckr3Ue67Hnl YP255lbHfMYOEEDHtjPGDeLCAuM2K2MTrYBl6Sf+IahqOaL/KyakYK95wuhj2REAn9Rf NVjUbDcV5NACeofL76qZV9V9bOfaEttNg7hbfVWTUoElKyR0OWTxwBxsXsyoFzmUAvMV oSTrLB8enOMahHDue+s9ao7pl9TP3bh/lir6Qi1xYTHiF9QiVXciUxGLmoxk/JKN5ONC 3j5xBi/VikkopqOS5YifIAeYzPEmIvGrhCLPL6FuYihOo0P0Klf/SW87rj/ysbnUPkBu ME2w== 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 a3si796583edt.127.2021.07.29.23.35.21; Thu, 29 Jul 2021 23:35:44 -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 S237604AbhG3Gdc (ORCPT + 99 others); Fri, 30 Jul 2021 02:33:32 -0400 Received: from mga17.intel.com ([192.55.52.151]:45258 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237512AbhG3Gda (ORCPT ); Fri, 30 Jul 2021 02:33:30 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10060"; a="193318819" X-IronPort-AV: E=Sophos;i="5.84,281,1620716400"; d="scan'208";a="193318819" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jul 2021 23:33:26 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,281,1620716400"; d="scan'208";a="664714908" Received: from coresw01.iind.intel.com ([10.223.252.64]) by fmsmga006.fm.intel.com with ESMTP; 29 Jul 2021 23:33:20 -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: [PATCH 2/3] mmc: sdhci-of-arasan: Add intel Thunder Bay SOC support to the arasan eMMC driver Date: Fri, 30 Jul 2021 12:03:08 +0530 Message-Id: <20210730063309.8194-3-rashmi.a@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210730063309.8194-1-rashmi.a@intel.com> References: <20210730063309.8194-1-rashmi.a@intel.com> 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