mesa-demo: runtime PHY-only mode with optional SPI-proxy client#17
mesa-demo: runtime PHY-only mode with optional SPI-proxy client#17vjardin wants to merge 7 commits into
Conversation
|
optional: it can use this proxy, https://github.com/vjardin/mepa-spidev-proxy |
|
Please, @HoratiuVultur, how would you consider such feature for your next 2026.09 release ? It is the only mean I found about to have many users of mepa PHYs. |
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. Signed-off-by: Vincent Jardin <vjardin@free.fr> --- misc information: pushed to: microchip-ung/sw-mepa#11 (sw-mepa original) microchip-ung#17 integration (vj_integration_allPR): cherry-picked from: vj_shared_phy_only @ 32d00f77 pull request: microchip-ung#17 pull request: microchip-ung/sw-mepa#11
Port the EDS2 board support from sw-mepa's board-configs so mesa-demo can run on this switch-less board and drive its MEPA PHYs: - meba/src/eds2/: meba.c (port table, capabilities, reset points incl. MEBA_PHY_INITIALIZE / MEBA_ENTRY_PHY_SET, IRQ/event plumbing), synce.c and tod.c. The board-configs meba_poe.c is NOT ported: it targets an older meba_poe_* API generation than mesa's, and PoE is not needed for PHY bring-up. - eds2_phy_spi_read/write: implement api.meba_phy_spi_read/write by forwarding to the application-provided board_info spi_read/spi_write accessors (ctrl_idx carries the MMD; slot demux stays in the app). Through meba_generic's mepa_callout wiring this gives the MEPA PHY drivers (lan80xx) their register path. - mesa/demo/main.c: phy_only_board_spi_read/write adapters installed into board_info when '-P' is given, so the board layer reaches the PHYs over /dev/spidev or the lan80xx-spid SPI proxy. - mepa/CMakeLists: mepa_eds2 aggregate (vtss_ts, ksz9031, lan8814, lan884x + lan80xx_ts_msec for the 25G PHY slots). - meba/CMakeLists: MEBA_LIB(eds2); mesa/demo/CMakeLists: APP_TARGET(app_eds2, MESA lan966x, MEBA meba_eds2) -- lan966x only provides the MESA API symbols, the board has no switch. Verified end-to-end on a host build: meba_only_eds2 and the full mesa-demo-lan966x binary build and link; running it with '-P proxy:<sock>' against a lan80xx-spid instance enters PHY-only mode and issues its PHY SPI operations through the proxy (confirmed by the daemon's per-client accounting). Signed-off-by: Vincent Jardin <vjardin@free.fr> --- misc information: depends on: the "mesa-demo: runtime PHY-only mode" commit (branch vj_shared_phy_only, microchip-ung#17) source: ported from sw-mepa board-configs/src/eds2 (branch br-pkg-aarch64) integration (vj_integration_allPR): cherry-picked from: vj_eds2_board @ fd27e55e
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. 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.
215af95 to
61df500
Compare
Port the EDS2 board support from sw-mepa's board-configs so mesa-demo can run on this switch-less board and drive its MEPA PHYs: - meba/src/eds2/: meba.c (port table, capabilities, reset points incl. MEBA_PHY_INITIALIZE / MEBA_ENTRY_PHY_SET, IRQ/event plumbing), synce.c and tod.c. The board-configs meba_poe.c is NOT ported: it targets an older meba_poe_* API generation than mesa's, and PoE is not needed for PHY bring-up. - eds2_phy_spi_read/write: implement api.meba_phy_spi_read/write by forwarding to the application-provided board_info spi_read/spi_write accessors (ctrl_idx carries the MMD; slot demux stays in the app). Through meba_generic's mepa_callout wiring this gives the MEPA PHY drivers (lan80xx) their register path. - mesa/demo/main.c: phy_only_board_spi_read/write adapters installed into board_info when '-P' is given, so the board layer reaches the PHYs over /dev/spidev or the lan80xx-spid SPI proxy. - mepa/CMakeLists: mepa_eds2 aggregate (vtss_ts, ksz9031, lan8814, lan884x + lan80xx_ts_msec for the 25G PHY slots). - meba/CMakeLists: MEBA_LIB(eds2); mesa/demo/CMakeLists: APP_TARGET(app_eds2, MESA lan966x, MEBA meba_eds2) -- lan966x only provides the MESA API symbols, the board has no switch. Verified end-to-end on a host build: meba_only_eds2 and the full mesa-demo-lan966x binary build and link; running it with '-P proxy:<sock>' against a lan80xx-spid instance enters PHY-only mode and issues its PHY SPI operations through the proxy (confirmed by the daemon's per-client accounting). Signed-off-by: Vincent Jardin <vjardin@free.fr> --- misc information: depends on: the "mesa-demo: runtime PHY-only mode" commit (branch vj_shared_phy_only, microchip-ung#17) source: ported from sw-mepa board-configs/src/eds2 (branch br-pkg-aarch64)
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. 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 @ 61df500 pull request: microchip-ung#17 (open) pull request: microchip-ung/sw-mepa#11 (closed 2026-07-03)
Port the EDS2 board support from sw-mepa's board-configs so mesa-demo can run on this switch-less board and drive its MEPA PHYs: - meba/src/eds2/: meba.c (port table, capabilities, reset points incl. MEBA_PHY_INITIALIZE / MEBA_ENTRY_PHY_SET, IRQ/event plumbing), synce.c and tod.c. The board-configs meba_poe.c is NOT ported: it targets an older meba_poe_* API generation than mesa's, and PoE is not needed for PHY bring-up. - eds2_phy_spi_read/write: implement api.meba_phy_spi_read/write by forwarding to the application-provided board_info spi_read/spi_write accessors (ctrl_idx carries the MMD; slot demux stays in the app). Through meba_generic's mepa_callout wiring this gives the MEPA PHY drivers (lan80xx) their register path. - mesa/demo/main.c: phy_only_board_spi_read/write adapters installed into board_info when '-P' is given, so the board layer reaches the PHYs over /dev/spidev or the lan80xx-spid SPI proxy. - mepa/CMakeLists: mepa_eds2 aggregate (vtss_ts, ksz9031, lan8814, lan884x + lan80xx_ts_msec for the 25G PHY slots). - meba/CMakeLists: MEBA_LIB(eds2); mesa/demo/CMakeLists: APP_TARGET(app_eds2, MESA lan966x, MEBA meba_eds2) -- lan966x only provides the MESA API symbols, the board has no switch. Verified end-to-end on a host build: meba_only_eds2 and the full mesa-demo-lan966x binary build and link; running it with '-P proxy:<sock>' against a lan80xx-spid instance enters PHY-only mode and issues its PHY SPI operations through the proxy (confirmed by the daemon's per-client accounting). Signed-off-by: Vincent Jardin <vjardin@free.fr> --- misc information: depends on: the "mesa-demo: runtime PHY-only mode" commit (branch vj_shared_phy_only, microchip-ung#17) source: ported from sw-mepa board-configs/src/eds2 (branch br-pkg-aarch64) integration (vj_integration_allPR): cherry-picked from: vj_eds2_board @ 1525e01
|
Hi @vjardin, I am not sure about this, we will need to talk more internally about this. Because I can see that you are kind of change the mesa-demo to talk only with PHYs if I understand correctly. This is just a demo APP on how to use the MESA and MEPA libraries and I think it would be best if you create your own APP that does exactly what you need and then just use the libraries. Thanks, |
|
It allows to support any applications with 3rd parties apps combined like a ptp (zls) daemon. |
Port the EDS2 board support from sw-mepa's board-configs so mesa-demo can run on this switch-less board and drive its MEPA PHYs: - meba/src/eds2/: meba.c (port table, capabilities, reset points incl. MEBA_PHY_INITIALIZE / MEBA_ENTRY_PHY_SET, IRQ/event plumbing), synce.c and tod.c. The board-configs meba_poe.c is NOT ported: it targets an older meba_poe_* API generation than mesa's, and PoE is not needed for PHY bring-up. - eds2_phy_spi_read/write: implement api.meba_phy_spi_read/write by forwarding to the application-provided board_info spi_read/spi_write accessors (ctrl_idx carries the MMD; slot demux stays in the app). Through meba_generic's mepa_callout wiring this gives the MEPA PHY drivers (lan80xx) their register path. - mesa/demo/main.c: phy_only_board_spi_read/write adapters installed into board_info when '-P' is given, so the board layer reaches the PHYs over /dev/spidev or the lan80xx-spid SPI proxy. - mepa/CMakeLists: mepa_eds2 aggregate (vtss_ts, ksz9031, lan8814, lan884x + lan80xx_ts_msec for the 25G PHY slots). - meba/CMakeLists: MEBA_LIB(eds2); mesa/demo/CMakeLists: APP_TARGET(app_eds2, MESA lan966x, MEBA meba_eds2) -- lan966x only provides the MESA API symbols, the board has no switch. Verified end-to-end on a host build: meba_only_eds2 and the full mesa-demo-lan966x binary build and link; running it with '-P proxy:<sock>' against a lan80xx-spid instance enters PHY-only mode and issues its PHY SPI operations through the proxy (confirmed by the daemon's per-client accounting). Signed-off-by: Vincent Jardin <vjardin@free.fr> --- misc information: depends on: the "mesa-demo: runtime PHY-only mode" commit (branch vj_shared_phy_only, microchip-ung#17) source: ported from sw-mepa board-configs/src/eds2 (branch br-pkg-aarch64)
Port the EDS2 board support from sw-mepa's board-configs so mesa-demo can run on this switch-less board and drive its MEPA PHYs: - meba/src/eds2/: meba.c (port table, capabilities, reset points incl. MEBA_PHY_INITIALIZE / MEBA_ENTRY_PHY_SET, IRQ/event plumbing), synce.c and tod.c. The board-configs meba_poe.c is NOT ported: it targets an older meba_poe_* API generation than mesa's, and PoE is not needed for PHY bring-up. - eds2_phy_spi_read/write: implement api.meba_phy_spi_read/write by forwarding to the application-provided board_info spi_read/spi_write accessors (ctrl_idx carries the MMD; slot demux stays in the app). Through meba_generic's mepa_callout wiring this gives the MEPA PHY drivers (lan80xx) their register path. - mesa/demo/main.c: phy_only_board_spi_read/write adapters installed into board_info when '-P' is given, so the board layer reaches the PHYs over /dev/spidev or the lan80xx-spid SPI proxy. Verified end-to-end on a host build: meba_only_eds2 and the full mesa-demo-lan966x binary build and link; running it with '-P proxy:<sock>' against a lan80xx-spid instance enters PHY-only mode and issues its PHY SPI operations through the proxy (confirmed by the daemon's per-client accounting). Signed-off-by: Vincent Jardin <vjardin@free.fr> --- misc information: depends on: the "mesa-demo: runtime PHY-only mode" commit (branch vj_shared_phy_only, microchip-ung#17) source: ported from sw-mepa board-configs/src/eds2 (branch br-pkg-aarch64)
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. 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 @ 61df500 pull request: microchip-ung#17 (open)
Make glues and proxy glue. Signed-off-by: Vincent Jardin <vjardin@free.fr> --- misc information: pushed to: microchip-ung#20 depends on: mesa PR microchip-ung#17 (vj_shared_phy_only, runtime PHY-only mode)
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. 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 @ 61df500 pull request: microchip-ung#17 (open) pull request: microchip-ung/sw-mepa#11 (closed 2026-07-03)
Make glues and proxy glue. Signed-off-by: Vincent Jardin <vjardin@free.fr> --- misc information: pushed to: microchip-ung#20 depends on: mesa PR microchip-ung#17 (vj_shared_phy_only, runtime PHY-only mode) integration (vj_integration_allPR): cherry-picked from: vj_eds2_board @ 7ef2465 pull request: microchip-ung#20 (open)
|
It wouldn't make more sense to integrate the libraries in 3rd party apps? |
|
Which one ? It needs to be legacy to be used for any mepa's consumers (boards + zls + debug tools). |
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. 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 @ 61df500 pull request: microchip-ung#17 (open)
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. 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.
61df500 to
3032ae7
Compare
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.
3032ae7 to
42ad66e
Compare
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)
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)
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)
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)
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)
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)
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)
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)
draft notes of the upcoming updatesThe purpose of the following update is to handle a PHY-only operation case: having This design is made of 3 layers:
Each piece works with the previous ones:
DesignRuntime PHY-only mode (
|
The empty-__VA_ARGS__ argument counter has two implementations: a __VA_OPT__(,) variant (correct when the compiler does not swallow the comma after ##__VA_ARGS__) and a legacy ##__VA_ARGS__ variant. Since __GNUC__ >= 13; __VA_OPT__ is available on every GCC. Signed-off-by: Vincent Jardin <vjardin@free.fr> --- misc information: pushed to: microchip-ung#18
Newer toolchains (GCC >= 15 at least) and distro hardening are
too restrictive.
It fixes issues such as:
base/ail/vtss_api.c: error: format not a string literal and no format
arguments [-Werror=format-security]
(prntf(buf) on a runtime, non-user-controlled string)
mesa/demo/mepa_apps/phy_gpio_demo.c: error: ignoring return value of
'scanf' declared with attribute 'warn_unused_result'
[-Werror=unused-result]
Signed-off-by: Vincent Jardin <vjardin@free.fr>
---
misc information:
pushed to:
microchip-ung#19
A MEBA board without switch and without fixed PHY population, for setups where an application drives only MEPA PHYs: evaluation boards, PTP daemons, debug tooling, SPI-attached 10G/25G PHYs such as the LAN80xx. The board exposes "port_cnt" MEPA port slots (conf tag, default 4) and deliberately does not probe or pre-create PHY devices at MEBA_PHY_INITIALIZE: without fixed population there is nothing to detect, and the application creates each device explicitly. PHY register access is forwarded to the application-provided board_info accessors: MIIM/MMD through the standard meba_generic callouts, SPI through meba_phy_spi_read/write. The mepa_void aggregate bundles the common PHY drivers including the LAN80xx (Malibu-25G) TS+MACsec driver. Signed-off-by: Vincent Jardin <vjardin@free.fr> --- misc information: pushed to: microchip-ung#17
Support the MEPA PHYs (LAN80xx) without a switch instance.
It can be used with 2 modes:
- either thru direct access to a /dev/spidev,
- thru a proxy that centralize the access to the /dev/spidev
in order to support many users of the same MEPA PHY.
It runs with '-P <spidev|proxy:sock>'.
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.
…t GPIO For the boards where the LAN80xx INTR (MDINT) pin is wired to a host GPIO, the MCU mailbox can wait on the real interrupt instead of polling the flag register over SPI. Let's bind the MEPA gpio callback to a Linux GPIO chardev line with falling-edge events. The INTR line is board-specific, set from $LAN80XX_MDINT, else a built-in default The new CLI command "PHY MCU intr <port_no>" performs the binding. Signed-off-by: Vincent Jardin <vjardin@free.fr> --- misc information: pushed to: microchip-ung#17 complements: microchip-ung#12 (driver-side no-GPIO SPI-flag fallback; independent, reviewable separately) It complements microchip-ung#12 but neither depends on the other.
Detect unresolved argument types up front and skip the method, removing it from the JSON-RPC method table as well. Full-API generations are unaffected: all types resolve, nothing is skipped. Signed-off-by: Vincent Jardin <vjardin@free.fr> --- misc information: pushed to: microchip-ung#17
…rary The PHY-only application (app_void) so far linked a full MESA switch chip library purely to satisfy the linker: no switch register is ever touched at runtime. Add a build flavor that removes it entirely. It is exclusive with the switch apps in the same build tree (-DMESA_PHY_ONLY=ON -Dapp_void=ON). The default builds are unchanged. Signed-off-by: Vincent Jardin <vjardin@free.fr> --- misc information: pushed to: microchip-ung#17
42ad66e to
60ca841
Compare
A MEBA board without switch and without fixed PHY population, for setups where an application drives only MEPA PHYs: evaluation boards, PTP daemons, debug tooling, SPI-attached 10G/25G PHYs such as the LAN80xx. The board exposes "port_cnt" MEPA port slots (conf tag, default 4) and deliberately does not probe or pre-create PHY devices at MEBA_PHY_INITIALIZE: without fixed population there is nothing to detect, and the application creates each device explicitly. PHY register access is forwarded to the application-provided board_info accessors: MIIM/MMD through the standard meba_generic callouts, SPI through meba_phy_spi_read/write. The mepa_void aggregate bundles the common PHY drivers including the LAN80xx (Malibu-25G) TS+MACsec driver. Signed-off-by: Vincent Jardin <vjardin@free.fr> --- misc information: pushed to: microchip-ung#17 integration (vj_integration_allPR): cherry-picked from: vj_shared_phy_only @ ca4a67d pull request: microchip-ung#17 (open)
Support the MEPA PHYs (LAN80xx) without a switch instance.
It can be used with 2 modes:
- either thru direct access to a /dev/spidev,
- thru a proxy that centralize the access to the /dev/spidev
in order to support many users of the same MEPA PHY.
It runs with '-P <spidev|proxy:sock>'.
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 @ 29f195e
pull request: microchip-ung#17 (open)
…t GPIO For the boards where the LAN80xx INTR (MDINT) pin is wired to a host GPIO, the MCU mailbox can wait on the real interrupt instead of polling the flag register over SPI. Let's bind the MEPA gpio callback to a Linux GPIO chardev line with falling-edge events. The INTR line is board-specific, set from $LAN80XX_MDINT, else a built-in default The new CLI command "PHY MCU intr <port_no>" performs the binding. Signed-off-by: Vincent Jardin <vjardin@free.fr> --- misc information: pushed to: microchip-ung#17 complements: microchip-ung#12 (driver-side no-GPIO SPI-flag fallback; independent, reviewable separately) It complements microchip-ung#12 but neither depends on the other. integration (vj_integration_allPR): cherry-picked from: vj_shared_phy_only @ 79314df pull request: microchip-ung#17 (open)
Detect unresolved argument types up front and skip the method, removing it from the JSON-RPC method table as well. Full-API generations are unaffected: all types resolve, nothing is skipped. Signed-off-by: Vincent Jardin <vjardin@free.fr> --- misc information: pushed to: microchip-ung#17 integration (vj_integration_allPR): cherry-picked from: vj_shared_phy_only @ 8c27a9d pull request: microchip-ung#17 (open)
…rary The PHY-only application (app_void) so far linked a full MESA switch chip library purely to satisfy the linker: no switch register is ever touched at runtime. Add a build flavor that removes it entirely. It is exclusive with the switch apps in the same build tree (-DMESA_PHY_ONLY=ON -Dapp_void=ON). The default builds are unchanged. Signed-off-by: Vincent Jardin <vjardin@free.fr> --- misc information: pushed to: microchip-ung#17 integration (vj_integration_allPR): cherry-picked from: vj_shared_phy_only @ 60ca841 pull request: microchip-ung#17 (open)
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.
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)
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.
Signed-off-by: Vincent Jardin vjardin@free.fr