Thread (36 messages) 36 messages, 4 authors, 2022-01-15

[RFC v5 net-next 11/13] mfd: ocelot-core: add control for the external mdio interface

flat view
STALE1746d

From: Colin Foster <colin.foster@in-advantage.com>
Date: 2021-12-18 21:50:44
Also in: linux-gpio, lkml
Subsystem: multifunction devices (mfd), ocelot external switch control, the rest · Maintainers: Lee Jones, Colin Foster, Linus Torvalds

Revision v5 (2 revisions archived).

Revisions (2)
  1. v4
  2. v5 current [diff against previous]
Utilize the mscc-miim-mdio driver as a child of the ocelot MFD.

Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
---
 drivers/mfd/ocelot-core.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
diff --git a/drivers/mfd/ocelot-core.c b/drivers/mfd/ocelot-core.c
index 52aa7b824d02..c67e433f467c 100644
--- a/drivers/mfd/ocelot-core.c
+++ b/drivers/mfd/ocelot-core.c
@@ -104,7 +104,22 @@ struct regmap *ocelot_mfd_get_regmap_from_resource(struct device *dev,
 }
 EXPORT_SYMBOL(ocelot_mfd_get_regmap_from_resource);
 
+static const struct resource vsc7512_miim1_resources[] = {
+	{
+		.start = 0x710700c0,
+		.end = 0x710700e3,
+		.name = "gcb_miim1",
+		.flags = IORESOURCE_MEM,
+	},
+};
+
 static const struct mfd_cell vsc7512_devs[] = {
+	{
+		.name = "ocelot-miim1",
+		.of_compatible = "mscc,ocelot-miim",
+		.num_resources = ARRAY_SIZE(vsc7512_miim1_resources),
+		.resources = vsc7512_miim1_resources,
+	},
 	{
 		.name = "ocelot-ext-switch",
 		.of_compatible = "mscc,vsc7512-ext-switch",
-- 
2.25.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help