Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2827628yba; Mon, 15 Apr 2019 21:50:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqwnhbILFBaOvUdUYECsXNUIN1X/7IdJk9zbBleZ0pfZ6F/6F2IOPNhNY2ixMh/pSL6CMi0J X-Received: by 2002:aa7:92d1:: with SMTP id k17mr31468477pfa.91.1555390244319; Mon, 15 Apr 2019 21:50:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555390244; cv=none; d=google.com; s=arc-20160816; b=tosDw5UjJnU2JNhMGlvGb8opU2R2yLXI8ok3dg1kmjCDLZ1BgrB4P9KTkQQlLZ0tqV mp28RrB4XBzPMVPrTL5vbRgOZo9rqVjBXxSPYT0OoKAmTGHRez4kKvMmtk9bj4UfjxRW NmmY3N1Z+FXIggr2aSDFjPpY4eeluXjBVPAszcDmRMrk5n0Am4V5mYb0TbtqMi/EKhI5 KRlRRvNkoI9i7HuUrKFif14fxOBAyAS7HgaO184O64pDIqQCgn08Rj0Vydh0aXBXW/A+ 1xjqnsoi8fhWbwJTm3MCt4Sk7rhi37+KUPm4oL0Nndv3adhVaF/JjHnejvn1A4VPNWvi /NPg== 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=ZL5pWOvzNY9Lijqfz5S3fq1CpOH0xSzWGRgnhz5ETnY=; b=QFhhT3wEleJIk9LefkLbyYJ8O8RF0ippVDRiMA8KcgKEuK6cQBrx3VjC/Owy+P1obR CGmeu30yv0bUdk22KhR5C1VCFUzfvKsxTYTU8IzgGw818K5KXfjG8eRWnH+bQj8jZh13 xc4tVcgzFxoem1vvPs1U2xaTKfpfe9Y62zTMwyO418rcz1ZQNr1GCUIEThJ6bUSj/GFP aZ/TZ5zeaWAwhgmcOSaT3mwnZFMfYreViIZZ/zobKIvVwLFpwPPwj1ZqpvGEb2g5RDQT 3k4DfJ3/3IZNZXTMF6YtJIv5AS1CP5umwpQe8gPEm/0ow7EW7TDkyQJ6dewxT0LWHmvI 8uMQ== 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 s5si46724532plr.307.2019.04.15.21.50.28; Mon, 15 Apr 2019 21:50:44 -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 S1726918AbfDPEsZ (ORCPT + 99 others); Tue, 16 Apr 2019 00:48:25 -0400 Received: from mx2.suse.de ([195.135.220.15]:59548 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726783AbfDPEsY (ORCPT ); Tue, 16 Apr 2019 00:48:24 -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 EC756AFDB; Tue, 16 Apr 2019 04:48:22 +0000 (UTC) From: NeilBrown To: Ulf Hansson , Chaotian Jing Date: Tue, 16 Apr 2019 14:47:29 +1000 Subject: [PATCH 3/5] 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: <155539004927.25108.8723794030985494935.stgit@noble.brown> In-Reply-To: <155538933003.25108.3338569916935462285.stgit@noble.brown> References: <155538933003.25108.3338569916935462285.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 # Conflicts: # drivers/mmc/host/mtk-sd.c --- 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 ed61cd5a5b8f..b6daa9773b25 100644 --- a/Documentation/devicetree/bindings/mmc/mtk-sd.txt +++ b/Documentation/devicetree/bindings/mmc/mtk-sd.txt @@ -15,6 +15,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 + "ralink,mt7620-sdhci", 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 14e048239143..d379f2ece305 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 = "ralink,mt7620-sdhci", .data = &mt7620_compat}, {} }; MODULE_DEVICE_TABLE(of, msdc_of_ids);