From patchwork Wed Feb 1 18:56:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= X-Patchwork-Id: 649356 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 93B2EC38142 for ; Wed, 1 Feb 2023 18:57:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232258AbjBAS5L (ORCPT ); Wed, 1 Feb 2023 13:57:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232262AbjBAS5J (ORCPT ); Wed, 1 Feb 2023 13:57:09 -0500 Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 715497D6E6; Wed, 1 Feb 2023 10:57:08 -0800 (PST) Received: by mail-ed1-x52e.google.com with SMTP id m8so9492088edd.10; Wed, 01 Feb 2023 10:57:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=916XgVZ9fASoqPZFrOcZBdhhHsdFw2GVlGXOTRIHOcg=; b=j4jCT3RNd4Fl3IhtsLOweL6JFnXgXuaJ/jZ7h5FNY5pcpO0mVtox0Bw4f9DvCnj+Gy TlaDzjmQcLkuQ5UfFWUPAEWCMVbM/Qii1P9+/lfII9nl99vUtkf9Os/1pizWpKOQjnoi lm/VQiytbkIqkefka60dSPUHl72SVAij0U/DbvLRldYFD5pyuGYvtZaqYPveBlWqk/NC HwoeqEjQK/c8BwCYzH4SZDRlqh3qMcu8bPUDYb08FqXAMGz6ap8C5r1ROOGK0pSuO1Jb 5xnmaoxSdB6IxJ5byRjWV6mAMFnUVHJ4n93zietmRiYVRZXXUJn7Pfkcf0QR58k6nQl+ iM+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=916XgVZ9fASoqPZFrOcZBdhhHsdFw2GVlGXOTRIHOcg=; b=yqCXGTuL8dSPQO7weqjzO5XVioWoyoidB8Z5BzaAYBKxMATu/83xIrsFgQf/q2W/uw tmJ1sKE9lTqSx1JnAO/RpqgfkTgtiORy54uiiEhuDXSPzH0zr1z2B3bnlr4657X9Vc3N 57OViRCSkkaL4nSWBTpNCSDReRsG/CTzJh4Yf0QKr/NA/2+RpcRGgMVZOpHyKdpL+adp Hz044yW81Qu/n6livk7tsYxIHrTwu/GzJCh+ai08NNg41SK41lzUJuKkigGayaMh9UNs xgzfsnHw3NZsR4vRxTVIHIwVVf44W0q9QOq2ssJkvP3K2EBaTo1vFne3UcApIibHkvfp H6dA== X-Gm-Message-State: AO0yUKX/44W94Rp21WCYpTxk4KDkfHKb4k6pXsP4O+razBmcfh29Ojv1 83YE4FMRa2O+osGlpS0LNaCHCS/WkkmV9U0E X-Google-Smtp-Source: AK7set+2KbiCTcddKLi6FlDnx9PjS8pp/NRXkaAMusiSZph4MTOlIO/4yg8XJu6FxV/4hlEXoGy56g== X-Received: by 2002:a05:6402:1950:b0:4a2:260f:3bbe with SMTP id f16-20020a056402195000b004a2260f3bbemr3759756edz.23.1675277826917; Wed, 01 Feb 2023 10:57:06 -0800 (PST) Received: from arinc9-PC.lan ([37.120.152.236]) by smtp.gmail.com with ESMTPSA id dy25-20020a05640231f900b0049e210884dasm10100883edb.15.2023.02.01.10.57.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Feb 2023 10:57:06 -0800 (PST) From: arinc9.unal@gmail.com X-Google-Original-From: arinc.unal@arinc9.com To: Rob Herring , Krzysztof Kozlowski , Matthias Brugger Cc: =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, Frank Wunderlich , erkin.bozoglu@xeront.com, Sean Wang , DENG Qingfang Subject: [PATCH v2 2/5] arm: dts: mt7623: add mt7530 switch to mt7623a.dtsi Date: Wed, 1 Feb 2023 21:56:53 +0300 Message-Id: <20230201185656.17164-3-arinc.unal@arinc9.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230201185656.17164-1-arinc.unal@arinc9.com> References: <20230201185656.17164-1-arinc.unal@arinc9.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Arınç ÜNAL The MT7530 switch is included as a part of the multi-chip module on the MT7623AI SoC. Add it to mt7623a.dtsi and adjust DTs that call mt7623a.dtsi. Signed-off-by: Arınç ÜNAL --- arch/arm/boot/dts/mt7623a-rfb-emmc.dts | 87 +++++++------------------- arch/arm/boot/dts/mt7623a-rfb-nand.dts | 87 +++++++------------------- arch/arm/boot/dts/mt7623a.dtsi | 74 ++++++++++++++++++++++ 3 files changed, 118 insertions(+), 130 deletions(-) diff --git a/arch/arm/boot/dts/mt7623a-rfb-emmc.dts b/arch/arm/boot/dts/mt7623a-rfb-emmc.dts index a64d68b6e165..5654284bab01 100644 --- a/arch/arm/boot/dts/mt7623a-rfb-emmc.dts +++ b/arch/arm/boot/dts/mt7623a-rfb-emmc.dts @@ -112,74 +112,31 @@ &crypto { status = "okay"; }; -&gmac0 { - status = "okay"; - phy-mode = "trgmii"; +&switch0 { + ports { + port@0 { + status = "okay"; + label = "lan0"; + }; - fixed-link { - speed = <1000>; - full-duplex; - pause; - }; -}; + port@1 { + status = "okay"; + label = "lan1"; + }; -ð { - status = "okay"; + port@2 { + status = "okay"; + label = "lan2"; + }; + + port@3 { + status = "okay"; + label = "lan3"; + }; - mdio-bus { - #address-cells = <1>; - #size-cells = <0>; - - switch@0 { - compatible = "mediatek,mt7530"; - reg = <0>; - mediatek,mcm; - resets = <ðsys MT2701_ETHSYS_MCM_RST>; - reset-names = "mcm"; - core-supply = <&mt6323_vpa_reg>; - io-supply = <&mt6323_vemc3v3_reg>; - - ports { - #address-cells = <1>; - #size-cells = <0>; - - port@0 { - reg = <0>; - label = "lan0"; - }; - - port@1 { - reg = <1>; - label = "lan1"; - }; - - port@2 { - reg = <2>; - label = "lan2"; - }; - - port@3 { - reg = <3>; - label = "lan3"; - }; - - port@4 { - reg = <4>; - label = "wan"; - }; - - port@6 { - reg = <6>; - label = "cpu"; - ethernet = <&gmac0>; - phy-mode = "trgmii"; - - fixed-link { - speed = <1000>; - full-duplex; - }; - }; - }; + port@4 { + status = "okay"; + label = "wan"; }; }; }; diff --git a/arch/arm/boot/dts/mt7623a-rfb-nand.dts b/arch/arm/boot/dts/mt7623a-rfb-nand.dts index fac3ca0322c8..afd177b3b516 100644 --- a/arch/arm/boot/dts/mt7623a-rfb-nand.dts +++ b/arch/arm/boot/dts/mt7623a-rfb-nand.dts @@ -116,74 +116,31 @@ &crypto { status = "okay"; }; -&gmac0 { - status = "okay"; - phy-mode = "trgmii"; +&switch0 { + ports { + port@0 { + status = "okay"; + label = "lan0"; + }; - fixed-link { - speed = <1000>; - full-duplex; - pause; - }; -}; + port@1 { + status = "okay"; + label = "lan1"; + }; -ð { - status = "okay"; + port@2 { + status = "okay"; + label = "lan2"; + }; - mdio-bus { - #address-cells = <1>; - #size-cells = <0>; - - switch@0 { - compatible = "mediatek,mt7530"; - reg = <0>; - mediatek,mcm; - resets = <ðsys MT2701_ETHSYS_MCM_RST>; - reset-names = "mcm"; - core-supply = <&mt6323_vpa_reg>; - io-supply = <&mt6323_vemc3v3_reg>; - - ports { - #address-cells = <1>; - #size-cells = <0>; - - port@0 { - reg = <0>; - label = "lan0"; - }; - - port@1 { - reg = <1>; - label = "lan1"; - }; - - port@2 { - reg = <2>; - label = "lan2"; - }; - - port@3 { - reg = <3>; - label = "lan3"; - }; - - port@4 { - reg = <4>; - label = "wan"; - }; - - port@6 { - reg = <6>; - label = "cpu"; - ethernet = <&gmac0>; - phy-mode = "trgmii"; - - fixed-link { - speed = <1000>; - full-duplex; - }; - }; - }; + port@3 { + status = "okay"; + label = "lan3"; + }; + + port@4 { + status = "okay"; + label = "wan"; }; }; }; diff --git a/arch/arm/boot/dts/mt7623a.dtsi b/arch/arm/boot/dts/mt7623a.dtsi index d304b62d24b5..fbb5731a3a53 100644 --- a/arch/arm/boot/dts/mt7623a.dtsi +++ b/arch/arm/boot/dts/mt7623a.dtsi @@ -17,8 +17,82 @@ &crypto { power-domains = <&scpsys MT7623A_POWER_DOMAIN_ETH>; }; +&gmac0 { + status = "okay"; + phy-mode = "trgmii"; + + fixed-link { + speed = <1000>; + full-duplex; + pause; + }; +}; + ð { + status = "okay"; power-domains = <&scpsys MT7623A_POWER_DOMAIN_ETH>; + + mdio: mdio-bus { + #address-cells = <1>; + #size-cells = <0>; + + switch0: switch@0 { + compatible = "mediatek,mt7530"; + reg = <0>; + mediatek,mcm; + resets = <ðsys MT2701_ETHSYS_MCM_RST>; + reset-names = "mcm"; + core-supply = <&mt6323_vpa_reg>; + io-supply = <&mt6323_vemc3v3_reg>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + status = "disabled"; + reg = <0>; + label = "swp0"; + }; + + port@1 { + status = "disabled"; + reg = <1>; + label = "swp1"; + }; + + port@2 { + status = "disabled"; + reg = <2>; + label = "swp2"; + }; + + port@3 { + status = "disabled"; + reg = <3>; + label = "swp3"; + }; + + port@4 { + status = "disabled"; + reg = <4>; + label = "swp4"; + }; + + port@6 { + reg = <6>; + label = "cpu"; + ethernet = <&gmac0>; + phy-mode = "trgmii"; + + fixed-link { + speed = <1000>; + full-duplex; + }; + }; + }; + }; + }; }; &nandc { From patchwork Wed Feb 1 18:56:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= X-Patchwork-Id: 649355 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 8CCECC05027 for ; Wed, 1 Feb 2023 18:57:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232372AbjBAS5W (ORCPT ); Wed, 1 Feb 2023 13:57:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232344AbjBAS5N (ORCPT ); Wed, 1 Feb 2023 13:57:13 -0500 Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CA8D47F303; Wed, 1 Feb 2023 10:57:11 -0800 (PST) Received: by mail-ej1-x62d.google.com with SMTP id bk15so54230959ejb.9; Wed, 01 Feb 2023 10:57:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=yR+4t71uvOrNwbzfT6rMlJz6ZARDL9nMPAtxzDTp2O8=; b=hAE9xFTNI1lnwpIuE40P7XM3zdPBSWs6oC1K4LIIIi3QjXVHNPzxV0kaKrVltoyw1a nr3pcOkDNFrPu6kunubdEh0/jBS5AkgdI0jnU/1TadEQm4SFGN5nsqT9v90fjBmd/mU+ jK2DrE/mUYa5oJaoSnXXmTh3BpKMu3qRl2gegfK/I51wfNok4JCz0nijSTBHqkQJ1KMr QC9X1Oj0ZBCu6aglye0rahH1MWdFaacyXZQOVt9GC7g0mGMOfYoxEJL/UtylpGx9nfA9 /0hqC4xxAMVvUIuY4PDD1KDCzYcgI1jUPwxHYRWBC/zfce2oh62xKctLUcE0wYrVyY2A 94Rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yR+4t71uvOrNwbzfT6rMlJz6ZARDL9nMPAtxzDTp2O8=; b=bZ26BUng2jOzIidDsqmkLQLfFUCNhdCdNeZYcybP3CLWDcbhq/NSZEwnifFG9D180l IMPJZf6klhIeIqC727rPNnPhVuR7IyP/WJThLJufJvzA9FbjHcx9Y6QvDJP2BF3wfZVF LMJRjuCIS9tAMVbIvtU7KgcNaYtXMmYbJuTJo3FZaldgGRO/U3jQVu37L+JfUMbivB89 LSnFuB1qoX0tXMc9j1/zOsvL+Tsk/brSFZPhAxk3ru9Z6u/ruxkjVdlhOUz8zq873sYu +Xic2YouW96obLzudcX9tAz3+BYIm7oYFKwx9g1M27XyAW0tJqsNbT/0fv6f0tycjGjd StFg== X-Gm-Message-State: AO0yUKUmb/V9GHLy29Z/+b0EiUw0uSk/vWNWQVvWVGEh3Z1VNP+ML2ht bq8AKYUkH72jWY0xrrT7Z5M= X-Google-Smtp-Source: AK7set8Vhjr4qyafeIDSZSc3Eb1qSQaqtTm5MaSmxLU9rQXRso14GgRsj8YWD3pwarp3ZDG7RMCdYw== X-Received: by 2002:a17:906:34d3:b0:82e:a57b:cc9b with SMTP id h19-20020a17090634d300b0082ea57bcc9bmr7270754ejb.24.1675277830106; Wed, 01 Feb 2023 10:57:10 -0800 (PST) Received: from arinc9-PC.lan ([37.120.152.236]) by smtp.gmail.com with ESMTPSA id dy25-20020a05640231f900b0049e210884dasm10100883edb.15.2023.02.01.10.57.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Feb 2023 10:57:09 -0800 (PST) From: arinc9.unal@gmail.com X-Google-Original-From: arinc.unal@arinc9.com To: Rob Herring , Krzysztof Kozlowski , Matthias Brugger Cc: =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, Frank Wunderlich , erkin.bozoglu@xeront.com, Sean Wang , DENG Qingfang Subject: [PATCH v2 4/5] arm: dts: mt7623: mux phy0 on Bananapi BPI-R2 Date: Wed, 1 Feb 2023 21:56:55 +0300 Message-Id: <20230201185656.17164-5-arinc.unal@arinc9.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230201185656.17164-1-arinc.unal@arinc9.com> References: <20230201185656.17164-1-arinc.unal@arinc9.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Arınç ÜNAL Mux the MT7530 switch's phy0 to gmac5 which is wired to the SoC's gmac1. This achieves 2 Gbps total bandwidth to the CPU using the second RGMII. With this, the interface name to access phy0 changes from wan to eth1. Signed-off-by: Arınç ÜNAL --- arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts index dc9b4f99eb8b..64700253fd35 100644 --- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts +++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts @@ -182,6 +182,12 @@ fixed-link { }; }; +&gmac1 { + status = "okay"; + phy-mode = "rgmii"; + phy-handle = <ðphy0>; +}; + ð { status = "okay"; @@ -189,6 +195,10 @@ mdio-bus { #address-cells = <1>; #size-cells = <0>; + ethphy0: ethernet-phy@0 { + reg = <0>; + }; + switch@1f { compatible = "mediatek,mt7530"; reg = <0x1f>; @@ -200,11 +210,6 @@ ports { #address-cells = <1>; #size-cells = <0>; - port@0 { - reg = <0>; - label = "wan"; - }; - port@1 { reg = <1>; label = "lan0";