[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <cover.1695058909.git.daniel@makrotopia.org>
Date: Mon, 18 Sep 2023 23:26:01 +0100
From: Daniel Golle <daniel@...rotopia.org>
To: "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>, Felix Fietkau <nbd@....name>,
John Crispin <john@...ozen.org>, Sean Wang <sean.wang@...iatek.com>,
Mark Lee <Mark-MC.Lee@...iatek.com>,
Lorenzo Bianconi <lorenzo@...nel.org>,
Matthias Brugger <matthias.bgg@...il.com>,
AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
Russell King <linux@...linux.org.uk>, netdev@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org
Subject: [PATCH net-next v2 0/2] net: ethernet: mtk_eth_soc: add paths and
SerDes modes
The series brings support for SerDes interface modes up to 10 Gb/s for
the MediaTek MT7988 SoC.
As the Ethernet driver now requires a few more phandles in device tree
referencing various other parts of the SoC also add corresponding
dt-binding changes.
It may be argued that instead of referencing those units as syscon and
access them as regmap one may want to implement propper clk or reset
drivers. However, only a single register write is require to the
otherwise completely undocumented pextp_pll unit which will not make a
nice clk driver...
The toprgu/watchdog reset controller is used to synchronously
assert/deassert multiple resets as the same time which is not
supported by Linux reset controller API which always asserts/deasserts
resets sequentially. It is not known whether asserting/deasserting
pextp, sgmii, xfi and usxgii resets simultanously is stricly required
for the hardware to work reliably, however, it's what the vendor
implementation is doing as well and there are no other drivers needing
to access the toprgu reset controller.
This series has been tested with the MT7988 reference board as well as
pre-mass-production BananaPi BPi-R4 board also featuring MT7988.
Various SFP(+) modules have been successfully tested on both boards and
also the on-board AQR133 10GE PHY found on the MT7988 reference board
works nicely.
To make sure no existing older SoCs have been broken run-time tests
have also been carried out on various MT7981, MT7986, MT7622 and
MT7623 boards. The patch is also present in OpenWrt for some months
now already and hence supposedly hundreds of users also on older
MT7621 systems should have tested it while I didn't hear about any
complaints so far.
For the interfaces modes covered by the existing LynxI PCS driver
(Cisco SGMII, 1000Base-X, 2500Base-X) to work on MT7988 this series
depends on commit 90308679c297f ("net: pcs: lynxi: implement pcs_disable op").
Changes since v1:
* add missing macro defines (v1 didn't build for that reason)
* add dt-bindings changes
Daniel Golle (2):
dt-bindings: net: mediatek,net: add phandles for SerDes on MT7988
net: ethernet: mtk_eth_soc: add paths and SerDes modes for MT7988
.../devicetree/bindings/net/mediatek,net.yaml | 28 +
drivers/net/ethernet/mediatek/Kconfig | 16 +
drivers/net/ethernet/mediatek/Makefile | 1 +
drivers/net/ethernet/mediatek/mtk_eth_path.c | 123 ++-
drivers/net/ethernet/mediatek/mtk_eth_soc.c | 182 ++++-
drivers/net/ethernet/mediatek/mtk_eth_soc.h | 237 +++++-
drivers/net/ethernet/mediatek/mtk_usxgmii.c | 698 ++++++++++++++++++
7 files changed, 1254 insertions(+), 31 deletions(-)
create mode 100644 drivers/net/ethernet/mediatek/mtk_usxgmii.c
--
2.42.0
Powered by blists - more mailing lists