[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240215030500.3067426-1-yong.liang.choong@linux.intel.com>
Date: Thu, 15 Feb 2024 11:04:50 +0800
From: Choong Yong Liang <yong.liang.choong@...ux.intel.com>
To: Rajneesh Bhardwaj <irenic.rajneesh@...il.com>,
David E Box <david.e.box@...ux.intel.com>,
Hans de Goede <hdegoede@...hat.com>,
Mark Gross <markgross@...nel.org>,
Alexandre Torgue <alexandre.torgue@...s.st.com>,
Jose Abreu <Jose.Abreu@...opsys.com>,
"David S . Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
Richard Cochran <richardcochran@...il.com>,
Russell King <linux@...linux.org.uk>,
Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Jesper Dangaard Brouer <hawk@...nel.org>,
John Fastabend <john.fastabend@...il.com>,
Andrew Lunn <andrew@...n.ch>,
Heiner Kallweit <hkallweit1@...il.com>,
Philipp Zabel <p.zabel@...gutronix.de>
Cc: Andrew Halaney <ahalaney@...hat.com>,
Serge Semin <fancer.lancer@...il.com>,
netdev@...r.kernel.org,
linux-kernel@...r.kernel.org,
linux-stm32@...md-mailman.stormreply.com,
linux-arm-kernel@...ts.infradead.org,
platform-driver-x86@...r.kernel.org,
linux-hwmon@...r.kernel.org,
bpf@...r.kernel.org,
Voon Wei Feng <weifeng.voon@...el.com>,
Michael Sit Wei Hong <michael.wei.hong.sit@...el.com>,
Lai Peter Jun Ann <jun.ann.lai@...el.com>,
Abdul Rahim Faizal <faizal.abdul.rahim@...el.com>
Subject: [PATCH net-next v5 0/9] Enable SGMII and 2500BASEX interface mode switching for Intel platforms
From: root <root@...gLiang-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
--
2.34.1
Powered by blists - more mailing lists