From mboxrd@z Thu Jan 1 00:00:00 1970 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 C106EEE4993 for ; Wed, 23 Aug 2023 10:58:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232161AbjHWK6z (ORCPT ); Wed, 23 Aug 2023 06:58:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232105AbjHWK6y (ORCPT ); Wed, 23 Aug 2023 06:58:54 -0400 Received: from pandora.armlinux.org.uk (unknown [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84BC4FB; Wed, 23 Aug 2023 03:58:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:Content-Type:MIME-Version: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=QpqzTXlkvfTZwb/qvLffSgOkdmA3MgzLw1gYn4Tft4k=; b=s/9kx6+CR/fuCvSdzEXiuQjEfZ EdboCKEcmE68sjpbz32RSMAnopH5pDf5FWnykSJznpjzbcLne2CEzF/ettMHvNxEZRwVE84hajdMi NK88pFfypItbIjF3cChnkLE6vL2H8WQit9euN7sWPjMxwQjzOiSPZy+En65nCYIFEk6TejmTV9yxc 3BSESc8hQZqVZH1d4SKqulITtnWdmHws66OttGpvKlGtRUzwVgj0iPKwY9vYa3HaysPc7b6n/z0i8 NGnex4U5VnAjp6bSr3FR0EK+NP/LM8+C51OLtz2klZ/imZyb1e7HMGAHvV3sPD3iiYaiy3BRUCxJY ikXoj3uA==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:42594) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1qYlZJ-0002eW-1e; Wed, 23 Aug 2023 11:58:33 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1qYlZI-0006lA-Js; Wed, 23 Aug 2023 11:58:32 +0100 Date: Wed, 23 Aug 2023 11:58:32 +0100 From: "Russell King (Oracle)" To: Serge Semin Cc: Jakub Kicinski , Rohan G Thomas , "David S . Miller" , Alexandre Torgue , Jose Abreu , Eric Dumazet , Paolo Abeni , Maxime Coquelin , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Giuseppe Cavallaro , netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Conor Dooley Subject: Synopsys XGMII MAC and USXGMII interfaces Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Sender: Russell King (Oracle) Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Part 2 of the discussion... A similar issue applies to PHY_INTERFACE_MODE_USXGMII, but is reversed. USXGMII supports 10M, 100M, 1G, 2.5G, 5G and 10G. Phylink allows all of these because that's what the appropriate standard says. dwxgmac2 initialises config register settings for speeds from 10M up to 10G. However, the PHY_INTERFACE_MODE_USXGMII switch() block in stmmac_mac_link_up() only handles 2.5G, 5G and 10G. Shouldn't it handle the other speed cases - it looks like the MAC does support them. The initialisation done by dwxgmac2_setup() does setup control register masks for everything from 10M to 10G, so on the face of it, it looks like a mistake in stmmac_mac_link_up(). If it's something outside of the MAC that doesn't support these speeds when operating as USXGMII, then that needs to be handled. The other weird thing is that when using PHY_INTERFACE_MODE_USXGMII with XPCS, XPCS supports 1G, 2.5G and 10G ethtool link modes, but not 5G. So combining the implementation in stmmac_mac_link_up(), that means only 2.5G and 10G can actually be functional. Is that a fair assessment of the USXGMII situation with stmmac? Thanks. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!