Repository navigation
arch/arm/stm32n6: Add Ethernet support - #21969
Open
raiden00pl wants to merge 9 commits into
Open
raiden00pl wants to merge 9 commits into
raiden00pl wants to merge 9 commits into
Conversation
The PHY interface is selected in SBS PMCR on STM32H5 and STM32H7R/S and in SYSCFG PMC on the other STM32H7, for the common Ethernet driver. Assisted-by: Claude:claude-fable-5-1 Signed-off-by: raiden00pl <raiden00@railab.me>
The Ethernet QoS MAC driver of STM32H7 and its MDIO drivers become common/stm32/stm32_eth_v2.c behind STM32_HAVE_IP_ETHMAC_V2, and replace the STM32H5 copy; the H5 checksum offload is carried over. Each family selects the PHY interface in its stm32_eth_phyif.h. Assisted-by: Claude:claude-fable-5-1 Signed-off-by: raiden00pl <raiden00@railab.me>
With CONFIG_NET_PHYLIB the driver hands the PHY to PHYLIB: the board registers the PHY driver and may set the PHY interface mode with BOARD_ETH_PHY_INTERFACE, and the link speed and duplex come from the PHY state machine. RGMII up to 1000 Mbps requires PHYLIB. The driver also learns 64-bit AXI DMA masters and MTL FIFOs shared by several queues. A MAC software reset that does not complete now fails the bring-up; its timeout covers the PHY receive clock start-up, and the RCC reset is read back first. RX replacement buffers are invalidated for the D-cache. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: raiden00pl <raiden00@railab.me>
A dribble bit error sets the RX error summary although the CRC of the frame is good. The LAN8742A RMII link of the Nucleo-N657X0-Q shows it on a few percent of the frames, which were all dropped. Drop only frames with a CRC, receive, overflow, watchdog or giant packet error. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: raiden00pl <raiden00@railab.me>
STM32N6 GPIOs can delay the input or the output path of a pin, which RGMII needs to skew the transmit clock from the data. A pinset now carries the delay and its path, and stm32_configgpio() programs the DELAYR and ADVCFGR registers on chips that have them. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: raiden00pl <raiden00@railab.me>
Select the common Ethernet v2 driver for ETH1 and add its pins, clocks and RGMII interface selection. ETH1 gets RIF access to Secure memory. Assisted-by: Claude:claude-fable-5-1 Signed-off-by: raiden00pl <raiden00@railab.me>
The RJ45 port is the RTL8211F PHY on ETH1 over RGMII. The netnsh configuration adds networking with DHCP, ping, telnetd and mdio. Assisted-by: Claude:claude-fable-5-1 Signed-off-by: raiden00pl <raiden00@railab.me>
Add the RMII pins of the LAN8742A PHY and a netnsh configuration. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: raiden00pl <raiden00@railab.me>
Add the RMII pins of the LAN8742A PHY and a netnsh configuration. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: raiden00pl <raiden00@railab.me>
raiden00pl
requested review from
davids5,
hartmannathan,
jerpelea,
masayuki2009,
simbit18,
xiaoxiang781216 and
yamt
as code owners
November 17, 2026 17:10
xiaoxiang781216
approved these changes
Nov 17, 2026
acassis
approved these changes
Nov 17, 2026
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Ethernet for STM32N6, using the H7 Ethernet driver moved to common.
provide the PHY interface select hooks.
sets BOARD_ETH_PHY_INTERFACE. No PHY-specific code in the arch driver.
(LAN8742A, RMII), stm32h573i-dk (RMII).
Impact
H5/H7 Ethernet keeps its existing (non-PHYLIB) path.
Testing
50/50 1400-byte pings, 3/3 ifdown/ifup.
link and ping OK.