1 /* SPDX-License-Identifier: GPL-2.0-only */
7 * The Atlas COMe module stores some non-volatile vital product data in
8 * an EC-attached I2C EEPROM. The EC firmware reads the EEPROM contents
9 * and provides them to the host via EMI (Embedded Memory Interface) 0.
14 #define VPD_MAGIC 0x56504453 /* 'VPDS' */
17 * Increment this value whenever new fields are added to the structures.
18 * Furthermore, adapt the `get_emi_eeprom_vpd()` function accordingly to
19 * provide fallback values for newly-added fields.
21 #define VPD_LATEST_REVISION 1
23 struct __packed emi_eeprom_vpd_header
{
26 uint8_t _rfu
[15]; /* Reserved for Future Use */
29 /* For backwards compatibility reasons, do NOT reuse enum values! */
31 ATLAS_PROF_UNPROGRAMMED
= 0, /* EEPROM not initialised */
32 ATLAS_PROF_DEFAULT
= 1,
33 ATLAS_PROF_REALTIME_PERFORMANCE
= 2,
34 ATLAS_PROF_THEMIS_LED_CONFIG
= 3,
37 #define ATLAS_SN_PN_LENGTH 20
39 struct __packed emi_eeprom_vpd
{
40 struct emi_eeprom_vpd_header header
;
41 char serial_number
[ATLAS_SN_PN_LENGTH
]; /* xx-xx-xxx-xxx */
42 char part_number
[ATLAS_SN_PN_LENGTH
]; /* xxx-xxxx-xxxx.Rxx */
46 /* Always returns a non-NULL pointer to valid data */
47 const struct emi_eeprom_vpd
*get_emi_eeprom_vpd(void);
49 #endif /* ATLAS_VPD_H */