From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pidgin.makrotopia.org (pidgin.makrotopia.org [185.142.180.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CBDF136AB56; Thu, 21 May 2026 02:40:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.142.180.65 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779331217; cv=none; b=MGglXI/6SAaPdSxbigWnl7MBIKn5E3wFZAc4Ajuu7ZbPOjCBkBF2aN8zR07pE6Oq6IEIaYw3bBI+A6AxEAP5NuGjkYWnMEe+4WUcCZcSkCbRtudyZxKbqcV6VBtvr33dTNdFytLL101J2sfYOs7ngmvv2winxLqkcybRTkWy6Ig= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779331217; c=relaxed/simple; bh=U2UZNLkL86bi9APMNPIl8uGlEIryY3wwdcEi0ga9w1k=; h=Date:From:To:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=Ozpb2yFh3DhxTeMD7m+7TINV/CkewfhmQqW2cH7B5v+jqZcnSbkE/rw05OO13owLEuoNLJ5C8bl7a5QKr7O+TM0D40T/wZOIKNPy9v38zVNJ+Cz/GQ2It8VcOHfp+p+r7NT3qBvFZjsoGizZoltJdJsgfiFCJ0RoPuck+p8UI3o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org; spf=pass smtp.mailfrom=makrotopia.org; arc=none smtp.client-ip=185.142.180.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=makrotopia.org Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.99) (envelope-from ) id 1wPtKE-0000000033i-0GVA; Thu, 21 May 2026 02:39:54 +0000 Date: Thu, 21 May 2026 03:39:50 +0100 From: Daniel Golle To: Daniel Golle , Andrew Lunn , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Russell King , linux-kernel@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH v2 0/4] net: dsa: mxl862xx: add SerDes ports Message-ID: Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Add support for the two SerDes PCS interfaces of the MxL862xx switch ICs, which can both either be used to connect PHYs or SFP cages, or as CPU port(s). 1000Base-X, 2500Base-X, 10GBase-R, 10GBase-KR, SGMII, QSGMII and USXGMII (single 10G or quad 2.5G) are supported. The firmware only added the API to directly control the PCS as of version 1.0.84, so the PCS features are gated behind a version check. As the driver is growing do some refactoring to break out the phylink parts into mxl862xx-phylink.c. --- Changes since v1: * drop custom ethtool stats (former patch 5/5) * add __{LE,BE}_BITFIELD layouts to ABI structs * per-sub-port QSGMII AN restart via usx_subport / usx_lane_mode * shared-SerDes refcount in pcs_disable via per-XPCS slot bitmap * let every sub-port call pcs_config * cache phy_interface_t instead of firmware type * skip pcs_link_up when inband-AN enabled * gate phylink_get_caps SerDes modes on same FW version as select_pcs * interpret xpcs_pcs_cfg.result as signed (s16) * drop dead MXL862XX_PCS_PORT macro * drop misleading "downshift detection" line from commit message Daniel Golle (4): net: dsa: mxl862xx: store firmware version for feature gating net: dsa: mxl862xx: move phylink stubs to mxl862xx-phylink.c net: dsa: mxl862xx: move API macros to mxl862xx-host.h net: dsa: mxl862xx: add support for SerDes ports drivers/net/dsa/mxl862xx/Makefile | 2 +- drivers/net/dsa/mxl862xx/mxl862xx-api.h | 358 ++++++++++++++++++ drivers/net/dsa/mxl862xx/mxl862xx-cmd.h | 9 + drivers/net/dsa/mxl862xx/mxl862xx-host.h | 8 + drivers/net/dsa/mxl862xx/mxl862xx-phylink.c | 379 ++++++++++++++++++++ drivers/net/dsa/mxl862xx/mxl862xx-phylink.h | 21 ++ drivers/net/dsa/mxl862xx/mxl862xx.c | 54 +-- drivers/net/dsa/mxl862xx/mxl862xx.h | 67 ++++ 8 files changed, 852 insertions(+), 46 deletions(-) create mode 100644 drivers/net/dsa/mxl862xx/mxl862xx-phylink.c create mode 100644 drivers/net/dsa/mxl862xx/mxl862xx-phylink.h -- 2.54.0