net: pcs: add driver for MediaTek SGMII PCS
authorDaniel Golle <daniel@makrotopia.org>
Sun, 19 Mar 2023 12:57:50 +0000 (12:57 +0000)
committerJakub Kicinski <kuba@kernel.org>
Tue, 21 Mar 2023 02:48:26 +0000 (19:48 -0700)
commit4765a9722e09765866e131ec31f7b9cf4c1f4854
treea4ac8d4220944aa44faff89cdfb10dc85b456252
parent3fbe4d8c0e53e40faf2e0c7505536f9483af6d23
net: pcs: add driver for MediaTek SGMII PCS

The SGMII core found in several MediaTek SoCs is identical to what can
also be found in MediaTek's MT7531 Ethernet switch IC.
As this has not always been clear, both drivers developed different
implementations to deal with the PCS.
Recently Alexander Couzens pointed out this fact which lead to the
development of this shared driver.

Add a dedicated driver, mostly by copying the code now found in the
Ethernet driver. The now redundant code will be removed by a follow-up
commit.

Suggested-by: Alexander Couzens <lynxis@fe80.eu>
Suggested-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
Tested-by: Frank Wunderlich <frank-w@public-files.de>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
MAINTAINERS
drivers/net/pcs/Kconfig
drivers/net/pcs/Makefile
drivers/net/pcs/pcs-mtk-lynxi.c [new file with mode: 0644]
include/linux/pcs/pcs-mtk-lynxi.h [new file with mode: 0644]