From ad75da9aaa8765b2115e7b40ee4f6dbcd60c3321 Mon Sep 17 00:00:00 2001
From: Markus Stockhausen <markus.stockhausen@gmx.de>
Date: Weg, 17 Sep 2025 20:23:31 +0200
Subject: [PATCH] net: pcs: Add Realtek Otto SerDes controller

SoCs in Realtek's Otto platform such as the RTL83xx and RTL93xx
have multiple SerDes to drive the PHYs. Provide a PCS driver
to configure them.

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
---
--- a/drivers/net/pcs/Kconfig
+++ b/drivers/net/pcs/Kconfig
@@ -46,6 +46,16 @@ config PCS_MTK_USXGMII
 	  1000Base-X, 2500Base-X and Cisco SGMII are supported on the same
 	  differential pairs via an embedded LynxI PCS.
 
+config PCS_RTL_OTTO
+	tristate "Realtek Otto SerDes PCS"
+	depends on MACH_REALTEK_RTL || COMPILE_TEST
+	select FWNODE_PCS
+	select PHY_COMMON_PROPS
+	select PHYLINK
+	select REGMAP
+	help
+	  This module provides a driver for the Realtek SerDes PCS
+
 config PCS_RZN1_MIIC
 	tristate "Renesas RZ/N1, RZ/N2H, RZ/T2H MII converter"
 	depends on OF
--- a/drivers/net/pcs/Makefile
+++ b/drivers/net/pcs/Makefile
@@ -9,4 +9,5 @@ obj-$(CONFIG_PCS_XPCS)		+= pcs_xpcs.o
 obj-$(CONFIG_PCS_LYNX)		+= pcs-lynx.o
 obj-$(CONFIG_PCS_MTK_LYNXI)	+= pcs-mtk-lynxi.o
 obj-$(CONFIG_PCS_MTK_USXGMII)	+= pcs-mtk-usxgmii.o
+obj-$(CONFIG_PCS_RTL_OTTO)	+= pcs-rtl-otto.o
 obj-$(CONFIG_PCS_RZN1_MIIC)	+= pcs-rzn1-miic.o
