hoahuubui opened a new pull request, #22562:
URL: https://github.com/apache/nuttx/pull/22562
## Summary
Add Ethernet support for the Renesas RZ/V2H (Cortex-R8, CR8_0 core) with
a driver for the native GBETH0 MAC, for RZV2H-EVK and RZV2H-RDK. The MAC
works with a new common driver for the Microchip KSZ9131 RGMII PHY over
the MDIO bus, and registers one network interface, `eth0`.
The GBETH0 driver provides:
- Link supervision: speed and duplex follow the PHY, carrier on/off.
- Multicast hash filtering (`d_addmac` / `d_rmmac`).
- Optional hardware checksum offload (`CONFIG_RZV2H_GBETH_CSUM_OFFLOAD`).
- RX and TX interrupt coalescing, an RX work budget and an optional
dedicated work queue.
- Optional RX zero copy into I/O buffers and TX buffers in DTCM, and
running the hot network code from ITCM.
- A non-cacheable MPU region for the descriptor rings, so the D-cache can
be enabled (`CONFIG_RZV2H_DCACHE`).
The series has four commits:
1. `drivers/net`: KSZ9131 PHY driver (`ksz9131.c`, `ksz9131.h`), enabled
by `CONFIG_NET_KSZ9131`, which depends on `CONFIG_MDIO_BUS`.
2. `arch/arm/rzv2h`: GBETH driver (`rzv2h_gbeth.c/.h`), Kconfig,
Make.defs and CMake, the MPU region and D-cache option, the ITCM hot
code copy at boot, the `R_GPIO` prefix in `tools/nxstyle.c`..\
3. `boards/arm/rzv2h`: GBETH board bring-up for both boards (PLLETH,
RGMII, reset, clocks, bus stop, interrupt routing), the `netnsh`
defconfig, and the DMA, ITCM and DTCM sections in the linker scripts.
4. `Documentation/arm/rzv2h`: documentation for the platform and both
boards.
## Impact
- New feature, off by default. `CONFIG_RZV2H_GBETH` and
`CONFIG_NET_KSZ9131` are enabled only by the new `netnsh` configuration
of each board.
- New configuration: `rzv2h-evk:netnsh` and `rzv2h-rdk:netnsh`.
- Changes that affect existing RZ/V2H configurations, independent of
`CONFIG_RZV2H_GBETH`:
- The board linker scripts move the heap (`.heap`) out of DTCM into
RAM, and `_eronly` now uses `LOADADDR(.data)`.
- Build: `rzv2h_gbeth.c` and `ksz9131.c` are compiled only when their
options are enabled.
- Kconfig: `RZV2H_GBETH` depends on `NET`, `NET_ETHERNET`, `MDIO_BUS` and
`SCHED_LPWORK`, and selects `NET_KSZ9131`, `NETDEV_LATEINIT` and
`ARCH_HAVE_NETDEV_STATISTICS`.
- Documentation: new Ethernet sections for the RZ/V2H platform page and
both board pages.
- No compatibility or security impact expected.
## Testing
Host: Linux Ubuntu 24.04, arm-none-eabi-gcc 13.2.1
Build checks:
- `rzv2h-evk:netnsh` and `rzv2h-rdk:netnsh`: `rzv2h_gbeth.c`,
`ksz9131.c`, `rzv2h_mpu_region.c` and `rzv2h_start.c` compile without
warnings.
- Both `netnsh` defconfigs are normalized with `make savedefconfig`.
- `tools/checkpatch.sh` passes on all changed files, and the pre-commit
hooks (nxstyle, cmake-format, codespell) pass.
- The RZ/V2H documentation pages build with Sphinx without warnings.
Runtime checks on hardware:
- Board(s): <RZV2H-EVK / RZV2H-RDK>
- Configuration: `netnsh`
- Steps: <for example `ifconfig eth0`, `ping -c 5 -s 1472 192.168.10.1`,
then `iperf` TCP and UDP in both directions against an iperf2 host>
```
NuttShell (NSH) NuttX-13.1.1-RC0
nsh> ping -c 5 -s 1472 192.168.10.1
PING 192.168.10.1 1472 bytes of data
1472 bytes from 192.168.10.1: icmp_seq=0 time=0.0 ms
1472 bytes from 192.168.10.1: icmp_seq=1 time=0.0 ms
1472 bytes from 192.168.10.1: icmp_seq=2 time=0.0 ms
1472 bytes from 192.168.10.1: icmp_seq=3 time=0.0 ms
1472 bytes from 192.168.10.1: icmp_seq=4 time=0.0 ms
5 packets transmitted, 5 received, 0% packet loss, time 5005 ms
rtt min/avg/max/mdev = 0.000/0.000/0.000/0.000 ms
nsh>
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]