From nobody Sat Sep 21 02:46:14 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 42BC8C77B60 for ; Thu, 30 Mar 2023 15:25:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233056AbjC3PZP (ORCPT ); Thu, 30 Mar 2023 11:25:15 -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?QXLEsW7DpyDDnG5hbA==?= , 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: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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, un= signed 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_swi= tch *ds, int port, * variants. */ if (interface =3D=3D PHY_INTERFACE_MODE_TRGMII || - (phy_interface_mode_is_8023z(interface))) { + interface =3D=3D PHY_INTERFACE_MODE_USXGMII || + interface =3D=3D PHY_INTERFACE_MODE_10GKR || + phy_interface_mode_is_8023z(interface)) { speed =3D SPEED_1000; duplex =3D DUPLEX_FULL; } --=20 2.39.2