Wiznet makers

Grace_Koo

Published April 15, 2026 ©

71 UCC

25 WCC

11 VAR

0 Contests

0 Followers

0 Following

Original Link

W6300 Zephyr Driver PR #102727: Under Review

A Zephyr RTOS driver PR for WIZnet W6300 on RP2350, using bit-bang SPI + MACRAW mode. Currently under review.

COMPONENTS
PROJECT DESCRIPTION

What This PR Does

This is an Ethernet driver PR that enables WIZnet W6300 support on Zephyr RTOS.

It brings the W6300-EVB-Pico2 board (RP2350 + W6300) into the Zephyr ecosystem — adding the driver code, Devicetree binding, board definition files, and documentation all in one go.

ItemDetails
Core ChipWIZnet W6300 (Hardwired TCP/IP, 10/100 Ethernet)
MCURaspberry Pi RP2350 (W6300-EVB-Pico2)
OS / FirmwareZephyr RTOS
InterfaceBit-bang SPI / 500kHz (MACRAW mode)
PR StatusOpen / Under review (as of Jan 2026)

Authored by WIZnet engineer Ethan-cho (Manjae Cho), the PR is currently going through community review with the goal of merging into the Zephyr mainline repository.


Background: W6300 on Zephyr

Zephyr RTOS is an open-source real-time operating system used across a wide range of domains — industrial IoT, wearables, automotive embedded systems, and more. Managed by the Linux Foundation with over 14,000 GitHub stars, getting a driver merged here means the chip becomes immediately usable across countless Zephyr-based projects.

The W6300 is WIZnet's latest Ethernet controller, supporting up to 90Mbps throughput via a hardwired TCP/IP stack and QSPI interface. Until now, no official Zephyr driver existed for the W6300. This PR is the first attempt to fill that gap.


The Role of WIZnet W6300

In this driver, the W6300 handles Ethernet MAC/PHY and packet I/O. It operates in MACRAW mode, passing raw Ethernet frames directly to the host (RP2350), with TCP/IP processing handled by the Zephyr network stack.

⚠️ What's Not Implemented Yet

Two of the W6300's headline features are not yet implemented in this PR.

FeatureW6300 SupportThis PR
QSPI (4-wire high-speed)✅ Up to 150MHz, 90Mbps+❌ Not implemented — bit-bang SPI at 500kHz
Hardware TCP/IP Stack (TOE)✅ 8 hardware sockets❌ Not implemented — MACRAW + Zephyr stack

In short, this is a baseline implementation that drives the W6300 via bit-bang SPI (500kHz) in MACRAW mode. The chip's performance advantages — QSPI throughput and TOE offloading — are not utilized at this stage.

The approach follows Zephyr's established driver patterns: MACRAW is the standard integration method for Ethernet controllers in Zephyr, and the existing W5500 driver uses the same approach.


How It Works

Bit-bang SPI Layer

The W6300 and RP2350 communicate via the zephyr,spi-bitbang driver, which software-toggles GPIO17 (CLK), GPIO18 (MOSI), GPIO19 (MISO), and GPIO16 (CS) directly. The maximum clock is set to 500kHz. The driver uses W6300's binary register protocol — selecting a register block via BSB (Block Select Bit), then exchanging a 16-bit address and data.

// W6300 SPI frame structure (from driver code)
uint8_t header[3] = {
    w6300_spi_instr(W6300_SPI_RWB_READ, bsb),
    (uint8_t)(addr >> 8),
    (uint8_t)addr,
};

MACRAW RX Loop

A dedicated Zephyr thread (eth_w6300) polls the W6300's receive buffer on interrupt, then passes Ethernet frames up to the Zephyr network stack via net_recv_data.

Devicetree Configuration

All hardware configuration — pin assignments, SPI bus, interrupt, and MAC address — is declared in Devicetree. The zephyr,random-mac-address property enables dynamic MAC address assignment.

/* W6300-EVB-Pico2 Devicetree (actual) */
spi_w6300: spi-bitbang {
    compatible = "zephyr,spi-bitbang";
    clk-gpios  = <&gpio0 17 GPIO_ACTIVE_HIGH>;
    mosi-gpios = <&gpio0 18 GPIO_ACTIVE_HIGH>;
    miso-gpios = <&gpio0 19 GPIO_ACTIVE_HIGH>;
    cs-gpios   = <&gpio0 16 GPIO_ACTIVE_LOW>;
    ethernet: w6300@0 {
        compatible = "wiznet,w6300";
        spi-max-frequency = <500000>;
        int-gpios = <&gpio0 15 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
        reset-gpios = <&gpio0 22 GPIO_ACTIVE_LOW>;
        zephyr,random-mac-address;
    };
};

Zephyr Network Stack Integration

By implementing Zephyr's ethernet.h API, the driver abstracts the W6300 entirely from the application layer. Any network feature Zephyr supports — DHCP, TCP/UDP, IPv4/IPv6 — works out of the box.


Hardware Overview

ComponentDetails
Ethernet ControllerWIZnet W6300
MCURaspberry Pi RP2350
BoardW6300-EVB-Pico2
InterfaceBit-bang SPI, 500kHz (GPIO15–22)
Flash2MB (external, per dtsi)
Form FactorRaspberry Pi Pico2-compatible pinout

What This Driver Opens Up

Once merged into the Zephyr mainline, the W6300 becomes an immediately usable component across any Zephyr-based platform or application.

Use CaseWhy It Fits
Industrial IoT / Edge ComputingZephyr supports industrial certifications such as IEC 61508. A merged W6300 driver provides a ready reference for industrial Ethernet node designs.
Smart Building / AutomationCombining W6300 Ethernet with Zephyr's Matter, Modbus, and MQTT stacks simplifies gateway development.
Medical / Defense EmbeddedProvides a stable, RTOS-based Ethernet controller reference for environments requiring certified software stacks.
ODM/OEMGives product teams a solid basis for adopting W6300 as a standard component in Zephyr-based designs. Porting to MCUs beyond RP2350 is relatively straightforward given the driver structure.

The current lack of QSPI support also means there is room for the driver to grow — the W6300's hardware is capable of far more than what this initial implementation uses.


Tech Stack Summary

ComponentDetails
Ethernet ControllerWIZnet W6300 (Hardwired TCP/IP, SPI/QSPI, 10/100Mbps)
MCU / BoardRaspberry Pi RP2350 / W6300-EVB-Pico2
OSZephyr RTOS (Linux Foundation)
Driver ModeBit-bang SPI 500kHz + MACRAW (Zephyr ethernet API)
ConfigurationDevicetree + Kconfig
QSPI SupportNot implemented (bit-bang SPI at 500kHz)
TOE (Hardware TCP/IP)Not implemented (Zephyr network stack used)
LicenseApache 2.0 (Zephyr standard)
PRzephyrproject-rtos/zephyr #102727

Closing

This PR is the first step toward W6300 becoming an officially supported part in the Zephyr RTOS ecosystem. The current implementation is minimal — bit-bang SPI at 500kHz with MACRAW — but establishing W6300 within Zephyr's driver framework is itself significant. Once a WIZnet chip is registered as an officially supported component in one of the world's largest embedded RTOS projects, industrial and commercial adoption naturally follows.


Project Link

Documents
Comments Write