From patchwork Sat Aug 20 22:45:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Couzens X-Patchwork-Id: 12949841 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 5EC31C25B08 for ; Sat, 20 Aug 2022 22:46:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229898AbiHTWq2 (ORCPT ); Sat, 20 Aug 2022 18:46:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234545AbiHTWq0 (ORCPT ); Sat, 20 Aug 2022 18:46:26 -0400 Received: from mail.base45.de (mail.base45.de [IPv6:2001:67c:2050:320::77]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9C41222BC; Sat, 20 Aug 2022 15:46:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=fe80.eu; s=20190804; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject: Cc:To:From:Sender:Reply-To:Content-Type: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=pFonu2+lyt11nAqs0JC7/r1UiLi62A30gEOaW5uexqQ=; b=a0O0grs72eKVIeOH7cGcs0m6J/ alQ0bRsmg/rpD6yDbdNXZmd1/uWpAhUFoQ1V45N0XKO4hptMrRfJqVuPYQ0YfQ3BhJXXPPXceYR34 Qy/OsSVMvaAJPoifh4u46vFjwAX4vO4l3JNNAcHJReINVNM75MrYUGBZWGF+48NdFomcg/SKQ4Q8K SRdV/MmDNlhF5lGXwq4bUxyou4zrbYE5t8koViEqrY9t8SMgRVIw2KPSThLGp77F9edumEqRDnBQ7 XVDl8t54PRsr4E4rL7clp+s4Mkn5YVJNigScqtKJPZAf6vHbmOVOgsEvJxR6xVoagB8qnbOh+xOLA lYWPK/Pg==; Received: from [2a02:2454:9869:1a:9eb6:54ff:0:fa5] (helo=cerator.lan) by mail.base45.de with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1oPXE4-00G2sh-OA; Sat, 20 Aug 2022 22:45:56 +0000 From: Alexander Couzens To: Felix Fietkau , John Crispin , Sean Wang , Mark Lee Cc: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Matthias Brugger , Russell King , netdev@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, Daniel Golle , Alexander Couzens Subject: [PATCH 0/4] net: mediatek: sgmii: add support to change interface parameter while running Date: Sun, 21 Aug 2022 00:45:34 +0200 Message-Id: <20220820224538.59489-1-lynxis@fe80.eu> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org When connecting the SGMII interface to a 2.5gbit ethernet phy (e.g. rtl8221 or a SFP slot) the SGMII interface need to change the SGMII connection parameters (speed, autoneg, duplex, ..) while running to match the phy speed. Alexander Couzens (4): net: mediatek: sgmii: fix powering up the SGMII phy net: mediatek: sgmii: ensure the SGMII PHY is powered down on configuration net: mediatek: sgmii: mtk_pcs_setup_mode_an: don't rely on register defaults net: mediatek: sgmii: set the speed according to the phy interface in AN drivers/net/ethernet/mediatek/mtk_sgmii.c | 40 ++++++++++++++++------- 1 file changed, 29 insertions(+), 11 deletions(-)