From: Maxime Chevallier <maxime.chevallier@bootlin.com>
To: Daniel Golle <daniel@makrotopia.org>,
Hauke Mehrtens <hauke@hauke-m.de>, Andrew Lunn <andrew@lunn.ch>,
Vladimir Oltean <olteanv@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Simon Horman <horms@kernel.org>,
Russell King <linux@armlinux.org.uk>,
netdev@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: Andreas Schirm <andreas.schirm@siemens.com>,
Lukas Stockmann <lukas.stockmann@siemens.com>,
Alexander Sverdlin <alexander.sverdlin@siemens.com>,
Peter Christen <peter.christen@siemens.com>,
Avinash Jayaraman <ajayaraman@maxlinear.com>,
Bing tao Xu <bxu@maxlinear.com>, Liang Xu <lxu@maxlinear.com>,
Juraj Povazanec <jpovazanec@maxlinear.com>,
"Fanni (Fang-Yi) Chan" <fchan@maxlinear.com>,
"Benny (Ying-Tsan) Weng" <yweng@maxlinear.com>,
"Livia M. Rosu" <lrosu@maxlinear.com>,
John Crispin <john@phrozen.org>
Subject: Re: [PATCH net-next v2 13/13] net: dsa: add driver for MaxLinear GSW1xx switch family
Date: Sat, 25 Oct 2025 18:43:12 +0200 [thread overview]
Message-ID: <43f20230-1e13-4952-8069-bbcb9d966a0f@bootlin.com> (raw)
In-Reply-To: <5a586b0441a18a1e0eca9ebe77668d6ebde79d1c.1761402873.git.daniel@makrotopia.org>
Hi Daniel,
On 25/10/2025 16:51, Daniel Golle wrote:
> Add driver for the MaxLinear GSW1xx family of Ethernet switch ICs which
> are based on the same IP as the Lantiq/Intel GSWIP found in the Lantiq VR9
> and Intel GRX MIPS router SoCs. The main difference is that instead of
> using memory-mapped I/O to communicate with the host CPU these ICs are
> connected via MDIO (or SPI, which isn't supported by this driver).
> Implement the regmap API to access the switch registers over MDIO to allow
> reusing lantiq_gswip_common for all core functionality.
>
> The GSW1xx also comes with a SerDes port capable of 1000Base-X, SGMII and
> 2500Base-X, which can either be used to connect an external PHY or SFP
> cage, or as the CPU port. Support for the SerDes interface is implemented
> in this driver using the phylink_pcs interface.
>
> Signed-off-by: Daniel Golle <daniel@makrotopia.org>
> ---
[...]
> +static int gsw1xx_sgmii_pcs_config(struct phylink_pcs *pcs,
> + unsigned int neg_mode,
> + phy_interface_t interface,
> + const unsigned long *advertising,
> + bool permit_pause_to_mac)
> +{
> + struct gsw1xx_priv *priv = sgmii_pcs_to_gsw1xx(pcs);
> + bool sgmii_mac_mode = dsa_is_user_port(priv->gswip.ds, GSW1XX_SGMII_PORT);
> + u16 txaneg, anegctl, val, nco_ctrl;
> + int ret;
> +
> + /* Assert and deassert SGMII shell reset */
> + ret = regmap_set_bits(priv->shell, GSW1XX_SHELL_RST_REQ,
> + GSW1XX_RST_REQ_SGMII_SHELL);
> + if (ret < 0)
> + return ret;
> +
> + ret = regmap_clear_bits(priv->shell, GSW1XX_SHELL_RST_REQ,
> + GSW1XX_RST_REQ_SGMII_SHELL);
> + if (ret < 0)
> + return ret;
> +
> + /* Hardware Bringup FSM Enable */
> + ret = regmap_write(priv->sgmii, GSW1XX_SGMII_PHY_HWBU_CTRL,
> + GSW1XX_SGMII_PHY_HWBU_CTRL_EN_HWBU_FSM |
> + GSW1XX_SGMII_PHY_HWBU_CTRL_HW_FSM_EN);
> + if (ret < 0)
> + return ret;
> +
> + /* Configure SGMII PHY Receiver */
> + val = FIELD_PREP(GSW1XX_SGMII_PHY_RX0_CFG2_EQ,
> + GSW1XX_SGMII_PHY_RX0_CFG2_EQ_DEF) |
> + GSW1XX_SGMII_PHY_RX0_CFG2_LOS_EN |
> + GSW1XX_SGMII_PHY_RX0_CFG2_TERM_EN |
> + FIELD_PREP(GSW1XX_SGMII_PHY_RX0_CFG2_FILT_CNT,
> + GSW1XX_SGMII_PHY_RX0_CFG2_FILT_CNT_DEF);
> +
> + // if (!priv->dts.sgmii_rx_invert)
> + val |= GSW1XX_SGMII_PHY_RX0_CFG2_INVERT;
There's a leftover commented-out line here :)
Maxime
next prev parent reply other threads:[~2025-10-25 16:43 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-25 14:47 [PATCH net-next v2 00/13] net: dsa: lantiq_gswip: Add support " Daniel Golle
2025-10-25 14:47 ` [PATCH net-next v2 01/13] net: dsa: lantiq_gswip: split into common and MMIO parts Daniel Golle
2025-10-25 14:48 ` [PATCH net-next v2 02/13] net: dsa: lantiq_gswip: support enable/disable learning Daniel Golle
2025-10-25 14:48 ` [PATCH net-next v2 03/13] net: dsa: lantiq_gswip: support Energy Efficient Ethernet Daniel Golle
2025-10-25 19:05 ` Russell King (Oracle)
2025-10-25 14:48 ` [PATCH net-next v2 04/13] net: dsa: lantiq_gswip: set link parameters also for CPU port Daniel Golle
2025-10-25 14:48 ` [PATCH net-next v2 05/13] net: dsa: lantiq_gswip: define and use GSWIP_TABLE_MAC_BRIDGE_VAL1_VALID Daniel Golle
2025-10-25 14:49 ` [PATCH net-next v2 06/13] dt-bindings: net: dsa: lantiq,gswip: add support for MII delay properties Daniel Golle
2025-10-25 16:30 ` Maxime Chevallier
2025-10-25 14:49 ` [PATCH net-next v2 07/13] net: dsa: lantiq_gswip: allow adjusting MII delays Daniel Golle
2025-10-25 14:50 ` [PATCH net-next v2 08/13] dt-bindings: net: dsa: lantiq,gswip: add MaxLinear RMII refclk output property Daniel Golle
2025-10-25 14:50 ` [PATCH net-next v2 09/13] net: dsa: lantiq_gswip: add vendor property to setup MII refclk output Daniel Golle
2025-10-25 14:50 ` [PATCH net-next v2 10/13] dt-bindings: net: dsa: lantiq,gswip: add support for MaxLinear GSW1xx switches Daniel Golle
2025-10-25 14:50 ` [PATCH net-next v2 11/13] net: dsa: add tagging driver for MaxLinear GSW1xx switch family Daniel Golle
2025-10-25 14:51 ` [PATCH net-next v2 12/13] net: dsa: lantiq_gswip: add registers specific for MaxLinear GSW1xx Daniel Golle
2025-10-25 14:51 ` [PATCH net-next v2 13/13] net: dsa: add driver for MaxLinear GSW1xx switch family Daniel Golle
2025-10-25 16:43 ` Maxime Chevallier [this message]
2025-10-25 18:44 ` Russell King (Oracle)
2025-10-27 0:08 ` Daniel Golle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=43f20230-1e13-4952-8069-bbcb9d966a0f@bootlin.com \
--to=maxime.chevallier@bootlin.com \
--cc=ajayaraman@maxlinear.com \
--cc=alexander.sverdlin@siemens.com \
--cc=andreas.schirm@siemens.com \
--cc=andrew@lunn.ch \
--cc=bxu@maxlinear.com \
--cc=conor+dt@kernel.org \
--cc=daniel@makrotopia.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=fchan@maxlinear.com \
--cc=hauke@hauke-m.de \
--cc=horms@kernel.org \
--cc=john@phrozen.org \
--cc=jpovazanec@maxlinear.com \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=lrosu@maxlinear.com \
--cc=lukas.stockmann@siemens.com \
--cc=lxu@maxlinear.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=peter.christen@siemens.com \
--cc=robh@kernel.org \
--cc=yweng@maxlinear.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®