Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp334506yba; Sat, 4 May 2019 03:27:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqy5RQxrNy6UV5YTcMegbXZrBDuM2iU+gBABac3vbLjbl9TLKyRM0fJyyT1/JGydpVUOwVEV X-Received: by 2002:a62:2687:: with SMTP id m129mr18959005pfm.204.1556965639502; Sat, 04 May 2019 03:27:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556965639; cv=none; d=google.com; s=arc-20160816; b=bIIy6Ymn7UkzwqFwTrXVbhWCPPV4ZT/fE7aI5ctFkBCzRlgmgEl1KEXOriDq15u41y fHZzBwxDb3ie2hwBXOxKOGrL/Upe6aOKem6cU/JJi2bmK5nKTgOcxQszcNf/EWliRYih uvEzjveoI1HK6KrJArA8nR4S1gIXFk5NF2BZZYX5hpBH9hNYJI1+gISHXp2OVvn3n7/6 EEJ2jz7zR2oL93e6NH8X9U1TrHjyxyzDAWF0wdt4z5YGF5tNf8Nw+cZj2buMbSIBQaDK bd6ayd4X9YcwGM/RqYTTrBWtmYMw2a4jM/G46dfE4I98qIvVkgHYl7UQmi46H7pV4+1V QOEg== 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 :user-agent:references:in-reply-to:message-id:cc:subject:date:to :from; bh=p3P/jZz7TzmVMCz+ccwCOhFK0yGWsf0bKvC8KOws6gs=; b=tLe5aCSbnrCh+Wj8T/oI6SKibAaUFJrw0J3mM0dltw2SsnQaer5EET2Avn6XmJZ+ds pVdwAHh7kISWtJE6T6je4EJzgdBZJvMorMh3HQ4vLc/IRQeAisf9NFESRRCNvVr4iP3O /OZ64iEz4H+wLkZfy8xpbkY0p1U+31A3zgbmRi8mBihFKUfHaHVJoFbuTYvq1LKlF054 uoV3limzycGHESCu/Zk8ecMBQNO+Ow/K8KxUA+5P9vsA6aE/IZvWomRwx1Ghk0h+ebud bMGt75BmFLbxmcs4Jseavi/Q0zXWbK5LAZvTmmae4qBNeyo/K7hmhRckJvFIrrOshWiT Yq/Q== ARC-Authentication-Results: i=1; mx.google.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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 142si6993044pfu.129.2019.05.04.03.27.04; Sat, 04 May 2019 03:27:19 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727501AbfEDKZ6 (ORCPT + 99 others); Sat, 4 May 2019 06:25:58 -0400 Received: from mx2.suse.de ([195.135.220.15]:48418 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727479AbfEDKZ4 (ORCPT ); Sat, 4 May 2019 06:25:56 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 29B7CAF03; Sat, 4 May 2019 10:25:55 +0000 (UTC) From: NeilBrown To: Ulf Hansson , Chaotian Jing Date: Sat, 04 May 2019 20:24:56 +1000 Subject: [PATCH 2/4] mmc: mtk-sd: add support for config found in mt7620 family SOCs. Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, thirtythreeforty@gmail.com Message-ID: <155696549676.8632.14384982012480111613.stgit@noble.brown> In-Reply-To: <155696540998.8632.5242582397805128125.stgit@noble.brown> References: <155696540998.8632.5242582397805128125.stgit@noble.brown> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org mt7620 family MIPS SOCs contain the mtk-sd silicon. Add support for this. Signed-off-by: NeilBrown --- Documentation/devicetree/bindings/mmc/mtk-sd.txt | 1 + drivers/mmc/host/mtk-sd.c | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.txt b/Documentation/devicetree/bindings/mmc/mtk-sd.txt index 91a2ec59e497..8a532f4453f2 100644 --- a/Documentation/devicetree/bindings/mmc/mtk-sd.txt +++ b/Documentation/devicetree/bindings/mmc/mtk-sd.txt @@ -16,6 +16,7 @@ Required properties: "mediatek,mt2712-mmc": for mmc host ip compatible with mt2712 "mediatek,mt7622-mmc": for MT7622 SoC "mediatek,mt7623-mmc", "mediatek,mt2701-mmc": for MT7623 SoC + "mediatek,mt7620-mmc", for MT7621 SoC (and others) - reg: physical base address of the controller and length - interrupts: Should contain MSDC interrupt number diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c index 469d4a717175..0c2be4f54b1f 100644 --- a/drivers/mmc/host/mtk-sd.c +++ b/drivers/mmc/host/mtk-sd.c @@ -517,6 +517,17 @@ static const struct mtk_mmc_compatible mt8516_compat = { .stop_clk_fix = true, }; +static const struct mtk_mmc_compatible mt7620_compat = { + .clk_div_bits = 8, + .hs400_tune = false, + .pad_tune_reg = MSDC_PAD_TUNE, + .async_fifo = false, + .data_tune = false, + .busy_check = false, + .stop_clk_fix = false, + .enhance_rx = false, +}; + static const struct of_device_id msdc_of_ids[] = { { .compatible = "mediatek,mt8135-mmc", .data = &mt8135_compat}, { .compatible = "mediatek,mt8173-mmc", .data = &mt8173_compat}, @@ -525,6 +536,7 @@ static const struct of_device_id msdc_of_ids[] = { { .compatible = "mediatek,mt2712-mmc", .data = &mt2712_compat}, { .compatible = "mediatek,mt7622-mmc", .data = &mt7622_compat}, { .compatible = "mediatek,mt8516-mmc", .data = &mt8516_compat}, + { .compatible = "mediatek,mt7620-mmc", .data = &mt7620_compat}, {} }; MODULE_DEVICE_TABLE(of, msdc_of_ids);