mirror of
https://git.openwrt.org/openwrt/openwrt.git
synced 2026-03-14 23:09:45 +01:00
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>
This commit is contained in:
parent
5dbf55bebb
commit
2cb7044f79
1 changed files with 13 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue