From nobody Mon Nov 11 00:42:27 2024 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 8BA90C433FE for ; Fri, 18 Nov 2022 19:03:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243025AbiKRTDO (ORCPT ); Fri, 18 Nov 2022 14:03:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242746AbiKRTBw (ORCPT ); Fri, 18 Nov 2022 14:01:52 -0500 Received: from mxout2.routing.net (mxout2.routing.net [IPv6:2a03:2900:1:a::b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B6DD3218B9; Fri, 18 Nov 2022 11:01:38 -0800 (PST) Received: from mxbulk.masterlogin.de (unknown [192.168.10.85]) by mxout2.routing.net (Postfix) with ESMTP id 6FE836049C; Fri, 18 Nov 2022 19:01:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1668798096; 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=46LdQBOByeZuglrOcnrqp2nEUUTk+5YvyMsAuNPulHE=; b=CAxCOxpWvAWCGTh5ZffOzvCq2/ySZWMAFalBqJAmESSJ2nKG6TincnY9WqVhvuQiyw2OMK QFBRs8nxohB4gg7KbtHVEh9ZKEc6Duhk6Ahh1Rz+d8XNFCDCHXEc3v/yJyPicqCj95XqJm GWVB5HCTruNVKQ6qy9BHb4KoB1dDsAI= Received: from frank-G5.. (fttx-pool-80.245.77.125.bambit.de [80.245.77.125]) by mxbulk.masterlogin.de (Postfix) with ESMTPSA id 1B27812271E; Fri, 18 Nov 2022 19:01:36 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Ryder Lee , Jianjun Wang , Bjorn Helgaas , Rob Herring , Krzysztof Kozlowski , Chunfeng Yun , Kishon Vijay Abraham I , Vinod Koul , Greg Kroah-Hartman , Matthias Brugger , Paolo Abeni , Lorenzo Bianconi , Bo Jiao , linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-phy@lists.infradead.org, linux-usb@vger.kernel.org, AngeloGioacchino Del Regno Subject: [PATCH v6 01/11] arm64: dts: mt7986: move wed_pcie node Date: Fri, 18 Nov 2022 20:01:16 +0100 Message-Id: <20221118190126.100895-2-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221118190126.100895-1-linux@fw-web.de> References: <20221118190126.100895-1-linux@fw-web.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Frank Wunderlich Move the wed_pcie node to have node aligned by address. Fixes: 00b9903996b3 ("arm64: dts: mediatek: mt7986: add support for Wireles= s Ethernet Dispatch") Signed-off-by: Frank Wunderlich Reviewed-by: AngeloGioacchino Del Regno --- arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi b/arch/arm64/boot/dt= s/mediatek/mt7986a.dtsi index a22e10e89ab9..afc01abfa99c 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi @@ -112,6 +112,12 @@ infracfg: infracfg@10001000 { #clock-cells =3D <1>; }; =20 + wed_pcie: wed-pcie@10003000 { + compatible =3D "mediatek,mt7986-wed-pcie", + "syscon"; + reg =3D <0 0x10003000 0 0x10>; + }; + topckgen: topckgen@1001b000 { compatible =3D "mediatek,mt7986-topckgen", "syscon"; reg =3D <0 0x1001B000 0 0x1000>; @@ -257,12 +263,6 @@ ethsys: syscon@15000000 { #reset-cells =3D <1>; }; =20 - wed_pcie: wed-pcie@10003000 { - compatible =3D "mediatek,mt7986-wed-pcie", - "syscon"; - reg =3D <0 0x10003000 0 0x10>; - }; - wed0: wed@15010000 { compatible =3D "mediatek,mt7986-wed", "syscon"; --=20 2.34.1 From nobody Mon Nov 11 00:42:27 2024 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 7864CC4332F for ; Fri, 18 Nov 2022 19:02:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243027AbiKRTCl (ORCPT ); Fri, 18 Nov 2022 14:02:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242845AbiKRTBw (ORCPT ); Fri, 18 Nov 2022 14:01:52 -0500 Received: from mxout1.routing.net (mxout1.routing.net [IPv6:2a03:2900:1:a::a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B728130550; Fri, 18 Nov 2022 11:01:38 -0800 (PST) Received: from mxbulk.masterlogin.de (unknown [192.168.10.85]) by mxout1.routing.net (Postfix) with ESMTP id D092F4039D; Fri, 18 Nov 2022 19:01:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1668798097; 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=0G8A0Vfo5m7AIOUJk0K0IJlgKB0iQp40ZYsUGIkco0E=; b=miuTTB51NT/kO2sKHO/2VyDlH4Kc5NLo6WnZxaMyP4eIt/g9EX3Kxz2ZrQUQRDJPo357nW EKDcCfvHT4l7gcTBVRKJMg6gHPWbvrg5/ptkSesICi7iyy+/D8hstXwaKO8UY3zbSoISKA EPHLN7RTg+sp3cIzwiZnkqip8AcwvVM= Received: from frank-G5.. (fttx-pool-80.245.77.125.bambit.de [80.245.77.125]) by mxbulk.masterlogin.de (Postfix) with ESMTPSA id 76AC81226BC; Fri, 18 Nov 2022 19:01:36 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Ryder Lee , Jianjun Wang , Bjorn Helgaas , Rob Herring , Krzysztof Kozlowski , Chunfeng Yun , Kishon Vijay Abraham I , Vinod Koul , Greg Kroah-Hartman , Matthias Brugger , Paolo Abeni , Lorenzo Bianconi , Bo Jiao , linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-phy@lists.infradead.org, linux-usb@vger.kernel.org, Krzysztof Kozlowski , AngeloGioacchino Del Regno Subject: [PATCH v6 02/11] dt-bindings: phy: mediatek,tphy: add support for mt7986 Date: Fri, 18 Nov 2022 20:01:17 +0100 Message-Id: <20221118190126.100895-3-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221118190126.100895-1-linux@fw-web.de> References: <20221118190126.100895-1-linux@fw-web.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Frank Wunderlich Add compatible string for mt7986. Signed-off-by: Frank Wunderlich Acked-by: Krzysztof Kozlowski Reviewed-by: Chunfeng Yun Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Matthias Brugger --- Documentation/devicetree/bindings/phy/mediatek,tphy.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/phy/mediatek,tphy.yaml b/Doc= umentation/devicetree/bindings/phy/mediatek,tphy.yaml index 5613cc5106e3..230a17f24966 100644 --- a/Documentation/devicetree/bindings/phy/mediatek,tphy.yaml +++ b/Documentation/devicetree/bindings/phy/mediatek,tphy.yaml @@ -79,6 +79,7 @@ properties: - enum: - mediatek,mt2712-tphy - mediatek,mt7629-tphy + - mediatek,mt7986-tphy - mediatek,mt8183-tphy - mediatek,mt8186-tphy - mediatek,mt8192-tphy --=20 2.34.1 From nobody Mon Nov 11 00:42:27 2024 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 99B31C433FE for ; Fri, 18 Nov 2022 19:02:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235562AbiKRTC4 (ORCPT ); Fri, 18 Nov 2022 14:02:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35124 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242958AbiKRTBx (ORCPT ); Fri, 18 Nov 2022 14:01:53 -0500 Received: from mxout3.routing.net (mxout3.routing.net [IPv6:2a03:2900:1:a::8]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E6D32126D; Fri, 18 Nov 2022 11:01:39 -0800 (PST) Received: from mxbulk.masterlogin.de (unknown [192.168.10.85]) by mxout3.routing.net (Postfix) with ESMTP id 339C660568; Fri, 18 Nov 2022 19:01:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1668798097; 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=zorltqywtJvpH+5vDOCm8ouz6cvEkR6i53PVbOSwOJs=; b=EB424GiGdYOlJt9K/5iut4GwK5GI8p4160p3F2KFeJ7xRlILLWkeQNfmMIAZHOiRhSxVoo ldF1VGKiYOirjzgr9z+S+dbOM7nKBk4cKQWcjQhXxaYzXkJz++hDHjQJ2CR2y/XGe9ucCu too8936SO2epQb1Q9a4scYizbWJxGP0= Received: from frank-G5.. (fttx-pool-80.245.77.125.bambit.de [80.245.77.125]) by mxbulk.masterlogin.de (Postfix) with ESMTPSA id D2B6312271E; Fri, 18 Nov 2022 19:01:36 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Ryder Lee , Jianjun Wang , Bjorn Helgaas , Rob Herring , Krzysztof Kozlowski , Chunfeng Yun , Kishon Vijay Abraham I , Vinod Koul , Greg Kroah-Hartman , Matthias Brugger , Paolo Abeni , Lorenzo Bianconi , Bo Jiao , linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-phy@lists.infradead.org, linux-usb@vger.kernel.org, Krzysztof Kozlowski , AngeloGioacchino Del Regno Subject: [PATCH v6 03/11] dt-bindings: usb: mtk-xhci: add support for mt7986 Date: Fri, 18 Nov 2022 20:01:18 +0100 Message-Id: <20221118190126.100895-4-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221118190126.100895-1-linux@fw-web.de> References: <20221118190126.100895-1-linux@fw-web.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Frank Wunderlich Add compatible string for mt7986. Signed-off-by: Frank Wunderlich Acked-by: Krzysztof Kozlowski Reviewed-by: Chunfeng Yun Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Matthias Brugger --- Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml b= /Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml index 939623867a64..a3c37944c630 100644 --- a/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml +++ b/Documentation/devicetree/bindings/usb/mediatek,mtk-xhci.yaml @@ -28,6 +28,7 @@ properties: - mediatek,mt7622-xhci - mediatek,mt7623-xhci - mediatek,mt7629-xhci + - mediatek,mt7986-xhci - mediatek,mt8173-xhci - mediatek,mt8183-xhci - mediatek,mt8186-xhci --=20 2.34.1 From nobody Mon Nov 11 00:42:27 2024 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 2DC26C433FE for ; Fri, 18 Nov 2022 19:03:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242977AbiKRTDD (ORCPT ); Fri, 18 Nov 2022 14:03:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242957AbiKRTBx (ORCPT ); Fri, 18 Nov 2022 14:01:53 -0500 Received: from mxout4.routing.net (mxout4.routing.net [IPv6:2a03:2900:1:a::9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6D7A21893; Fri, 18 Nov 2022 11:01:39 -0800 (PST) Received: from mxbulk.masterlogin.de (unknown [192.168.10.85]) by mxout4.routing.net (Postfix) with ESMTP id 8838A100995; Fri, 18 Nov 2022 19:01:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1668798097; 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=6YDvN14LGzYl2jRSkK1fRlKatqJWzuwYk+eXtAY5bVg=; b=Bg8VOojRqjXpMbnvcQ0BS7YLdq0qU/ixxmd4qWW8aTSiRMhNppN9n3ZX6yXL3D63iLfYKj RmsCghVZLHDx+vGs+y0zv+f0pci1vrv67b1npT/kLsrner+k1nETyiF2ELJfEXbvJPfkCH oS6CyKYn3XmZdV61b/HV8DvuS1oWzow= Received: from frank-G5.. (fttx-pool-80.245.77.125.bambit.de [80.245.77.125]) by mxbulk.masterlogin.de (Postfix) with ESMTPSA id 365341226BC; Fri, 18 Nov 2022 19:01:37 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Ryder Lee , Jianjun Wang , Bjorn Helgaas , Rob Herring , Krzysztof Kozlowski , Chunfeng Yun , Kishon Vijay Abraham I , Vinod Koul , Greg Kroah-Hartman , Matthias Brugger , Paolo Abeni , Lorenzo Bianconi , Bo Jiao , linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-phy@lists.infradead.org, linux-usb@vger.kernel.org, Rob Herring , AngeloGioacchino Del Regno Subject: [PATCH v6 04/11] dt-bindings: PCI: mediatek-gen3: add SoC based clock config Date: Fri, 18 Nov 2022 20:01:19 +0100 Message-Id: <20221118190126.100895-5-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221118190126.100895-1-linux@fw-web.de> References: <20221118190126.100895-1-linux@fw-web.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Frank Wunderlich The PCIe driver covers different SOC which needing different clock configs. Define them based on compatible. Signed-off-by: Frank Wunderlich Reviewed-by: Rob Herring Acked-by: Jianjun Wang Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Matthias Brugger --- v2: - fix typo in mediatek,mt8192-pcie v3: - remove contains to match only if compatible is no fallback tested with series "Add driver nodes for MT8195 SoC" and mt7986 pcie-nodes, dtbs_check is now clean --- .../bindings/pci/mediatek-pcie-gen3.yaml | 47 ++++++++++++++----- 1 file changed, 35 insertions(+), 12 deletions(-) diff --git a/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml = b/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml index c00be39af64e..5d7369debff2 100644 --- a/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml +++ b/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml @@ -43,9 +43,6 @@ description: |+ each set has its own address for MSI message, and supports 32 MSI vectors to generate interrupt. =20 -allOf: - - $ref: /schemas/pci/pci-bus.yaml# - properties: compatible: oneOf: @@ -84,15 +81,7 @@ properties: maxItems: 6 =20 clock-names: - items: - - const: pl_250m - - const: tl_26m - - const: tl_96m - - const: tl_32k - - const: peri_26m - - enum: - - top_133m # for MT8192 - - peri_mem # for MT8188/MT8195 + maxItems: 6 =20 assigned-clocks: maxItems: 1 @@ -138,6 +127,40 @@ required: - '#interrupt-cells' - interrupt-controller =20 +allOf: + - $ref: /schemas/pci/pci-bus.yaml# + - if: + properties: + compatible: + const: mediatek,mt8192-pcie + then: + properties: + clock-names: + items: + - const: pl_250m + - const: tl_26m + - const: tl_96m + - const: tl_32k + - const: peri_26m + - const: top_133m + - if: + properties: + compatible: + contains: + enum: + - mediatek,mt8188-pcie + - mediatek,mt8195-pcie + then: + properties: + clock-names: + items: + - const: pl_250m + - const: tl_26m + - const: tl_96m + - const: tl_32k + - const: peri_26m + - const: peri_mem + unevaluatedProperties: false =20 examples: --=20 2.34.1 From nobody Mon Nov 11 00:42:27 2024 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 66A8EC43217 for ; Fri, 18 Nov 2022 19:02:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242962AbiKRTCd (ORCPT ); Fri, 18 Nov 2022 14:02:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242960AbiKRTBx (ORCPT ); Fri, 18 Nov 2022 14:01:53 -0500 Received: from mxout2.routing.net (mxout2.routing.net [IPv6:2a03:2900:1:a::b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EBB59233A2; Fri, 18 Nov 2022 11:01:39 -0800 (PST) Received: from mxbulk.masterlogin.de (unknown [192.168.10.85]) by mxout2.routing.net (Postfix) with ESMTP id DF7D2604EB; Fri, 18 Nov 2022 19:01:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1668798098; 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=HCq6Ar2PkhD4OoGWAuL/w2DeeuE2Tk+RaLJ97BRtlww=; b=dLbEK6OqXg4Y29VGLlzXLdLUH0vx5bhiykL7giT8Qpi4c26CS+xjB+UgQ0p3F1Fq5x9MNH Rkv9anDKeIBvGeq6dRSAYGkwLMlcaiw+gjQWeBPmwY88S9FSVYLwdzhTdniZe8ZvhYsYnJ UV81cKeBFe15ZH0GZ88c0YAvwI5HnmY= Received: from frank-G5.. (fttx-pool-80.245.77.125.bambit.de [80.245.77.125]) by mxbulk.masterlogin.de (Postfix) with ESMTPSA id 900D612271E; Fri, 18 Nov 2022 19:01:37 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Ryder Lee , Jianjun Wang , Bjorn Helgaas , Rob Herring , Krzysztof Kozlowski , Chunfeng Yun , Kishon Vijay Abraham I , Vinod Koul , Greg Kroah-Hartman , Matthias Brugger , Paolo Abeni , Lorenzo Bianconi , Bo Jiao , linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-phy@lists.infradead.org, linux-usb@vger.kernel.org, Rob Herring Subject: [PATCH v6 05/11] dt-bindings: PCI: mediatek-gen3: add support for mt7986 Date: Fri, 18 Nov 2022 20:01:20 +0100 Message-Id: <20221118190126.100895-6-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221118190126.100895-1-linux@fw-web.de> References: <20221118190126.100895-1-linux@fw-web.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Frank Wunderlich Add compatible string and clock-definition for mt7986. It needs 4 clocks for PCIe, define them in binding. Signed-off-by: Frank Wunderlich Reviewed-by: Rob Herring Acked-by: Jianjun Wang Reviewed-by: Matthias Brugger --- v2: - squashed patch 2+3 (compatible and clock definition) --- .../bindings/pci/mediatek-pcie-gen3.yaml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml = b/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml index 5d7369debff2..f7a02019daea 100644 --- a/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml +++ b/Documentation/devicetree/bindings/pci/mediatek-pcie-gen3.yaml @@ -48,6 +48,7 @@ properties: oneOf: - items: - enum: + - mediatek,mt7986-pcie - mediatek,mt8188-pcie - mediatek,mt8195-pcie - const: mediatek,mt8192-pcie @@ -78,9 +79,11 @@ properties: - const: mac =20 clocks: + minItems: 4 maxItems: 6 =20 clock-names: + minItems: 4 maxItems: 6 =20 assigned-clocks: @@ -160,6 +163,20 @@ allOf: - const: tl_32k - const: peri_26m - const: peri_mem + - if: + properties: + compatible: + contains: + enum: + - mediatek,mt7986-pcie + then: + properties: + clock-names: + items: + - const: pl_250m + - const: tl_26m + - const: peri_26m + - const: top_133m =20 unevaluatedProperties: false =20 --=20 2.34.1 From nobody Mon Nov 11 00:42:27 2024 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 9DE0BC4708D for ; Fri, 18 Nov 2022 19:02:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242983AbiKRTCa (ORCPT ); Fri, 18 Nov 2022 14:02:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35128 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242959AbiKRTBx (ORCPT ); Fri, 18 Nov 2022 14:01:53 -0500 Received: from mxout3.routing.net (mxout3.routing.net [IPv6:2a03:2900:1:a::8]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 091EA2FFFC; Fri, 18 Nov 2022 11:01:39 -0800 (PST) Received: from mxbulk.masterlogin.de (unknown [192.168.10.85]) by mxout3.routing.net (Postfix) with ESMTP id 41062604DC; Fri, 18 Nov 2022 19:01:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1668798098; 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=rLXaSi0nuYISQNA4/ZZOAgFRiUbo5QoSWGShK+kyzL8=; b=RzpUfc38A2J1HvklQknH14z6OqQdbFlIs+cswd/DJsnTKTaQDBe65Dp0iNk7+Oo57WLr1e KdTjCZ4R5VTq4apKt9ccuiMWk4maCRq8LvhhdmWjGWVx9XMLtOFtXV1yLorZEiFMrOmZnB 7KYY0XdG1K0Cfz6bgu1sZ+qrN+7PG4M= Received: from frank-G5.. (fttx-pool-80.245.77.125.bambit.de [80.245.77.125]) by mxbulk.masterlogin.de (Postfix) with ESMTPSA id E1F5C1226BC; Fri, 18 Nov 2022 19:01:37 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Ryder Lee , Jianjun Wang , Bjorn Helgaas , Rob Herring , Krzysztof Kozlowski , Chunfeng Yun , Kishon Vijay Abraham I , Vinod Koul , Greg Kroah-Hartman , Matthias Brugger , Paolo Abeni , Lorenzo Bianconi , Bo Jiao , linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-phy@lists.infradead.org, linux-usb@vger.kernel.org, Sam Shih , AngeloGioacchino Del Regno Subject: [PATCH v6 06/11] arm64: dts: mt7986: add spi related device nodes Date: Fri, 18 Nov 2022 20:01:21 +0100 Message-Id: <20221118190126.100895-7-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221118190126.100895-1-linux@fw-web.de> References: <20221118190126.100895-1-linux@fw-web.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Sam Shih This patch adds spi support for MT7986. Signed-off-by: Sam Shih Signed-off-by: Frank Wunderlich Reviewed-by: AngeloGioacchino Del Regno --- arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts | 35 ++++++++++++++++++++ arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 28 ++++++++++++++++ arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts | 35 ++++++++++++++++++++ 3 files changed, 98 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts b/arch/arm64/boot= /dts/mediatek/mt7986a-rfb.dts index 2f48cc3d3ddb..006878e3f2b2 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts +++ b/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts @@ -59,6 +59,20 @@ switch: switch@0 { }; =20 &pio { + spi_flash_pins: spi-flash-pins { + mux { + function =3D "spi"; + groups =3D "spi0", "spi0_wp_hold"; + }; + }; + + spic_pins: spic-pins { + mux { + function =3D "spi"; + groups =3D "spi1_2"; + }; + }; + uart1_pins: uart1-pins { mux { function =3D "uart"; @@ -105,6 +119,27 @@ conf { }; }; =20 +&spi0 { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&spi_flash_pins>; + cs-gpios =3D <0>, <0>; + status =3D "okay"; + spi_nand: spi_nand@0 { + compatible =3D "spi-nand"; + reg =3D <0>; + spi-max-frequency =3D <10000000>; + spi-tx-buswidth =3D <4>; + spi-rx-buswidth =3D <4>; + }; +}; + +&spi1 { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&spic_pins>; + cs-gpios =3D <0>, <0>; + status =3D "okay"; +}; + &switch { ports { #address-cells =3D <1>; diff --git a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi b/arch/arm64/boot/dt= s/mediatek/mt7986a.dtsi index afc01abfa99c..29da9b8ed753 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi @@ -253,6 +253,34 @@ i2c0: i2c@11008000 { status =3D "disabled"; }; =20 + spi0: spi@1100a000 { + compatible =3D "mediatek,mt7986-spi-ipm", "mediatek,spi-ipm"; + #address-cells =3D <1>; + #size-cells =3D <0>; + reg =3D <0 0x1100a000 0 0x100>; + interrupts =3D ; + clocks =3D <&topckgen CLK_TOP_MPLL_D2>, + <&topckgen CLK_TOP_SPI_SEL>, + <&infracfg CLK_INFRA_SPI0_CK>, + <&infracfg CLK_INFRA_SPI0_HCK_CK>; + clock-names =3D "parent-clk", "sel-clk", "spi-clk", "hclk"; + status =3D "disabled"; + }; + + spi1: spi@1100b000 { + compatible =3D "mediatek,mt7986-spi-ipm", "mediatek,spi-ipm"; + #address-cells =3D <1>; + #size-cells =3D <0>; + reg =3D <0 0x1100b000 0 0x100>; + interrupts =3D ; + clocks =3D <&topckgen CLK_TOP_MPLL_D2>, + <&topckgen CLK_TOP_SPIM_MST_SEL>, + <&infracfg CLK_INFRA_SPI1_CK>, + <&infracfg CLK_INFRA_SPI1_HCK_CK>; + clock-names =3D "parent-clk", "sel-clk", "spi-clk", "hclk"; + status =3D "disabled"; + }; + ethsys: syscon@15000000 { #address-cells =3D <1>; #size-cells =3D <1>; diff --git a/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts b/arch/arm64/boot= /dts/mediatek/mt7986b-rfb.dts index 79c5c78f7a14..2c7f1d4fb352 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts +++ b/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts @@ -100,6 +100,20 @@ fixed-link { }; =20 &pio { + spi_flash_pins: spi-flash-pins { + mux { + function =3D "spi"; + groups =3D "spi0", "spi0_wp_hold"; + }; + }; + + spic_pins: spic-pins { + mux { + function =3D "spi"; + groups =3D "spi1_2"; + }; + }; + wf_2g_5g_pins: wf-2g-5g-pins { mux { function =3D "wifi"; @@ -132,6 +146,27 @@ conf { }; }; =20 +&spi0 { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&spi_flash_pins>; + cs-gpios =3D <0>, <0>; + status =3D "okay"; + spi_nand: spi_nand@0 { + compatible =3D "spi-nand"; + reg =3D <0>; + spi-max-frequency =3D <10000000>; + spi-tx-buswidth =3D <4>; + spi-rx-buswidth =3D <4>; + }; +}; + +&spi1 { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&spic_pins>; + cs-gpios =3D <0>, <0>; + status =3D "okay"; +}; + &uart0 { status =3D "okay"; }; --=20 2.34.1 From nobody Mon Nov 11 00:42:27 2024 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 0A6B3C4332F for ; Fri, 18 Nov 2022 19:03:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243017AbiKRTDG (ORCPT ); Fri, 18 Nov 2022 14:03:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242968AbiKRTB7 (ORCPT ); Fri, 18 Nov 2022 14:01:59 -0500 Received: from mxout4.routing.net (mxout4.routing.net [IPv6:2a03:2900:1:a::9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 411F0317EC; Fri, 18 Nov 2022 11:01:40 -0800 (PST) Received: from mxbulk.masterlogin.de (unknown [192.168.10.85]) by mxout4.routing.net (Postfix) with ESMTP id 956D31005E9; Fri, 18 Nov 2022 19:01:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1668798098; 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=KMKZcxPTghRdN2Z6t+oSFK4Mz3I0ecfUNW4MAmMP6yg=; b=caQomNfxXqeRFI/X2YhG/TRtW3cKKwQZh3s32bxXdu/no+Kkcsh1g4dUlqud7nbNUH16FE Jt+ILYwIAyXjVCyzwlI7sb+EJ9QRzDUvKkPJ7+wKT87HxXFtMmUoWxBVA8HkVg0q0uWqMN yDsxB0JjsXqHi50lv0DUsM3tteL3n8c= Received: from frank-G5.. (fttx-pool-80.245.77.125.bambit.de [80.245.77.125]) by mxbulk.masterlogin.de (Postfix) with ESMTPSA id 47AC112271E; Fri, 18 Nov 2022 19:01:38 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Ryder Lee , Jianjun Wang , Bjorn Helgaas , Rob Herring , Krzysztof Kozlowski , Chunfeng Yun , Kishon Vijay Abraham I , Vinod Koul , Greg Kroah-Hartman , Matthias Brugger , Paolo Abeni , Lorenzo Bianconi , Bo Jiao , linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-phy@lists.infradead.org, linux-usb@vger.kernel.org, Sam Shih Subject: [PATCH v6 07/11] arm64: dts: mt7986: add usb related device nodes Date: Fri, 18 Nov 2022 20:01:22 +0100 Message-Id: <20221118190126.100895-8-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221118190126.100895-1-linux@fw-web.de> References: <20221118190126.100895-1-linux@fw-web.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Sam Shih This patch adds USB support for MT7986. Signed-off-by: Sam Shih Signed-off-by: Frank Wunderlich Reviewed-by: Chunfeng Yun --- changes compared to sams original version: - reorder xhci-clocks based on yaml binding v5: - update ranges/reg of usb-phy - not added RB from AngeloGioacchino for v4 because of these changes v6: - remove unused usb regulators - remove 3v3 regulator (will be added with emmc-patch) --- arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts | 8 +++ arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 55 ++++++++++++++++++++ arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts | 8 +++ 3 files changed, 71 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts b/arch/arm64/boot= /dts/mediatek/mt7986a-rfb.dts index 006878e3f2b2..828d504a4e48 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts +++ b/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts @@ -140,6 +140,10 @@ &spi1 { status =3D "okay"; }; =20 +&ssusb { + status =3D "okay"; +}; + &switch { ports { #address-cells =3D <1>; @@ -201,6 +205,10 @@ &uart2 { status =3D "okay"; }; =20 +&usb_phy { + status =3D "okay"; +}; + &wifi { status =3D "okay"; pinctrl-names =3D "default", "dbdc"; diff --git a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi b/arch/arm64/boot/dt= s/mediatek/mt7986a.dtsi index 29da9b8ed753..c69b8bff7f4a 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi @@ -281,6 +281,61 @@ spi1: spi@1100b000 { status =3D "disabled"; }; =20 + ssusb: usb@11200000 { + compatible =3D "mediatek,mt7986-xhci", + "mediatek,mtk-xhci"; + reg =3D <0 0x11200000 0 0x2e00>, + <0 0x11203e00 0 0x0100>; + reg-names =3D "mac", "ippc"; + interrupts =3D ; + clocks =3D <&infracfg CLK_INFRA_IUSB_SYS_CK>, + <&infracfg CLK_INFRA_IUSB_CK>, + <&infracfg CLK_INFRA_IUSB_133_CK>, + <&infracfg CLK_INFRA_IUSB_66M_CK>, + <&topckgen CLK_TOP_U2U3_XHCI_SEL>; + clock-names =3D "sys_ck", + "ref_ck", + "mcu_ck", + "dma_ck", + "xhci_ck"; + phys =3D <&u2port0 PHY_TYPE_USB2>, + <&u3port0 PHY_TYPE_USB3>, + <&u2port1 PHY_TYPE_USB2>; + status =3D "disabled"; + }; + + usb_phy: t-phy@11e10000 { + compatible =3D "mediatek,mt7986-tphy", + "mediatek,generic-tphy-v2"; + #address-cells =3D <1>; + #size-cells =3D <1>; + ranges =3D <0 0 0x11e10000 0x1700>; + status =3D "disabled"; + + u2port0: usb-phy@0 { + reg =3D <0x0 0x700>; + clocks =3D <&topckgen CLK_TOP_DA_U2_REFSEL>, + <&topckgen CLK_TOP_DA_U2_CK_1P_SEL>; + clock-names =3D "ref", "da_ref"; + #phy-cells =3D <1>; + }; + + u3port0: usb-phy@700 { + reg =3D <0x700 0x900>; + clocks =3D <&topckgen CLK_TOP_USB3_PHY_SEL>; + clock-names =3D "ref"; + #phy-cells =3D <1>; + }; + + u2port1: usb-phy@1000 { + reg =3D <0x1000 0x700>; + clocks =3D <&topckgen CLK_TOP_DA_U2_REFSEL>, + <&topckgen CLK_TOP_DA_U2_CK_1P_SEL>; + clock-names =3D "ref", "da_ref"; + #phy-cells =3D <1>; + }; + }; + ethsys: syscon@15000000 { #address-cells =3D <1>; #size-cells =3D <1>; diff --git a/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts b/arch/arm64/boot= /dts/mediatek/mt7986b-rfb.dts index 2c7f1d4fb352..cdfc292002cf 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts +++ b/arch/arm64/boot/dts/mediatek/mt7986b-rfb.dts @@ -167,10 +167,18 @@ &spi1 { status =3D "okay"; }; =20 +&ssusb { + status =3D "okay"; +}; + &uart0 { status =3D "okay"; }; =20 +&usb_phy { + status =3D "okay"; +}; + &wifi { status =3D "okay"; pinctrl-names =3D "default", "dbdc"; --=20 2.34.1 From nobody Mon Nov 11 00:42:27 2024 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 DEF04C43217 for ; Fri, 18 Nov 2022 19:02:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243040AbiKRTCt (ORCPT ); Fri, 18 Nov 2022 14:02:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242976AbiKRTCA (ORCPT ); Fri, 18 Nov 2022 14:02:00 -0500 Received: from mxout2.routing.net (mxout2.routing.net [IPv6:2a03:2900:1:a::b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB06E3055F; Fri, 18 Nov 2022 11:01:41 -0800 (PST) Received: from mxbulk.masterlogin.de (unknown [192.168.10.85]) by mxout2.routing.net (Postfix) with ESMTP id 00F516050E; Fri, 18 Nov 2022 19:01:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1668798099; 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=HErHfykO7IYXVp4U9iKhL1dv6JpdE4zIk+xeou1yDI8=; b=OVH4VMaHj8qdFZZChl/q7vFQ1/PfQMV/JYtJQK154Uilc21qz5omAv0WD4BcihgmkSPijS dknPhmigVsayS96rEpleUSkJ+L2qHiMVZM0vYUsH5pqfWQD+mEHID+K8OQ9rz8HwBCMko9 OJGyuMmfyuehvbfhzWf7MUMSd/+rWGo= Received: from frank-G5.. (fttx-pool-80.245.77.125.bambit.de [80.245.77.125]) by mxbulk.masterlogin.de (Postfix) with ESMTPSA id 9B2D41226BC; Fri, 18 Nov 2022 19:01:38 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Ryder Lee , Jianjun Wang , Bjorn Helgaas , Rob Herring , Krzysztof Kozlowski , Chunfeng Yun , Kishon Vijay Abraham I , Vinod Koul , Greg Kroah-Hartman , Matthias Brugger , Paolo Abeni , Lorenzo Bianconi , Bo Jiao , linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-phy@lists.infradead.org, linux-usb@vger.kernel.org, Sam Shih Subject: [PATCH v6 08/11] arm64: dts: mt7986: add mmc related device nodes Date: Fri, 18 Nov 2022 20:01:23 +0100 Message-Id: <20221118190126.100895-9-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221118190126.100895-1-linux@fw-web.de> References: <20221118190126.100895-1-linux@fw-web.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Sam Shih This patch adds mmc support for MT7986. Signed-off-by: Sam Shih Signed-off-by: Frank Wunderlich --- v2: - update mmc-node because clocks changed v3: - fix pullups/pulldowns for mt7986a-rfb to have generic bias-pull-* v6: - add 3v3 regulator in mt7986a-rfb (was in usb patch before) - dropped AngeloGioacchino RB because of this change --- arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts | 96 ++++++++++++++++++++ arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 15 +++ 2 files changed, 111 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts b/arch/arm64/boot= /dts/mediatek/mt7986a-rfb.dts index 828d504a4e48..4c0b879d6703 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts +++ b/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts @@ -5,6 +5,8 @@ */ =20 /dts-v1/; +#include + #include "mt7986a.dtsi" =20 / { @@ -23,6 +25,24 @@ memory@40000000 { device_type =3D "memory"; reg =3D <0 0x40000000 0 0x40000000>; }; + + reg_1p8v: regulator-1p8v { + compatible =3D "regulator-fixed"; + regulator-name =3D "fixed-1.8V"; + regulator-min-microvolt =3D <1800000>; + regulator-max-microvolt =3D <1800000>; + regulator-boot-on; + regulator-always-on; + }; + + reg_3p3v: regulator-3p3v { + compatible =3D "regulator-fixed"; + regulator-name =3D "fixed-3.3V"; + regulator-min-microvolt =3D <3300000>; + regulator-max-microvolt =3D <3300000>; + regulator-boot-on; + regulator-always-on; + }; }; =20 &crypto { @@ -58,7 +78,83 @@ switch: switch@0 { }; }; =20 +&mmc0 { + pinctrl-names =3D "default", "state_uhs"; + pinctrl-0 =3D <&mmc0_pins_default>; + pinctrl-1 =3D <&mmc0_pins_uhs>; + bus-width =3D <8>; + max-frequency =3D <200000000>; + cap-mmc-highspeed; + mmc-hs200-1_8v; + mmc-hs400-1_8v; + hs400-ds-delay =3D <0x14014>; + vmmc-supply =3D <®_3p3v>; + vqmmc-supply =3D <®_1p8v>; + non-removable; + no-sd; + no-sdio; + status =3D "okay"; +}; + &pio { + mmc0_pins_default: mmc0-pins { + mux { + function =3D "emmc"; + groups =3D "emmc_51"; + }; + conf-cmd-dat { + pins =3D "EMMC_DATA_0", "EMMC_DATA_1", "EMMC_DATA_2", + "EMMC_DATA_3", "EMMC_DATA_4", "EMMC_DATA_5", + "EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD"; + input-enable; + drive-strength =3D <4>; + bias-pull-up =3D ; /* pull-up 10K */ + }; + conf-clk { + pins =3D "EMMC_CK"; + drive-strength =3D <6>; + bias-pull-down =3D ; /* pull-down 50K */ + }; + conf-ds { + pins =3D "EMMC_DSL"; + bias-pull-down =3D ; /* pull-down 50K */ + }; + conf-rst { + pins =3D "EMMC_RSTB"; + drive-strength =3D <4>; + bias-pull-up =3D ; /* pull-up 10K */ + }; + }; + + mmc0_pins_uhs: mmc0-uhs-pins { + mux { + function =3D "emmc"; + groups =3D "emmc_51"; + }; + conf-cmd-dat { + pins =3D "EMMC_DATA_0", "EMMC_DATA_1", "EMMC_DATA_2", + "EMMC_DATA_3", "EMMC_DATA_4", "EMMC_DATA_5", + "EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD"; + input-enable; + drive-strength =3D <4>; + bias-pull-up =3D ; /* pull-up 10K */ + }; + conf-clk { + pins =3D "EMMC_CK"; + drive-strength =3D <6>; + bias-pull-down =3D ; /* pull-down 50K */ + }; + conf-ds { + pins =3D "EMMC_DSL"; + bias-pull-down =3D ; /* pull-down 50K */ + }; + conf-rst { + pins =3D "EMMC_RSTB"; + drive-strength =3D <4>; + bias-pull-up =3D ; /* pull-up 10K */ + }; + }; + spi_flash_pins: spi-flash-pins { mux { function =3D "spi"; diff --git a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi b/arch/arm64/boot/dt= s/mediatek/mt7986a.dtsi index c69b8bff7f4a..b3ad8978b563 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi @@ -304,6 +304,21 @@ ssusb: usb@11200000 { status =3D "disabled"; }; =20 + mmc0: mmc@11230000 { + compatible =3D "mediatek,mt7986-mmc"; + reg =3D <0 0x11230000 0 0x1000>, + <0 0x11c20000 0 0x1000>; + interrupts =3D ; + clocks =3D <&topckgen CLK_TOP_EMMC_416M_SEL>, + <&infracfg CLK_INFRA_MSDC_HCK_CK>, + <&infracfg CLK_INFRA_MSDC_CK>, + <&infracfg CLK_INFRA_MSDC_133M_CK>, + <&infracfg CLK_INFRA_MSDC_66M_CK>; + clock-names =3D "source", "hclk", "source_cg", "bus_clk", + "sys_cg"; + status =3D "disabled"; + }; + usb_phy: t-phy@11e10000 { compatible =3D "mediatek,mt7986-tphy", "mediatek,generic-tphy-v2"; --=20 2.34.1 From nobody Mon Nov 11 00:42:27 2024 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 1533BC4167D for ; Fri, 18 Nov 2022 19:02:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242942AbiKRTC1 (ORCPT ); Fri, 18 Nov 2022 14:02:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242979AbiKRTCA (ORCPT ); Fri, 18 Nov 2022 14:02:00 -0500 Received: from mxout3.routing.net (mxout3.routing.net [IPv6:2a03:2900:1:a::8]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8DBA3218AD; Fri, 18 Nov 2022 11:01:43 -0800 (PST) Received: from mxbulk.masterlogin.de (unknown [192.168.10.85]) by mxout3.routing.net (Postfix) with ESMTP id 5B87261CEF; Fri, 18 Nov 2022 19:01:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1668798099; 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=anPDs/4TCvtbO7YnDuWwStrovW6zwEuztic4Z6KFJxI=; b=oK886iYEKQxOY7iDP5qwTCmu33i+kMZuHH0I57HmBj6w23z9ydheGnkGMceeS7C4w6/6pP zjuiLT8VuO4dySkFySsF9jAQGCkI+utzGeTtgSjD3bBK94tKZwUcc2aQYeKVUhwL4X5rXp dV2R2Asvh3ezEXv7YNsdjkMDdcdOz68= Received: from frank-G5.. (fttx-pool-80.245.77.125.bambit.de [80.245.77.125]) by mxbulk.masterlogin.de (Postfix) with ESMTPSA id 0705912271E; Fri, 18 Nov 2022 19:01:39 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Ryder Lee , Jianjun Wang , Bjorn Helgaas , Rob Herring , Krzysztof Kozlowski , Chunfeng Yun , Kishon Vijay Abraham I , Vinod Koul , Greg Kroah-Hartman , Matthias Brugger , Paolo Abeni , Lorenzo Bianconi , Bo Jiao , linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-phy@lists.infradead.org, linux-usb@vger.kernel.org, Sam Shih , Jieyy Yang , AngeloGioacchino Del Regno Subject: [PATCH v6 09/11] arm64: dts: mt7986: add pcie related device nodes Date: Fri, 18 Nov 2022 20:01:24 +0100 Message-Id: <20221118190126.100895-10-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221118190126.100895-1-linux@fw-web.de> References: <20221118190126.100895-1-linux@fw-web.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Sam Shih This patch adds PCIe support for MT7986. Signed-off-by: Jieyy Yang Signed-off-by: Sam Shih Signed-off-by: Frank Wunderlich Reviewed-by: AngeloGioacchino Del Regno --- changes compared to sams original version: - add clock-names to pcie node - update clocks to new binding --- bindings-patches: https://patchwork.kernel.org/project/linux-mediatek/list/?series=3D690172 --- arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts | 16 ++++++ arch/arm64/boot/dts/mediatek/mt7986a.dtsi | 52 ++++++++++++++++++++ 2 files changed, 68 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts b/arch/arm64/boot= /dts/mediatek/mt7986a-rfb.dts index 4c0b879d6703..8eaee9ff1822 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts +++ b/arch/arm64/boot/dts/mediatek/mt7986a-rfb.dts @@ -93,6 +93,15 @@ &mmc0 { non-removable; no-sd; no-sdio; +}; + +&pcie { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&pcie_pins>; + status =3D "okay"; +}; + +&pcie_phy { status =3D "okay"; }; =20 @@ -155,6 +164,13 @@ conf-rst { }; }; =20 + pcie_pins: pcie-pins { + mux { + function =3D "pcie"; + groups =3D "pcie_clk", "pcie_wake", "pcie_pereset"; + }; + }; + spi_flash_pins: spi-flash-pins { mux { function =3D "spi"; diff --git a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi b/arch/arm64/boot/dt= s/mediatek/mt7986a.dtsi index b3ad8978b563..b310abc02dcc 100644 --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi @@ -8,6 +8,7 @@ #include #include #include +#include =20 / { interrupt-parent =3D <&gic>; @@ -319,6 +320,57 @@ mmc0: mmc@11230000 { status =3D "disabled"; }; =20 + pcie: pcie@11280000 { + compatible =3D "mediatek,mt7986-pcie", + "mediatek,mt8192-pcie"; + device_type =3D "pci"; + #address-cells =3D <3>; + #size-cells =3D <2>; + reg =3D <0x00 0x11280000 0x00 0x4000>; + reg-names =3D "pcie-mac"; + interrupts =3D ; + bus-range =3D <0x00 0xff>; + ranges =3D <0x82000000 0x00 0x20000000 0x00 + 0x20000000 0x00 0x10000000>; + clocks =3D <&infracfg CLK_INFRA_IPCIE_PIPE_CK>, + <&infracfg CLK_INFRA_IPCIE_CK>, + <&infracfg CLK_INFRA_IPCIER_CK>, + <&infracfg CLK_INFRA_IPCIEB_CK>; + clock-names =3D "pl_250m", "tl_26m", "peri_26m", "top_133m"; + status =3D "disabled"; + + phys =3D <&pcie_port PHY_TYPE_PCIE>; + phy-names =3D "pcie-phy"; + + #interrupt-cells =3D <1>; + interrupt-map-mask =3D <0 0 0 0x7>; + interrupt-map =3D <0 0 0 1 &pcie_intc 0>, + <0 0 0 2 &pcie_intc 1>, + <0 0 0 3 &pcie_intc 2>, + <0 0 0 4 &pcie_intc 3>; + pcie_intc: interrupt-controller { + #address-cells =3D <0>; + #interrupt-cells =3D <1>; + interrupt-controller; + }; + }; + + pcie_phy: t-phy@11c00000 { + compatible =3D "mediatek,mt7986-tphy", + "mediatek,generic-tphy-v2"; + #address-cells =3D <2>; + #size-cells =3D <2>; + ranges; + status =3D "disabled"; + + pcie_port: pcie-phy@11c00000 { + reg =3D <0 0x11c00000 0 0x20000>; + clocks =3D <&clk40m>; + clock-names =3D "ref"; + #phy-cells =3D <1>; + }; + }; + usb_phy: t-phy@11e10000 { compatible =3D "mediatek,mt7986-tphy", "mediatek,generic-tphy-v2"; --=20 2.34.1 From nobody Mon Nov 11 00:42:27 2024 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 03EA0C4332F for ; Fri, 18 Nov 2022 19:03:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243031AbiKRTDR (ORCPT ); Fri, 18 Nov 2022 14:03:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242992AbiKRTCC (ORCPT ); Fri, 18 Nov 2022 14:02:02 -0500 Received: from mxout2.routing.net (mxout2.routing.net [IPv6:2a03:2900:1:a::b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77285218AB; Fri, 18 Nov 2022 11:01:43 -0800 (PST) Received: from mxbulk.masterlogin.de (unknown [192.168.10.85]) by mxout2.routing.net (Postfix) with ESMTP id B3459613DE; Fri, 18 Nov 2022 19:01:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1668798099; 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=Yn2B8JqvD7tu//zoCCFRlcpqvzp6QtIEUW/kB8kTk5w=; b=Y1xiHULQCTlN4mJsmkew+efH6VBf58zZKSfHigZ2nHGZ/Wn5KdbfBCgtGEIzjJK7Sgkk6j 9NOpUNe6YVKzuy9d3xPkT4+w1lHgsWhFnpC+nIkdYrgZgRu+Pqvrjvvecm5KXMTNTL6GC3 ZzkIUMr3sEI4+9/xCoOkSFlLEh3UzqQ= Received: from frank-G5.. (fttx-pool-80.245.77.125.bambit.de [80.245.77.125]) by mxbulk.masterlogin.de (Postfix) with ESMTPSA id 6179D1226BC; Fri, 18 Nov 2022 19:01:39 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Ryder Lee , Jianjun Wang , Bjorn Helgaas , Rob Herring , Krzysztof Kozlowski , Chunfeng Yun , Kishon Vijay Abraham I , Vinod Koul , Greg Kroah-Hartman , Matthias Brugger , Paolo Abeni , Lorenzo Bianconi , Bo Jiao , linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-phy@lists.infradead.org, linux-usb@vger.kernel.org, AngeloGioacchino Del Regno Subject: [PATCH v6 10/11] arm64: dts: mt7986: add Bananapi R3 Date: Fri, 18 Nov 2022 20:01:25 +0100 Message-Id: <20221118190126.100895-11-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221118190126.100895-1-linux@fw-web.de> References: <20221118190126.100895-1-linux@fw-web.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Frank Wunderlich Add support for Bananapi R3 SBC. - SD/eMMC support (switching first 4 bits of data-bus with sw6/D) - all rj45 ports and both SFP working (eth1/lan4) - all USB-Ports + SIM-Slot tested - i2c and all uarts tested - wifi tested (with eeprom calibration data) Signed-off-by: Frank Wunderlich Reviewed-by: AngeloGioacchino Del Regno --- The device can boot from all 4 storage options. Both, SPI and MMC, can be switched using hardware switches on the board, see https://wiki.banana-pi.org/Banana_Pi_BPI-R3#Jumper_setting I have added base dtb for sd/emmc to have a bootable version in mainline linux. SPI-NAND/NOR switched (CS by sw5/C) can be done with DT-Overlays, but don't know how to do it in upstream the right way...added dts files for dtbo and added them with dtbo extension to Makefile works. there is a commit which adds support building dtso files to dtbo in next: "kbuild: Allow DTB overlays to built from .dtso named source files" https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git/commit/?h=3D= dt/next&id=3D363547d2191cbc32ca954ba75d72908712398ff2 if Overlays are accepted then we can change my current dts from here to overlays too to have all as such. Till then imho the best way is to have mmc as board dts and add the right spi-device via overlay if needed. changes: v6: - drop usb 5v regulator from bpi-r3 based on chunfengs response it is only needed if regulator is switched (like for otg), usb works without it. v4: - add PCIe nodes - fix sfp-properties of sfp-1 (need to be plural) thx to Denis Odintsov for this v3: - rename factory-key to reset-key - add dcin regulator and add it as input for 3v3 (with renaming) - remove memory-node - dropped wifi eeprom (calibration) data - move mmc0 pinctrl to common dtsi and drop sdcard comment - change mmc pull-up/down to have generic bias-pull* v2: - remove pcie to be added later (discussion about clocks) - some fixes based on suggestions on ML - add key suffix like it's done in mt7622-bpi-r64 devicetree - add dash in sfp node names - use reg as unit for switch-node - drop "-3-4" suffix from i2c-pins node name - fix order in Makefile --- arch/arm64/boot/dts/mediatek/Makefile | 2 + .../mediatek/mt7986a-bananapi-bpi-r3-emmc.dts | 31 ++ .../mediatek/mt7986a-bananapi-bpi-r3-sd.dts | 25 + .../dts/mediatek/mt7986a-bananapi-bpi-r3.dtsi | 446 ++++++++++++++++++ 4 files changed, 504 insertions(+) create mode 100644 arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-em= mc.dts create mode 100644 arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-sd= .dts create mode 100644 arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dt= si diff --git a/arch/arm64/boot/dts/mediatek/Makefile b/arch/arm64/boot/dts/me= diatek/Makefile index 0ec90cb3ef28..e8902f2cc58f 100644 --- a/arch/arm64/boot/dts/mediatek/Makefile +++ b/arch/arm64/boot/dts/mediatek/Makefile @@ -7,6 +7,8 @@ dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt6797-evb.dtb dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt6797-x20-dev.dtb dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt7622-rfb1.dtb dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt7622-bananapi-bpi-r64.dtb +dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt7986a-bananapi-bpi-r3-emmc.dtb +dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt7986a-bananapi-bpi-r3-sd.dtb dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt7986a-rfb.dtb dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt7986b-rfb.dtb dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt8167-pumpkin.dtb diff --git a/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-emmc.dts = b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-emmc.dts new file mode 100644 index 000000000000..a0ca35b5977e --- /dev/null +++ b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-emmc.dts @@ -0,0 +1,31 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) +/* + * Copyright (C) 2021 MediaTek Inc. + * Author: Sam.Shih + */ + +/dts-v1/; +#include +#include + +#include "mt7986a-bananapi-bpi-r3.dtsi" + +/ { + model =3D "Bananapi BPI-R3 (emmc)"; +}; + +&mmc0 { + bus-width =3D <8>; + max-frequency =3D <200000000>; + cap-mmc-highspeed; + mmc-hs200-1_8v; + mmc-hs400-1_8v; + hs400-ds-delay =3D <0x14014>; + vmmc-supply =3D <®_3p3v>; + vqmmc-supply =3D <®_1p8v>; + non-removable; + no-sd; + no-sdio; + status =3D "okay"; +}; + diff --git a/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-sd.dts b/= arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-sd.dts new file mode 100644 index 000000000000..06e4691cb815 --- /dev/null +++ b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-sd.dts @@ -0,0 +1,25 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) +/* + * Copyright (C) 2021 MediaTek Inc. + * Author: Sam.Shih + */ + +/dts-v1/; +#include +#include + +#include "mt7986a-bananapi-bpi-r3.dtsi" + +/ { + model =3D "Bananapi BPI-R3 (sdmmc)"; +}; + +&mmc0 { + bus-width =3D <4>; + max-frequency =3D <52000000>; + cap-sd-highspeed; + vmmc-supply =3D <®_3p3v>; + vqmmc-supply =3D <®_1p8v>; + status =3D "okay"; +}; + diff --git a/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dtsi b/ar= ch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dtsi new file mode 100644 index 000000000000..455e958ea08a --- /dev/null +++ b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3.dtsi @@ -0,0 +1,446 @@ +// SPDX-License-Identifier: (GPL-2.0 OR MIT) +/* + * Copyright (C) 2021 MediaTek Inc. + * Authors: Sam.Shih + * Frank Wunderlich + * Daniel Golle + */ + +/dts-v1/; +#include +#include +#include +#include + +#include "mt7986a.dtsi" + +/ { + model =3D "Bananapi BPI-R3"; + compatible =3D "bananapi,bpi-r3", "mediatek,mt7986a"; + + aliases { + serial0 =3D &uart0; + ethernet0 =3D &gmac0; + ethernet1 =3D &gmac1; + }; + + chosen { + stdout-path =3D "serial0:115200n8"; + }; + + dcin: regulator-12vd { + compatible =3D "regulator-fixed"; + regulator-name =3D "12vd"; + regulator-min-microvolt =3D <12000000>; + regulator-max-microvolt =3D <12000000>; + regulator-boot-on; + regulator-always-on; + }; + + gpio-keys { + compatible =3D "gpio-keys"; + + reset-key { + label =3D "reset"; + linux,code =3D ; + gpios =3D <&pio 9 GPIO_ACTIVE_LOW>; + }; + + wps-key { + label =3D "wps"; + linux,code =3D ; + gpios =3D <&pio 10 GPIO_ACTIVE_LOW>; + }; + }; + + /* i2c of the left SFP cage (wan) */ + i2c_sfp1: i2c-gpio-0 { + compatible =3D "i2c-gpio"; + sda-gpios =3D <&pio 16 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + scl-gpios =3D <&pio 17 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + i2c-gpio,delay-us =3D <2>; + #address-cells =3D <1>; + #size-cells =3D <0>; + }; + + /* i2c of the right SFP cage (lan) */ + i2c_sfp2: i2c-gpio-1 { + compatible =3D "i2c-gpio"; + sda-gpios =3D <&pio 18 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + scl-gpios =3D <&pio 19 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + i2c-gpio,delay-us =3D <2>; + #address-cells =3D <1>; + #size-cells =3D <0>; + }; + + leds { + compatible =3D "gpio-leds"; + + green_led: led-0 { + color =3D ; + function =3D LED_FUNCTION_POWER; + gpios =3D <&pio 69 GPIO_ACTIVE_HIGH>; + default-state =3D "on"; + }; + + blue_led: led-1 { + color =3D ; + function =3D LED_FUNCTION_STATUS; + gpios =3D <&pio 86 GPIO_ACTIVE_HIGH>; + default-state =3D "off"; + }; + }; + + reg_1p8v: regulator-1p8v { + compatible =3D "regulator-fixed"; + regulator-name =3D "1.8vd"; + regulator-min-microvolt =3D <1800000>; + regulator-max-microvolt =3D <1800000>; + regulator-boot-on; + regulator-always-on; + vin-supply =3D <&dcin>; + }; + + reg_3p3v: regulator-3p3v { + compatible =3D "regulator-fixed"; + regulator-name =3D "3.3vd"; + regulator-min-microvolt =3D <3300000>; + regulator-max-microvolt =3D <3300000>; + regulator-boot-on; + regulator-always-on; + vin-supply =3D <&dcin>; + }; + + /* left SFP cage (wan) */ + sfp1: sfp-1 { + compatible =3D "sff,sfp"; + i2c-bus =3D <&i2c_sfp1>; + los-gpios =3D <&pio 46 GPIO_ACTIVE_HIGH>; + mod-def0-gpios =3D <&pio 49 GPIO_ACTIVE_LOW>; + tx-disable-gpios =3D <&pio 20 GPIO_ACTIVE_HIGH>; + tx-fault-gpios =3D <&pio 7 GPIO_ACTIVE_HIGH>; + }; + + /* right SFP cage (lan) */ + sfp2: sfp-2 { + compatible =3D "sff,sfp"; + i2c-bus =3D <&i2c_sfp2>; + los-gpios =3D <&pio 31 GPIO_ACTIVE_HIGH>; + mod-def0-gpios =3D <&pio 47 GPIO_ACTIVE_LOW>; + tx-disable-gpios =3D <&pio 15 GPIO_ACTIVE_HIGH>; + tx-fault-gpios =3D <&pio 48 GPIO_ACTIVE_HIGH>; + }; +}; + +&crypto { + status =3D "okay"; +}; + +ð { + status =3D "okay"; + + gmac0: mac@0 { + compatible =3D "mediatek,eth-mac"; + reg =3D <0>; + phy-mode =3D "2500base-x"; + + fixed-link { + speed =3D <2500>; + full-duplex; + pause; + }; + }; + + gmac1: mac@1 { + compatible =3D "mediatek,eth-mac"; + reg =3D <1>; + phy-mode =3D "2500base-x"; + sfp =3D <&sfp1>; + managed =3D "in-band-status"; + }; + + mdio: mdio-bus { + #address-cells =3D <1>; + #size-cells =3D <0>; + }; +}; + +&mdio { + switch: switch@31 { + compatible =3D "mediatek,mt7531"; + reg =3D <31>; + reset-gpios =3D <&pio 5 GPIO_ACTIVE_HIGH>; + }; +}; + +&mmc0 { + pinctrl-names =3D "default", "state_uhs"; + pinctrl-0 =3D <&mmc0_pins_default>; + pinctrl-1 =3D <&mmc0_pins_uhs>; +}; + +&i2c0 { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&i2c_pins>; + status =3D "okay"; +}; + +&pcie { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&pcie_pins>; + status =3D "okay"; +}; + +&pcie_phy { + status =3D "okay"; +}; + +&pio { + i2c_pins: i2c-pins { + mux { + function =3D "i2c"; + groups =3D "i2c"; + }; + }; + + mmc0_pins_default: mmc0-pins { + mux { + function =3D "emmc"; + groups =3D "emmc_51"; + }; + conf-cmd-dat { + pins =3D "EMMC_DATA_0", "EMMC_DATA_1", "EMMC_DATA_2", + "EMMC_DATA_3", "EMMC_DATA_4", "EMMC_DATA_5", + "EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD"; + input-enable; + drive-strength =3D <4>; + bias-pull-up =3D ; /* pull-up 10K */ + }; + conf-clk { + pins =3D "EMMC_CK"; + drive-strength =3D <6>; + bias-pull-down =3D ; /* pull-down 50K */ + }; + conf-ds { + pins =3D "EMMC_DSL"; + bias-pull-down =3D ; /* pull-down 50K */ + }; + conf-rst { + pins =3D "EMMC_RSTB"; + drive-strength =3D <4>; + bias-pull-up =3D ; /* pull-up 10K */ + }; + }; + + mmc0_pins_uhs: mmc0-uhs-pins { + mux { + function =3D "emmc"; + groups =3D "emmc_51"; + }; + conf-cmd-dat { + pins =3D "EMMC_DATA_0", "EMMC_DATA_1", "EMMC_DATA_2", + "EMMC_DATA_3", "EMMC_DATA_4", "EMMC_DATA_5", + "EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD"; + input-enable; + drive-strength =3D <4>; + bias-pull-up =3D ; /* pull-up 10K */ + }; + conf-clk { + pins =3D "EMMC_CK"; + drive-strength =3D <6>; + bias-pull-down =3D ; /* pull-down 50K */ + }; + conf-ds { + pins =3D "EMMC_DSL"; + bias-pull-down =3D ; /* pull-down 50K */ + }; + conf-rst { + pins =3D "EMMC_RSTB"; + drive-strength =3D <4>; + bias-pull-up =3D ; /* pull-up 10K */ + }; + }; + + pcie_pins: pcie-pins { + mux { + function =3D "pcie"; + groups =3D "pcie_clk", "pcie_pereset"; + }; + }; + + spi_flash_pins: spi-flash-pins { + mux { + function =3D "spi"; + groups =3D "spi0", "spi0_wp_hold"; + }; + }; + + spic_pins: spic-pins { + mux { + function =3D "spi"; + groups =3D "spi1_0"; + }; + }; + + uart1_pins: uart1-pins { + mux { + function =3D "uart"; + groups =3D "uart1_rx_tx"; + }; + }; + + uart2_pins: uart2-pins { + mux { + function =3D "uart"; + groups =3D "uart2_0_rx_tx"; + }; + }; + + wf_2g_5g_pins: wf-2g-5g-pins { + mux { + function =3D "wifi"; + groups =3D "wf_2g", "wf_5g"; + }; + conf { + pins =3D "WF0_HB1", "WF0_HB2", "WF0_HB3", "WF0_HB4", + "WF0_HB0", "WF0_HB0_B", "WF0_HB5", "WF0_HB6", + "WF0_HB7", "WF0_HB8", "WF0_HB9", "WF0_HB10", + "WF0_TOP_CLK", "WF0_TOP_DATA", "WF1_HB1", + "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0", + "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8", + "WF1_TOP_CLK", "WF1_TOP_DATA"; + drive-strength =3D <4>; + }; + }; + + wf_dbdc_pins: wf-dbdc-pins { + mux { + function =3D "wifi"; + groups =3D "wf_dbdc"; + }; + conf { + pins =3D "WF0_HB1", "WF0_HB2", "WF0_HB3", "WF0_HB4", + "WF0_HB0", "WF0_HB0_B", "WF0_HB5", "WF0_HB6", + "WF0_HB7", "WF0_HB8", "WF0_HB9", "WF0_HB10", + "WF0_TOP_CLK", "WF0_TOP_DATA", "WF1_HB1", + "WF1_HB2", "WF1_HB3", "WF1_HB4", "WF1_HB0", + "WF1_HB5", "WF1_HB6", "WF1_HB7", "WF1_HB8", + "WF1_TOP_CLK", "WF1_TOP_DATA"; + drive-strength =3D <4>; + }; + }; + + wf_led_pins: wf-led-pins { + mux { + function =3D "led"; + groups =3D "wifi_led"; + }; + }; +}; + +&spi0 { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&spi_flash_pins>; + cs-gpios =3D <0>, <0>; + status =3D "okay"; +}; + +&spi1 { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&spic_pins>; + cs-gpios =3D <0>, <0>; + status =3D "okay"; +}; + +&ssusb { + status =3D "okay"; +}; + +&switch { + ports { + #address-cells =3D <1>; + #size-cells =3D <0>; + + port@0 { + reg =3D <0>; + label =3D "wan"; + }; + + port@1 { + reg =3D <1>; + label =3D "lan0"; + }; + + port@2 { + reg =3D <2>; + label =3D "lan1"; + }; + + port@3 { + reg =3D <3>; + label =3D "lan2"; + }; + + port@4 { + reg =3D <4>; + label =3D "lan3"; + }; + + port5: port@5 { + reg =3D <5>; + label =3D "lan4"; + phy-mode =3D "2500base-x"; + sfp =3D <&sfp2>; + managed =3D "in-band-status"; + }; + + port@6 { + reg =3D <6>; + label =3D "cpu"; + ethernet =3D <&gmac0>; + phy-mode =3D "2500base-x"; + + fixed-link { + speed =3D <2500>; + full-duplex; + pause; + }; + }; + }; +}; + +&trng { + status =3D "okay"; +}; + +&uart0 { + status =3D "okay"; +}; + +&uart1 { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&uart1_pins>; + status =3D "okay"; +}; + +&uart2 { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&uart2_pins>; + status =3D "okay"; +}; + +&usb_phy { + status =3D "okay"; +}; + +&watchdog { + status =3D "okay"; +}; + +&wifi { + status =3D "okay"; + pinctrl-names =3D "default", "dbdc"; + pinctrl-0 =3D <&wf_2g_5g_pins>, <&wf_led_pins>; + pinctrl-1 =3D <&wf_dbdc_pins>, <&wf_led_pins>; +}; + --=20 2.34.1 From nobody Mon Nov 11 00:42:27 2024 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 A6120C4332F for ; Fri, 18 Nov 2022 19:03:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242959AbiKRTC7 (ORCPT ); Fri, 18 Nov 2022 14:02:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242977AbiKRTCA (ORCPT ); Fri, 18 Nov 2022 14:02:00 -0500 Received: from mxout1.routing.net (mxout1.routing.net [IPv6:2a03:2900:1:a::a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 325D230F7B; Fri, 18 Nov 2022 11:01:42 -0800 (PST) Received: from mxbulk.masterlogin.de (unknown [192.168.10.85]) by mxout1.routing.net (Postfix) with ESMTP id 0F02D408F1; Fri, 18 Nov 2022 19:01:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailerdienst.de; s=20200217; t=1668798100; 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=9Uac+pNoJWvk1YG3xnBZ9E1dKIbudwUnPsApI3M6W8c=; b=rEfhhMJ3SboHRT66Ds97LMw4Prt6m2LdIp8j/pJq0RJi/cRmOuZhtWo8Gg2AWjHhtqh3nj O6hRq/0NzC8aDMEb9xgx2gfhffakhtDe5u3Agq79EmH818/AULPZ47ZZx3yGXASCXzr5m7 DLqNPIVx/MLCDOs4QgZWRTWMy1kGaXM= Received: from frank-G5.. (fttx-pool-80.245.77.125.bambit.de [80.245.77.125]) by mxbulk.masterlogin.de (Postfix) with ESMTPSA id B670D12271E; Fri, 18 Nov 2022 19:01:39 +0000 (UTC) From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Ryder Lee , Jianjun Wang , Bjorn Helgaas , Rob Herring , Krzysztof Kozlowski , Chunfeng Yun , Kishon Vijay Abraham I , Vinod Koul , Greg Kroah-Hartman , Matthias Brugger , Paolo Abeni , Lorenzo Bianconi , Bo Jiao , linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-phy@lists.infradead.org, linux-usb@vger.kernel.org Subject: [PATCH v6 11/11] arm64: dts: mt7986: add BPI-R3 nand/nor overlays Date: Fri, 18 Nov 2022 20:01:26 +0100 Message-Id: <20221118190126.100895-12-linux@fw-web.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20221118190126.100895-1-linux@fw-web.de> References: <20221118190126.100895-1-linux@fw-web.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" From: Frank Wunderlich Add devicetree overlays for using nand and nor on BPI-R3. Signed-off-by: Frank Wunderlich --- maybe rename to dtso? "kbuild: Allow DTB overlays to built from .dtso named source files" https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git/commit/?h=3D= dt/next&id=3D363547d2191cbc32ca954ba75d72908712398ff2 more comments about the dt overlay-support: https://patchwork.kernel.org/comment/25092116/ https://patchwork.kernel.org/comment/25085681/ --- v4: - drop compile-comment from overlays - add author-information to dt-overlays --- arch/arm64/boot/dts/mediatek/Makefile | 2 + .../mediatek/mt7986a-bananapi-bpi-r3-nand.dts | 55 +++++++++++++++ .../mediatek/mt7986a-bananapi-bpi-r3-nor.dts | 69 +++++++++++++++++++ 3 files changed, 126 insertions(+) create mode 100644 arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-na= nd.dts create mode 100644 arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-no= r.dts diff --git a/arch/arm64/boot/dts/mediatek/Makefile b/arch/arm64/boot/dts/me= diatek/Makefile index e8902f2cc58f..d42208c4090d 100644 --- a/arch/arm64/boot/dts/mediatek/Makefile +++ b/arch/arm64/boot/dts/mediatek/Makefile @@ -8,6 +8,8 @@ dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt6797-x20-dev.dtb dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt7622-rfb1.dtb dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt7622-bananapi-bpi-r64.dtb dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt7986a-bananapi-bpi-r3-emmc.dtb +dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt7986a-bananapi-bpi-r3-nand.dtbo +dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt7986a-bananapi-bpi-r3-nor.dtbo dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt7986a-bananapi-bpi-r3-sd.dtb dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt7986a-rfb.dtb dtb-$(CONFIG_ARCH_MEDIATEK) +=3D mt7986b-rfb.dtb diff --git a/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-nand.dts = b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-nand.dts new file mode 100644 index 000000000000..15ee8c568f3c --- /dev/null +++ b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-nand.dts @@ -0,0 +1,55 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR MIT) */ +/* + * Authors: Daniel Golle + * Frank Wunderlich + */ + +/dts-v1/; +/plugin/; + +/ { + compatible =3D "bananapi,bpi-r3", "mediatek,mt7986a"; + + fragment@0 { + target-path =3D "/soc/spi@1100a000"; + __overlay__ { + #address-cells =3D <1>; + #size-cells =3D <0>; + spi_nand: spi_nand@0 { + compatible =3D "spi-nand"; + reg =3D <0>; + spi-max-frequency =3D <10000000>; + spi-tx-buswidth =3D <4>; + spi-rx-buswidth =3D <4>; + + partitions { + compatible =3D "fixed-partitions"; + #address-cells =3D <1>; + #size-cells =3D <1>; + + partition@0 { + label =3D "bl2"; + reg =3D <0x0 0x80000>; + read-only; + }; + + partition@80000 { + label =3D "reserved"; + reg =3D <0x80000 0x300000>; + }; + + partition@380000 { + label =3D "fip"; + reg =3D <0x380000 0x200000>; + read-only; + }; + + partition@580000 { + label =3D "ubi"; + reg =3D <0x580000 0x7a80000>; + }; + }; + }; + }; + }; +}; diff --git a/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-nor.dts b= /arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-nor.dts new file mode 100644 index 000000000000..f18643a9089c --- /dev/null +++ b/arch/arm64/boot/dts/mediatek/mt7986a-bananapi-bpi-r3-nor.dts @@ -0,0 +1,69 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR MIT) */ +/* + * Authors: Daniel Golle + * Frank Wunderlich + */ + +/dts-v1/; +/plugin/; + +/ { + compatible =3D "bananapi,bpi-r3", "mediatek,mt7986a"; + + fragment@0 { + target-path =3D "/soc/spi@1100a000"; + __overlay__ { + #address-cells =3D <1>; + #size-cells =3D <0>; + flash@0 { + compatible =3D "jedec,spi-nor"; + reg =3D <0>; + spi-max-frequency =3D <10000000>; + + partitions { + compatible =3D "fixed-partitions"; + #address-cells =3D <1>; + #size-cells =3D <1>; + + partition@0 { + label =3D "bl2"; + reg =3D <0x0 0x20000>; + read-only; + }; + + partition@20000 { + label =3D "reserved"; + reg =3D <0x20000 0x20000>; + }; + + partition@40000 { + label =3D "u-boot-env"; + reg =3D <0x40000 0x40000>; + }; + + partition@80000 { + label =3D "reserved2"; + reg =3D <0x80000 0x80000>; + }; + + partition@100000 { + label =3D "fip"; + reg =3D <0x100000 0x80000>; + read-only; + }; + + partition@180000 { + label =3D "recovery"; + reg =3D <0x180000 0xa80000>; + }; + + partition@c00000 { + label =3D "fit"; + reg =3D <0xc00000 0x1400000>; + compatible =3D "denx,fit"; + }; + }; + }; + }; + }; +}; --=20 2.34.1