Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp3398329rwr; Sat, 22 Apr 2023 04:49:44 -0700 (PDT) X-Google-Smtp-Source: AKy350Zm2bUCpF+XmO0q1DYtxPQu5XZK/u16t6NRrF+TC+sGKWmA3jwMRpDQYrgn2a3WthhrXmCs X-Received: by 2002:a17:902:dacd:b0:1a1:956d:2281 with SMTP id q13-20020a170902dacd00b001a1956d2281mr9597714plx.3.1682164184562; Sat, 22 Apr 2023 04:49:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682164184; cv=none; d=google.com; s=arc-20160816; b=EZSmG75Xkeze75SLaeMdwUGqQWgFe4eTos5xi13u51GGmhbD24ebUHPJyUNU4/O2oQ rChfbpkorfuoXCUn+mh0Rtt7sMahJBavOqccTs5Ckej8wD2RDKHcsj2TC7EmTXnN06Yy Szm190eMPAPogS+czYmSBW9efFylg8/NAxUHG2I4KfFe2q5RdmFzfzBOKWNFdxEG8p+p hr5PKnPoXGdPaEw2zxe9vU6dCc7tx/khWM8s3Ac7MFZI4holj9bPB/nV8TvzbTgXCaco /lCpSUpiCF/jRBasMRmKvwLUNmExNzGyKfwX9w0WYqwWtkivPCq+nDefqJ2sPpb8xE8R g8lA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date; bh=ievwEfhWyu0jnsZb80RbxIKLOxlwC0PerTHehcuR5jI=; b=x0vqeuKZ68POBtOAQSMiadNaPhS1HFtA/EwNvg38zT2jNDS9nD7wKkwc21JYuBIJ/C pSD9Cx76lsJows8DM/eXD3P1vbg02TrvXZuOQhUjPAWUb3uXywMBCl+DI7fLc3UbEcWr KHMhGFXz0LBuZ2uBKaQlQRyeNlp5VZFT9zvM4DXD7d8tq7m9twyFYvCovD5FAqpstRNK spEftcK4kaqAWhhF+D2Zbqlsde2BQWhVh3LLDrLhQ0Tb9kOkPyCS1NWpn97aQ5lsgUvV 8327B/Ruy3wlzIElU847e+e6Yps0titMTi+d+Te8/Os2QNlDdrhwNTq9iveVwash0nC6 WtPg== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u7-20020a170902e5c700b001a63ff97bf2si7242045plf.496.2023.04.22.04.49.33; Sat, 22 Apr 2023 04:49:44 -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 S229693AbjDVLsU (ORCPT + 99 others); Sat, 22 Apr 2023 07:48:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229508AbjDVLsT (ORCPT ); Sat, 22 Apr 2023 07:48:19 -0400 Received: from fudo.makrotopia.org (fudo.makrotopia.org [IPv6:2a07:2ec0:3002::71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77DA21BF2; Sat, 22 Apr 2023 04:48: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 1pqBis-000840-13; Sat, 22 Apr 2023 13:48:10 +0200 Date: Sat, 22 Apr 2023 12:48:06 +0100 From: Daniel Golle To: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Andrew Lunn , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Chen Minqiang , Chukun Pan , Yevhen Kolomeiko , Alexander Couzens Subject: [RFC PATCH net-next 0/8] Improvements for RealTek 2.5G Ethernet PHYs Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 Improve support for RealTek 2.5G Ethernet PHYs (RTL822x series). The PHYs can operate with Clause-22 and Clause-45 MDIO. When using Clause-45 it is desireable to avoid rate-adapter mode and rather have the MAC interface mode follow the PHY speed. The PHYs support 2500Base-X for 2500M, and Cisco SGMII for 1000M/100M/10M. Also prepare support for proprietary RealTek HiSGMII mode which will be needed for situations when used with RealTek switch or router SoCs such as RTL93xx. Add support for Link Down Power Saving Mode (ALDPS) which is already supported for older RTL821x series 1GbE PHYs. Make sure that link-partner advertised modes are only used if the advertisement can be considered valid. Otherwise we are seeing false-positives warning about downscaling eventhough higher speeds are not actually advertised by the link partner. While at it, improve the driver by using existing macros and inline functions which are not actually vendor specific. Alexander Couzens (1): net: phy: realtek: rtl8221: allow to configure SERDES mode Chukun Pan (1): net: phy: realtek: switch interface mode for RTL822x series Daniel Golle (6): net: phy: realtek: use genphy_soft_reset for 2.5G PHYs net: phy: realtek: disable SGMII in-band AN for 2.5G PHYs net: phy: realtek: use phy_read_paged instead of open coding net: phy: realtek: use inline functions for 10GbE advertisement net: phy: realtek: check validity of 10GbE link-partner advertisement net: phy: realtek: setup ALDPS on RTL822x drivers/net/phy/realtek.c | 152 ++++++++++++++++++++++++++++++++------ 1 file changed, 130 insertions(+), 22 deletions(-) base-commit: fbc1449d385d65be49a8d164dfd3772f2cb049ae -- 2.40.0