summaryrefslogtreecommitdiff
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* hwtimer: add support for tracking time since cold bootMary Ruthven2023-04-281-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pinweaver needs a timer that counts through deep sleep. This change keeps track of the time since cold boot in PWRDN_SCRATCH23. Before the low speed timer is cleared during init add the value to PWRDN_SCRATCH23. BUG=b:262036852,b:279759625 TEST=manual After hard reset the cold reset time and system time should be the same. > sysinfo Reset flags: 0x00000800 (hard) Reset count: 0 > get Time: 0x0000000006628dd7 = 107.122135 s since cold_reset: 107 s Verify the cold reset timer keeps counting during deep sleep. dut-control cold_reset:on [138.415843 AP off] [Reset cause: hibernate wake-pin] [Image: RW, ... [0.003864 Inits done] [0.009647 init_jittery_clock_locking_o... [0.039134 init took 22838] > get Time: 0x0000000000bf3e3a = 12.533306 s since cold_reset: 150 s > sysi Reset flags: 0x00000140 (hibernate wake-pin) Verify cold reset and system time are the same after H1_RST_L is pulsed dut-control gsc_reset:on gsc_reset:off > get Time: 0x00000000001cdea9 = 1.892009 s since cold_reset: 1 s > sysi Reset flags: 0x00000008 (power-on) Reset count: 1 Change-Id: Ie57324880c8b8068ddff62760848e161b2df903d Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4093120 Reviewed-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-by: Andrey Pronin <apronin@chromium.org>
* gsctool: Add get time command code.Brian Granaghan2023-04-261-0/+2
| | | | | | | | | | | BUG=b:273347276 TEST=build Change-Id: I115030362a5f3a7c04d88e020382cc9de42a787a Signed-off-by: Brian Granaghan <granaghan@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4475133 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Mary Ruthven <mruthven@chromium.org>
* cr50: separate ap_ro_statusChing-Kang Yen2023-04-182-33/+44
| | | | | | | | | | | | | | | Move ap_ro_status to ap_ro_status.h from ap_ro_integrity_check.h so that we could have enum ap_ro_status exposed to trunks and tpm_manager. BUG=b:275524662 TEST=make buildall -j Change-Id: Ibe0a6ef5de1fe63d9bb0a677b5902857109251fb Signed-off-by: Ching-Kang Yen <chingkang@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4431682 Commit-Queue: Ching-Kang Yen <chingkang@chromium.org> Tested-by: Ching-Kang Yen <chingkang@chromium.org> Reviewed-by: Mary Ruthven <mruthven@chromium.org>
* cr50: add fwmp wp policyMary Ruthven2023-04-171-0/+1
| | | | | | | | | | BUG=b:268352167 TEST=see bug Change-Id: I3a4f2ae746cbc2e64df535c4c91b16cdbd7f292a Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4367525 Reviewed-by: Andrey Pronin <apronin@chromium.org>
* cr50: Add get/set factory config command codes.Brian Granaghan2023-04-131-0/+3
| | | | | | | | | | | BUG=b:275356839 TEST=build Change-Id: I6de6de6a43cfe45860bbe9b4aa7cce211da0166e Signed-off-by: Brian Granaghan <granaghan@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4421422 Reviewed-by: Mary Ruthven <mruthven@chromium.org> Commit-Queue: Mary Ruthven <mruthven@chromium.org>
* Revert "gsctool: Add command to get or set factory config."Mary Ruthven2023-04-051-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit f4b79570b7b423cce8431ebdd2deae102db7a91b. Reason for revert: This breaks the CQ b/277089899 Original change's description: > gsctool: Add command to get or set factory config. > > Add '--factory_config' command to get the factory config if not optarg > is provided and set it if one is provided. > > BUG=b:275356839 > TEST=localhost ~ # gsctool -a --factory_config > EEDDCCBBAA998877 > Failed because already set: > localhost ~ # gsctool -a --factory_config 001122334455667788 > Factory config failed. (7) > > Successful set: > localhost ~ # gsctool -a --factory_config > 0 > localhost ~ # gsctool -a --factory_config 001122334455667788 > localhost ~ # gsctool -a --factory_config > 1122334455667788 > > Change-Id: I69c3c6a9c5540d39d2a9fc02fc3702174229a77d > Signed-off-by: Brian Granaghan <granaghan@google.com> > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4400915 > Reviewed-by: Mary Ruthven <mruthven@chromium.org> Bug: b:275356839 Change-Id: I9217cffe68808c2191d796f16864a9289b928f21 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4400343 Reviewed-by: Aaron Massey <aaronmassey@google.com> Tested-by: Aaron Massey <aaronmassey@google.com>
* gsctool: Add command to get or set factory config.Brian Granaghan2023-04-051-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Add '--factory_config' command to get the factory config if not optarg is provided and set it if one is provided. BUG=b:275356839 TEST=localhost ~ # gsctool -a --factory_config EEDDCCBBAA998877 Failed because already set: localhost ~ # gsctool -a --factory_config 001122334455667788 Factory config failed. (7) Successful set: localhost ~ # gsctool -a --factory_config 0 localhost ~ # gsctool -a --factory_config 001122334455667788 localhost ~ # gsctool -a --factory_config 1122334455667788 Change-Id: I69c3c6a9c5540d39d2a9fc02fc3702174229a77d Signed-off-by: Brian Granaghan <granaghan@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4400915 Reviewed-by: Mary Ruthven <mruthven@chromium.org>
* gsctool: Add command to get console logs.Brian Granaghan2023-04-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Add '-l' command to fetch GSC console logs and print them to stdsout. BUG=b:268396021 TEST=localhost ~ # gsctool -aDl Valid CCD config found CCD_MODE: deasserted AP RO verification result: setting unprovisioned PLT_RST_L DEASSERTED WARNING: with `AllowUnverifiedRo` disabled EC will be kept in reset in future Ti50 versions Unverified AP RO allowed ERROR: failed to retrieve key ladder state, setting to dev libtpm initialized Deferring NV write. Deferring NV write. Servo: debouncing -> disconnected Starting erase Change-Id: I59db7ebba0517d89900f31451b0d919712d2c564 Signed-off-by: Brian Granaghan <granaghan@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4266190 Reviewed-by: Mary Ruthven <mruthven@chromium.org>
* cr50: Add support for building platform/pinweaverMary Ruthven2023-03-161-0/+3
| | | | | | | | | | | | | | | Add CONFIG_PLATFORM_PINWEAVER build flag, and support for building platform/pinweaver. BUG=b:262040869 TEST=make board=cr50 -j Change-Id: I993051af60ab4163c37726eac87bd98a8b60fc69 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4311234 Tested-by: Howard Yang <hcyang@google.com> Reviewed-by: Andrey Pronin <apronin@chromium.org> Commit-Queue: Howard Yang <hcyang@google.com>
* cr50: Rename pinweaver codeMary Ruthven2023-03-162-1/+1
| | | | | | | | | | | | | | | | Rename the headers so they will not collide with platform/pinweaver headers with the same names. BUG=b:262040869 TEST=make -j BOARD=cr50 Cq-Depend: chromium:4337377 Change-Id: Iee9f44c4fcb6ab0a01faec5886f07b84c271d1fc Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4311233 Reviewed-by: Andrey Pronin <apronin@chromium.org> Tested-by: Howard Yang <hcyang@google.com> Commit-Queue: Howard Yang <hcyang@google.com>
* gsctool: Add command to get crashlogs.Brian Granaghan2023-03-091-0/+2
| | | | | | | | | | | | | | | | | | | | | Add -x <num> or --clog <num> command to fetch the crash log associated with num and dump the raw output stdout. BUG=b:265310865 TEST=gsctool -a -x 2 00000000000000000df0ad0b000000000000000000000000000000000200... 58a609000000000000000000000000000df0ad0b00000000440000000000... 000000000000000024440c00000000000000000001000000480000006801... 65720000000000009400000001000000010000008800000072763569a271... 00000018b8e20100000000000100000002000000000000000d0000000000... . . . Change-Id: I10fa3c19c31c18f1007bcc161e7ff8d2ac9e6e6c Signed-off-by: Brian Granaghan <granaghan@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4257728 Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
* gsctool: add two new AP RO verification statusstabilize-15361.B-cr50_stabstabilize-15359.B-cr50_stabstabilize-15359.58.B-cr50_stabstabilize-15359.50.B-cr50_stabstabilize-15359.45.B-cr50_stabrelease-R112-15359.B-cr50_stabJett Rink2023-02-221-1/+7
| | | | | | | | | | | | | | | | | Add nice strings for two new AP RO verification status codes. Also make the unknown value match what is specified in ti50 (255) BUG=none TEST=make gsctool builds Change-Id: I26399640dd2cc73d7f463f38e49e5234024c24fb Signed-off-by: Jett Rink <jettrink@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4237256 Tested-by: Jett Rink <jettrink@chromium.org> Commit-Queue: Jett Rink <jettrink@chromium.org> Reviewed-by: Mary Ruthven <mruthven@chromium.org> Auto-Submit: Jett Rink <jettrink@chromium.org>
* gsctool: support setting CCD capabilitiesstabilize-15251.B-cr50_stabstabilize-15245.B-cr50_stabVadim Bendebury2022-11-142-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is necessary to allow the user to set certain capabilities using gsctool. Which exactly capabilities can be set and to which values is determined by the policies enforced by the chip, gsctool should provide a generic way of setting any existing capability to any legal value. The 'AllowUnverifiedRo' capability stands out, because it might require the operator's physical presence confirmation, similar to the 'ccd open' case. A new vendor subcommand is being added to pass desired capability and value to Ti50, as three byte payload the version, the capability and the value. Version and value are mapped by Ti50 into the appropriate enums. All available capability names can be seen in the output of 'gsctool -D -I', the accepted values are 'Default', 'IfOpened', and 'Always'. The new functionality is achieved by allowing the 'I' command line option to accept an optional argument, a string in the form of '<capability name>:<desired value>', where both parts of the string can be abbreviated and will be accepted case insensitive unless the abbreviation is ambiguous. Since this option is supported only by Ti50, gsctool will enforce the default Ti50 USB device ID when running this command over USB and in case of errors will remind the user that the setting capabilities is not supported on Cr50. BUG=b:257253538 TEST=tried running the command on Ti50 implementing support of the new vendor subcommand. # Attempt to set when CCD is locked $ gsctool -D -I | grep State State: Locked $ gsctool -I UartGscRxAPTx:always finding_device 18d1:504a Found device. found interface 3 endpoint 4, chunk_len 64 READY ------- Got error 7(NotAllowed) # Attempt to set to the current value when CCD is open $ gsctool -D -I | grep State State: Opened $ gsctool -I UartGscRxAPTx:always finding_device 18d1:504a Found device. found interface 3 endpoint 4, chunk_len 64 READY ------- # attempt to use ambiguous capability name $ gsctool -I UartGscRx:always finding_device 18d1:504a Found device. found interface 3 endpoint 4, chunk_len 64 READY ------- Ambiguous capability name # Attempt to use incorrect value abbreviation $ gsctool -I UartGscRxAPTx:x finding_device 18d1:504a Found device. found interface 3 endpoint 4, chunk_len 64 READY ------- Unsupported capability value # Various attempts to set AllowUnverifiedRo. Transitions from # default -> ifOpened -> Always require PP, transitions in the # opposite direction do not. $ gsctool -I allow:d finding_device 18d1:504a Found device. found interface 3 endpoint 4, chunk_len 64 READY ------- $ gsctool -I allow:if finding_device 18d1:504a Found device. found interface 3 endpoint 4, chunk_len 64 READY ------- Another press will be required! Press PP button now! Press PP button now! Press PP button now! Press PP button now! Press PP button now! Press PP button now! Press PP button now! PP Done! $ gsctool -I allow:a finding_device 18d1:504a Found device. found interface 3 endpoint 4, chunk_len 64 READY ------- Another press will be required! Press PP button now! Press PP button now! Press PP button now! Press PP button now! Press PP button now! Press PP button now! PP Done! $ gsctool -I allow:d finding_device 18d1:504a Found device. found interface 3 endpoint 4, chunk_len 64 READY ------- $ - also validated that misformatted capability/value combinations are rejected as expected: $ gsctool -I xyz: finding_device 18d1:504a Found device. found interface 3 endpoint 4, chunk_len 64 READY ------- Misformatted capability parameter: xyz: $ gsctool -I :xyz finding_device 18d1:504a Found device. found interface 3 endpoint 4, chunk_len 64 READY ------- Misformatted capability parameter: :xyz $ gsctool -I xyz finding_device 18d1:504a Found device. found interface 3 endpoint 4, chunk_len 64 READY ------- Misformatted capability parameter: xyz $ gsctool -I x:yz finding_device 18d1:504a Found device. found interface 3 endpoint 4, chunk_len 64 READY ------- Unknown capability name - tried setting capabilities when running on Brya, observed expected error messages. Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Change-Id: I803440501d0e3af3c2a645b52b42970b54695701 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4010705 Reviewed-by: Mary Ruthven <mruthven@chromium.org>
* u2f: Fix some constant usageHoward Yang2022-11-071-3/+3
| | | | | | | | | | | | | | | | | | | The size of auth_time_secret_hash should be SHA256_DIGEST_SIZE, not U2F_AUTH_TIME_SECRET_SIZE, though they are the same now. This will make the userland check more consistent with the actual constants used in the header. Also, the CORP_SALT_SIZE is defined incorrectly and never used, fix it to the correct value and use it in the struct field size. BUG=None TEST=make buildall -j Change-Id: I22dcf2cfd46819475ca916e0b0c3dcd5b3369b19 Signed-off-by: Howard Yang <hcyang@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4007998 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org> Commit-Queue: Vadim Sukhomlinov <sukhomlinov@chromium.org>
* gsctool: Add AP RO verify SPI read/write addressing config mode commandMatt Vertescher2022-11-071-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the ability to get and set the AP RO verification SPI read/write addressing mode configuration setting from `gsctool` by adding a new `-C` command flag with an optional argument. BUG=b:250972056 TEST=Running gsctool locally to set and get the SPI addressing mode to verify communication and handlers are working properly: $ gsctool -D -C 3byte ... $ gsctool -D -C ... 3byte $ gsctool -D -C 4byte ... $ gsctool -D -C ... 4byte Change-Id: I2ad4af65615310cf1477adfda7df1bfdf0e0a914 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3966474 Tested-by: Matt Vertescher <mvertescher@google.com> Reviewed-by: Alyssa Haroldsen <kupiakos@google.com> Auto-Submit: Matt Vertescher <mvertescher@google.com> Commit-Queue: Matt Vertescher <mvertescher@google.com> Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
* apro: fail if the V1 data is corruptedMary Ruthven2022-11-071-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It shouldn't be possible to have an unsupported ap_ro_check type and the data shouldn't get corrupted. Fail verification, so the user can tell that something is wrong. If the space is empty or the board id is blocked, still treat verification as unsupported and allow the device to boot. Move the AP RO failed processing into a function, so cr50 can fail immediately. BUG=none TEST=manual use a DBG image to write ap_ro_check data with the wrong type. Verify verification fails immediately [65.918056 RO Validation triggered] [65.920169 ap_ro_check_unsupported: unable to read ap ro space] [65.922733 do_ap_ro_check: bad v1 data] [65.924049 enable_spi_pinmux: AP] [65.927314 spi_hash_pp_done: AP] [65.928829 spi_hash_disable] [65.929904 AP RO FAILED!] Erase V1 data. Check verification is skipped because it's unsupported. [3.724384 RO Validation triggered] [3.726524 ap_ro_check_unsupported: RO verification not programmed] [3.728363 do_ap_ro_check: unsupported] [3.906272 AP UART on] [4.296054 deferred_tpm_rst_isr] [4.297027 AP on] [4.297588 tpm_reset_request(0, 0)] [4.298374 tpm_reset_now(0)] [4.299095 Committing NVMEM changes.] Write V1 data normally. Check verification runs normally. [35.977050 RO Validation triggered] [35.978744 do_ap_ro_check: found v1 data] [35.979732 enable_spi_pinmux: AP] [35.982574 spi_hash_pp_done: AP] [35.983276 get_saved_gbbd: not programmed] [36.145401 validate_gbb_flags: ok] [36.146457 Using 0 for GBB flags.] [36.147239 usb_spi_sha256_update: c00000:500c] [36.190986 usb_spi_sha256_update: c05010:3faff0] [43.365467 matched gbb 0] [43.367374 do_ap_ro_check: saved gbbd] [43.368988 spi_hash_disable] [43.370231 AP RO PASS!] Change-Id: I9be2a900dc69009b40c32e12dec250e54977a08a Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4004357 Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
* apro: save the gbb descriptor after verification passesMary Ruthven2022-11-071-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Save the GBBD in AP RO flash after verification passes. It takes a while to cycle through all of the factory flags. If Cr50 successfully matches the saved AP RO hash with injected factory flags, save the flags to save for future runs. The gbb descriptor data is saved 512 bytes after the start of the AP RO check data. The max v1 size is currently 296 bytes, so there's extra room if we need to increase the AP RO check data size. The entire AP RO data space is 2048, so there's a lot of extra space after the gbb descriptor if we need to add more stuff. BUG=b:236844541 TEST=manual # erase hash > ap_ro_info erase # set the GBB flags to 0x239 /usr/share/vboot/bin/set_gbb_flags.sh 0x239 # add test key to RO_VPD vpd -i RO_VPD -s "apro_test=original" # save hash ap_ro_hash.py WP_RO # trigger verification. Make sure it fails because the flags # are 0x239 [200.425891 RO Validation triggered] ... [200.481670 AP RO FAILED!] # set the GBB flags to 0 /usr/share/vboot/bin/set_gbb_flags.sh 0 # change test RO_VPD key. make sure verification fails. vpd -i RO_VPD -s "apro_test=wrong" [3.822818 RO Validation triggered] ... [61.407680 spi_hash_disable] [61.407955 AP RO FAILED!] [61.418949 AP off] # restore test RO_VPD key. vpd -i RO_VPD -s "apro_test=original" # trigger verification. Make sure it passes and saves the gbbd. [3.822818 RO Validation triggered] [3.825035 enable_spi_pinmux: AP] ... [25.695068 spi_hash_disable] [25.696224 AP RO PASS!] # check saved gbbd shows 0x239 > ap result : 6 gbb : saved (0x239) supported : yes ... # Trigger verification. Verify Cr50 just uses 0x239 [356.968860 RO Validation triggered] [356.969795 enable_spi_pinmux: AP] ... [364.289047 AP RO PASS!] # change test RO_VPD key make sure verification fails. vpd -i RO_VPD -s "apro_test=wrong" [213.868492 RO Validation triggered] ... [221.192661 AP RO FAILED!] # erase the AP RO data. Verify gbbd gets cleared > ap_ro_info erase result : 6 [400.206562 ap_ro_check_unsupported: RO verification not programmed] supported : no > ap result : 6 [403.772743 ap_ro_check_unsupported: RO verification not programmed] supported : no > Change-Id: Iad8cfd4a448c2e5798a94aa8b4e3a735281eb849 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3915000 Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
* gsctool: add support for AP RO Verification V2 statusJett Rink2022-11-031-0/+17
| | | | | | | | | | | | | | | | | | Implement AP RO Verification V2 status that ti50 will send via the same TPM Vendor command: VENDOR_CC_GET_AP_RO_STATUS See ti50 impl in chrome-internal:5070449 BUG=b:256892104 TEST=manually verified all V2 return values from ti50 Change-Id: I95c071046054075c045d8e698946dc81e55c64dd Signed-off-by: Jett Rink <jettrink@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3999806 Tested-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-by: Mary Ruthven <mruthven@chromium.org> Commit-Queue: Jett Rink <jettrink@chromium.org>
* fix ChromiumOS authors and whitespace warningsMary Ruthven2022-09-13172-183/+172
| | | | | | | | | | | BUG=none TEST=none Change-Id: I61b0b0106a43f723ec3bc805eb190aef00bbd05b Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3894391 Reviewed-by: Vadim Bendebury <vbendeb@chromium.org> Commit-Queue: Vadim Bendebury <vbendeb@chromium.org>
* ap_ro_integrity_check: specify ap ro status enum valuesstabilize-15072.B-cr50_stabMary Ruthven2022-08-251-7/+7
| | | | | | | | | | | | | Specify ap ro status enum values, so it's easy to verify they're the same across Ti50 and AP scripts. BUG=none TEST=none Change-Id: Id65855b030ae315440f59b84dd02def0ef9d2c1f Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3828598 Reviewed-by: Andrey Pronin <apronin@chromium.org>
* apro: clear AP_RO_FAIL on combo0Mary Ruthven2022-08-252-0/+7
| | | | | | | | | | | | | | | | | | | | | | There are a couple of known issues saving the AP RO verification hash in cr50, so it's possible AP RO verification will fail even if the AP RO is ok. Add support for releasing the EC from reset with PWRB + refresh after AP RO verification fails. This just makes it easier to recover the device. If the device is released from reset, the status is set to AP_RO_FAIL_CLEARED and a APROF_FAIL_CLEARED flog event is logged. This only releases EC reset if the device failed AP RO verification. Any other verification status won't get cleared by the key combo. BUG=b:240530668 TEST=trigger verification on a device with a bad hash. Verify the EC is held in reset until PWRB + refresh is pressed. make -C extra/usb_updater gsctool Change-Id: I03a02501e7c91a41374816d82f48a5289f289c39 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3805820 Reviewed-by: Andrey Pronin <apronin@chromium.org>
* apro: add new return codes (take two)Mary Ruthven2022-08-181-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add new ap_ro_integrity_check return codes. The existing AP_RO_PASS (1) return code doesn't verify the GBB. Rename it to AP_RO_PASS_UNVERIFIED_GBB. Shimless RMA should only treat AP_RO_PASS (6) as a pass. Nothing returns this right now. This CL also adds AP_RO_IN_PROGRESS(7). AP_RO_IN_PROGRESS is used if AP RO verification is ongoing. AP_RO_FAIL_CLEARED will be used in a followup CL. old: 1 - AP_RO_PASS new: 1 - AP_RO_PASS_UNVERIFIED_GBB ... 6 - AP_RO_PASS 7 - AP_RO_IN_PROGRESS This saves 8 bytes since it also shortens a print message. The remaining space changes from 5804 to 5812 bytes. BUG=b:234497234 TEST=make buildall -j; make -C extra/usb_updater/ gsctool Change-Id: I9f8b45f5564d453cbb4386b318b65d977d8b3f73 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3828596 Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
* Revert "apro: add new return codes"stabilize-15054.98.B-cr50_stabstabilize-15054.26.B-cr50_stabstabilize-15054.115.B-cr50_stabrelease-R106-15054.B-cr50_stabJudy Hsiao2022-08-121-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c1f5a5481f1121e2f408055f04906205b779dc91. Reason for revert: b:242249503 ``` gsctool.c:2382:2: error: duplicate case value 2382 | case AP_RO_UNSUPPORTED_NOT_TRIGGERED: | ^~~~ gsctool.c:2373:2: note: previously used here 2373 | case AP_RO_UNSUPPORTED_NOT_TRIGGERED: | ^~~~ ``` Original change's description: > apro: add new return codes > > Add new ap_ro_integrity_check return codes. The existing AP_RO_PASS (2) > return code doesn't verify the GBB. Rename it to > AP_RO_PASS_UNVERIFIED_GBB. Shimless RMA should only treat > AP_RO_PASS (7) as a pass. Nothing returns this right now. > This CL also adds AP_RO_FAIL_CLEARED(8) and AP_RO_IN_PROGRESS(9). > AP_RO_IN_PROGRESS is used if AP RO verification is ongoing. > AP_RO_FAIL_CLEARED will be used in a followup CL. > > old: > 2 - AP_RO_PASS > > new: > 2 - AP_RO_PASS_UNVERIFIED_GBB > ... > 7 - AP_RO_PASS > 8 - AP_RO_FAIL_CLEARED > 9 - AP_RO_IN_PROGRESS > > This saves 8 bytes since it also shortens a print message. The remaining > space changes from 5804 to 5812 bytes. > > BUG=b:234497234 > TEST=make buildall -j > > Change-Id: I8d19a411c2534236c9defa82291872420c19a15b > Signed-off-by: Mary Ruthven <mruthven@chromium.org> > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3805819 > Reviewed-by: Andrey Pronin <apronin@chromium.org> > Commit-Queue: Andrey Pronin <apronin@chromium.org> Bug=b:234497234, b:242249503 Change-Id: I63ebc6a1343410e3b2a5ab0684a8a533553ec1ec Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3826713 Reviewed-by: Andrey Pronin <apronin@chromium.org> Auto-Submit: Judy Hsiao <judyhsiao@google.com> Tested-by: Judy Hsiao <judyhsiao@google.com> Owners-Override: Judy Hsiao <judyhsiao@google.com> Reviewed-by: Mary Ruthven <mruthven@chromium.org> Commit-Queue: Andrey Pronin <apronin@chromium.org> Commit-Queue: Mary Ruthven <mruthven@chromium.org>
* apro: add new return codesMary Ruthven2022-08-111-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add new ap_ro_integrity_check return codes. The existing AP_RO_PASS (2) return code doesn't verify the GBB. Rename it to AP_RO_PASS_UNVERIFIED_GBB. Shimless RMA should only treat AP_RO_PASS (7) as a pass. Nothing returns this right now. This CL also adds AP_RO_FAIL_CLEARED(8) and AP_RO_IN_PROGRESS(9). AP_RO_IN_PROGRESS is used if AP RO verification is ongoing. AP_RO_FAIL_CLEARED will be used in a followup CL. old: 2 - AP_RO_PASS new: 2 - AP_RO_PASS_UNVERIFIED_GBB ... 7 - AP_RO_PASS 8 - AP_RO_FAIL_CLEARED 9 - AP_RO_IN_PROGRESS This saves 8 bytes since it also shortens a print message. The remaining space changes from 5804 to 5812 bytes. BUG=b:234497234 TEST=make buildall -j Change-Id: I8d19a411c2534236c9defa82291872420c19a15b Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3805819 Reviewed-by: Andrey Pronin <apronin@chromium.org> Commit-Queue: Andrey Pronin <apronin@chromium.org>
* base64: add implementation for encoding binary into base64Vadim Bendebury2022-06-132-0/+27
| | | | | | | | | | | | | | | | | | | | In the Cr50 tree there is no really output devices other than console where base64 encoding output could be sent, and there is no use for decoding function yet. Add the encoding function implementation, make it possible to send output to console by default and optionally to a passed in function. Add test to verify proper encoding. BUG=b:234745585 TEST='make run-base64' succeeds. Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Change-Id: Ibc10681632bc649320d602e319e4f634b4b3a1d1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3701141 Reviewed-by: Mary Ruthven <mruthven@chromium.org> Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
* cr50: Add corp format to u2f_attestHoward Yang2022-06-031-7/+29
| | | | | | | | | | | | | | | Add a format for u2fd-corp attestation to u2f_attest, and corresponding test case in u2f_test.py BUG=b:233147441 TEST=make buildall -j TEST=u2f_test.py Change-Id: I4d12345fd0531a4be091c05670215444fe38e706 Signed-off-by: Howard Yang <hcyang@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3670107 Reviewed-by: Andrey Pronin <apronin@chromium.org> Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
* gsctool: Support flog on H1D3C.stabilize-14771.B-cr50_stabBrian Granaghan2022-04-291-0/+3
| | | | | | | | | | | | BUG=b:219038720 TEST=gsctool -aL Change-Id: I1c0b417e61dcb6460345c2fcf8d43952ebbf65d3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3573469 Commit-Queue: Brian Granaghan <granaghan@google.com> Tested-by: Brian Granaghan <granaghan@google.com> Reviewed-by: Andrey Pronin <apronin@chromium.org> Reviewed-by: Mary Ruthven <mruthven@chromium.org>
* gpio: add gpio flags to disable sleepMary Ruthven2022-04-273-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add GPIO_SLEEP_DIS_LOW and GPIO_SLEEP_DIS_HIGH to disable sleep when a gpio with one of those flags is asserted. GPIO_SLEEP_DIS_LOW disables sleep when the signal is set to 0. GPIO_SLEEP_DIS_HIGH disables sleep when the signal is set to 1. This will disable all forms of sleep. The flags can be used for ccd signals to ensure cr50 doesn't enter sleep while c2d2 or servo micro are relying on a ccd signal to flash the device. These flags should not be add to signals used during normal cr50 operation. They disable regular sleep regular sleep so using them will significantly increase cr50 power consumption. This change adds GPIO_SLEEP_DIS_HIGH to AP_FLASH_SELECT. I'll add more signals in followup CLs. This change also replaces SLEEP_MASK_CHARGING with SLEEP_MASK_GPIO. Nothing was using SLEEP_MASK_CHARGING. BUG=b:229974371 TEST=Toggle AP_FLASH_SELECT while the AP is off. Verify cr50 doesn't enter deep sleep and the gpiocfg and sleepmask output looks ok. > gpioset AP_FLASH_SELECT 1 > gpiocfg GPIO0_GPIO1: read 0 drive 0 GPIO0_GPIO2: read 1 drive 1 GPIO1_GPIO0: read 0 INT_RISING GPIO1_GPIO1: read 0 INT_HIGH GPIO1_GPIO4: read 0 INT_FALLING GPIO1_GPIO5: read 0 drive 1 GPIO1_GPIO7: read 0 INT_RISING GPIO1_GPIO8: read 0 INT_FALLING gpio sleepmask: 00001000 > sleepmask sleep mask: 00000008 > gpioset AP_FLASH_SELECT 0 > gpiocfg GPIO0_GPIO1: read 0 drive 0 GPIO0_GPIO2: read 0 drive 0 GPIO1_GPIO0: read 0 INT_RISING GPIO1_GPIO1: read 0 INT_HIGH GPIO1_GPIO4: read 0 INT_FALLING GPIO1_GPIO5: read 0 drive 1 GPIO1_GPIO7: read 0 INT_RISING GPIO1_GPIO8: read 0 INT_FALLING gpio sleepmask: 00000000 > sleepmask sleep mask: 00000000 > Change-Id: I1de35455c5a6702635fb714b14d6791f8e5eb2ed Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3605881 Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
* Revert "gsctool: Support flog on H1D3C."stabilize-14682.B-cr50_stabMorg2022-04-061-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 6a90601b84302253f1f2572b948ca2dce69cc17c. Reason for revert: Currently breaking CQ Original change's description: > gsctool: Support flog on H1D3C. > > BUG=b:219038720 > TEST=gsctool -D -L > > Change-Id: I606d1a5958de4a94be402f6520836504f5b8c6c3 > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3561468 > Reviewed-by: Jett Rink <jettrink@chromium.org> > Reviewed-by: Mary Ruthven <mruthven@chromium.org> > Commit-Queue: Brian Granaghan <granaghan@google.com> > Tested-by: Brian Granaghan <granaghan@google.com> BUG=b:228247766 Change-Id: I03eba9b17190909e475938808892ca3747376811 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3572266 Reviewed-by: Brian Granaghan <granaghan@google.com> Tested-by: Morg <morg@chromium.org> Owners-Override: Morg <morg@chromium.org> Auto-Submit: Morg <morg@chromium.org> Commit-Queue: Brian Granaghan <granaghan@google.com> Reviewed-by: Anton Romanov <romanton@google.com>
* gsctool: Support flog on H1D3C.Brian Granaghan2022-04-051-0/+3
| | | | | | | | | | | | BUG=b:219038720 TEST=gsctool -D -L Change-Id: I606d1a5958de4a94be402f6520836504f5b8c6c3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3561468 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Mary Ruthven <mruthven@chromium.org> Commit-Queue: Brian Granaghan <granaghan@google.com> Tested-by: Brian Granaghan <granaghan@google.com>
* cr50: return the time since user_pres was assertedMary Ruthven2022-03-011-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a vendor command that returns the time since user_pres_l was asserted. This is only used for testing. Tracking user_pres_l needs to be enabled with a vendor command since DIOM4 may not be pulled up and may be pulled down on old boards. Enabling the vendor command survives deep sleep reset. It gets cleared after cr50 reset. Cr50 clears the user_pres_l status if tracking is disabled. BUG=b:219981194,b:208504127 TEST=manual # Verify it survives deep sleep sudo gsctool -y enable sudo gsctool -y ... user pres enabled # enter deep sleep sudo gsctool -y ... user pres enabled # Verify it doesn't survive cr50 reboot sudo gsctool -y enable sudo gsctool -y ... user pres enabled cr50 > reboot sudo gsctool -y ... user pres disabled # Check gsctool output after triggering DIOM4 pulse sudo gsctool -y enable # Trigger pulse and wait 5 seconds sudo gsctool -y ... user pres enabled last press: 5064331 Change-Id: Ib37980a5cd8d3378bf718e8e32a7d4152435a816 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3495863 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
* add vendor command to disable deep sleepMary Ruthven2022-01-261-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a vendor command to disable deep sleep the next time TPM_RST_L is asserted. Normally cr50 enters deep sleep whenever TPM_RST_L is asserted. New boards want to disable deep sleep during certain power states. This vendor command allows the AP to disable deep sleep for the next suspend cycle. When deep sleep is disabled, cr50 modifies TPM_RST_L to be WAKE_HIGH and sets it back to WAKE_LOW after TPM_RST_L is deasserted, so TPM_RST_L doesn't constantly wake cr50 from regular sleep. This uses 248 bytes BUG=b:214479456 TEST=manual # Check G3 resume works ok. # Disable Deep Sleep from the AP. The vendor command is 59 # (0x3b) trunks_send --raw 80010000000c20000000003b ccdstate DS Dis: on AP > shutdown -P now ... [454.992733 Block DS] ccdstate DS Dis: on pinmux 40060018: DIOM3 0 IN WAKE_HIGH idle idle action: sleep # Verify cr50 starts cycling through sleep spinner at two ticks # a second. EC > powerbtn # check the cr50 console ... Aï¿œUART on] 10/ 1 [102.484012 Missed edge] [102.484352 deferred_tpm_rst_isr] [102.484580 AP on] [102.484779 set TPM wake] [102.484981 tpm_reset_request(0, 0)] [102.485279 tpm_reset_now(0)] [547.928375 AP on] [547.928615 set TPM wake] pinmux 40060018: DIOM3 0 IN WAKE_LOW # Disable Deep Sleep from the AP. The vendor command is 59 # (0x3b) trunks_send --raw 80010000000c20000000003b ccdstate DS Dis: on ecrst pulse ... [602.638427 AP on] [547.928615 set TPM wake] [602.638668 tpm_reset_request(0, 0)] ... ccdstate DS Dis: off # Check S3 resume works ok. # Use AP commands to enter S3 AP > trunks_send --raw 80010000000c20000000003b AP > echo deep > /sys/power/mem_sleep AP > echo mem > /sys/power/state 10\ 1 [243.409412 dis DS] 1|[249.536811 tpm_rst_asserted] [250.537197 AP off] [250.537631 Block DS] # Wake the AP with a power button press from the EC EC > powerbtn # verify cr50 prints "Missed edge", but the device resumes ok. 1/ 10- 1 [270.112655 Missed edge] [270.113037 deferred_tpm_rst_isr] [270.113315 AP on] [270.113529 set TPM wake] [270.113712 tpm_reset_request(0, 0)] [270.114013 tpm_reset_now(0)] [270.116996 tpm_init] tpm_manufactured: manufactured [270.118301 tpm_reset_now: done] [270.156967 PinWeaver: Loading Tree!] [270.189353 Skipping commit] Change-Id: I96049a9d38b5c66acad9c73628f588f4cf6b2b3f Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3406587 Reviewed-by: Vadim Bendebury <vbendeb@chromium.org> Commit-Queue: Vadim Bendebury <vbendeb@chromium.org>
* brdprop: log invalid and ambiguous eventsMary Ruthven2022-01-151-0/+22
| | | | | | | | | | | | | | | | Log brdprop errors in flog, so the team can track brdprop errors from the AP without grepping through cr50 logs. BUG=b:214550629 TEST=flash on red board. Verify invalid strap events are logged. enable closed-loop-reset on the red board. Verify "ambiguous" strap logs are ignored. Change-Id: Ibea73fb19119fa81ed3652c5d68e430cdbae9fa5 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3386405 Reviewed-by: Vadim Bendebury <vbendeb@chromium.org> Commit-Queue: Vadim Bendebury <vbendeb@chromium.org>
* ap ro verification: add log entry for the 'unsupported' caseVadim Bendebury2021-12-291-0/+1
| | | | | | | | | | | | | | Let's have different log entries for the case when AP RO verification is provisioned but failed, and when it is supported. BUG=b:211762871 TEST=none Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Change-Id: If99c89e6c6c0d10eec2d9e9c97d13e85bb3f1f23 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3360091 Tested-by: Vadim Bendebury <vbendeb@gmail.com> Reviewed-by: Andrey Pronin <apronin@chromium.org>
* ap_ro_integrity_check: call keep_ec_in_reset in do_ap_ro_checkstabilize-14385.B-cr50_stabfactory-kukui-14374.B-cr50_stabMary Ruthven2021-11-291-9/+2
| | | | | | | | | | | | | | | | | | Move the keep_ec_in_reset call into do_ap_ro_check, so AP RO verification will hold the EC in reset when it's triggered from the AP. This change removes the ap_ro_verification_failed_ variable, so all of the AP RO verification is included in ap_ro_info. ap_ro_ver_state isn't needed anymore, so this CL removes it. BUG=b:207545621 TEST=make clobber ; make buildall -j Change-Id: Id0b2e04b042d48f2b8a9dae021e762369ca5f3eb Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3300174 Reviewed-by: Vadim Bendebury <vbendeb@chromium.org> Commit-Queue: Vadim Bendebury <vbendeb@chromium.org>
* Revert "console_channel.inc: Add more ifdef to reduce number of channels"Mary Ruthven2021-11-222-11/+0
| | | | | | | | | | | | | This reverts commit b5cebbaadb4966e9d1820b0dcabd690d3e5d762e. BUG=b:207391162 TEST=The chan output is the same on ToT and mp images. Change-Id: Ief9bc6f6c9b027284b423e46681c313fd3fd73aa Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3296743 Reviewed-by: Andrey Pronin <apronin@chromium.org> Commit-Queue: Andrey Pronin <apronin@chromium.org>
* coil: replace non-inclusive terms with "placeholder"Mary Ruthven2021-11-195-8/+8
| | | | | | | | | | BUG=b:173227629 TEST=make buildall -j Change-Id: I2b203dfe45416aa3b632f6f788d14264b08f44e0 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3293252 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
* remove spi_norMary Ruthven2021-11-191-807/+0
| | | | | | | | | | | | | Nothing uses spi_nor and sfdp.h has non-inclusive terms in it. Remove both to make the codebase more inclusive. BUG=b:173227629 TEST=make buildall -j Change-Id: I2b880fcae3ab9619ff9703ba49be2936a5a9bd73 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3293251 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
* coil: replace non-inclusive terms with "validity"Mary Ruthven2021-11-192-2/+2
| | | | | | | | | | BUG=b:173227629 TEST=make buildall -j Change-Id: Iaf8028984cc58cc4108907fdba4ea4b38c43cf70 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3293250 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
* Revert "ec: Add a task_reset function."Mary Ruthven2021-11-182-73/+0
| | | | | | | | | | | | This reverts commit 9cb1b936e76809cb68419c3ff3612e17fec81e9c. BUG=b:200823466 TEST=make buildall -j Change-Id: I82d322106022d70f9df3b7b618526ce8adf7e846 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3289991 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
* Revert "chip/stm32/usb: More reliable implementation of usb_wake"Mary Ruthven2021-11-181-7/+1
| | | | | | | | | | | | This reverts commit 520bd3f6ad2098e6969dd353350e2e2281f28989. BUG=b:200823466 TEST=make buildall -j Change-Id: Ie94334d0151f9f4755ec0937e7fcb04deed8b0a7 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3285831 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
* Revert "hammer: Pulse detection pin on USB wake event"Mary Ruthven2021-11-181-3/+0
| | | | | | | | | | | | This reverts commit 7fb0338cbd40d40db2a304cd3e8ed10ae4f59450. BUG=b:200823466 TEST=make buildall -j Change-Id: I439ed8d5c8f16abfa3b077ab623398e73720aedb Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3285830 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
* Revert "usb_api.h: Stub usb_wake if CONFIG_USB_REMOTE_WAKEUP is not defined"Mary Ruthven2021-11-181-6/+2
| | | | | | | | | | | | This reverts commit 1ba0395a18c02dfbdc66f8b0f5fa930353b26705. BUG=b:200823466 TEST=make buildall -j Change-Id: Iabc46228203ea11dac845570a17c0d0944ba7646 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3285829 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
* Revert "KBL/SKL: Add wait between DSW_PWROK and PWRBTN"Mary Ruthven2021-11-182-22/+0
| | | | | | | | | | | | This reverts commit 627f3a8ac28751f549fbdb5266f8ccee417d339d. BUG=b:200823466 TEST=make buildall -j Change-Id: Id942eb041f8f28cc4fcf533d720a1c9ee79e92f4 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3285828 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
* Revert "common/led_common: Add API for controlling LED state"Mary Ruthven2021-11-182-18/+0
| | | | | | | | | | | | This reverts commit 2bb9aec01aded925b726f7b18a66cdad181ac8db. BUG=b:200823466 TEST=make buildall -j Change-Id: Ia3a6d52c21dd864898cf91a31e6e742cb6b915f1 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3285827 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
* Revert "dma: separate out DMA enable status from wait_for_bytes"Mary Ruthven2021-11-181-9/+2
| | | | | | | | | | | | This reverts commit 4609b59404bd6e32c4cdb267658511a46557dab2. BUG=b:200823466 TEST=make buildall -j Change-Id: Ia1765a8ec8d37a2dc88ea4b497698845a52dbfce Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3285826 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
* Revert "ISH3.0: Scaling timer from 12MHz to 1MHz"Mary Ruthven2021-11-181-2/+0
| | | | | | | | | | | | This reverts commit 80e6645b2d9876be58102c454cb0cf188f1d1eff. BUG=b:200823466 TEST=make buildall -j Change-Id: I7627a20f650ddac1b8a1b7df3ff998b20f65697e Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3285825 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
* Revert "common: add `RETURN_ERROR` macro"Mary Ruthven2021-11-181-7/+0
| | | | | | | | | | | | This reverts commit ebdc7e09a54041022d8276976ea6e59a87b95c29. BUG=b:200823466 TEST=make buildall -j Change-Id: I21f2f1beebcf9440bd2856922322cf068a2286e5 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3285824 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
* Revert "ec_features / coral: Allow disabling keyboard backlight feature"Mary Ruthven2021-11-182-12/+0
| | | | | | | | | | | | This reverts commit 09136dea764dbe482392c29b3c8d1763149df3e6. BUG=b:200823466 TEST=make buildall -j Change-Id: Ibd86be5017c3c984ba10c59a8c0cca6e5c392af5 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3285823 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>
* Revert "chip/mt_scp: support software gain"Mary Ruthven2021-11-181-5/+0
| | | | | | | | | | | | This reverts commit 8fe3e6a850f06b499cc60834a925736ce95171d9. BUG=b:200823466 TEST=make buildall -j Change-Id: I02223d61ec727c8b5891fa23868930ed20d7b394 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3285760 Reviewed-by: Vadim Sukhomlinov <sukhomlinov@chromium.org>