diff options
| author | Simon Glass <[email protected]> | 2021-01-16 14:52:25 -0700 |
|---|---|---|
| committer | Simon Glass <[email protected]> | 2021-01-30 14:25:41 -0700 |
| commit | 7791df576c4e0bcb0529850e14173d028ec37275 (patch) | |
| tree | 93b1185fd5fb60bc540d9b93d0478cf072978ac1 /cmd | |
| parent | 698e30f7a862ae6eb4754ef0d42b8dc8cf416edd (diff) | |
cros_ec: Add support for reading the SKU ID
This allows reading strapping pins attached to the EC. Add an
implementation for this.
Signed-off-by: Simon Glass <[email protected]>
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/cros_ec.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cmd/cros_ec.c b/cmd/cros_ec.c index ce1f59a740c..4e85e184fee 100644 --- a/cmd/cros_ec.c +++ b/cmd/cros_ec.c @@ -352,6 +352,15 @@ static int do_cros_ec(struct cmd_tbl *cmdtp, int flag, int argc, debug("%s: Could not access LDO%d\n", __func__, index); return ret; } + } else if (!strcmp("sku", cmd)) { + ret = cros_ec_get_sku_id(dev); + + if (ret >= 0) { + printf("%d\n", ret); + ret = 0; + } else { + printf("Error: %d\n", ret); + } } else { return CMD_RET_USAGE; } @@ -382,6 +391,7 @@ U_BOOT_CMD( "crosec write <ro|rw> <addr> [<size>] Write EC image\n" "crosec vbnvcontext [hexstring] Read [write] VbNvContext from EC\n" "crosec ldo <idx> [<state>] Switch/Read LDO state\n" + "crosec sku Read board SKU ID\n" "crosec test run tests on cros_ec\n" "crosec version Read CROS-EC version" ); |
