From 5b38f63ee59afd95c1d265b7e2097a0958db8a61 Mon Sep 01 00:00:00 2025
From: Markus Stockhausen <markus.stockhausen@gmx.de>
Date: Mon, 01 Sep 2025 20:13:21 +0200
Subject: realtek: add support for mdio controller

Signed-off-by: Markus Stockhausen <markus.stockhausen@gmx.de>
---

--- a/drivers/net/mdio/Makefile
+++ b/drivers/net/mdio/Makefile
@@ -22,6 +22,7 @@ obj-$(CONFIG_MDIO_MVUSB)		+= mdio-mvusb.
 obj-$(CONFIG_MDIO_OCTEON)		+= mdio-octeon.o
 obj-$(CONFIG_MDIO_REALTEK_RTL9300)	+= mdio-realtek-rtl9300.o
 obj-$(CONFIG_MDIO_REGMAP)		+= mdio-regmap.o
+obj-$(CONFIG_MDIO_REALTEK_OTTO)	+= mdio-realtek-otto.o
 obj-$(CONFIG_MDIO_REALTEK_OTTO_AUX)	+= mdio-realtek-otto-aux.o
 obj-$(CONFIG_MDIO_SMBUS)		+= mdio-smbus.o
 obj-$(CONFIG_MDIO_SUN4I)		+= mdio-sun4i.o
--- a/drivers/net/mdio/Kconfig
+++ b/drivers/net/mdio/Kconfig
@@ -191,6 +191,13 @@ config MDIO_REGMAP
 	  regmap. Users willing to use this driver must explicitly select
 	  REGMAP.
 
+config MDIO_REALTEK_OTTO
+	tristate "Realtek Otto MDIO interface support"
+	default MACH_REALTEK_RTL
+	depends on MACH_REALTEK_RTL || COMPILE_TEST
+	help
+	  This driver supports the MDIO bus on RTL83xx/RTL93xx SoCs.
+
 config MDIO_REALTEK_OTTO_AUX
 	tristate "Realtek Otto auxiliary MDIO interface support"
 	default MACH_REALTEK_RTL
