Message ID | 20240215030500.3067426-1-yong.liang.choong@linux.intel.com (mailing list archive) |
---|---|
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C7496C4829E for <linux-arm-kernel@archiver.kernel.org>; Thu, 15 Feb 2024 03:07:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=88XTRgcwFmVbGrNjDmUNLXSrFoKkfPLXreDlu5b+dkE=; b=wJRPoylH/Eo/GM BEUK3YE9tFO+rki96U2O1zG0Ux9LYRF0CxQQkw4FX2QwScBhRlVzknhJr9VkpNp6a+pxd02zkqgJe 5ZAiZkk7ZINaNfI2sKx+93P453GoAIzhFNHkPCLFjCmSY9zzCCmA71jj8F+4yN9zRe0FTkdSSOEi4 LFwx57lDtcBQr8KrtMixaQYQ/DKBJJ66qCHo/NZ7vXtHvgQdiPV66e85EvIkKyKPqBgEPJAd7MrJZ BKjJr6sjfTnxX1/Y3iaXEcUNc47o9GXG//TRVciXY75+7C46X59mbjhHSFd65aKOnf7rpdfHd6a0r COq7QdmRR11xN06e9ZsQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1raS62-0000000EqFi-2WPs; Thu, 15 Feb 2024 03:07:34 +0000 Received: from mgamail.intel.com ([198.175.65.10]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1raS60-0000000EqFH-16Uz for linux-arm-kernel@lists.infradead.org; Thu, 15 Feb 2024 03:07:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1707966453; x=1739502453; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=qwwasO+1xBKjEezC6aXWqJJmEG8jQepQBuZ9KNK5I8Y=; b=bxGLBORBWinub67o6yDL2HOKaINbFv9+UOQi/FyFjGtQhoXZaDuj1/SO spZuovteiezL5HZ3IcE6Zm18vJQHK9Ld7T6NsSwLrco32Uw5rHuaw3R5H ZXCXsC0dfY7hd4YVg7C14NY88cGL4zgIWboCqBRXQg/ARwQxKZyjTYf2y 5/5xSyLcwN56y32jHa19yt923p75G+2rPXMTMUMEUrn6iBCTZF8KBDZWo Yr4cw587AnqF+PLGB9G72Pzu8Hj82Sul3TNZpahdghHPbEfX8Df53zDyx WPqcduvAcm8PD7rnnbDX+tYhvww0spYVZgB6mJwAuv6vs084TGXbRYPnz Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10984"; a="19461209" X-IronPort-AV: E=Sophos;i="6.06,161,1705392000"; d="scan'208";a="19461209" Received: from fmviesa009.fm.intel.com ([10.60.135.149]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Feb 2024 19:07:29 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,161,1705392000"; d="scan'208";a="3385643" Received: from yongliang-ubuntu20-ilbpg12.png.intel.com ([10.88.229.33]) by fmviesa009.fm.intel.com with ESMTP; 14 Feb 2024 19:07:21 -0800 From: Choong Yong Liang <yong.liang.choong@linux.intel.com> To: Rajneesh Bhardwaj <irenic.rajneesh@gmail.com>, David E Box <david.e.box@linux.intel.com>, Hans de Goede <hdegoede@redhat.com>, Mark Gross <markgross@kernel.org>, Alexandre Torgue <alexandre.torgue@foss.st.com>, Jose Abreu <Jose.Abreu@synopsys.com>, "David S . Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Maxime Coquelin <mcoquelin.stm32@gmail.com>, Richard Cochran <richardcochran@gmail.com>, Russell King <linux@armlinux.org.uk>, Alexei Starovoitov <ast@kernel.org>, Daniel Borkmann <daniel@iogearbox.net>, Jesper Dangaard Brouer <hawk@kernel.org>, John Fastabend <john.fastabend@gmail.com>, Andrew Lunn <andrew@lunn.ch>, Heiner Kallweit <hkallweit1@gmail.com>, Philipp Zabel <p.zabel@pengutronix.de> Cc: Andrew Halaney <ahalaney@redhat.com>, Serge Semin <fancer.lancer@gmail.com>, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, platform-driver-x86@vger.kernel.org, linux-hwmon@vger.kernel.org, bpf@vger.kernel.org, Voon Wei Feng <weifeng.voon@intel.com>, Michael Sit Wei Hong <michael.wei.hong.sit@intel.com>, Lai Peter Jun Ann <jun.ann.lai@intel.com>, Abdul Rahim Faizal <faizal.abdul.rahim@intel.com> Subject: [PATCH net-next v5 0/9] Enable SGMII and 2500BASEX interface mode switching for Intel platforms Date: Thu, 15 Feb 2024 11:04:50 +0800 Message-Id: <20240215030500.3067426-1-yong.liang.choong@linux.intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240214_190732_410218_384A856F X-CRM114-Status: GOOD ( 14.90 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
Enable SGMII and 2500BASEX interface mode switching for Intel platforms
|
expand
|
From: root <root@YongLiang-Ubuntu20-iLBPG12.png.intel.com> During the interface mode change, the 'phylink_major_config' function will be triggered in phylink. The modification of the following functions will be triggered to support the switching between SGMII and 2500BASEX interfaces mode for the Intel platform. - mac_get_pcs_neg_mode: A new function that selects the PCS negotiation mode according to the interface mode. - xpcs_do_config: Re-initiate clause 37 auto-negotiation for SGMII interface mode to perform auto-negotiation. - mac_finish: Configures the SerDes according to the interface mode. With the above changes, the code will work as follows during the interface mode change. The PCS and PCS negotiation mode will be selected for PCS configuration according to the interface mode. Then, the MAC driver will perform SerDes configuration on the 'mac_finish' based on the interface mode. During the SerDes configuration, the selected interface mode will identify TSN lane registers from FIA and then send IPC commands to the Power Management Controller (PMC) through the PMC driver/API. PMC will act as a proxy to program the PLL registers. Change log: v1 -> v2: - Add static to pmc_lpm_modes declaration - Add cur_link_an_mode to the kernel doc - Combine 2 commits i.e. "stmmac: intel: Separate driver_data of ADL-N from TGL" and "net: stmmac: Add 1G/2.5G auto-negotiation support for ADL-N" into 1 commit. v2 -> v3: - Create `pmc_ipc.c` file for `intel_pmc_ipc()` function and allocate the file in `arch/x86/platform/intel/` directory. - Update phylink's AN mode during phy interface change and not exposing phylink's AN mode into phylib. v3 -> v4: - Introduce `allow_switch_interface` flag to have all ethtool link modes that are supported and advertised will be published. - Introduce `mac_get_pcs_neg_mode` function that selects the PCS negotiation mode according to the interface mode. - Remove pcs-xpcs.c changes and handle pcs during `mac_select_pcs` function - Configure SerDes base on the interface on `mac_finish` function. v4 -> v5: - remove 'allow_switch_interface' related patches. - remove 'mac_select_pcs' related patches. - add a soft reset according to XPCS datasheet for re-initiate Clause 37 auto-negotiation when switching to SGMII interface mode. Choong Yong Liang (7): net: phylink: provide mac_get_pcs_neg_mode() function net: phylink: add phylink_pcs_neg_mode() declaration into phylink.h net: stmmac: select PCS negotiation mode according to the interface mode net: pcs: xpcs: re-initiate clause 37 Auto-negotiation net: stmmac: configure SerDes on mac_finish stmmac: intel: interface switching support for EHL platform stmmac: intel: interface switching support for ADL-N platform David E. Box (1): arch: x86: Add IPC mailbox accessor function and add SoC register access Tan, Tee Min (1): stmmac: intel: configure SerDes according to the interface mode MAINTAINERS | 2 + arch/x86/Kconfig | 9 + arch/x86/platform/intel/Makefile | 1 + arch/x86/platform/intel/pmc_ipc.c | 75 ++++++ drivers/net/ethernet/stmicro/stmmac/Kconfig | 2 + .../net/ethernet/stmicro/stmmac/dwmac-intel.c | 233 ++++++++++++++++-- .../net/ethernet/stmicro/stmmac/dwmac-intel.h | 81 ++++++ .../net/ethernet/stmicro/stmmac/stmmac_main.c | 30 +++ drivers/net/pcs/pcs-xpcs.c | 62 ++++- drivers/net/phy/phylink.c | 21 +- include/linux/phylink.h | 8 + .../linux/platform_data/x86/intel_pmc_ipc.h | 34 +++ include/linux/stmmac.h | 5 + 13 files changed, 538 insertions(+), 25 deletions(-) create mode 100644 arch/x86/platform/intel/pmc_ipc.c create mode 100644 include/linux/platform_data/x86/intel_pmc_ipc.h