Skip to contentSkip to conversation

Bitbanging MDIO driver for DM framework.

PATCH In review Tom Rini 1 participant 2 messages Nov 19, 2024 – Jan 1, 2025 Network drivers

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 Bitbanging MDIO driver for DM framework.

From: Markus Gothe <[email protected]>

Linux DTS compatible MDIO bitbanging driver.
Both clause 22 and clause 45 MDIO supported and validated.

Heavily based on the Linux drivers (more or less the same code base).

---
 drivers/net/Kconfig     |   6 +
 drivers/net/Makefile    |   1 +
 drivers/net/mdio_gpio.c | 313 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 320 insertions(+)
 create mode 100644 drivers/net/mdio_gpio.c
drivers/net/Kconfig +6 -0
index 576cd2d50ad9..5e862158c566 100644
@@ -1007,6 +1007,12 @@ config FSL_ENETC
 	  This driver supports the NXP ENETC Ethernet controller found on some
 	  of the NXP SoCs.
 
+config MDIO_GPIO_BITBANG
+	bool "GPIO bitbanging MDIO driver"
+	depends on DM_MDIO && DM_GPIO
+	help
+	 Driver for bitbanging MDIO
+
 config MDIO_MUX_I2CREG
 	bool "MDIO MUX accessed as a register over I2C"
 	depends on DM_MDIO_MUX && DM_I2C
drivers/net/Makefile +1 -0
index f5ab1f5dedf6..e51a917933eb 100644
@@ -61,6 +61,7 @@ obj-$(CONFIG_LITEETH) += liteeth.o
 obj-$(CONFIG_MACB) += macb.o
 obj-$(CONFIG_MCFFEC) += mcffec.o mcfmii.o
 obj-$(CONFIG_MDIO_IPQ4019) += mdio-ipq4019.o
+obj-$(CONFIG_MDIO_GPIO_BITBANG) += mdio_gpio.o
 obj-$(CONFIG_MDIO_MUX_I2CREG) += mdio_mux_i2creg.o
 obj-$(CONFIG_MDIO_MUX_MESON_G12A) += mdio_mux_meson_g12a.o
 obj-$(CONFIG_MDIO_MUX_MESON_GXL) += mdio_mux_meson_gxl.o
drivers/net/mdio_gpio.c new file +313 -0

313 lines not on this page · raw message

Signature · 1 line
2.34.1
author
#1 lore raw
Quoted 6 lines · Tom Rini

Linux DTS compatible MDIO bitbanging driver.
Both clause 22 and clause 45 MDIO supported and validated.

Heavily based on the Linux drivers (more or less the same code base).

Applied to u-boot/next, thanks!

Signature · 1 line
Tom