Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NXP S32Z270DC2_R52 platform uses same MAC for every build #61478

Closed
benmordaunt opened this issue Aug 14, 2023 · 6 comments
Closed

NXP S32Z270DC2_R52 platform uses same MAC for every build #61478

benmordaunt opened this issue Aug 14, 2023 · 6 comments
Assignees
Labels
area: Ethernet Feature Request A request for a new feature platform: NXP S32 NXP Semiconductors, S32 priority: low Low impact/importance bug

Comments

@benmordaunt
Copy link

The NXP S32Z270DC2_R52 platform uses the same MAC address for every build (specifically for the enetc_psi0 interface:

local-mac-address = [00 00 00 01 02 00];

instead of deriving it from EEPROM or similar.

As a result, attempting to network several of these boards together will fail at ARP resolution (layer 2). Is there not a unique partial MAC stored somewhere on this board/PHY?

Thanks,

Ben

@benmordaunt benmordaunt added the bug The issue is a bug, or the PR is fixing a bug label Aug 14, 2023
@jhedberg jhedberg added the priority: low Low impact/importance bug label Aug 15, 2023
@manuargue manuargue self-assigned this Aug 16, 2023
@manuargue
Copy link
Member

hi @benmordaunt. You can change the local-mac-address from your application DT overlay, or choose one of https://github.com/zephyrproject-rtos/zephyr/blob/main/dts/bindings/ethernet/ethernet-controller.yaml#L9-L24

@benjaminmordaunt
Copy link

benjaminmordaunt commented Aug 16, 2023

@manuargue Sure, that is what I am currently doing. However neither approach is particularly robust. local-mac-address has me guessing unique addresses, and random-mac-address gives the surprising behaviour of having a new MAC on each boot, which can cause issues with ARP caches.

Most embedded systems have an EEPROM somewhere with a factory-programmed partial (24-bit) MAC address which can be read. Is that not the case here?

I'm not sure it should be necessary to provide a DT overlay just to have unique MAC addresses...

@manuargue
Copy link
Member

I understand the use-case. Not many Ethernet drivers in Zephyr do that out-of-the-box, only the Atmel SAM GMAC https://github.com/zephyrproject-rtos/zephyr/blob/main/drivers/ethernet/eth_sam_gmac.c#L1799-L1820

There's an on-board EEPROM that can be used for this purpose, but is not of my knowledge that it has a factory pre-programmed partial MAC address on it. I will consult with the hw design team and come back to you on this.

In the meantime, I'll mark this as a feature request instead of a bug.

@manuargue manuargue added Feature Request A request for a new feature and removed bug The issue is a bug, or the PR is fixing a bug labels Aug 16, 2023
@dleach02 dleach02 removed their assignment Aug 16, 2023
@manuargue
Copy link
Member

manuargue commented Aug 17, 2023

Hi @benjaminmordaunt. The on-board EEPROM does not contain factory-programmed MAC addresses and is there with the intention to support RCON boot, not for parameters storage. Although, this does not prevent the user to use the EEPROM for something else if RCON boot is not used, but the user would need to program it before booting Zephyr, provided there's a mechanism implemented in the Ethernet driver to pull the MAC address from a configurable memory address (actually more than one addresses since the NETC exposes multiple SI's plus the Switch ports). An alternative storage would be the fuse space.

I will keep this issue open while internally at NXP analyze if it's feasible and valuable to implement this use-case for Zephyr.
If you have further questions related to the hardware support, please reach out NXP through https://community.nxp.com/ or through your NXP communication channels.

@manuargue manuargue assigned Dat-NguyenDuy and unassigned manuargue Apr 15, 2024
@manuargue manuargue added platform: NXP S32 NXP Semiconductors, S32 and removed platform: NXP NXP labels Jun 10, 2024
@manuargue manuargue self-assigned this Jun 10, 2024
@Dat-NguyenDuy
Copy link
Contributor

Hello @benjaminmordaunt, sorry for a delay in response. As discussed last year, since the board does not contain unique factory-programmed MAC addresses, user would need program to store the MAC addresses into hardware before booting Zephyr.

Is you still interested this approach as a solution for the feature request? Thanks.

@manuargue
Copy link
Member

manuargue commented Jul 1, 2024

closing as this ad-hoc feature request have been logged almost a year ago and currently there's no response from the author. If needed, it can be re-opened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Ethernet Feature Request A request for a new feature platform: NXP S32 NXP Semiconductors, S32 priority: low Low impact/importance bug
Projects
None yet
Development

No branches or pull requests

7 participants