[openwrt/openwrt] realtek: rtl8231-aux: add RTL931x support
LEDE Commits
lede-commits at lists.infradead.org
Sun Aug 17 08:32:22 PDT 2025
hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/2cb7044f79947164171d77340b2ac726dbff33df
commit 2cb7044f79947164171d77340b2ac726dbff33df
Author: Markus Stockhausen <markus.stockhausen at gmx.de>
AuthorDate: Thu Aug 14 07:13:49 2025 -0400
realtek: rtl8231-aux: add RTL931x support
The auxiliary RTL8231 controller driver is missing RTL931x support.
Add it by defining the proper register and matching compatible.
Signed-off-by: Markus Stockhausen <markus.stockhausen at gmx.de>
Link: https://github.com/openwrt/openwrt/pull/19776
Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
...23-net-mdio-Add-Realtek-Otto-auxiliary-controller.patch | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/target/linux/realtek/patches-6.12/723-net-mdio-Add-Realtek-Otto-auxiliary-controller.patch b/target/linux/realtek/patches-6.12/723-net-mdio-Add-Realtek-Otto-auxiliary-controller.patch
index 7315899b3f..ad11b90752 100644
--- a/target/linux/realtek/patches-6.12/723-net-mdio-Add-Realtek-Otto-auxiliary-controller.patch
+++ b/target/linux/realtek/patches-6.12/723-net-mdio-Add-Realtek-Otto-auxiliary-controller.patch
@@ -49,7 +49,7 @@ Signed-off-by: Sander Vanheule <sander at svanheule.net>
obj-$(CONFIG_MDIO_THUNDER) += mdio-thunder.o
--- /dev/null
+++ b/drivers/net/mdio/mdio-realtek-otto-aux.c
-@@ -0,0 +1,175 @@
+@@ -0,0 +1,187 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include <linux/mfd/core.h>
@@ -65,6 +65,7 @@ Signed-off-by: Sander Vanheule <sander at svanheule.net>
+#define RTL8380_EXT_GPIO_INDIRECT_ACCESS 0xA09C
+#define RTL8390_EXT_GPIO_INDIRECT_ACCESS 0x0224
+#define RTL9300_EXT_GPIO_INDIRECT_ACCESS 0xC620
++#define RTL9310_EXT_GPIO_INDIRECT_ACCESS 0x07F4
+
+#define RTL83XX_AUX_MDIO_DATA_OFFSET 16
+#define RTL83XX_AUX_MDIO_RCMD_FAIL 0
@@ -106,6 +107,13 @@ Signed-off-by: Sander Vanheule <sander at svanheule.net>
+ .timeout_us = 19000,
+};
+
++static const struct realtek_aux_mdio_info info_rtl931x = {
++ .cmd_reg = RTL9310_EXT_GPIO_INDIRECT_ACCESS,
++ .data_offset = RTL93XX_AUX_MDIO_DATA_OFFSET,
++ .rcmd_fail_mask = RTL93XX_AUX_MDIO_RCMD_FAIL,
++ .timeout_us = 19000,
++};
++
+struct realtek_aux_mdio_ctrl {
+ struct device *dev;
+ struct regmap *map;
@@ -209,6 +217,10 @@ Signed-off-by: Sander Vanheule <sander at svanheule.net>
+ .compatible = "realtek,rtl9300-aux-mdio",
+ .data = &info_rtl930x,
+ },
++ {
++ .compatible = "realtek,rtl9310-aux-mdio",
++ .data = &info_rtl931x,
++ },
+ { /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(of, realtek_aux_mdio_of_match);
More information about the lede-commits
mailing list