From patchwork Tue Oct 25 13:29:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 13019250 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 23620C04A95 for ; Tue, 25 Oct 2022 13:30:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=t6qFQWHmKSFyBCgF8VJRGuHsK4Ei7rkne6tsfke6P0E=; b=E6lU2XlErsGUJB k8u+S9bs1tBDVLmIT/2yDLfHURwVrdQbRMaAJzzoCipacvqWYe4u6D1DnoccIPyic+E2cb7T0Tj+1 5Z7+fAclrLBZ1vf3TW8CTZCdLkNkv4RqovWa1+bO0eQam+43YJX/+XGeRxrqzjhiIw2unyZpYTTyx uZht9rdC89g66oSVxqprTauUNB5OsrCEL1xM9WG7pCLCvdBpkE5/uNoojU34ufid4uMM6zN/+oJas F/zoXTg68jvVVM9xrZgFLClFDCJURo6NFILnovfbwuPlJzc3iAn5tiBrg8SKw/YnlEnpVqxQnC60Y xh0p6b++SnBUrKutiOwQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1onK0u-005TCH-IJ; Tue, 25 Oct 2022 13:30:40 +0000 Received: from mxout4.routing.net ([2a03:2900:1:a::9]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1onK0I-005SvE-Sb; Tue, 25 Oct 2022 13:30:05 +0000 Received: from mxbox1.masterlogin.de (unknown [192.168.10.88]) by mxout4.routing.net (Postfix) with ESMTP id C1A5D1025EB; Tue, 25 Oct 2022 13:29:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1666704599; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=t6qFQWHmKSFyBCgF8VJRGuHsK4Ei7rkne6tsfke6P0E=; b=vU5Gta+sTAyNnclvdMa1mPapNQxHT2bo3oZfzMJg4hTzgHhgmXXkx/A88WP0oZ/uZbiJFz GzTBZY2xXdAHOyKVX69O1fg/bVrQ1/Ha+shwF39e7ofPiG4SKV1Oka99dU4fAjEuandQZR btJr89gnqgYy2O7Xmcrrb3Tg592WmNU= Received: from frank-G5.. (fttx-pool-217.61.152.57.bambit.de [217.61.152.57]) by mxbox1.masterlogin.de (Postfix) with ESMTPSA id 992A4403A9; Tue, 25 Oct 2022 13:29:58 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Subject: [PATCH v5 1/6] dt-bindings: mmc: mtk-sd: Set clocks based on compatible Date: Tue, 25 Oct 2022 15:29:48 +0200 Message-Id: <20221025132953.81286-2-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221025132953.81286-1-linux@fw-web.de> References: <20221025132953.81286-1-linux@fw-web.de> MIME-Version: 1.0 X-Mail-ID: 22076d22-0fc1-48b2-8540-d60d145b0ee7 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221025_063003_240609_C1F584A8 X-CRM114-Status: GOOD ( 12.38 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Ulf Hansson , =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= , Wenbin Mei , Sam Shih , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski , Rob Herring , linux-arm-kernel@lists.infradead.org, Krzysztof Kozlowski , Matthias Brugger , Chaotian Jing Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org From: Nícolas F. R. A. Prado The binding was describing a single clock list for all platforms, but that's not really suitable: Most platforms using at least 2 clocks (source, hclk), some of them a third "source_cg". Mt2712 requires an extra 'bus_clk' on some of its controllers, while mt8192 requires 8 clocks. Move the clock definitions inside if blocks that match on the compatibles. I used Patch from Nícolas F. R. A. Prado and modified it to not using "not" statement. Fixes: 59a23395d8aa ("dt-bindings: mmc: Add support for MT8192 SoC") Signed-off-by: Nícolas F. R. A. Prado Signed-off-by: Frank Wunderlich Reviewed-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno --- v2: - add this patch v3: - add blank lines and change "not" to matchlist - reorder entries - make generic first then order alphanumeric - rewrite commit description - drop soc-specific mt8183 - constraints were also set for it above v4: - re-add mt8183 reg-minitems --- .../devicetree/bindings/mmc/mtk-sd.yaml | 123 +++++++++++++----- 1 file changed, 93 insertions(+), 30 deletions(-) diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml index d8e1e2e9adf2..0cedeb12892d 100644 --- a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml +++ b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml @@ -10,9 +10,6 @@ maintainers: - Chaotian Jing - Wenbin Mei -allOf: - - $ref: mmc-controller.yaml# - properties: compatible: oneOf: @@ -48,27 +45,11 @@ properties: description: Should contain phandle for the clock feeding the MMC controller. minItems: 2 - items: - - description: source clock (required). - - description: HCLK which used for host (required). - - description: independent source clock gate (required for MT2712). - - description: bus clock used for internal register access (required for MT2712 MSDC0/3). - - description: msdc subsys clock gate (required for MT8192). - - description: peripheral bus clock gate (required for MT8192). - - description: AXI bus clock gate (required for MT8192). - - description: AHB bus clock gate (required for MT8192). + maxItems: 7 clock-names: minItems: 2 - items: - - const: source - - const: hclk - - const: source_cg - - const: bus_clk - - const: sys_cg - - const: pclk_cg - - const: axi_cg - - const: ahb_cg + maxItems: 7 interrupts: description: @@ -190,15 +171,97 @@ required: - vmmc-supply - vqmmc-supply -if: - properties: - compatible: - contains: - const: mediatek,mt8183-mmc -then: - properties: - reg: - minItems: 2 +allOf: + - $ref: mmc-controller.yaml# + - if: + properties: + compatible: + enum: + - mediatek,mt2701-mmc + - mediatek,mt6779-mmc + - mediatek,mt6795-mmc + - mediatek,mt7620-mmc + - mediatek,mt7622-mmc + - mediatek,mt7623-mmc + - mediatek,mt8135-mmc + - mediatek,mt8173-mmc + - mediatek,mt8183-mmc + - mediatek,mt8186-mmc + - mediatek,mt8188-mmc + - mediatek,mt8195-mmc + - mediatek,mt8516-mmc + then: + properties: + clocks: + minItems: 2 + items: + - description: source clock + - description: HCLK which used for host + - description: independent source clock gate + clock-names: + minItems: 2 + items: + - const: source + - const: hclk + - const: source_cg + + - if: + properties: + compatible: + contains: + const: mediatek,mt2712-mmc + then: + properties: + clocks: + minItems: 3 + items: + - description: source clock + - description: HCLK which used for host + - description: independent source clock gate + - description: bus clock used for internal register access (required for MSDC0/3). + clock-names: + minItems: 3 + items: + - const: source + - const: hclk + - const: source_cg + - const: bus_clk + + - if: + properties: + compatible: + contains: + const: mediatek,mt8183-mmc + then: + properties: + reg: + minItems: 2 + + - if: + properties: + compatible: + contains: + const: mediatek,mt8192-mmc + then: + properties: + clocks: + items: + - description: source clock + - description: HCLK which used for host + - description: independent source clock gate + - description: msdc subsys clock gate + - description: peripheral bus clock gate + - description: AXI bus clock gate + - description: AHB bus clock gate + clock-names: + items: + - const: source + - const: hclk + - const: source_cg + - const: sys_cg + - const: pclk_cg + - const: axi_cg + - const: ahb_cg unevaluatedProperties: false From patchwork Tue Oct 25 13:29:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 13019251 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C5D7AC38A2D for ; Tue, 25 Oct 2022 13:31:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-Id:Date :Subject:To:From:Reply-To:Content-Type:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=bMnJc+k3BQCb5bXYfRL3MsvClm+VDOd3dvG9NLKDvOQ=; b=mNvQf2jvu1CW/z AkRXqkmQtW6D0DUJr5fZ4z5GUIu/t0oR/52bKzTi7m/y3dStyou1Vr+9r8JEOxePsHl7y2Z6zLfgi tHd+uEMVNWr5S1Vi/TbTt+xraur+er1/LKoHtk9oMRj7LttXM4ECDNuZ+5RwYSkRacFOPDWmXn3un /edbhfi0OKx4rmFCK06vRY6dH1qbzE++O1ZzAlQJJiI03e1U2x4mzSoIQJ+2ODUjQGjaqWHqjq491 EIsn3jv9vV8Xq4W4Y9AAIVWbjJI3yPOp3V3TS7d4W9MUTNZ4FX1nNKsLNVB5hCm0XHGCJItNomZss XDn1CpX83yc9m8f3Z+fw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1onK1S-005TTK-Cq; Tue, 25 Oct 2022 13:31:14 +0000 Received: from mxout3.routing.net ([2a03:2900:1:a::8]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1onK0L-005SvX-LG; Tue, 25 Oct 2022 13:30:07 +0000 Received: from mxbox1.masterlogin.de (unknown [192.168.10.88]) by mxout3.routing.net (Postfix) with ESMTP id 9F3AD6269B; Tue, 25 Oct 2022 13:30:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1666704600; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bMnJc+k3BQCb5bXYfRL3MsvClm+VDOd3dvG9NLKDvOQ=; b=bqmjXLDAHMMTdEesmQZpRVjFUesGHRW4pFIElh7RlDZ3fk2PHkd3CB6WZcs0tUkYoyeic2 ZMfInO8tsZY1OT3/41+sXPu0C46qltffdlN69AXlPNukYwyOpyYQUCwW8Tn0gGEh3gYlm0 66CrMJL7mR/wOBgeD2FvM08GgIvhxWw= Received: from frank-G5.. (fttx-pool-217.61.152.57.bambit.de [217.61.152.57]) by mxbox1.masterlogin.de (Postfix) with ESMTPSA id B857340112; Tue, 25 Oct 2022 13:29:59 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Subject: [PATCH v5 2/6] dt-bindings: mmc: Add support for Mediatek MT7986 Date: Tue, 25 Oct 2022 15:29:49 +0200 Message-Id: <20221025132953.81286-3-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221025132953.81286-1-linux@fw-web.de> References: <20221025132953.81286-1-linux@fw-web.de> MIME-Version: 1.0 X-Mail-ID: a777fd38-8390-4268-8bed-ccfa143c1ccc X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221025_063005_857594_543C86CA X-CRM114-Status: UNSURE ( 9.55 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Ulf Hansson , Wenbin Mei , Sam Shih , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, Rob Herring , linux-arm-kernel@lists.infradead.org, Krzysztof Kozlowski , Matthias Brugger , Chaotian Jing Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org From: Sam Shih This commit adds dt-binding documentation of mmc for Mediatek MT7986 SoC Platform. Add SoC specific section for defining clock configuration. Signed-off-by: Sam Shih Signed-off-by: Frank Wunderlich Reviewed-by: Krzysztof Kozlowski Reviewed-by: AngeloGioacchino Del Regno --- v3: - drop assigned-clocks/assigned-clock-parents - fix clock description v4: - update binding for mt7986 (new mtk version) - squashed part 1 (compatible) and 3 (SoC specific clock config) and so dropped Ack from Rob for 1rst Part v5: - drop quotes around clock names --- .../devicetree/bindings/mmc/mtk-sd.yaml | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml index 0cedeb12892d..6f8ecb4788eb 100644 --- a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml +++ b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml @@ -20,6 +20,7 @@ properties: - mediatek,mt6795-mmc - mediatek,mt7620-mmc - mediatek,mt7622-mmc + - mediatek,mt7986-mmc - mediatek,mt8135-mmc - mediatek,mt8173-mmc - mediatek,mt8183-mmc @@ -237,6 +238,31 @@ allOf: reg: minItems: 2 + - if: + properties: + compatible: + contains: + enum: + - mediatek,mt7986-mmc + then: + properties: + clocks: + minItems: 3 + items: + - description: source clock + - description: HCLK which used for host + - description: independent source clock gate + - description: bus clock used for internal register access (required for MSDC0/3). + - description: msdc subsys clock gate + clock-names: + minItems: 3 + items: + - const: source + - const: hclk + - const: source_cg + - const: bus_clk + - const: sys_cg + - if: properties: compatible: From patchwork Tue Oct 25 13:29:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 13019249 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 93C35ECDFA1 for ; Tue, 25 Oct 2022 13:30:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-Id:Date :Subject:To:From:Reply-To:Content-Type:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=m0tnr5ZD8EC2va1ebYMWM4ouc4PlgDpshSSnTTqC0Pw=; b=wmqKT0JimLYiB7 xUHaeTLeXnzM9O6X/QxS9AFVhjNY1tQhrsceTpowoKSXIxUQP8j5EUF2mDzfCFp+JIvShcUmyESMQ 0wZJ9LXwi5EZBWwM079EJn9ZGf7x6yV1Pmws/7BohYYm8/O/vTlOlIU1i3aH+PJIKKt1E9e7Ze6Lt C/09+KcKD8KUWsUpuVD6vjvikByyHCbhJjf7lopWcbtwqVdmR0CCvTiDLaCs4fx8bdblmUjYJUoAH 0HYrb74qq2Ko5erHpW4bc21zvPRcjyO4ZNDdnrIvkIg5rc5tfOBfqIARrKin6U0ERBfuOdh2asZgs eTSVBiWPPBWoXZac0hvA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1onK0f-005T4p-VA; Tue, 25 Oct 2022 13:30:25 +0000 Received: from mxout4.routing.net ([2a03:2900:1:a::9]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1onK0J-005Svg-1a; Tue, 25 Oct 2022 13:30:04 +0000 Received: from mxbox1.masterlogin.de (unknown [192.168.10.88]) by mxout4.routing.net (Postfix) with ESMTP id 7B21E1025EC; Tue, 25 Oct 2022 13:30:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1666704601; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=m0tnr5ZD8EC2va1ebYMWM4ouc4PlgDpshSSnTTqC0Pw=; b=qMwAso86Hp7ltBOtgNKFpe/kVMJdUg34CtwFxfD3b+e4f3STZK7P3oc9v9AaTkRQ0HcSe8 PNGlN1mBQ13PQhsAaH+JwtO+F1kGJMdMqIZE/3otG2dGX1/kvEx5qKHC3IaIlpg4Qlu9yV kRaMVhOY8jxUxd/3Z1l/sMrWhwysKmo= Received: from frank-G5.. (fttx-pool-217.61.152.57.bambit.de [217.61.152.57]) by mxbox1.masterlogin.de (Postfix) with ESMTPSA id 9B149406DF; Tue, 25 Oct 2022 13:30:00 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Subject: [PATCH v5 3/6] arm64: dts: mediatek: mt2712e: swap last 2 clocks to match binding Date: Tue, 25 Oct 2022 15:29:50 +0200 Message-Id: <20221025132953.81286-4-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221025132953.81286-1-linux@fw-web.de> References: <20221025132953.81286-1-linux@fw-web.de> MIME-Version: 1.0 X-Mail-ID: f049c69f-c4f7-41cc-b7ee-c69fafc39865 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221025_063003_247626_E1857DC2 X-CRM114-Status: GOOD ( 10.69 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Ulf Hansson , Wenbin Mei , Sam Shih , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, Rob Herring , linux-arm-kernel@lists.infradead.org, Krzysztof Kozlowski , Matthias Brugger , Chaotian Jing Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org From: Frank Wunderlich First 3 clocks for mt2712 need to be "source", "hclk", "source_cg" so swap last 2 of mmc0 to match the binding. Signed-off-by: Frank Wunderlich Reviewed-by: AngeloGioacchino Del Regno --- arch/arm64/boot/dts/mediatek/mt2712e.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm64/boot/dts/mediatek/mt2712e.dtsi b/arch/arm64/boot/dts/mediatek/mt2712e.dtsi index e6d7453e56e0..9dc0794fcd2e 100644 --- a/arch/arm64/boot/dts/mediatek/mt2712e.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt2712e.dtsi @@ -766,9 +766,9 @@ mmc0: mmc@11230000 { interrupts = ; clocks = <&pericfg CLK_PERI_MSDC30_0>, <&pericfg CLK_PERI_MSDC50_0_HCLK_EN>, - <&pericfg CLK_PERI_MSDC30_0_QTR_EN>, - <&pericfg CLK_PERI_MSDC50_0_EN>; - clock-names = "source", "hclk", "bus_clk", "source_cg"; + <&pericfg CLK_PERI_MSDC50_0_EN>, + <&pericfg CLK_PERI_MSDC30_0_QTR_EN>; + clock-names = "source", "hclk", "source_cg", "bus_clk"; status = "disabled"; }; From patchwork Tue Oct 25 13:29:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 13019253 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2E117C38A2D for ; Tue, 25 Oct 2022 13:31:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-Id:Date :Subject:To:From:Reply-To:Content-Type:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=+KqTA8X1WXkJtVBHAMBvpE4UsH8pqMLqQ8SW7LYnkls=; b=OgbboHz/MmPEXP SYEBd75CoJhsx9iUK3bsKEgObXUNd5ATZ4naFUngjM1meiahUZ7fFDFKLkGprgWea644QwQ7tN3t5 Vt1D8a4HjKuB0s5nJiQLOHb0+ION3ycU0RIsylKsGHg76l86JWjj8RPXGDqPzuaUK+MltQpWRNYjS qPuXHjWyzV+aZztRDe2kxWMwuT7WVSlkLA1Qu2KTI9fEqx8u9q3Wx/t17ZQgvPNEEvNcx9pnnm2Zh 1s/dWcoZw/LbQS3niWPKljS0pLn1pi8wrnZmxE5cqJ5Uz89CuLfMM9acdcDwXdZ+n0l4KkrbxiRj2 59JBf1b6gO0lAHm3Cc4g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1onK1s-005TjK-Sv; Tue, 25 Oct 2022 13:31:40 +0000 Received: from mxout1.routing.net ([2a03:2900:1:a::a]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1onK0M-005Swb-OH; Tue, 25 Oct 2022 13:30:09 +0000 Received: from mxbox1.masterlogin.de (unknown [192.168.10.88]) by mxout1.routing.net (Postfix) with ESMTP id 13D0341BE4; Tue, 25 Oct 2022 13:30:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1666704603; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+KqTA8X1WXkJtVBHAMBvpE4UsH8pqMLqQ8SW7LYnkls=; b=opW/QX8eaW2XDxkaSJahYnIs5eBiv750GyW+oBsM+qMEVoweVMIeqowiBmMDWn2RsjCskU 2lV9Ccfj4LIqULGTmrQpiCRdk+RNih3ByUauYP8R5XgIs52rN6BmEponUB8Jt/Hg1bxDXU ykeKwF5UClaWz8Bj8o3jG9DIbybyVVM= Received: from frank-G5.. (fttx-pool-217.61.152.57.bambit.de [217.61.152.57]) by mxbox1.masterlogin.de (Postfix) with ESMTPSA id 830C44055F; Tue, 25 Oct 2022 13:30:01 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Subject: [PATCH v5 4/6] arm64: dts: mt8183: drop drv-type from mmc-node Date: Tue, 25 Oct 2022 15:29:51 +0200 Message-Id: <20221025132953.81286-5-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221025132953.81286-1-linux@fw-web.de> References: <20221025132953.81286-1-linux@fw-web.de> MIME-Version: 1.0 X-Mail-ID: dc44d099-0e74-475c-a740-2cf015df65f2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221025_063006_994570_5035DAFE X-CRM114-Status: UNSURE ( 9.44 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Ulf Hansson , Wenbin Mei , Sam Shih , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, Rob Herring , linux-arm-kernel@lists.infradead.org, Krzysztof Kozlowski , Matthias Brugger , Chaotian Jing Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org From: Frank Wunderlich This property is not defined in binding and driver. Fixes: cd894e274b74 ("arm64: dts: mt8183: Add krane-sku176 board") Signed-off-by: Frank Wunderlich Reviewed-by: AngeloGioacchino Del Regno --- v5: - add fixes-tag --- arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi b/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi index b4b86bb1f1a7..0c9b18c16c89 100644 --- a/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt8183-kukui.dtsi @@ -378,7 +378,6 @@ &mmc1 { mmc-pwrseq = <&wifi_pwrseq>; bus-width = <4>; max-frequency = <200000000>; - drv-type = <2>; cap-sd-highspeed; sd-uhs-sdr50; sd-uhs-sdr104; From patchwork Tue Oct 25 13:29:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 13019252 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 80B27C04A95 for ; Tue, 25 Oct 2022 13:31:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-Id:Date :Subject:To:From:Reply-To:Content-Type:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=5FbSf9twERvETDm4iNLtIwwA/uZDMLwNyqcMb0P1AC4=; b=gj20OZiROdY1ew 2ftx7UNGhh54SOyhmV5FrXyO5yzWwQW9GwgfQkioEp8BxEWQj+NTdKpPPq38Jp1MnQd3UkAP1kbJA Kg4OPjDuIZtRqeWTAp3ehNWDwq6JOVi1gWziHz/MQDW0xkKBiYwBbkm8l3slxujLCDVLdcqb75YqO ggkw1elJ2EgjEUciGNK2Q6EJcWpR0fNww20Nnbv2Z1zsdDHpv+9/8D4I6LhWVoVNntN/cuPUAcgT1 DDz2pt5va2Fwi+DE5TSQOSfRjPtOczB8/6IUyJICYoMy3ciVlMBNZgITQ0hS5l3RMfSwXidgTJuip VeOQXM80s7dBd4u84yvA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1onK1T-005TTs-9Z; Tue, 25 Oct 2022 13:31:15 +0000 Received: from mxout3.routing.net ([2a03:2900:1:a::8]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1onK0L-005Swr-RU; Tue, 25 Oct 2022 13:30:07 +0000 Received: from mxbox1.masterlogin.de (unknown [192.168.10.88]) by mxout3.routing.net (Postfix) with ESMTP id 09BF96269E; Tue, 25 Oct 2022 13:30:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1666704604; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5FbSf9twERvETDm4iNLtIwwA/uZDMLwNyqcMb0P1AC4=; b=M70gzvNjSVP8os7+u68LOoPoxFjVqN2sNM94ZSip68YoZaZWBiDq6X5/GLh9K5vR4sIDyX CXXOQi7DAIeSKHHYbQ1pGknvpu5cFVEpRVwvixzDdRzdhyFOmXTPr+qHjglaOirSs5jLBL J2dVYr50qTuaeyR9oO17e9ssuKTku3s= Received: from frank-G5.. (fttx-pool-217.61.152.57.bambit.de [217.61.152.57]) by mxbox1.masterlogin.de (Postfix) with ESMTPSA id 9E7CF406DF; Tue, 25 Oct 2022 13:30:02 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Subject: [PATCH v5 5/6] arm64: dts: mt7622: drop r_smpl property from mmc node Date: Tue, 25 Oct 2022 15:29:52 +0200 Message-Id: <20221025132953.81286-6-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221025132953.81286-1-linux@fw-web.de> References: <20221025132953.81286-1-linux@fw-web.de> MIME-Version: 1.0 X-Mail-ID: da3b5ec5-4663-4d83-aad4-cc50a829ea61 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221025_063006_062954_9B713BF6 X-CRM114-Status: UNSURE ( 9.75 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Ulf Hansson , Wenbin Mei , Sam Shih , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, Rob Herring , linux-arm-kernel@lists.infradead.org, Krzysztof Kozlowski , Matthias Brugger , Chaotian Jing Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org From: Frank Wunderlich This property is not defined in binding and driver. Fixes: 2c002a3049f7 ("arm64: dts: mt7622: add mmc related device nodes") Fixes: 0b6286dd96c0 ("arm64: dts: mt7622: add bananapi BPI-R64 board") Signed-off-by: Frank Wunderlich Reviewed-by: AngeloGioacchino Del Regno --- v5: - add fixes-tag --- arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts | 1 - arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts | 1 - 2 files changed, 2 deletions(-) diff --git a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts index d3f9eab2b784..af3fe61e4093 100644 --- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts +++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts @@ -235,7 +235,6 @@ &mmc1 { bus-width = <4>; max-frequency = <50000000>; cap-sd-highspeed; - r_smpl = <1>; cd-gpios = <&pio 81 GPIO_ACTIVE_LOW>; vmmc-supply = <®_3p3v>; vqmmc-supply = <®_3p3v>; diff --git a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts index 36722cabe626..b74e774c6eba 100644 --- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts +++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts @@ -208,7 +208,6 @@ &mmc1 { bus-width = <4>; max-frequency = <50000000>; cap-sd-highspeed; - r_smpl = <1>; cd-gpios = <&pio 81 GPIO_ACTIVE_LOW>; vmmc-supply = <®_3p3v>; vqmmc-supply = <®_3p3v>; From patchwork Tue Oct 25 13:29:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 13019258 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0F886C38A2D for ; Tue, 25 Oct 2022 13:32:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-Id:Date :Subject:To:From:Reply-To:Content-Type:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=WAjUi/ga04HIkMa7Z+d3a+gEhyr0vQRbkNFGR/WcXSQ=; b=d6mZwuS4Il4zyU Dz0lugZdAgfeY5X8dgu+Z6OtepT84HoHiaF/irChy33yDmqalnMJVIIWk/60Vvgk+uU4Wch9QUDnK ldJ/u5D+cfGEJZko/VplA2YR+HCpRt6/KtlAMLaoW8WJtSia1QM6od2zfNlGbmAO61r0sk1286ZoA hsQA9Kav1pmV6FUJxRVUeazJxCr/M+hSLZKI+fRmDJvNobuf5AyaNvRiQvb7DhKriivXfpDWYiGfu XxtugzYFZPTt84hEFta8W2mMjylbJoUb+fTl6HpLe+1XpSNo55pKrHWlfhAItxBVwp5VvXPWIMXGI W9v5hjMo4fV6NS0E55bw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1onK29-005Tun-OD; Tue, 25 Oct 2022 13:31:57 +0000 Received: from mxout3.routing.net ([2a03:2900:1:a::8]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1onK0O-005SyM-MW; Tue, 25 Oct 2022 13:30:10 +0000 Received: from mxbox1.masterlogin.de (unknown [192.168.10.88]) by mxout3.routing.net (Postfix) with ESMTP id E8EC66269F; Tue, 25 Oct 2022 13:30:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1666704605; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WAjUi/ga04HIkMa7Z+d3a+gEhyr0vQRbkNFGR/WcXSQ=; b=a5RrdKXte/35yjTwJvGKlVu5lgtfaA7v8j1tRHeFzSb/Chcec/eCRJ2ZqMfBHTT693Xgeb HrxtY11z0KvK+6S2M9U/M19WTdMha7FL5FB2m6y/nQhOUXwVae58Z90w3vslj9vZOkp5k9 Da+b9cEx1/aAIzTH1Ytotn9CmBWH/mk= Received: from frank-G5.. (fttx-pool-217.61.152.57.bambit.de [217.61.152.57]) by mxbox1.masterlogin.de (Postfix) with ESMTPSA id EAD5A40112; Tue, 25 Oct 2022 13:30:03 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Subject: [PATCH v5 6/6] mmc: mediatek: add support for MT7986 SoC Date: Tue, 25 Oct 2022 15:29:53 +0200 Message-Id: <20221025132953.81286-7-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221025132953.81286-1-linux@fw-web.de> References: <20221025132953.81286-1-linux@fw-web.de> MIME-Version: 1.0 X-Mail-ID: 481834d9-7b72-49f9-bee4-d48e2eac2acb X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221025_063008_936920_7F6FF18E X-CRM114-Status: UNSURE ( 9.77 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Ulf Hansson , Wenbin Mei , Sam Shih , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, Rob Herring , linux-arm-kernel@lists.infradead.org, Krzysztof Kozlowski , Matthias Brugger , Chaotian Jing , AngeloGioacchino Del Regno Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org From: Sam Shih Adding mt7986 own characteristics and of_device_id to have support of MT7986 SoC. Signed-off-by: Sam Shih Signed-off-by: Frank Wunderlich Reviewed-by: AngeloGioacchino Del Regno --- v5: - add reviewed-tag --- drivers/mmc/host/mtk-sd.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c index df941438aef5..3f7f3a1e0df8 100644 --- a/drivers/mmc/host/mtk-sd.c +++ b/drivers/mmc/host/mtk-sd.c @@ -552,6 +552,19 @@ static const struct mtk_mmc_compatible mt7622_compat = { .support_64g = false, }; +static const struct mtk_mmc_compatible mt7986_compat = { + .clk_div_bits = 12, + .recheck_sdio_irq = true, + .hs400_tune = false, + .pad_tune_reg = MSDC_PAD_TUNE0, + .async_fifo = true, + .data_tune = true, + .busy_check = true, + .stop_clk_fix = true, + .enhance_rx = true, + .support_64g = true, +}; + static const struct mtk_mmc_compatible mt8135_compat = { .clk_div_bits = 8, .recheck_sdio_irq = true, @@ -609,6 +622,7 @@ static const struct of_device_id msdc_of_ids[] = { { .compatible = "mediatek,mt6795-mmc", .data = &mt6795_compat}, { .compatible = "mediatek,mt7620-mmc", .data = &mt7620_compat}, { .compatible = "mediatek,mt7622-mmc", .data = &mt7622_compat}, + { .compatible = "mediatek,mt7986-mmc", .data = &mt7986_compat}, { .compatible = "mediatek,mt8135-mmc", .data = &mt8135_compat}, { .compatible = "mediatek,mt8173-mmc", .data = &mt8173_compat}, { .compatible = "mediatek,mt8183-mmc", .data = &mt8183_compat},