summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Stockhausen2025-08-14 11:13:49 +0000
committerHauke Mehrtens2025-08-17 15:31:22 +0000
commit2cb7044f79947164171d77340b2ac726dbff33df (patch)
tree144148e4249c33a69ded4c9977a0c5ec0a971b00
parent5dbf55bebb4f0f7af241c712dbf036abea767e13 (diff)
downloadopenwrt-2cb7044f79947164171d77340b2ac726dbff33df.tar.gz
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@gmx.de> Link: https://github.com/openwrt/openwrt/pull/19776 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-rw-r--r--target/linux/realtek/patches-6.12/723-net-mdio-Add-Realtek-Otto-auxiliary-controller.patch14
1 files changed, 13 insertions, 1 deletions
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@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@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@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@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);