From patchwork Sun Oct 23 09:12:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 617689 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 17D40ECAAA1 for ; Sun, 23 Oct 2022 09:13:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230008AbiJWJNO (ORCPT ); Sun, 23 Oct 2022 05:13:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229971AbiJWJNO (ORCPT ); Sun, 23 Oct 2022 05:13:14 -0400 Received: from mxout4.routing.net (mxout4.routing.net [IPv6:2a03:2900:1:a::9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4D0C72B6F; Sun, 23 Oct 2022 02:13:11 -0700 (PDT) Received: from mxbox2.masterlogin.de (unknown [192.168.10.89]) by mxout4.routing.net (Postfix) with ESMTP id DC2A910003A; Sun, 23 Oct 2022 09:13:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1666516390; 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=BD6mAlNjAC8SIECoC4GM6MgHhzLKTiR/Q5syyPQ9ektkWyP96tQ0WFR5aV1sPl9CZcwvAF X9Zx3DjRkbGH/c/d5WPlVv9qWAxIrS7JLJqEr314aA6JwwwakzjFCu3VmY82wz6dnetc5/ 9jQCCIu+FpFirlyQ3dFFZH6To71WhYs= Received: from frank-G5.. (fttx-pool-80.245.79.234.bambit.de [80.245.79.234]) by mxbox2.masterlogin.de (Postfix) with ESMTPSA id 0F37310031F; Sun, 23 Oct 2022 09:13:09 +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 v3 1/7] dt-bindings: mmc: Add compatible for Mediatek MT7986 Date: Sun, 23 Oct 2022 11:12:41 +0200 Message-Id: <20221023091247.70586-2-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221023091247.70586-1-linux@fw-web.de> References: <20221023091247.70586-1-linux@fw-web.de> MIME-Version: 1.0 X-Mail-ID: e429a734-6886-45a0-be96-cf417621776e Precedence: bulk List-ID: X-Mailing-List: devicetree@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 Sun Oct 23 09:12:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 617687 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 58DA2C433FE for ; Sun, 23 Oct 2022 09:13:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230040AbiJWJNT (ORCPT ); Sun, 23 Oct 2022 05:13:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230035AbiJWJNP (ORCPT ); Sun, 23 Oct 2022 05:13:15 -0400 Received: from mxout3.routing.net (mxout3.routing.net [IPv6:2a03:2900:1:a::8]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4362172B75; Sun, 23 Oct 2022 02:13:12 -0700 (PDT) Received: from mxbox2.masterlogin.de (unknown [192.168.10.89]) by mxout3.routing.net (Postfix) with ESMTP id A3A2F60553; Sun, 23 Oct 2022 09:13:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1666516390; 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=4VritE+ybpU07rveA4R3SYkkmaTESv58T7iG6/ydmr8=; b=SNSTWeYb/eV/JIYBlg57eIomzZIwVjBbkbeWKybl4nyzT6YzkpbWdM+s3ztyJGU7j4+oSQ Qfd6J4+4ZMVqDkUdloaGc/C/MMCMUQ2LVEWUTCXgY+pTkhssjLXeU38gpD2S9ouLxtRm4R PLVs5K7M55g36aSahPJmr9S9vm1/z/w= Received: from frank-G5.. (fttx-pool-80.245.79.234.bambit.de [80.245.79.234]) by mxbox2.masterlogin.de (Postfix) with ESMTPSA id D267310009F; Sun, 23 Oct 2022 09:13:09 +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 v3 2/7] dt-bindings: mmc: mtk-sd: Set clocks based on compatible Date: Sun, 23 Oct 2022 11:12:42 +0200 Message-Id: <20221023091247.70586-3-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221023091247.70586-1-linux@fw-web.de> References: <20221023091247.70586-1-linux@fw-web.de> MIME-Version: 1.0 X-Mail-ID: 26f9b6cb-7d41-488e-9bd4-dd6e7e6caf6b Precedence: bulk List-ID: X-Mailing-List: devicetree@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: 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 --- 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 --- .../devicetree/bindings/mmc/mtk-sd.yaml | 113 +++++++++++++----- 1 file changed, 83 insertions(+), 30 deletions(-) diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml index 3cbf0208f1b4..31bb6dc329d2 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,87 @@ 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,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 Sun Oct 23 09:12:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 617688 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 5AD36ECAAA1 for ; Sun, 23 Oct 2022 09:13:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230119AbiJWJNS (ORCPT ); Sun, 23 Oct 2022 05:13:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230048AbiJWJNP (ORCPT ); Sun, 23 Oct 2022 05:13:15 -0400 Received: from mxout4.routing.net (mxout4.routing.net [IPv6:2a03:2900:1:a::9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9185B72B6A; Sun, 23 Oct 2022 02:13:14 -0700 (PDT) Received: from mxbox2.masterlogin.de (unknown [192.168.10.89]) by mxout4.routing.net (Postfix) with ESMTP id A4CB0100105; Sun, 23 Oct 2022 09:13:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1666516392; 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=DkHMIRX0PtZEilJiS4bmFZHJWooEn5VptusI4EzbSkk=; b=DXa0DwoHnRr97FlGjGthS8d2qmmLDOX1SlDvmaHDJVQQ2EvDYCOlPgVQhoTi7CzfqnMCA1 /0AZFWObx2ewz7KXui0TY99AUQXapg7UaB6AFVC2Ye4kt/yzmM4D40N26XcyrO12pmA+cG lWSv8/fP8QCLaDH2wg5uaOF0gP8o7Ww= Received: from frank-G5.. (fttx-pool-80.245.79.234.bambit.de [80.245.79.234]) by mxbox2.masterlogin.de (Postfix) with ESMTPSA id EE66910031F; Sun, 23 Oct 2022 09:13:11 +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 v3 5/7] arm64: dts: mt8183: drop drv-type from mmc-node Date: Sun, 23 Oct 2022 11:12:45 +0200 Message-Id: <20221023091247.70586-6-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221023091247.70586-1-linux@fw-web.de> References: <20221023091247.70586-1-linux@fw-web.de> MIME-Version: 1.0 X-Mail-ID: 0b6fc260-44f2-42a2-a722-ba39a77fe633 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Frank Wunderlich This property is not defined in binding and driver. Signed-off-by: Frank Wunderlich --- 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 Sun Oct 23 09:12:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Wunderlich X-Patchwork-Id: 617686 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 8F6A8FA3745 for ; Sun, 23 Oct 2022 09:13:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229728AbiJWJNX (ORCPT ); Sun, 23 Oct 2022 05:13:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230122AbiJWJNS (ORCPT ); Sun, 23 Oct 2022 05:13:18 -0400 Received: from mxout2.routing.net (mxout2.routing.net [IPv6:2a03:2900:1:a::b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C2B4D72B6F; Sun, 23 Oct 2022 02:13:14 -0700 (PDT) Received: from mxbox2.masterlogin.de (unknown [192.168.10.89]) by mxout2.routing.net (Postfix) with ESMTP id 5364E5FC8D; Sun, 23 Oct 2022 09:13:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1666516393; 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=rMnfisK/hDmrrndbTYh3V3/FJiHDh0xeFPqPbDK9Zow=; b=PvXRtWEpFgfA+IwYUQ2o11RUnU29TFuqvg+urs1OUFP2irCuwHx3Jkd/OuhQu32tYYpvKb 2uP2vdShx1vofS2/c6XbmcAIx2XeLZNpoHWtDNm8m7CqSwKZzXpx8skwyFy0gTeARiPobU Gomb1bW/IWyqTxBPbh1u7C7CJ0DVcMw= Received: from frank-G5.. (fttx-pool-80.245.79.234.bambit.de [80.245.79.234]) by mxbox2.masterlogin.de (Postfix) with ESMTPSA id 9DDD310009F; Sun, 23 Oct 2022 09:13:12 +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 v3 6/7] arm64: dts: mt7622: drop r_smpl property from mmc node Date: Sun, 23 Oct 2022 11:12:46 +0200 Message-Id: <20221023091247.70586-7-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221023091247.70586-1-linux@fw-web.de> References: <20221023091247.70586-1-linux@fw-web.de> MIME-Version: 1.0 X-Mail-ID: ce718442-cd9d-45b0-806f-f5631c844f6e Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Frank Wunderlich This property is not defined in binding and driver. Signed-off-by: Frank Wunderlich --- 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>;