roadmap NOT-STARTED

940. radon's second Ethernet port: the driver brings up ethernet@16040000 as well

(Number, title and slug provisional.)

calef asked for this on 2026-10-20 (UTC), at the bench: "Lets create a milestones to get jack #1 also working." A writing-only lane wrote it the same day and built nothing.

Why

radon, a VisionFive 2 v1.3B, has two RJ45 jacks. Each is a Synopsys DesignWare Ethernet QoS controller behind its own Motorcomm YT8531: gmac0 at 0x1603_0000 and gmac1 at 0x1604_0000. Milestone 53 (the board's own peripherals: network and storage on real silicon) drives only the first. Its first bench runs, on 2026-10-20 (UTC), on branch milestone/53-radon-first-runs (bench/radon-2026-10-20/network-bench-{1,2,3}.log):

So a person who plugs radon in by the jack nearest to hand has a one-in-two chance of no network, and nothing on the console says to try the other one. The firmware has no such limit.

What the tree has

Everything port-specific is written for gmac0, and the shape of a second port is already in the sources this tree read.

Which port the boot uses: the first to lease

Ruled by calef on 2026-10-20 (UTC), on #2470: "Lets do a and create a milestones for b." The boot hands net_stack the port that gets a DHCP lease first, and gmac0 when both would. A lease, not a link: a jack cabled to a switch with no DHCP server behind it links and must not win.

Both ports at once, each its own Stack, is the milestone #2471 adds (a machine on two networks at once). It waits on a socket-contract decision and builds on this block's per-port table. A port named by configuration was refused: a person would have to know which jack the cable is in, which is the failure on 2026-10-20.

Reuse: OpenBSD's if_dwqe_fdt.c (dwqe_setup_jh7110), already adapted for gmac0, picks the port by the controller's address, so its gmac1 path is the one to adapt (its handling of the second port's syscon is to be read, not assumed). Linux's dwmac-starfive.c and mainline's device tree (GPL) are read for facts only, as milestone 53 does. No existing code in this tree chooses between two NICs; the policy is a loop over the ports in order.

Exit criteria

  1. crates/designware_ethernet describes each port as data: its base, its clock and reset plans, its syscon window, offset and shift, and its PHY fallback. gmac0's entry is today's constants. gmac1's cites mainline at f47d223627f8 and the fixtures above. No function in the crate names gmac0 in its body.
  2. Host tests run against the existing vendor and mainline fixtures. Discovery finds both ports in each tree. gmac1's PHY settings read receive 0x2, transmit 0 and no inversion at 1000 Mbit/s from either spelling, and the vendor lookup reads the port's own child node. gmac1's interface select changes bits 2 to 4 of its word and nothing else.
  3. crates/jh7110_clock_and_reset carries gmac1's plan, and a host test shows its reset steps land on reset numbers 66 and 67 of the SYS domain and its parent select on clock 105.
  4. The kernel maps and brings up both ports' control planes when the tree names both, with a report per port. The SYS syscon window is mapped whenever a JH7110 Ethernet port is described, not only when the PMIC plan exists.
  5. The boot tries the ports in order and keeps the first to lease, under a stated bound on the DHCP wait. A port that links without leasing has its net_stack ended and its controller stopped before the next is tried. The console names the port chosen and, for each other port, whether it had no link or no lease.
  6. network_bench prints one block of lines per port (nic, syscon, phy, link), the syscon line naming the port it read, and runs the coherence probe on the port it hands out.
  7. On radon, with a person moving the cable. With the cable in gmac1's jack, the bench prints a link line and a dhcp : leased line for 0x16040000. verdict LEASED-AND-MEASURED waits on 53's receive stall. With the cable in gmac0's jack, the run matches 53's. With gmac0 cabled to a switch that serves no DHCP and gmac1 to the local area network, the boot gives gmac0 up after the bound and leases on gmac1. Both logs are committed under bench/radon-<date>/, each recording its port's PHY id, I/O voltage and settings source.
  8. notes/designware-ethernet.md says the cable may go in either jack, its runbook covers both, and its BUGS loses "gmac0 only".

BUGS

Index row

radon has two Ethernet jacks and nife drives only gmac0's, so a cable in the other one, gmac1 at 0x1604_0000, gets no network although the firmware links on it. Describe each port as data, give gmac1 its SYS-domain clocks, SYS-syscon interface select and its own PHY delays, and have the boot hand net_stack the first port to get a DHCP lease, gmac0 first.