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: 13015907 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E071DC433FE for ; Sat, 22 Oct 2022 10:43:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230376AbiJVKnF (ORCPT ); Sat, 22 Oct 2022 06:43:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231130AbiJVKmb (ORCPT ); Sat, 22 Oct 2022 06:42:31 -0400 Received: from mxout2.routing.net (mxout2.routing.net [IPv6:2a03:2900:1:a::b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E58AC57E03; Sat, 22 Oct 2022 02:59:38 -0700 (PDT) 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 Cc: Frank Wunderlich , Chaotian Jing , Ulf Hansson , Rob Herring , Krzysztof Kozlowski , Matthias Brugger , Wenbin Mei , linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Sam Shih , Rob Herring 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 Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.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: 13015908 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E7F55C433FE for ; Sat, 22 Oct 2022 10:44:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230270AbiJVKoa (ORCPT ); Sat, 22 Oct 2022 06:44:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231161AbiJVKoP (ORCPT ); Sat, 22 Oct 2022 06:44:15 -0400 Received: from mxout1.routing.net (mxout1.routing.net [IPv6:2a03:2900:1:a::a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C260318AE6; Sat, 22 Oct 2022 03:01:50 -0700 (PDT) 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 Cc: Frank Wunderlich , Chaotian Jing , Ulf Hansson , Rob Herring , Krzysztof Kozlowski , Matthias Brugger , Wenbin Mei , linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Sam Shih 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 Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.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: 13015895 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8F39BC04A95 for ; Sat, 22 Oct 2022 10:18:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230239AbiJVKSp (ORCPT ); Sat, 22 Oct 2022 06:18:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230305AbiJVKSV (ORCPT ); Sat, 22 Oct 2022 06:18:21 -0400 Received: from mxout4.routing.net (mxout4.routing.net [IPv6:2a03:2900:1:a::9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8DA215A14D; Sat, 22 Oct 2022 02:35:02 -0700 (PDT) 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 Cc: Frank Wunderlich , Chaotian Jing , Ulf Hansson , Rob Herring , Krzysztof Kozlowski , Matthias Brugger , Wenbin Mei , linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= 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 Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.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: 13015878 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6BFF9C04A95 for ; Sat, 22 Oct 2022 09:56:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230078AbiJVJ4C (ORCPT ); Sat, 22 Oct 2022 05:56:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229960AbiJVJzm (ORCPT ); Sat, 22 Oct 2022 05:55:42 -0400 Received: from mxout2.routing.net (mxout2.routing.net [IPv6:2a03:2900:1:a::b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D045301011; Sat, 22 Oct 2022 02:09:00 -0700 (PDT) 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 Cc: Frank Wunderlich , Chaotian Jing , Ulf Hansson , Rob Herring , Krzysztof Kozlowski , Matthias Brugger , Wenbin Mei , linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.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 Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.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: 13015909 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0691BC433FE for ; Sat, 22 Oct 2022 10:44:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229718AbiJVKog (ORCPT ); Sat, 22 Oct 2022 06:44:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41878 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230013AbiJVKoS (ORCPT ); Sat, 22 Oct 2022 06:44:18 -0400 Received: from mxout1.routing.net (mxout1.routing.net [IPv6:2a03:2900:1:a::a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA22F31BF49; Sat, 22 Oct 2022 03:01:50 -0700 (PDT) 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 Cc: Frank Wunderlich , Chaotian Jing , Ulf Hansson , Rob Herring , Krzysztof Kozlowski , Matthias Brugger , Wenbin Mei , linux-mmc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.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 Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.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: