Skip to content

meba: lan966x: forward PHY SPI register access to board_info accessors#21

Open
vjardin wants to merge 1 commit into
microchip-ung:masterfrom
vjardin:vj_eds2_board_v2
Open

meba: lan966x: forward PHY SPI register access to board_info accessors#21
vjardin wants to merge 1 commit into
microchip-ung:masterfrom
vjardin:vj_eds2_board_v2

Conversation

@vjardin

@vjardin vjardin commented Jul 9, 2026

Copy link
Copy Markdown

It is a rework of #20 thanks to @HoratiuVultur 's comments.

There is a dependency on #17 that has been imported here since we cannot handle pull request over pull request with github.

vjardin added a commit to vjardin/mesa that referenced this pull request Jul 9, 2026
api.meba_phy_spi_read/write: forward to the application-provided
board_info spi_read/spi_write accessors.

Boards without spi accessors get a MESA_RC_NOT_IMPLEMENTED, as before.

Signed-off-by: Vincent Jardin <vjardin@free.fr>

---
misc information:
pushed to:
  microchip-ung#21
depends on:
  microchip-ung#17 (runtime PHY-only mode; first
  commit of PR microchip-ung#21's stack)
supersedes:
  microchip-ung#20 (closed 2026-07-08: rework onto
  meba/src/lan966x requested by Microchip)
vjardin added a commit to vjardin/mesa that referenced this pull request Jul 9, 2026
Signed-off-by: Vincent Jardin <vjardin@free.fr>

---
misc information:
pushed to:
  microchip-ung#21
depends on:
  microchip-ung#17 (runtime PHY-only mode; first
  commit of PR microchip-ung#21's stack)
supersedes:
  microchip-ung#20 (closed 2026-07-08: rework onto
  meba/src/lan966x requested by Microchip)
@vjardin
vjardin force-pushed the vj_eds2_board_v2 branch from b0a44b8 to fd8e9fe Compare July 9, 2026 15:38
@vjardin

vjardin commented Jul 9, 2026

Copy link
Copy Markdown
Author

following a live review with @BlockoS ; this dirty patch of the eds2 board could be avoided by creating a mesa_void board that supports the phy only case (mepa) without any switch.

Please, @HoratiuVultur : would it make a better sense ? Can we propose such mesa_void ?

I'll finalize some few topics and try to propose this alternate by early next week (or sooner if possible).

vjardin added a commit to vjardin/mesa that referenced this pull request Jul 9, 2026
Support the MEPA PHYs (LAN80xx) without a switch instance.

It can be used with 2 modes: either thru direct access to a
/dev/spidev or thru a proxy that centralize the access to
the /dev/spidev in order to support many users of the
same MEPA PHY.

Fake few models for the purposes of this phy-only case: the board
conf answers select the EDS2 board (pcb 0x8385) with the LAN8814
plugin module in slot A, so the board comes up with 4 ports (base
port 0) matching the '-P' PHY slot router.

It was tested with a LAN8024 target.

Signed-off-by: Vincent Jardin <vjardin@free.fr>

---
misc information:
pushed to:
  microchip-ung/sw-mepa#11 (sw-mepa original)
  microchip-ung#17
status: sw-mepa PR microchip-ung#11 closed 2026-07-03 by Microchip (HoratiuVultur):
  "a PR in MESA was open for this, I will add my comments there" --
  review continues on mesa PR microchip-ung#17.

integration (vj_integration_allPR):
  cherry-picked from: vj_shared_phy_only @ 42ad66e
  pull request: microchip-ung#17 (open; also the
    first commit of PR microchip-ung#21's stack)
vjardin added a commit to vjardin/mesa that referenced this pull request Jul 9, 2026
api.meba_phy_spi_read/write: forward to the application-provided
board_info spi_read/spi_write accessors.

Boards without spi accessors get a MESA_RC_NOT_IMPLEMENTED, as before.

Signed-off-by: Vincent Jardin <vjardin@free.fr>

---
misc information:
pushed to:
  microchip-ung#21
depends on:
  microchip-ung#17 (runtime PHY-only mode; first
  commit of PR microchip-ung#21's stack)
supersedes:
  microchip-ung#20 (closed 2026-07-08: rework onto
  meba/src/lan966x requested by Microchip)

integration (vj_integration_allPR):
  cherry-picked from: vj_eds2_board_v2 @ 739211c
  pull request: microchip-ung#21 (open)
vjardin added a commit to vjardin/mesa that referenced this pull request Jul 9, 2026
Signed-off-by: Vincent Jardin <vjardin@free.fr>

---
misc information:
pushed to:
  microchip-ung#21
depends on:
  microchip-ung#17 (runtime PHY-only mode; first
  commit of PR microchip-ung#21's stack)
supersedes:
  microchip-ung#20 (closed 2026-07-08: rework onto
  meba/src/lan966x requested by Microchip)

integration (vj_integration_allPR):
  cherry-picked from: vj_eds2_board_v2 @ fd8e9fe
  pull request: microchip-ung#21 (open)
vjardin added a commit to vjardin/mesa that referenced this pull request Jul 9, 2026
Support the MEPA PHYs (LAN80xx) without a switch instance.

It can be used with 2 modes: either thru direct access to a
/dev/spidev or thru a proxy that centralize the access to
the /dev/spidev in order to support many users of the
same MEPA PHY.

Fake few models for the purposes of this phy-only case: the board
conf answers select the EDS2 board (pcb 0x8385) with the LAN8814
plugin module in slot A, so the board comes up with 4 ports (base
port 0) matching the '-P' PHY slot router.

It was tested with a LAN8024 target.

Signed-off-by: Vincent Jardin <vjardin@free.fr>

---
misc information:
pushed to:
  microchip-ung/sw-mepa#11 (sw-mepa original)
  microchip-ung#17
status: sw-mepa PR microchip-ung#11 closed 2026-07-03 by Microchip (HoratiuVultur):
  "a PR in MESA was open for this, I will add my comments there" --
  review continues on mesa PR microchip-ung#17.

integration (vj_integration_allPR):
  cherry-picked from: vj_shared_phy_only @ 42ad66e
  pull request: microchip-ung#17 (open; also the
    first commit of PR microchip-ung#21's stack)
vjardin added a commit to vjardin/mesa that referenced this pull request Jul 9, 2026
api.meba_phy_spi_read/write: forward to the application-provided
board_info spi_read/spi_write accessors.

Boards without spi accessors get a MESA_RC_NOT_IMPLEMENTED, as before.

Signed-off-by: Vincent Jardin <vjardin@free.fr>

---
misc information:
pushed to:
  microchip-ung#21
depends on:
  microchip-ung#17 (runtime PHY-only mode; first
  commit of PR microchip-ung#21's stack)
supersedes:
  microchip-ung#20 (closed 2026-07-08: rework onto
  meba/src/lan966x requested by Microchip)

integration (vj_integration_allPR):
  cherry-picked from: vj_eds2_board_v2 @ 739211c
  pull request: microchip-ung#21 (open)
vjardin added a commit to vjardin/mesa that referenced this pull request Jul 9, 2026
Signed-off-by: Vincent Jardin <vjardin@free.fr>

---
misc information:
pushed to:
  microchip-ung#21
depends on:
  microchip-ung#17 (runtime PHY-only mode; first
  commit of PR microchip-ung#21's stack)
supersedes:
  microchip-ung#20 (closed 2026-07-08: rework onto
  meba/src/lan966x requested by Microchip)

integration (vj_integration_allPR):
  cherry-picked from: vj_eds2_board_v2 @ fd8e9fe
  pull request: microchip-ung#21 (open)
@vjardin

vjardin commented Jul 9, 2026

Copy link
Copy Markdown
Author

implementation notes:

  • meba: board
  • mesa: switch
  • mepa: phy

meba_void -> board with a phy only that sets for instance 4 ports

api.meba_phy_spi_read/write: forward to the application-provided
board_info spi_read/spi_write accessors.

Boards without spi accessors get a MESA_RC_NOT_IMPLEMENTED, as before.

Signed-off-by: Vincent Jardin <vjardin@free.fr>

---
misc information:
pushed to:
  microchip-ung#21
supersedes:
  microchip-ung#20 (closed 2026-07-08: rework onto
  meba/src/lan966x requested by Microchip)
note: standalone since the 2026-07-10 rework -- this PR no longer stacks on
  PR microchip-ung#17 and no longer carries the eds2 25G demo app (superseded by PR microchip-ung#17's
  void-board PHY-only app). meba_phy_spi_read/write and the board_info
  spi_read/spi_write accessors are stock v2026.06; this commit only wires
  them together on the lan966x MEBA for real EDS2 setups.
@vjardin
vjardin force-pushed the vj_eds2_board_v2 branch from fd8e9fe to 21b1572 Compare July 9, 2026 22:35
@vjardin vjardin changed the title finalize standalone/phy only support and spi proxy with applied case for eds2 board meba: lan966x: forward PHY SPI register access to board_info accessors Jul 9, 2026
@vjardin

vjardin commented Jul 9, 2026

Copy link
Copy Markdown
Author

It is standalone now since the last push and since thesuperseded by the PHY-only application on the
void board, see #17.

This forwarding remains useful on its own for real EDS2 setups running the stock lan966x MEBA with SPI-attached PHYs.

vjardin added a commit to vjardin/mesa that referenced this pull request Jul 10, 2026
api.meba_phy_spi_read/write: forward to the application-provided
board_info spi_read/spi_write accessors.

Boards without spi accessors get a MESA_RC_NOT_IMPLEMENTED, as before.

Signed-off-by: Vincent Jardin <vjardin@free.fr>

---
misc information:
pushed to:
  microchip-ung#21
supersedes:
  microchip-ung#20 (closed 2026-07-08: rework onto
  meba/src/lan966x requested by Microchip)
note: standalone since the 2026-07-10 rework -- this PR no longer stacks on
  PR microchip-ung#17 and no longer carries the eds2 25G demo app (superseded by PR microchip-ung#17's
  void-board PHY-only app). meba_phy_spi_read/write and the board_info
  spi_read/spi_write accessors are stock v2026.06; this commit only wires
  them together on the lan966x MEBA for real EDS2 setups.

integration (vj_integration_allPR):
  cherry-picked from: vj_eds2_board_v2 @ 21b1572
  pull request: microchip-ung#21 (open)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant