ec/google/chromeec: add support for fw_config cbi field

The firmware configuration (fw_config) field is store in the CBI EEPROM
and it should be used to make firmware customization instead of
sku/variant id.

BUG=b:145519081
TEST=builds

Change-Id: I790998a29e724ecdff8876cca072267537b7cea6
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/38410
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
Jett Rink 2020-01-14 11:41:47 -07:00 committed by Patrick Georgi
parent ba2edaffdc
commit 8db8a6154f
2 changed files with 8 additions and 2 deletions

View File

@ -885,6 +885,11 @@ int google_chromeec_cbi_get_sku_id(uint32_t *id)
return cbi_get_uint32(id, CBI_TAG_SKU_ID);
}
int google_chromeec_cbi_get_fw_config(uint32_t *fw_config)
{
return cbi_get_uint32(fw_config, CBI_TAG_FW_CONFIG);
}
int google_chromeec_cbi_get_oem_id(uint32_t *id)
{
return cbi_get_uint32(id, CBI_TAG_OEM_ID);

View File

@ -77,13 +77,14 @@ int google_chromeec_vstore_write(int slot, uint8_t *data, size_t size);
int google_chromeec_reboot(int dev_idx, enum ec_reboot_cmd type, uint8_t flags);
/**
* Get OEM (or SKU) ID from Cros Board Info
* Get data from Cros Board Info
*
* @param id [OUT] oem/sku id
* @param id/fw_config/buf [OUT] value from from CBI.
* @return 0 on success or negative integer for errors.
*/
int google_chromeec_cbi_get_oem_id(uint32_t *id);
int google_chromeec_cbi_get_sku_id(uint32_t *id);
int google_chromeec_cbi_get_fw_config(uint32_t *fw_config);
int google_chromeec_cbi_get_dram_part_num(char *buf, size_t bufsize);
int google_chromeec_cbi_get_oem_name(char *buf, size_t bufsize);