From patchwork Sun Jul 23 21:57:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Golle X-Patchwork-Id: 124551 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9010:0:b0:3e4:2afc:c1 with SMTP id l16csp1448213vqg; Sun, 23 Jul 2023 15:08:00 -0700 (PDT) X-Google-Smtp-Source: APBJJlHnCT2suK7kkrVpHKPeBJZPtGdaxQN1+XA2gTr0vgBR29dBCp7Sad9mimjiksa77UAhbNOK X-Received: by 2002:a05:6808:1a23:b0:3a3:76c6:a46f with SMTP id bk35-20020a0568081a2300b003a376c6a46fmr11287421oib.38.1690150079958; Sun, 23 Jul 2023 15:07:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690150079; cv=none; d=google.com; s=arc-20160816; b=f4aVxwpY6QcZ4xYm8ZY1QniOaVdtnGByhW8nkIC8OhU9a6HTdddeccBSb+3uam4RBm s9D9TTPqo8wXhMWGCCB5SB/axdG6SIvgGul7oI+97yGlMpJWnhOTzPxNJCiOwoMSSLtn NibUnLXY7tpR9U/upful5cF2g/D9/tn8S9JAELGAESh5yuArov2aLIs/EIyNVE4WF0As JN0KZ34WCgs1nCac3wmpJDsM90qmypeXF4Fu8cfg8OD3vA8DArSxlNDt/icDc3rhlUz2 pmGbH6kqMEKuzrBIhksLUaM6A82S0vw6Xx4AOuRw+QAjJ8nZ0bJvi5xGw93M3yaFi9IC BrQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:to:from:date; bh=42fF/Dey54dE1gejx0RH+cPa7bl+q4p8UZMumaUvRqQ=; fh=kSbt13auWz6/f7g9BzzANFH9WDsh0lXoSikr6/LoHRg=; b=Jx6pA6jk1i2hXjNg9285sUWtbZLpUrmp96rIhbe78lKEpAsKeLghdZYE1kjwFFuwn2 kLPnp2Hy+BrEHbzv8yfta6qecp1TO72V/ig4koQh5SANHcX1pVQKcmbceyUTXDPd07Qc v4VW7YKLrCEh2MVdwKMY+ELIs8ofqH+2PoZb6KUfrhma5dRVEn3a24kwxla9q2X/07WK zl81sjRO7jbZmWPJ5DKrXeWTnEYNqUhhw34Z6qz1VAU1lYALCVFyhXhyBONba/qcDj5/ rT+IcLGeE/kc+irGngqBbcEhIaM9adCQl2cYYc6vBcaFoN9JCvZds6cUYZcv/pBsVBh2 dYTA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a17-20020a637051000000b00557447d5721si7674864pgn.768.2023.07.23.15.07.47; Sun, 23 Jul 2023 15:07:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230001AbjGWV6S (ORCPT + 99 others); Sun, 23 Jul 2023 17:58:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47082 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229964AbjGWV6P (ORCPT ); Sun, 23 Jul 2023 17:58:15 -0400 Received: from pidgin.makrotopia.org (pidgin.makrotopia.org [185.142.180.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B3989E73; Sun, 23 Jul 2023 14:58:13 -0700 (PDT) Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.96) (envelope-from ) id 1qNh5X-0005Pv-1h; Sun, 23 Jul 2023 21:58:03 +0000 Date: Sun, 23 Jul 2023 22:57:55 +0100 From: Daniel Golle To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Felix Fietkau , John Crispin , Sean Wang , Mark Lee , Lorenzo Bianconi , Matthias Brugger , AngeloGioacchino Del Regno , Russell King , =?iso-8859-1?q?Bj=F8rn?= Mork , Greg Ungerer , Florian Fainelli , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH net-next v5 2/9] dt-bindings: net: mediatek,net: add mt7988-eth binding Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772250810208018906 X-GMAIL-MSGID: 1772250810208018906 Introduce DT bindings for the MT7988 SoC to mediatek,net.yaml. The MT7988 SoC got 3 Ethernet MACs operating at a maximum of 10 Gigabit/sec supported by 2 packet processor engines for offloading tasks. The first MAC is hard-wired to a built-in switch which exposes four 1000Base-T PHYs as user ports. It also comes with built-in 2500Base-T PHY which can be used with the 2nd GMAC. The 2nd and 3rd GMAC can be connected to external PHYs or provide SFP(+) cages attached via SGMII, 1000Base-X, 2500Base-X, USXGMII, 5GBase-KR or 10GBase-KR. Signed-off-by: Daniel Golle Reviewed-by: Conor Dooley --- .../devicetree/bindings/net/mediatek,net.yaml | 82 +++++++++++++++++-- 1 file changed, 76 insertions(+), 6 deletions(-) diff --git a/Documentation/devicetree/bindings/net/mediatek,net.yaml b/Documentation/devicetree/bindings/net/mediatek,net.yaml index 38aa3d97ee234..8d3554818c377 100644 --- a/Documentation/devicetree/bindings/net/mediatek,net.yaml +++ b/Documentation/devicetree/bindings/net/mediatek,net.yaml @@ -24,6 +24,7 @@ properties: - mediatek,mt7629-eth - mediatek,mt7981-eth - mediatek,mt7986-eth + - mediatek,mt7988-eth - ralink,rt5350-eth reg: @@ -61,6 +62,12 @@ properties: Phandle to the mediatek hifsys controller used to provide various clocks and reset to the system. + mediatek,infracfg: + $ref: /schemas/types.yaml#/definitions/phandle + description: + Phandle to the syscon node that handles the path from GMAC to + PHY variants. + mediatek,sgmiisys: $ref: /schemas/types.yaml#/definitions/phandle-array minItems: 1 @@ -122,6 +129,8 @@ allOf: - const: gp1 - const: gp2 + mediatek,infracfg: false + mediatek,pctl: $ref: /schemas/types.yaml#/definitions/phandle description: @@ -152,6 +161,8 @@ allOf: - const: ethif - const: fe + mediatek,infracfg: false + mediatek,wed: false mediatek,wed-pcie: false @@ -184,6 +195,8 @@ allOf: - const: sgmii_ck - const: eth2pll + mediatek,infracfg: false + mediatek,sgmiisys: minItems: 1 maxItems: 1 @@ -229,12 +242,6 @@ allOf: - const: sgmii_ck - const: eth2pll - mediatek,infracfg: - $ref: /schemas/types.yaml#/definitions/phandle - description: - Phandle to the syscon node that handles the path from GMAC to - PHY variants. - mediatek,sgmiisys: minItems: 2 maxItems: 2 @@ -275,6 +282,8 @@ allOf: - const: netsys0 - const: netsys1 + mediatek,infracfg: false + mediatek,sgmiisys: minItems: 2 maxItems: 2 @@ -311,6 +320,67 @@ allOf: - const: netsys0 - const: netsys1 + mediatek,infracfg: false + + mediatek,sgmiisys: + minItems: 2 + maxItems: 2 + + - if: + properties: + compatible: + contains: + const: mediatek,mt7988-eth + then: + properties: + interrupts: + minItems: 4 + + clocks: + minItems: 34 + maxItems: 34 + + clock-names: + items: + - const: crypto + - const: fe + - const: gp2 + - const: gp1 + - const: gp3 + - const: ethwarp_wocpu2 + - const: ethwarp_wocpu1 + - const: ethwarp_wocpu0 + - const: esw + - const: netsys0 + - const: netsys1 + - const: sgmii_tx250m + - const: sgmii_rx250m + - const: sgmii2_tx250m + - const: sgmii2_rx250m + - const: top_usxgmii0_sel + - const: top_usxgmii1_sel + - const: top_sgm0_sel + - const: top_sgm1_sel + - const: top_xfi_phy0_xtal_sel + - const: top_xfi_phy1_xtal_sel + - const: top_eth_gmii_sel + - const: top_eth_refck_50m_sel + - const: top_eth_sys_200m_sel + - const: top_eth_sys_sel + - const: top_eth_xgmii_sel + - const: top_eth_mii_sel + - const: top_netsys_sel + - const: top_netsys_500m_sel + - const: top_netsys_pao_2x_sel + - const: top_netsys_sync_250m_sel + - const: top_netsys_ppefb_250m_sel + - const: top_netsys_warp_sel + - const: wocpu1 + - const: wocpu0 + - const: xgp1 + - const: xgp2 + - const: xgp3 + mediatek,sgmiisys: minItems: 2 maxItems: 2