A practical Q&A on where to store the MAC address during SpacemiT K3 production: dedicated EEPROM, flash, or UFS partition.
We recently came across a SpacemiT K3 user question about MAC address programming during production. The summary may help others doing board bring-up or factory provisioning.
Question
The SpacemiT production-line programming document mentions writing the MAC address into an EEPROM. The user asked three things:
- Is it mandatory to add a dedicated EEPROM just for the MAC address?
- If the board already has flash and UFS storage, can the MAC address be written there instead?
- Does the CPU come with a unique factory MAC address?
Background
The K3 uses a TLV (Type-Length-Value) format for device-specific configuration data, including the MAC address. The reference document is in the buildroot/device/tlv.md path of the K3 SDK.
Answers
- Dedicated EEPROM is not strictly required. The TLV data can live in any non-volatile storage the bootloader can read before the network stack comes up. EEPROM, SPI NOR flash, eMMC, and UFS are all valid candidates, but the bootloader and device tree must agree on where to find it.
- Flash or UFS can be used, but you must ensure the partition is preserved across firmware updates and accessible early in the boot flow. Many designs place the TLV in a dedicated, small SPI NOR flash or an EEPROM because it is simpler to protect from accidental erasure than a large UFS partition.
- The CPU does not provide a globally unique, guaranteed MAC address. You must assign and program a valid MAC per board during production. The assigned MAC should come from your IEEE OUI range to avoid conflicts.
Recommended Practice
- For low-volume or evaluation boards, an I2C/SPI EEPROM is the simplest and safest choice.
- For cost-sensitive high-volume designs, reserve a small, protected region in SPI NOR flash or UFS for the TLV block.
- Make sure the MAC address region is marked read-only or excluded from normal firmware update packages to avoid bricking network boot.
- Implement a read-back and CRC/validity check in U-Boot or the OS before bringing up the Ethernet interface.
Source:
SpacemiT Forum - MAC Address Burning