From patchwork Sat Oct 22 09:05:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 13015862 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 BC720C3A59D for ; Sat, 22 Oct 2022 09:06:11 +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=FdAcqBn0H2JqQ0pdVG6sZ5NnqpXSrOBaSZ51qSReaUY=; b=UlZWUz+aVh1R82 9IrNkddZvS0r2Zf5GpYWVBMeOLYtH50S3MexRTLE/1w076wJIW2saDsZuAy4P0T/2Pj/1EoTcZfPe lbqeSiPBDOBYMFUVld3p8zv4r76O2+hKRQcQ1hiAh6QuY31pIxNxdThh4m+VZTng93t/ZasAgS+gf peXs4a0SfyQVvarUOmrWRR05iOiY7iFfMpsb9Y80Qzwtf6exYGbcSrYGRufD33IPxeI4954XkIY0J 4JrVdfVwJU28ttaRAQ5eo5y65gx7r3zyjGHZCeUJ3FH/a34WNPUza3rgq7MZ/BB+Oi9tymfoBK/nq f90cN5EAhyyi/EwZRnRg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1omAS9-00Bt4T-R1; Sat, 22 Oct 2022 09:06:01 +0000 Received: from mxout2.routing.net ([2a03:2900:1:a::b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1omARp-00BsxW-TC; Sat, 22 Oct 2022 09:05:43 +0000 Received: from mxbox1.masterlogin.de (unknown [192.168.10.88]) by mxout2.routing.net (Postfix) with ESMTP id A6AC25FC59; Sat, 22 Oct 2022 09:05:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1666429537; 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=FdAcqBn0H2JqQ0pdVG6sZ5NnqpXSrOBaSZ51qSReaUY=; b=ffNyPhHhNS1WwHLjXME0VKXh2X6Xacb3lp9yewBaHF4KzYvsjOmjhUDK04d2Mo+J3FRAvm lS+XLcSoJZ/yCirUEt8QFbaA5VRDmXKLHnCta019IzHYIoLTrGl6heiL9vEP2H9UF5TLWI hjhVtgpcN81G4ekx+iHQCfqRHcVmrg4= Received: from frank-G5.. (fttx-pool-80.245.73.148.bambit.de [80.245.73.148]) by mxbox1.masterlogin.de (Postfix) with ESMTPSA id CDCCD407B2; Sat, 22 Oct 2022 09:05:36 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Subject: [PATCH v2 1/5] dt-bindings: mmc: Add compatible for Mediatek MT7986 Date: Sat, 22 Oct 2022 11:05:26 +0200 Message-Id: <20221022090530.16265-2-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221022090530.16265-1-linux@fw-web.de> References: <20221022090530.16265-1-linux@fw-web.de> MIME-Version: 1.0 X-Mail-ID: ab4bd667-2f47-4413-a414-67051bd144ff X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221022_020542_109238_B009E595 X-CRM114-Status: UNSURE ( 8.22 ) 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 , Rob Herring , 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. Signed-off-by: Sam Shih Signed-off-by: Frank Wunderlich Acked-by: Rob Herring --- Documentation/devicetree/bindings/mmc/mtk-sd.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml index d8e1e2e9adf2..3cbf0208f1b4 100644 --- a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml +++ b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml @@ -23,6 +23,7 @@ properties: - mediatek,mt6795-mmc - mediatek,mt7620-mmc - mediatek,mt7622-mmc + - mediatek,mt7986-mmc - mediatek,mt8135-mmc - mediatek,mt8173-mmc - mediatek,mt8183-mmc From patchwork Sat Oct 22 09:05:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 13015873 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 E42CBC04A95 for ; Sat, 22 Oct 2022 09:06:58 +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=9YIiUZlTrjdPAMVHM7klpVqQezdSDroJaCTYC5nvEj0=; b=JWgtiDkd3rgDyF QO5kf6LRF/x64bfwuP6nBzhVIiWvoanOsr5tc81bQd1Rw8iH6kqzjwSYt01dsH8jEfT5Xi2tZmJIr ZofoArdu7pBZXa9n/l1YAMpvfWRdIaP3APqotX86q1pQ65yb6q7/f4BLtf0xQOZPvmH4SfOudVXNm 9Sfz/yQYYlNJ5Ecf6qVTwk8apyoDSC2sdPMcKbHN7pJGXP4hU9cvPhXT0FHv1OWeIhzu76ngRMTlY XfHMS5ihEpND/bW2RlrZH4qo4hyGqHP9Ck9yofSTQXplUGZwJVc4ZVrVLXD/Ea6VH2lMV26kE3QRF urHG42VV2y74WBrYclRA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1omASx-00BtU2-6f; Sat, 22 Oct 2022 09:06:51 +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 1omARq-00Bsxe-Aw; Sat, 22 Oct 2022 09:05:44 +0000 Received: from mxbox1.masterlogin.de (unknown [192.168.10.88]) by mxout1.routing.net (Postfix) with ESMTP id 633D23FE7B; Sat, 22 Oct 2022 09:05:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1666429538; 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=9YIiUZlTrjdPAMVHM7klpVqQezdSDroJaCTYC5nvEj0=; b=lHgZAK25MZU9KEAKj69t9BDdXuWpdeF4092Cc0t/isPenPxhZInA9DSsR6N1xogTdJe1q9 s+kpaGBNnPDIRN/MA1mSma3kdpCOKr1e9JXQL9B1RlRaE5Xq/G4lfyz/cV7OhXmUFzsQ8K d0i/pGO/stnONSn1LmzAiAcjbdTb2z4= Received: from frank-G5.. (fttx-pool-80.245.73.148.bambit.de [80.245.73.148]) by mxbox1.masterlogin.de (Postfix) with ESMTPSA id 98940405AF; Sat, 22 Oct 2022 09:05:37 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Subject: [PATCH v2 2/5] mmc: mediatek: add support for MT7986 SoC Date: Sat, 22 Oct 2022 11:05:27 +0200 Message-Id: <20221022090530.16265-3-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221022090530.16265-1-linux@fw-web.de> References: <20221022090530.16265-1-linux@fw-web.de> MIME-Version: 1.0 X-Mail-ID: beee7ae5-5b66-4462-bddd-cc2fb99e2c29 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221022_020542_539028_F5F16BC7 X-CRM114-Status: UNSURE ( 9.06 ) 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 Adding mt7986 own characteristics and of_device_id to have support of MT7986 SoC. Signed-off-by: Sam Shih Signed-off-by: Frank Wunderlich --- 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}, From patchwork Sat Oct 22 09:05:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 13015874 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 06239C433FE for ; Sat, 22 Oct 2022 09:07:02 +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=UTXQqkN1u8oqr164Wn8zlXyUh6Ah1bcisEKsdbq/R2I=; b=KND80AsrwjggzH Yd4q4FWqdJZjW9Tws7P+ZAIV5/iOeJ4qW6er2JiGEBW0LhkUkIuDMzR55jT1b6n41GNlAX1zcefy/ TCY8mJ34U6VpgLgLyT86Z8hBWIGbXXF/v5vCyXgwBQipPQfli2GOXbd6zKLUUXq9APCJXsb4moBbt GI8y39np/gd3QfSvyV0F6rxT9Ytn+StpOZUuEtyJQ+goJgZoir/+yfkkL2EjdGNe0YA4PCeaZRX/C HYSb13A8mPFzJCqYDzkEFWA7Gp81+qTD7qRCXmWcbx2sD8fZ23HBF42Jp/793zIHShxlisO0wFEd1 iGXyF0ED0z82r7CS50zw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1omASy-00BtVJ-JG; Sat, 22 Oct 2022 09:06:52 +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 1omARp-00Bsxn-TG; Sat, 22 Oct 2022 09:05:44 +0000 Received: from mxbox1.masterlogin.de (unknown [192.168.10.88]) by mxout4.routing.net (Postfix) with ESMTP id 257011004AC; Sat, 22 Oct 2022 09:05:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1666429539; 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=UTXQqkN1u8oqr164Wn8zlXyUh6Ah1bcisEKsdbq/R2I=; b=SmTfGSC6OXmd26oEoU/Ks0TYmuRkykE3o3IR4gqyI+uXwtByG8LUFHpHGuf+C8MKNTgtf2 M7s/amoCv4ZMrFagV0HaGW086ciJ9xvZtlUz0g/sZNHXxjAIF8u3kfPAhUP0Mg9H5kd2yX ScjHxgUEFMUkxxcc0RPb32Av44N0krw= Received: from frank-G5.. (fttx-pool-80.245.73.148.bambit.de [80.245.73.148]) by mxbox1.masterlogin.de (Postfix) with ESMTPSA id 59F5C407B2; Sat, 22 Oct 2022 09:05:38 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Subject: [PATCH v2 3/5] dt-bindings: mmc: mtk-sd: Set clocks based on compatible Date: Sat, 22 Oct 2022 11:05:28 +0200 Message-Id: <20221022090530.16265-4-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221022090530.16265-1-linux@fw-web.de> References: <20221022090530.16265-1-linux@fw-web.de> MIME-Version: 1.0 X-Mail-ID: eb8f1813-330d-417e-9bcc-0cc0defb3966 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221022_020542_260997_8493A632 X-CRM114-Status: GOOD ( 11.66 ) 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 , 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: NĂ­colas F. R. A. Prado The binding was describing a single clock list for all platforms, but that's not really suitable: mt2712 requires an extra 'bus_clk' on some of its controllers, while mt8192 requires four different extra clocks. The rest of the platforms can share the same 3 clocks, with the third being optional as it's not present on all platforms. Move the clock definitions inside if blocks that match on the compatibles. In practice this gets rid of dtbs_check warnings on mt8192, since the 'bus_clk' clock from mt2712 is no longer expected on this platform. Fixes: 59a23395d8aa ("dt-bindings: mmc: Add support for MT8192 SoC") Signed-off-by: NĂ­colas F. R. A. Prado Signed-off-by: Frank Wunderlich --- .../devicetree/bindings/mmc/mtk-sd.yaml | 111 +++++++++++++----- 1 file changed, 81 insertions(+), 30 deletions(-) diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml index 3cbf0208f1b4..c7bcf0c3dd5d 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: @@ -49,27 +46,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: @@ -191,15 +172,85 @@ 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: + 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 + - 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: + not: + properties: + compatible: + contains: + enum: + - mediatek,mt2712-mmc + - mediatek,mt8192-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 unevaluatedProperties: false From patchwork Sat Oct 22 09:05:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 13015863 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 07E6FC433FE for ; Sat, 22 Oct 2022 09:06: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=m0tnr5ZD8EC2va1ebYMWM4ouc4PlgDpshSSnTTqC0Pw=; b=xDfKPV3Tv/6kEt OHxNi4HqOVgRs30YUimpHcB+a+Fsr+zB1HTYrJ3VxrFQ9kFoC28hncOc2jgAw9m/ILUF88TM4WpT7 9kStAFSNoddaW+INXHRphSYOpxgPuvpgP9o+iYQjO2EyMGMD56AslGV91fG8yUx1E+SMJN/ePOP0I 41Rd8JADmuT2Gt3CSbF5U9XR45g++CqfC+oY60BserCOXWHRljhAw1WJqzoB1H1NP4WASBXR0rnn3 nVgrltHIHV0ZjhXi3A6hxm3y3/NG13B+X9jICscfBJPv3yv59akR26m4NvE3WzFkmzzFUjUWXpQ8O TycWZwEFM7Mw27Sg57fA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1omASJ-00Bt7t-Iq; Sat, 22 Oct 2022 09:06:11 +0000 Received: from mxout2.routing.net ([2a03:2900:1:a::b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1omARp-00Bsxt-TH; Sat, 22 Oct 2022 09:05:44 +0000 Received: from mxbox1.masterlogin.de (unknown [192.168.10.88]) by mxout2.routing.net (Postfix) with ESMTP id D415F60406; Sat, 22 Oct 2022 09:05:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1666429540; 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=f+HX7AxOXEhU94NT54g1eTsKTgL8+mTIqD19sYWf20al3RSAFUn21Mx2RcajqwH32XrP6b 5YqPpo+x07Bh84CtjH5ZXFDqvKjPEY+heOBWqDbcLDOAD2oYvv48NfQaZdKMTg6KAsjxoH 54eUbHWjL/shbQElje5vXKU3W/VAtck= Received: from frank-G5.. (fttx-pool-80.245.73.148.bambit.de [80.245.73.148]) by mxbox1.masterlogin.de (Postfix) with ESMTPSA id 1964C405AF; Sat, 22 Oct 2022 09:05:39 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Subject: [PATCH v2 4/5] arm64: dts: mediatek: mt2712e: swap last 2 clocks to match binding Date: Sat, 22 Oct 2022 11:05:29 +0200 Message-Id: <20221022090530.16265-5-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221022090530.16265-1-linux@fw-web.de> References: <20221022090530.16265-1-linux@fw-web.de> MIME-Version: 1.0 X-Mail-ID: da3b6cee-fbd9-477b-9dcb-927f929ae418 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221022_020542_109774_F3555FEF X-CRM114-Status: GOOD ( 10.47 ) 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 , 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 --- 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 Sat Oct 22 09:05:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 13015872 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 18ED8C433FE for ; Sat, 22 Oct 2022 09:06:57 +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=uwE9fx2tS9oduVfTIs9Hd6/Fb9a+3JIsjdgPxEZuCWk=; b=jkB30zgKPnn3/5 AfOUIeNHJkX5KEcTkZI+7IFnzi8PzWSqDGbuoX0HANCJMixLaO0Dehs4ECs+amb+vgX9va0+xco3g nxWWb5AP/zleohJHzvfM7Qngn/dEt+iaSybXgaxkQW3fVxvQ1058PnSVA4eMar3utw3f3wjmVnx1T zR4BUf3bHQMFAQHdJwva35Rr2uUJVsqMykNCdWRlf0mtwPTxveU9qe1SQSGnLqvLyNIFjDyRreZ6p qsU02C2GfofjYQmpGsug4aIQ9Mc1fRsCKGhUuwAKrz1QCh0puynMqWSPUScSHD3cHM0j5DdjK30nf z154aVXfWSho2lRpWpNQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1omASv-00BtSv-HK; Sat, 22 Oct 2022 09:06:49 +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 1omARq-00Bsxv-Ay; Sat, 22 Oct 2022 09:05:44 +0000 Received: from mxbox1.masterlogin.de (unknown [192.168.10.88]) by mxout1.routing.net (Postfix) with ESMTP id 8AA8A41A25; Sat, 22 Oct 2022 09:05:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1666429540; 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=uwE9fx2tS9oduVfTIs9Hd6/Fb9a+3JIsjdgPxEZuCWk=; b=G1xnd0RAP2vFdUQcNsw9U+lz+xRBas2yonC7dKl/xdx4sQpNoL0h2wCEjl4zSw/hjbN97h XqXubJCBuU3O8GVbLOnfbLZ8regoUcyCtf/Iinridt3NAixHPzUNZHPfCHH4313o5u5VVv IXlpKKROuQzbWa7VeD+offVODzc0hm8= Received: from frank-G5.. (fttx-pool-80.245.73.148.bambit.de [80.245.73.148]) by mxbox1.masterlogin.de (Postfix) with ESMTPSA id CB46C40690; Sat, 22 Oct 2022 09:05:39 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Subject: [PATCH v2 5/5] dt-bindings: mmc: mtk-sd: add mt7986 Date: Sat, 22 Oct 2022 11:05:30 +0200 Message-Id: <20221022090530.16265-6-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221022090530.16265-1-linux@fw-web.de> References: <20221022090530.16265-1-linux@fw-web.de> MIME-Version: 1.0 X-Mail-ID: 2ff8b4a6-6a4a-400a-8436-ce86973b8370 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221022_020542_541565_59C45497 X-CRM114-Status: UNSURE ( 7.88 ) 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 , 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 Add SoC specific section for defining clock configuration. Add compatible in "not" section to avoid override the settings again. Signed-off-by: Frank Wunderlich --- .../devicetree/bindings/mmc/mtk-sd.yaml | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml index c7bcf0c3dd5d..9df63c461f1f 100644 --- a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml +++ b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml @@ -229,6 +229,33 @@ allOf: - const: hclk - const: source_cg - const: bus_clk + - if: + properties: + compatible: + contains: + enum: + - mediatek,mt7986-mmc + then: + properties: + assigned-clock-parents: + maxItems: 2 + assigned-clocks: + maxItems: 2 + 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 + - description: msdc subsys clock gate + clock-names: + minItems: 3 + items: + - const: source + - const: hclk + - const: axi_cg + - const: ahb_cg - if: not: properties: @@ -237,6 +264,7 @@ allOf: enum: - mediatek,mt2712-mmc - mediatek,mt8192-mmc + - mediatek,mt7986-mmc then: properties: clocks: