Skip to main content

<alp/hw_info.h> — Hardware Identification

Runtime structure populated from the on-module EEPROM manifest + BOARD_ID ADC. Used at boot to confirm the running firmware matches the hardware revision.

#include <alp/hw_info.h>
#include "alp_hw_info_build.h" /* generated by --emit hw-info-h */

Read the manifest

alp_hw_info_t info;
if (alp_hw_info_read(&info) != ALP_OK) {
// EEPROM not present or corrupt
}

printk("SoM: %s\n", info.som_sku);
printk("Family: %s\n", info.som_family);
printk("Rev: %s\n", info.som_hw_rev);
printk("Serial: %s\n", info.serial);
printk("Mfg: %04u-%02u-%02u\n", info.mfg_year, info.mfg_month, info.mfg_day);

Assert at boot

alp_hw_info_t info;
alp_hw_info_read(&info);
alp_hw_info_assert_matches_build(&info,
ALP_HW_BUILD_SOM_SKU,
ALP_HW_BUILD_SOM_HW_REV);
// Halts boot on mismatch; logs the discrepancy.

The ALP_HW_BUILD_* macros come from the build-time companion header emitted by alp_orchestrate.py --emit hw-info-h based on your board.yaml:

  • ALP_HW_BUILD_SOM_SKU — e.g. "E1M-AEN701"
  • ALP_HW_BUILD_SOM_FAMILY — e.g. "aen"
  • ALP_HW_BUILD_SOM_HW_REV — e.g. "r1"
  • ALP_HW_BUILD_OS — e.g. "zephyr"
  • ALP_HW_BUILD_CARRIER_NAME — when a carrier is declared
  • ALP_HW_BUILD_CARRIER_HW_REV

Where the manifest comes from

The 128-byte EEPROM manifest is programmed at production-test time using scripts/program_eeprom.py:

python3 scripts/program_eeprom.py \
--board-yaml board.yaml \
--serial AL-2025-000123 \
--mfg-date 2026-05-13 \
--output build/manifest.bin

The packer reads identifiers from board.yaml, adds serial + mfg date, and emits a binary that the production-test flow burns to the on-module 24C128 EEPROM.

BOARD_ID ADC

In addition to the EEPROM, every E1M SoM and carrier carries a single ADC channel fed by a resistor divider that encodes the hardware revision. The SDK samples this at boot as a cross-check against the EEPROM manifest. Per-rev resistor values and nominal mV readings live in each family's hw-revisions.yaml.

Why one ADC pin instead of GPIO straps: the E1M form factor has no spare GPIO pads for board-ID resistor straps — every pad is allocated by the spec. A single ADC channel distinguishes up to ~8 revisions at ±100 mV bin radius with 1 % resistors on a 1.8 V rail.

See also

Questions about this page? Discuss in Community Forum