Skip to content

wolfIP NXP QorIQ FMan port (also big endian fix for ee16/ee32)#136

Open
dgarske wants to merge 6 commits into
wolfSSL:masterfrom
dgarske:nxp_fman
Open

wolfIP NXP QorIQ FMan port (also big endian fix for ee16/ee32)#136
dgarske wants to merge 6 commits into
wolfSSL:masterfrom
dgarske:nxp_fman

Conversation

@dgarske

@dgarske dgarske commented Jun 16, 2026

Copy link
Copy Markdown
Member

Ethernet driver for the NXP QorIQ Frame Manager (FMan) multirate Ethernet MAC (mEMAC) and MDIO, shared across the big-endian PowerPC DPAA1 QorIQ parts: T2080 (e6500), T1024 and T1040 (e5500). One driver serves every board; all board-specific values come from nxp_fman_board.h.

@dgarske dgarske self-assigned this Jun 16, 2026
Copilot AI review requested due to automatic review settings June 16, 2026 18:05

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new NXP QorIQ DPAA1 FMan (mEMAC + dedicated MDIO) Ethernet port for wolfIP and updates core endian-conversion helpers so wolfIP works correctly on big-endian hosts (e.g., PowerPC e5500/e6500).

Changes:

  • Fix ee16/ee32 to be endian-aware (no-op on big-endian, swap on little-endian).
  • Add src/port/nxp_fman/ port: FMan register definitions, board-override parameters, and a polled RX/TX BD-ring driver.
  • Add port-specific configuration and documentation for building/using the driver.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
wolfip.h Makes ee16/ee32 conditional on host endianness (fixes big-endian behavior).
src/port/nxp_fman/README.md Documents the new QorIQ FMan port model, parameters, and build example.
src/port/nxp_fman/nxp_fman.h Adds FMan/mEMAC/MDIO register map and the public driver API.
src/port/nxp_fman/nxp_fman.c Implements the FMan driver (MDIO/PHY, PRAM setup, BD rings, poll/send).
src/port/nxp_fman/nxp_fman_board.h Provides overridable board-specific defaults (CCSRBAR, PHY addr, mode, etc.).
src/port/nxp_fman/config.h Adds port-specific wolfIP configuration defaults (MTU, DHCP, buffers, etc.).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/port/nxp_fman/nxp_fman.c Outdated
Comment thread src/port/nxp_fman/nxp_fman.c Outdated
Comment thread src/port/nxp_fman/nxp_fman.c Outdated
Comment thread src/port/nxp_fman/nxp_fman.c

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 22 out of 22 changed files in this pull request and generated 2 comments.

Comment thread src/port/nxp_enetc/nxp_enetc.c
Comment thread src/port/nxp_enetc/nxp_enetc.c

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 24 out of 24 changed files in this pull request and generated 4 comments.

Comment thread wolfip.h
Comment thread src/port/common/nxp_phy.h
Comment thread src/port/nxp_enetc/nxp_enetc.c
Comment thread src/port/nxp_etsec/README.md
dgarske added 4 commits July 8, 2026 16:07
mEMAC/MDIO + PHY (SGMII/RGMII) + FMan independent-mode RX/TX datapath, one
driver for the DPAA1 QorIQ parts (T2080 e6500, T1024/T1040 e5500). Hardware-
verified on CW VPX3-152 (DTSEC1 SGMII), NAII 68PPC2 (DTSEC3 RGMII) and
T1040D4RDB (DTSEC4 RGMII). Includes nxp_fman_phy_read_at() for MDIO bus scan
so multi-port boards can identify the cabled PHY. README documents a per-board
bring-up matrix and the WOLFIP_SPEED_TEST throughput benchmark.
@dgarske dgarske requested a review from Copilot July 9, 2026 21:40
@dgarske dgarske marked this pull request as ready for review July 9, 2026 21:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 24 out of 24 changed files in this pull request and generated 5 comments.

Comment on lines +554 to +556
phy_addr = nxp_phy_detect(NXP_QE_PHY_ADDR);
if (phy_addr < 0)
return 0x100; /* datapath up, PHY not found */
Comment on lines +691 to +693
phy_addr = nxp_phy_detect(NXP_FMAN_PHY_ADDR);
if (phy_addr < 0)
return 0x100; /* datapath up, PHY not found */
Comment on lines +589 to +591
phy_addr = nxp_phy_detect(NXP_ENETC_PHY_ADDR);
if (phy_addr < 0)
return 0x100; /* datapath up, PHY not found */
Comment on lines +440 to +444
phy_addr = nxp_phy_detect(NXP_ETSEC_PHY_ADDR);
if (phy_addr < 0) {
adjust_link(NXP_ETSEC_SPEED, 1);
return 0x100; /* datapath up, PHY not found */
}
Comment on lines +163 to +167
/* Soft-reset and bring up the selected eTSEC (MAC, BD rings, MDIO, PHY) and
* populate ll with the MAC address, interface name and poll/send callbacks.
* Pass mac=NULL for the built-in default. Returns a status word encoding the
* detected PHY id high byte, link bit and PHY address, or a negative value
* on hard failure. */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants