Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp3147381pxa; Tue, 25 Aug 2020 12:45:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx7Mhfh1hl+zHZ1/hlgIe/hhrt3Ys6zzxHFawCHniUy2PwU83I3eUK23cip7sRO58sXEgwt X-Received: by 2002:a05:6402:782:: with SMTP id d2mr12093734edy.186.1598384747139; Tue, 25 Aug 2020 12:45:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598384747; cv=none; d=google.com; s=arc-20160816; b=oWWBgcLGDjT4uswO3Q/a8drabw8hAd91JGT9AkngJva7/dImius4bNHszXrt2F0nUQ cXRmkDXJ90fQF41abCzsyZueCitmv/rLhfDA8Zg95sPBILkbEN4nziCeqzMw8Egylfck qYI385qBCX99CGvkqxcdcqclJJWFrCWFsuMJVGtFNhPWOJ78fVCd+krvM+stGMnq3s/H I6PGi3biRATMzJH6zaFcRHSfBCBjFwZdtJwHGe41xb5qJBHmYS5zNgM3AZtwMBFiNp9i Nb53pA1wkLM+iLSkrGbwFWZirVNi+hHUaZvC3LAcNEo0mAyBL8m57DfBrAyChhDIeMUo EchA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=xFa4K2EMnvtSpb7MXWNHE/NvCVe7Pt+4e7+jJHBanys=; b=XMXCLWLnBj8GyrfCKRoOziTe7kT83e7SHpx4wKXu1ytu9b01CzvT3oA98Y+7ivt/mT dPZQyxHqcN1MtY+BBPDiqSps35nu+yF5EGKYnaJtLwve48ptz6mrkHGt2d33d4Ki1USZ /k6WP3KyJTHxnANlRTR7132cPiiod8wl/J9B0131mIM9e18q02omsFFMMDyf1N88rLG/ 3dvHyqEnO1VtRZflDr6AQEuQcO57r5NyFm8Lxo9g1eamaSrESdeH8YGBBRh7JAODkNiD DIidirB6a5js7izQKCicId5S/ZS1qjiW8tbq23yGtQxHPN7jZzRkkjZnqRYqxYEg4oI+ avfQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bo27si9506590edb.0.2020.08.25.12.45.24; Tue, 25 Aug 2020 12:45:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726666AbgHYTnL (ORCPT + 99 others); Tue, 25 Aug 2020 15:43:11 -0400 Received: from mail-io1-f68.google.com ([209.85.166.68]:36614 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726303AbgHYTnK (ORCPT ); Tue, 25 Aug 2020 15:43:10 -0400 Received: by mail-io1-f68.google.com with SMTP id i10so8158551iow.3; Tue, 25 Aug 2020 12:43:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=xFa4K2EMnvtSpb7MXWNHE/NvCVe7Pt+4e7+jJHBanys=; b=RWWyOZTC34l4psCUv40YziStvOB1Sju+6sqfXEqpMfEBjbdv5WHhV3D3QQVTonDfof 9EDuFhEi/LdgR9uHIvIqsPOxxAphKpU2i6vD0qea5JiXseyoikJyEHI1J0PeEssqbeQk vPwxEPXqLPkSo8h5Y1CIXX4eDKl01Zq4JZyPGw42yKzqVBTdprFlk2Kq1U+0x+Vc3wEo fXSfjJ/cQMMiy4T+t2EKWJjUiIi0Bw/Um61woo8FJm3RTGGoqdnlN2Ai7HHBwQMpfARu m++o187vME2t90J7eLaxn3SIQ7Lx6cYpbSDz1DrZuAt1EYPiqxgMptW7KQN9wQyHhahL 8+5Q== X-Gm-Message-State: AOAM5319nVVIyI2n29oyjj6E795wEWPD2Z00vpEZ9sNhAFWk04djIPQ/ DLoJ974wiavfgEcjPKVtaQ== X-Received: by 2002:a6b:bfc1:: with SMTP id p184mr10370531iof.193.1598384589390; Tue, 25 Aug 2020 12:43:09 -0700 (PDT) Received: from xps15 ([64.188.179.249]) by smtp.gmail.com with ESMTPSA id f128sm9645725ilh.71.2020.08.25.12.43.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 25 Aug 2020 12:43:08 -0700 (PDT) Received: (nullmailer pid 1198512 invoked by uid 1000); Tue, 25 Aug 2020 19:43:06 -0000 Date: Tue, 25 Aug 2020 13:43:06 -0600 From: Rob Herring To: Landen Chao Cc: andrew@lunn.ch, f.fainelli@gmail.com, vivien.didelot@savoirfairelinux.com, matthias.bgg@gmail.com, mark.rutland@arm.com, devicetree@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, davem@davemloft.net, sean.wang@mediatek.com, opensource@vdorst.com, frank-w@public-files.de, dqfext@gmail.com Subject: Re: [PATCH net-next v2 4/7] dt-bindings: net: dsa: add new MT7531 binding to support MT7531 Message-ID: <20200825194306.GA1160944@bogus> References: <1ec38b68deec6f1c23e1236d38035b1823ea2ebf.1597729692.git.landen.chao@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1ec38b68deec6f1c23e1236d38035b1823ea2ebf.1597729692.git.landen.chao@mediatek.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 18, 2020 at 03:14:09PM +0800, Landen Chao wrote: > Add devicetree binding to support the compatible mt7531 switch as used > in the MediaTek MT7531 switch. > > Signed-off-by: Sean Wang > Signed-off-by: Landen Chao > --- > .../devicetree/bindings/net/dsa/mt7530.txt | 71 ++++++++++++++++++- > 1 file changed, 68 insertions(+), 3 deletions(-) > > diff --git a/Documentation/devicetree/bindings/net/dsa/mt7530.txt b/Documentation/devicetree/bindings/net/dsa/mt7530.txt > index c5ed5d25f642..50eaf40fb612 100644 > --- a/Documentation/devicetree/bindings/net/dsa/mt7530.txt > +++ b/Documentation/devicetree/bindings/net/dsa/mt7530.txt > @@ -5,6 +5,7 @@ Required properties: > > - compatible: may be compatible = "mediatek,mt7530" > or compatible = "mediatek,mt7621" > + or compatible = "mediatek,mt7531" > - #address-cells: Must be 1. > - #size-cells: Must be 0. > - mediatek,mcm: Boolean; if defined, indicates that either MT7530 is the part > @@ -32,10 +33,13 @@ Required properties for the child nodes within ports container: > > - reg: Port address described must be 6 for CPU port and from 0 to 5 for > user ports. > -- phy-mode: String, must be either "trgmii" or "rgmii" for port labeled > - "cpu". > +- phy-mode: String, the follow value would be acceptable for port labeled "cpu" > + If compatible mediatek,mt7530 or mediatek,mt7621 is set, > + must be either "trgmii" or "rgmii" > + If compatible mediatek,mt7531 is set, > + must be either "sgmii", "1000base-x" or "2500base-x" > > -Port 5 of the switch is muxed between: > +Port 5 of mt7530 and mt7621 switch is muxed between: > 1. GMAC5: GMAC5 can interface with another external MAC or PHY. > 2. PHY of port 0 or port 4: PHY interfaces with an external MAC like 2nd GMAC > of the SOC. Used in many setups where port 0/4 becomes the WAN port. > @@ -308,3 +312,64 @@ Example 3: MT7621: Port 5 is connected to external PHY: Port 5 -> external PHY. > }; > }; > }; > + > +Example 4: MT7531BE port6 -- up-clocked 2.5Gbps SGMII -- MT7622 CPU 1st GMAC Does this really need another example? > + > +ð { > + gmac0: mac@0 { > + compatible = "mediatek,eth-mac"; > + reg = <0>; > + phy-mode = "2500base-x"; > + > + fixed-link { > + speed = <2500>; > + full-duplex; > + pause; > + }; > + }; > + > + &mdio0 { > + switch@0 { > + compatible = "mediatek,mt7531"; > + reg = <0>; > + reset-gpios = <&pio 54 0>; > + > + ports { > + #address-cells = <1>; > + #size-cells = <0>; > + reg = <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 = "2500base-x"; > + }; > + }; > + }; > + }; > -- > 2.17.1