From patchwork Thu Mar 30 15:23:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Golle X-Patchwork-Id: 77279 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1247530vqo; Thu, 30 Mar 2023 09:18:58 -0700 (PDT) X-Google-Smtp-Source: AKy350YcPGftMc6fitIAvz9Mb+RyKAaLkCsolYyBolD+HnKjpA46VCDtFfjp86yBlOGJByyczGJu X-Received: by 2002:a17:90b:1b4d:b0:23f:9196:c038 with SMTP id nv13-20020a17090b1b4d00b0023f9196c038mr27785516pjb.37.1680193137977; Thu, 30 Mar 2023 09:18:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680193137; cv=none; d=google.com; s=arc-20160816; b=RDhcY68HkIIQF/DmB+o3Ei5j2D3W7fsjdz4W6Vw/sIy/N+9moyFuu8oJsA+t1IZaaU F5hw8w7hxc+y9QzzwBV0XPJxPHNddteWlpTwNO+4uuxmoAgJqLJ1oa5FIJjaU6dc4g/x nDOOtaV33dvaGD3BCXOHhaWyLo1qIenVHwBRKHWK6wsegt5chJay7OCOclFOp/vn3Qsc 0+L3IO30Zj5Wi/MSLQsLNlXi+rhq2/Z/C/46144nFHRWKDR3OQzJ6e17BYczX9wceTTi K5RcDILQL/GcacA6JgIePfitTS5AYPAaDj4mBIwE/y1GI/X78gDsJT9ehM5XOF5O2Iao goWw== 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:cc:to:from:date; bh=H1PiqDahVMuQBWSb8tvhlNIh1R4yNy8SiAjmiSdiPc8=; b=kr9yogpDIeAMirb97R4LWE7OYi2BOgYsKzVlb2oe0Z+c+xy+ZP1yTn8y5KF5/ZJmjB fMwUhirWFtd5yAr/TsrC+Y+UlG9yu9YqzJKlveTknI5tDeLxmDTg3hioR56PzKhwkj6O yWQ/V5c/KkRjB/8tepms1Uqg3mx+rsSv9lUicYf1xzPjdRcV+RDjM14K7G6KJb7+dbJu F82V4af2eYqYWG0faGMMKcs+uL+glUjGBYEK9EWd663RR9VGhxPYkg3Waq7OAecPPFUA irwGXbilje6LtkhKaNFWR2qh1JNua0V8ovJUvC85rLPR3ewWT3w4Wu6eqea6Cxi8UYQa JZqQ== 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 q29-20020a635c1d000000b0050beb3fe627si4385pgb.459.2023.03.30.09.18.43; Thu, 30 Mar 2023 09:18:57 -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 S233025AbjC3PZO (ORCPT + 99 others); Thu, 30 Mar 2023 11:25:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232999AbjC3PYr (ORCPT ); Thu, 30 Mar 2023 11:24:47 -0400 Received: from fudo.makrotopia.org (fudo.makrotopia.org [IPv6:2a07:2ec0:3002::71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8CFA0D50B; Thu, 30 Mar 2023 08:24:17 -0700 (PDT) Received: from local by fudo.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.96) (envelope-from ) id 1phu7e-0006kn-1H; Thu, 30 Mar 2023 17:23:30 +0200 Date: Thu, 30 Mar 2023 16:23:26 +0100 From: Daniel Golle To: netdev@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux@armlinux.org.uk, linux-kernel@vger.kernel.org, Andrew Lunn , =?utf-8?b?QXI=?= =?utf-8?b?xLFuw6cgw5xuYWw=?= , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , AngeloGioacchino Del Regno , Sean Wang , Landen Chao , DENG Qingfang , Philipp Zabel Cc: Sam Shih , Lorenzo Bianconi , John Crispin , Felix Fietkau Subject: [PATCH net-next 13/15] net: dsa: mt7530: add support for 10G link modes for CPU port Message-ID: <89ef48606fdbe896705a57a65a85c22cae01936e.1680180959.git.daniel@makrotopia.org> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761810199988824210?= X-GMAIL-MSGID: =?utf-8?q?1761810199988824210?= The built-in switch of the MT7988 SoC is internally connected using a stateless 10G link. Add support for 10G interface modes to silence a warning otherwise occurring when the switch driver is setup. Reviewed-by: Andrew Lunn Signed-off-by: Daniel Golle --- drivers/net/dsa/mt7530.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c index 3a4682e71e746..ac666da2d10dc 100644 --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c @@ -2618,6 +2618,9 @@ mt7531_mac_config(struct dsa_switch *ds, int port, unsigned int mode, case PHY_INTERFACE_MODE_1000BASEX: case PHY_INTERFACE_MODE_2500BASEX: /* handled in SGMII PCS driver */ + case PHY_INTERFACE_MODE_USXGMII: + case PHY_INTERFACE_MODE_10GKR: + /* internal stateless 10G link */ return 0; default: return -EINVAL; @@ -2741,7 +2744,9 @@ static void mt753x_phylink_mac_link_up(struct dsa_switch *ds, int port, * variants. */ if (interface == PHY_INTERFACE_MODE_TRGMII || - (phy_interface_mode_is_8023z(interface))) { + interface == PHY_INTERFACE_MODE_USXGMII || + interface == PHY_INTERFACE_MODE_10GKR || + phy_interface_mode_is_8023z(interface)) { speed = SPEED_1000; duplex = DUPLEX_FULL; }