DAVICOM DM9051 on Embedded Linux: Driver Setup & Debugging
Add Ethernet to a SoC without a built-in MAC using the SPI-interface DM9051: enabling the kernel driver, the device tree node, and common troubleshooting.
Published: 2025-04-01
Why SPI Ethernet
Many low-end SoCs or MCUs have no built-in MAC, or the MAC is already in use. The DM9051 is a single-chip 10/100M Ethernet controller integrating MAC and PHY, adding a network port over SPI alone and greatly simplifying the hardware routing.
It already has a native Linux kernel driver, so integration on embedded Linux platforms like Buildroot / Yocto is quite mature.
Enable the kernel driver
The DM9051 driver lives in the kernel under drivers/net/ethernet/davicom. Enable the corresponding DM9051 option in menuconfig (built-in or as a module).
Make sure your SPI controller driver is enabled as well, because the DM9051 is a device on the SPI bus and needs a working SPI master.
Device tree node
Add a child node under the SPI controller describing the DM9051: set compatible to "davicom,dm9051", give it a reg (chip-select index), a spi-max-frequency (start conservative, e.g. 10–25MHz), and the interrupts / interrupt-parent wired to its IRQ pin.
If the hardware has a reset pin, describe it with reset-gpios as well. With the node correct, dmesg at boot should show the interface registered (e.g. eth0).
Common troubleshooting
If the interface fails to register or packets do not pass, check in order: the interrupt wiring and configuration (the IRQ is a common culprit); whether the SPI speed is too high — lower it first, then raise it gradually; and whether the MAC address is valid (set it in the device tree or a boot script if needed).
Use dmesg and ethtool to observe link state (link, speed, duplex) — most issues can be pinpointed from there.
Products mentioned
DM9051 SPI Interface 10/100M Ethernet Controller
DM9051 is a DAVICOM single-chip 10/100M Fast Ethernet controller with an SPI interface, eliminating the need for 8/16-bit parallel bus and greatly simplifying hardware design. Features 16KB SRAM TX/RX buffer, full-duplex flow control, and native Linux kernel driver support — ideal for network expansion on ARM or RISC-V MCU systems.
DM9000A Parallel Interface 10/100M Ethernet Controller
DM9000A is a well-established Ethernet controller familiar to the embedded Linux community, using an 8/16-bit parallel ISA-like interface. Mature drivers exist for ARM9/ARM11 platforms (Samsung S3C series), with u-boot and Linux kernel native support — commonly found on industrial embedded boards and SoC evaluation boards.
Need these components or design help?
JLink Technology provides parts, datasheets, and engineering support.
Request a Quote