summaryrefslogtreecommitdiff
path: root/board/nocturne_fp
Commit message (Collapse)AuthorAgeFilesLines
* board/dartmonkey: Disable support for saving extended reset flagsPatryk Duda2022-02-281-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | FPMCU RO for nocturne and nami don't support extended reset flags in backup RAM. CL:1295890 adds BKPDATA_INDEX_SAVED_RESET_FLAGS_2 in the middle of bkpdata_index enum, so the order of data has changed causing mismatch between RO and RW. RO interprets the register as saved panic reason, so it tries to restore panic data when value in the register is different than 0. Another problem is that panic data saved in backup RAM on hard reset is restored incorrectly. Fix needs to be applied only for nami_fp and nocturne_fp firmware. BUG=b:119131962 BRANCH=none TEST=Compile FPMCU firmware for nami with RO nami_fp_v2.2.144-7a08e07eb. Crash RW using 'crash assert' command. After FPMCU jumps to RW issue 'reboot hard' command. After jump to RW check panic data using 'panicinfo' command. R4 and R5 registers should have correct values. Signed-off-by: Patryk Duda <pdk@semihalf.com> Change-Id: I090c653218cac4d986e61948e25937d12f190b86 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3477958 Reviewed-by: Bobby Casey <bobbycasey@google.com> Reviewed-by: Tom Hughes <tomhughes@chromium.org> Tested-by: Patryk Duda <patrykd@google.com> Commit-Queue: Patryk Duda <patrykd@google.com>
* stm32: Introduce define to control extended reset flagsPatryk Duda2022-02-281-0/+2
| | | | | | | | | | | | | | | | | | | | | | | Some ROs don't support extended reset flags saved in backup RAM. BKPDATA_INDEX_SAVED_RESET_FLAGS_2 (introduced in CL:1295890) was added in the middle of bkpdata_index enum, so it breaks compatibility between RO and RW. In some cases, extended reset flags in backup RAM are cleared because RO wrongly recognizes flags as panic reason. BUG=b:119131962 BRANCH=none TEST=Compile FPMCU firmware for nami with RO nami_fp_v2.2.144-7a08e07eb. Issue 'reboot ro' command from RW part. FPMCU shouldn't stop in RO, because that was not implemented when RO was released. After jump to RW, check if panic data doesn't exist. Signed-off-by: Patryk Duda <pdk@semihalf.com> Change-Id: Ifcefa463c80ec1b498546589dcfc704eba8dfe60 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3477957 Reviewed-by: Bobby Casey <bobbycasey@google.com> Reviewed-by: Tom Hughes <tomhughes@chromium.org> Tested-by: Patryk Duda <patrykd@google.com> Commit-Queue: Patryk Duda <patrykd@google.com>
* dartmonkey/board: Exclude RV32I panic data from structurePatryk Duda2022-02-281-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FPMCU RO for nami and nocturne don't contain RV32I core panic data so their panic data structure is smaller than current. This results in overwriting panic data left by RW when doing sysjump, because RO doesn't use struct_size field when calculating jump data address. Another problem is that RW can't find jump data because overwritten panic data contains RW panic data structure size (bigger than RO), so calculated jump data address is wrong. BUG=b:119131962 BRANCH=none TEST=Prepare nocturne_fp firmware with RO nocturne_fp_v2.2.64-58cf5974e and RW from ToT. Issue 'crash assert' in RW. Check if panic data after reboot is correct. TEST=Prepare nami_fp firmware with RO nami_fp_v2.2.144-7a08e07eb and RW from ToT. Issue 'crash assert' in RW. Check if panic data after reboot is correct. TEST=Prepare dartmonkey firmware with RO dartmonkey_v2.0.2887-311310808 and RW from ToT. Issue 'crash assert' in RW. Check if panic data after reboot is correct. Signed-off-by: Patryk Duda <pdk@semihalf.com> Change-Id: I2d9f3aa3738d28a1c2eac411f24ca4ce03e8b3d0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3477954 Reviewed-by: Tom Hughes <tomhughes@chromium.org> Reviewed-by: Bobby Casey <bobbycasey@google.com> Tested-by: Patryk Duda <patrykd@google.com> Commit-Queue: Patryk Duda <patrykd@google.com>
* cortex-m: Introduce FPU interrupt handlerPatryk Duda2022-02-032-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When performing some illegal operation or when result can't be represented using floats, the FPU will assert an interrupt which should be handled. After this change, the EC will inform about type of FPU exception and address where it ocurred. To reduce overhead, the FPU handler will only copy necessary information, schedule fpu_warn() function and clear FPU flags. Message is printed from fpu_warn() which is deferred function (it's called from HOOK task context). Please note that: - FPU interrupt is not asserted immediately after problem occurred, but with noticeable delay, so PC and LR might not be correct. - FPU interrupt will be never triggered on STM32H7 (see errata ES0392 Rev 8, 2.1.2 Cortex-M7 FPU interrupt not present on NVIC line 81). BUG=b:215606535 BRANCH=none TEST=./test/run_device_tests.py --board bloonchipper --tests cortexm_fpu TEST=./test/run_device_tests.py --board dartmonkey --tests cortexm_fpu Signed-off-by: Patryk Duda <pdk@semihalf.com> Change-Id: Ib6f6c974082affc35302a822f0beea176e204206 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3412259 Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bobby Casey <bobbycasey@google.com> Reviewed-by: Tom Hughes <tomhughes@chromium.org> Commit-Queue: Patryk Duda <patrykd@google.com>
* COIL: Update SPI references to controller/peripheralKeith Short2021-11-231-2/+4
| | | | | | | | | | | | | | | Update SPI references to controller/peripheral for inclusivity. BUG=b:163885307 BRANCH=none TEST=compare_build.sh Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I19b02fb949aad9ade569c4658a904e9ce59e27c3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3066272 Reviewed-by: Tom Hughes <tomhughes@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Tested-by: Tom Hughes <tomhughes@chromium.org>
* nocturne_fp/board: Define CONFIG_PANIC_STRIP_GPR in configPatryk Duda2021-09-161-0/+1
| | | | | | | | | | | | | | | | | | | | | | Fingerprint MCU is processing sensitive data (fingerprints, keys). Defining this option will prevent leaking the data in General Purpose Registers. BUG=b:193408648 BRANCH=none TEST=`make BOARD=dartmonkey`. Flash image on icetower. Trigger panic using 'crash' command. After reboot, use 'panicinfo' to check what was saved. When CPU exception occurred registers R0-R12 should be set to 0. In case of software panic, R4 and R5 can contain panic reason and additional information. Signed-off-by: Patryk Duda <pdk@semihalf.com> Change-Id: I3278e985300a6e1a336b407d507820f5cf963c9b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3114646 Commit-Queue: Marcin Wojtas <mwojtas@google.com> Reviewed-by: Craig Hesling <hesling@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* dartmonkey: Moved unused SLP_ALT_DEV_L to RWCraig Hesling2021-08-092-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BRANCH=none BUG=b:178746753 TEST=make -j tests-dartmonkey TEST=# Connect servo_micro and J-Link to an icetower board. make proj-dartmonkey -j sudo servod --board=icetower ./util/flash_jlink.py --board=dartmonkey --image=./build/dartmonkey/ec.bin # Unplug J-Link dut-control fpmcu_slp:off fpmcu_slp_alt:off dut-control pp3300_dx_mcu_mw # Should be more than 40mw dut-control fpmcu_slp:on fpmcu_slp_alt:off dut-control pp3300_dx_mcu_mw # Should be less than 10mw dut-control fpmcu_slp:off fpmcu_slp_alt:on dut-control pp3300_dx_mcu_mw # Should be less than 10mw dut-control fpmcu_slp:on fpmcu_slp_alt:on dut-control pp3300_dx_mcu_mw # Should be less than 10mw dut-control fpmcu_slp:off fpmcu_slp_alt:off minicom -D$(dut-control -o raw_fpmcu_console_uart_pty) > reboot ro # Ctrl-A Q # RO no longer enters low-power-idle. dut-control fpmcu_slp:off fpmcu_slp_alt:off dut-control pp3300_dx_mcu_mw # Should be more than 40mw dut-control fpmcu_slp:on fpmcu_slp_alt:off dut-control pp3300_dx_mcu_mw # Should be more than 40mw dut-control fpmcu_slp:off fpmcu_slp_alt:on dut-control pp3300_dx_mcu_mw # Should be more than 40mw dut-control fpmcu_slp:on fpmcu_slp_alt:on dut-control pp3300_dx_mcu_mw # Should be more than 40mw dut-control fpmcu_slp:off fpmcu_slp_alt:off minicom -D$(dut-control -o raw_fpmcu_console_uart_pty) > gpioget # Check that SLP_ALT_DEV_L is missing. # Ctrl-A Q Signed-off-by: Craig Hesling <hesling@chromium.org> Change-Id: I677838148f5aeff6d2f613272e29dc8accb0417e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3078826 Reviewed-by: Josie Nordrum <josienordrum@google.com>
* dartmonkey/bloonchipper: Disable low-power-idle in ROCraig Hesling2021-08-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In https://crrev.com/c/2657778 and https://crrev.com/c/2673909 sleeping was explicitly forbidden in RO, in addition to moving the sleep lines explicitly to RW. CLs https://crrev.com/c/3012241 and https://crrev.com/c/3052750 bring the sleep lines back to RO (and RW), since they serve to gate host interface communications when the AP is sleeping. This CL restores the part of the original two refactoring CLs that blocks the more complicated low power sleeping. BRANCH=none BUG=b:178746753 TkEST=make -j tests-dartmonkey tests-bloonchipper TEST=# Connect servo_micro and J-Link to an icetower board. make proj-dartmonkey -j sudo servod --board=icetower ./util/flash_jlink.py --board=dartmonkey --image=./build/dartmonkey/ec.bin # Unplug J-Link dut-control fpmcu_slp:off fpmcu_slp_alt:off dut-control pp3300_dx_mcu_mw # Should be more than 40mw dut-control fpmcu_slp:on fpmcu_slp_alt:off dut-control pp3300_dx_mcu_mw # Should be less than 10mw dut-control fpmcu_slp:off fpmcu_slp_alt:on dut-control pp3300_dx_mcu_mw # Should be less than 10mw dut-control fpmcu_slp:on fpmcu_slp_alt:on dut-control pp3300_dx_mcu_mw # Should be less than 10mw dut-control fpmcu_slp:off fpmcu_slp_alt:off minicom -D$(dut-control -o raw_fpmcu_console_uart_pty) > reboot ro # Ctrl-A Q # RO no longer enters low-power-idle. dut-control fpmcu_slp:off fpmcu_slp_alt:off dut-control pp3300_dx_mcu_mw # Should be more than 40mw dut-control fpmcu_slp:on fpmcu_slp_alt:off dut-control pp3300_dx_mcu_mw # Should be more than 40mw dut-control fpmcu_slp:off fpmcu_slp_alt:on dut-control pp3300_dx_mcu_mw # Should be more than 40mw dut-control fpmcu_slp:on fpmcu_slp_alt:on dut-control pp3300_dx_mcu_mw # Should be more than 40mw dut-control fpmcu_slp:off fpmcu_slp_alt:off minicom -D$(dut-control -o raw_fpmcu_console_uart_pty) > reboot > fpenroll > fpmatch # Ctrl-A Q TEST=# Connect servo_micro to a dragonclaw board. make proj-bloonchipper -j sudo servod --board=dragonclaw ./util/flash_ec --board=bloonchipper dut-control fpmcu_slp:off fpmcu_slp_alt:off dut-control pp3300_dx_mcu_mw # Should be around 20mw dut-control fpmcu_slp:on fpmcu_slp_alt:off dut-control pp3300_dx_mcu_mw # Should be less the 5mw dut-control fpmcu_slp:off fpmcu_slp_alt:on dut-control pp3300_dx_mcu_mw # Should be less the 5mw dut-control fpmcu_slp:on fpmcu_slp_alt:on dut-control pp3300_dx_mcu_mw # Should be less the 5mw dut-control fpmcu_slp:off fpmcu_slp_alt:off minicom -D$(dut-control -o raw_fpmcu_console_uart_pty) > reboot ro # Ctrl-A Q # RO no longer enters low-power-idle. dut-control fpmcu_slp:off fpmcu_slp_alt:off dut-control pp3300_dx_mcu_mw # Should be around 20mw dut-control fpmcu_slp:on fpmcu_slp_alt:off dut-control pp3300_dx_mcu_mw # Should be around 20mw dut-control fpmcu_slp:off fpmcu_slp_alt:on dut-control pp3300_dx_mcu_mw # Should be around 20mw dut-control fpmcu_slp:on fpmcu_slp_alt:on dut-control pp3300_dx_mcu_mw # Should be around 20mw dut-control fpmcu_slp:off fpmcu_slp_alt:off minicom -D$(dut-control -o raw_fpmcu_console_uart_pty) > reboot > fpenroll > fpmatch # Ctrl-A Q Signed-off-by: Craig Hesling <hesling@chromium.org> Change-Id: Iee0cad2dc46aaf9a4499637fce0d446530ff49b2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3078825 Reviewed-by: Josie Nordrum <josienordrum@google.com>
* dartmonkey: Reintroduce sleep lines to ROCraig Hesling2021-08-098-45/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change https://crrev.com/c/2657778 removed the sleep lines from RO in an effort to minimize the RO complexity. Most notably, this isolated the deep-sleep/low-power-idle logic to RW only. Unfortunately, the sleep lines also control whether the SPI host interface is listening, which allows it to ignore spurious communication. It seems safer to reinstate the the sleep line with low power idle active and directly disable CONFIG_LOW_POWER_IDLE in subsequent CL. We reinstate the sleep line gpio logic from the following: crrev.com/c1b5095aa8404709bb447bd7a58f262d7d471a01/board/nocturne_fp/board.c This is the parent commit to the CL that refactors the sleep lines. Considering dartmonkey has a sleep line modification for dev boards, we keep this in RW only. Since nearly all functionality would need to be conditioned and communicated between RO and RW, I decided to just create a clean break between RO and RW board init. The original board.c no longer spans both RO and RW, there are exclusive board_ro.c and board_rw.c files. BRANCH=none BUG=b:178746753, b:195718112 TEST=make -j tests-dartmonkey TEST=# Connect servo_micro and J-Link to an icetower board. make proj-dartmonkey -j sudo servod --board=icetower ./util/flash_jlink.py --board=dartmonkey --image=./build/dartmonkey/ec.bin # Unplug J-Link and unplug/replug servo connector. dut-control fpmcu_slp:off fpmcu_slp_alt:off dut-control pp3300_dx_mcu_mw # Should be more than 40mw dut-control fpmcu_slp:on fpmcu_slp_alt:off dut-control pp3300_dx_mcu_mw # Should be less than 10mw dut-control fpmcu_slp:off fpmcu_slp_alt:on dut-control pp3300_dx_mcu_mw # Should be less than 10mw dut-control fpmcu_slp:on fpmcu_slp_alt:on dut-control pp3300_dx_mcu_mw # Should be less than 10mw dut-control fpmcu_slp:off fpmcu_slp_alt:off minicom -D$(dut-control -o raw_fpmcu_console_uart_pty) > reboot ro # Ctrl-A Q # RO does not have the code to adjust to SLP_ALT_DEV_L, thus # it will use SLP_ALT_L, which is 0. This means it will always # think sleep is asserted. dut-control fpmcu_slp:off fpmcu_slp_alt:off dut-control pp3300_dx_mcu_mw # Should be less than 10mw minicom -D$(dut-control -o raw_fpmcu_console_uart_pty) > gpioget # Should see SLP_L=1, SLP_ALT_L=0, and SLP_ALT_DEV_L=1 > reboot > fpenroll > fpmatch # Ctrl-A Q Signed-off-by: Craig Hesling <hesling@chromium.org> Change-Id: I6183a4afa61817c552da5272f7d66a5c58d96f66 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3078824 Reviewed-by: Josie Nordrum <josienordrum@google.com>
* Revert "dartmonkey: Reintroduce sleep lines to RO"Hsu Wei-Cheng2021-08-068-98/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 565833feea83ca23d0c16a1c01bbc4a3c42d02c6. Reason for revert: It may broke CQ BUG=b:195718112 Original change's description: > dartmonkey: Reintroduce sleep lines to RO > > Change https://crrev.com/c/2657778 removed the sleep lines from RO > in an effort to minimize the RO complexity. > Most notably, this isolated the deep-sleep/low-power-idle > logic to RW only. > > Unfortunately, the sleep lines also control whether the SPI host interface > is listening, which allows it to ignore spurious communication. > > It seems safer to reinstate the the sleep line with low power idle > active and directly disable CONFIG_LOW_POWER_IDLE in subsequent CL. > > We reinstate the sleep line gpio logic from the following: > crrev.com/c1b5095aa8404709bb447bd7a58f262d7d471a01/board/nocturne_fp/board.c > This is the parent commit to the CL that refactors the sleep lines. > > Considering dartmonkey has a sleep line modification for dev boards, > we keep this in RW only. Since nearly all functionality would need > to be conditioned and communicated between RO and RW, I decided to > just create a clean break between RO and RW board init. The original > board.c no longer spans both RO and RW, there are exclusive board_ro.c > and board_rw.c files. > > BRANCH=none > BUG=b:178746753 > TEST=# Connect servo_micro and J-Link to an icetower board. > make proj-dartmonkey -j > sudo servod --board=icetower > ./util/flash_jlink.py --board=dartmonkey --image=./build/dartmonkey/ec.bin > # Unplug J-Link and unplug/replug servo connector. > > dut-control fpmcu_slp:off fpmcu_slp_alt:off > dut-control pp3300_dx_mcu_mw # Should be more than 40mw > dut-control fpmcu_slp:on fpmcu_slp_alt:off > dut-control pp3300_dx_mcu_mw # Should be less than 10mw > dut-control fpmcu_slp:off fpmcu_slp_alt:on > dut-control pp3300_dx_mcu_mw # Should be less than 10mw > dut-control fpmcu_slp:on fpmcu_slp_alt:on > dut-control pp3300_dx_mcu_mw # Should be less than 10mw > dut-control fpmcu_slp:off fpmcu_slp_alt:off > > minicom -D$(dut-control -o raw_fpmcu_console_uart_pty) > > reboot ro > # Ctrl-A Q > > # RO does not have the code to adjust to SLP_ALT_DEV_L, thus > # it will use SLP_ALT_L, which is 0. This means it will always > # think sleep is asserted. > dut-control fpmcu_slp:off fpmcu_slp_alt:off > dut-control pp3300_dx_mcu_mw # Should be less than 10mw > minicom -D$(dut-control -o raw_fpmcu_console_uart_pty) > > gpioget > # Should see SLP_L=1, SLP_ALT_L=0, and SLP_ALT_DEV_L=1 > > reboot > > fpenroll > > fpmatch > # Ctrl-A Q > > Signed-off-by: Craig Hesling <hesling@chromium.org> > Change-Id: Ibb2c8052bc4fb776c5e1c172eeb1f3faf356a147 > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3052750 > Commit-Queue: Josie Nordrum <josienordrum@google.com> > Reviewed-by: Josie Nordrum <josienordrum@google.com> Bug: b:178746753 Change-Id: I923d515ec8d10e9a2f90b87966e83b2a4190b931 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3077588 Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Owners-Override: Hsu Wei-Cheng <mojahsu@chromium.org> Auto-Submit: Hsu Wei-Cheng <mojahsu@chromium.org>
* Revert "dartmonkey/bloonchipper: Disable low-power-idle in RO"Hsu Wei-Cheng2021-08-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 6c3977530eaf07da7c3568cedc3cacde2f3d9eaa. Reason for revert: It may broke CQ BUG=b:195718112 Original change's description: > dartmonkey/bloonchipper: Disable low-power-idle in RO > > In https://crrev.com/c/2657778 and https://crrev.com/c/2673909 > sleeping was explicitly forbidden in RO, in addition to moving > the sleep lines explicitly to RW. > > CLs https://crrev.com/c/3012241 and https://crrev.com/c/3052750 > bring the sleep lines back to RO (and RW), since they serve to > gate host interface communications when the AP is sleeping. > > This CL restores the part of the original two refactoring CLs that > blocks the more complicated low power sleeping. > > BRANCH=none > BUG=b:178746753 > TEST=# Connect servo_micro and J-Link to an icetower board. > make proj-dartmonkey -j > sudo servod --board=icetower > ./util/flash_jlink.py --board=dartmonkey --image=./build/dartmonkey/ec.bin > # Unplug J-Link > > dut-control fpmcu_slp:off fpmcu_slp_alt:off > dut-control pp3300_dx_mcu_mw # Should be more than 40mw > dut-control fpmcu_slp:on fpmcu_slp_alt:off > dut-control pp3300_dx_mcu_mw # Should be less than 10mw > dut-control fpmcu_slp:off fpmcu_slp_alt:on > dut-control pp3300_dx_mcu_mw # Should be less than 10mw > dut-control fpmcu_slp:on fpmcu_slp_alt:on > dut-control pp3300_dx_mcu_mw # Should be less than 10mw > dut-control fpmcu_slp:off fpmcu_slp_alt:off > > minicom -D$(dut-control -o raw_fpmcu_console_uart_pty) > > reboot ro > # Ctrl-A Q > > # RO no longer enters low-power-idle. > dut-control fpmcu_slp:off fpmcu_slp_alt:off > dut-control pp3300_dx_mcu_mw # Should be more than 40mw > dut-control fpmcu_slp:on fpmcu_slp_alt:off > dut-control pp3300_dx_mcu_mw # Should be more than 40mw > dut-control fpmcu_slp:off fpmcu_slp_alt:on > dut-control pp3300_dx_mcu_mw # Should be more than 40mw > dut-control fpmcu_slp:on fpmcu_slp_alt:on > dut-control pp3300_dx_mcu_mw # Should be more than 40mw > dut-control fpmcu_slp:off fpmcu_slp_alt:off > > minicom -D$(dut-control -o raw_fpmcu_console_uart_pty) > > reboot > > fpenroll > > fpmatch > # Ctrl-A Q > TEST=# Connect servo_micro to a dragonclaw board. > make proj-bloonchipper -j > sudo servod --board=dragonclaw > ./util/flash_ec --board=bloonchipper > > dut-control fpmcu_slp:off fpmcu_slp_alt:off > dut-control pp3300_dx_mcu_mw # Should be around 20mw > dut-control fpmcu_slp:on fpmcu_slp_alt:off > dut-control pp3300_dx_mcu_mw # Should be less the 5mw > dut-control fpmcu_slp:off fpmcu_slp_alt:on > dut-control pp3300_dx_mcu_mw # Should be less the 5mw > dut-control fpmcu_slp:on fpmcu_slp_alt:on > dut-control pp3300_dx_mcu_mw # Should be less the 5mw > dut-control fpmcu_slp:off fpmcu_slp_alt:off > > minicom -D$(dut-control -o raw_fpmcu_console_uart_pty) > > reboot ro > # Ctrl-A Q > > # RO no longer enters low-power-idle. > dut-control fpmcu_slp:off fpmcu_slp_alt:off > dut-control pp3300_dx_mcu_mw # Should be around 20mw > dut-control fpmcu_slp:on fpmcu_slp_alt:off > dut-control pp3300_dx_mcu_mw # Should be around 20mw > dut-control fpmcu_slp:off fpmcu_slp_alt:on > dut-control pp3300_dx_mcu_mw # Should be around 20mw > dut-control fpmcu_slp:on fpmcu_slp_alt:on > dut-control pp3300_dx_mcu_mw # Should be around 20mw > dut-control fpmcu_slp:off fpmcu_slp_alt:off > > minicom -D$(dut-control -o raw_fpmcu_console_uart_pty) > > reboot > > fpenroll > > fpmatch > # Ctrl-A Q > > Signed-off-by: Craig Hesling <hesling@chromium.org> > Change-Id: I7654ec6aa5f56cb0ddfd27784db61784aad9e10f > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3052754 > Commit-Queue: Josie Nordrum <josienordrum@google.com> > Reviewed-by: Josie Nordrum <josienordrum@google.com> Bug: b:178746753 Change-Id: Ibe946f73601b52eed38b0f7a9093b942f251a90e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3077587 Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Owners-Override: Hsu Wei-Cheng <mojahsu@chromium.org> Auto-Submit: Hsu Wei-Cheng <mojahsu@chromium.org>
* Revert "dartmonkey: Moved unused SLP_ALT_DEV_L to RW"Hsu Wei-Cheng2021-08-062-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 69d96e325f9f9060e64fece1e04cf2963ccef3ab. Reason for revert: It may broke CQ BUG=b:195718112 Original change's description: > dartmonkey: Moved unused SLP_ALT_DEV_L to RW > > BRANCH=none > BUG=b:178746753 > TEST=# Connect servo_micro and J-Link to an icetower board. > make proj-dartmonkey -j > sudo servod --board=icetower > ./util/flash_jlink.py --board=dartmonkey --image=./build/dartmonkey/ec.bin > # Unplug J-Link > > dut-control fpmcu_slp:off fpmcu_slp_alt:off > dut-control pp3300_dx_mcu_mw # Should be more than 40mw > dut-control fpmcu_slp:on fpmcu_slp_alt:off > dut-control pp3300_dx_mcu_mw # Should be less than 10mw > dut-control fpmcu_slp:off fpmcu_slp_alt:on > dut-control pp3300_dx_mcu_mw # Should be less than 10mw > dut-control fpmcu_slp:on fpmcu_slp_alt:on > dut-control pp3300_dx_mcu_mw # Should be less than 10mw > dut-control fpmcu_slp:off fpmcu_slp_alt:off > > minicom -D$(dut-control -o raw_fpmcu_console_uart_pty) > > reboot ro > # Ctrl-A Q > > # RO no longer enters low-power-idle. > dut-control fpmcu_slp:off fpmcu_slp_alt:off > dut-control pp3300_dx_mcu_mw # Should be more than 40mw > dut-control fpmcu_slp:on fpmcu_slp_alt:off > dut-control pp3300_dx_mcu_mw # Should be more than 40mw > dut-control fpmcu_slp:off fpmcu_slp_alt:on > dut-control pp3300_dx_mcu_mw # Should be more than 40mw > dut-control fpmcu_slp:on fpmcu_slp_alt:on > dut-control pp3300_dx_mcu_mw # Should be more than 40mw > dut-control fpmcu_slp:off fpmcu_slp_alt:off > > minicom -D$(dut-control -o raw_fpmcu_console_uart_pty) > > gpioget # Check that SLP_ALT_DEV_L is missing. > # Ctrl-A Q > > Signed-off-by: Craig Hesling <hesling@chromium.org> > Change-Id: I51057d710ef0a884133e3dab03ee0bac2e74c3b8 > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3064768 > Commit-Queue: Josie Nordrum <josienordrum@google.com> > Reviewed-by: Josie Nordrum <josienordrum@google.com> Bug: b:178746753 Change-Id: I0c3ed1420696c2b07c25ebc254ab80c4e12b4e79 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3077586 Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: Hsu Wei-Cheng <mojahsu@chromium.org> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Owners-Override: Hsu Wei-Cheng <mojahsu@chromium.org> Auto-Submit: Hsu Wei-Cheng <mojahsu@chromium.org>
* dartmonkey: Moved unused SLP_ALT_DEV_L to RWCraig Hesling2021-08-052-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BRANCH=none BUG=b:178746753 TEST=# Connect servo_micro and J-Link to an icetower board. make proj-dartmonkey -j sudo servod --board=icetower ./util/flash_jlink.py --board=dartmonkey --image=./build/dartmonkey/ec.bin # Unplug J-Link dut-control fpmcu_slp:off fpmcu_slp_alt:off dut-control pp3300_dx_mcu_mw # Should be more than 40mw dut-control fpmcu_slp:on fpmcu_slp_alt:off dut-control pp3300_dx_mcu_mw # Should be less than 10mw dut-control fpmcu_slp:off fpmcu_slp_alt:on dut-control pp3300_dx_mcu_mw # Should be less than 10mw dut-control fpmcu_slp:on fpmcu_slp_alt:on dut-control pp3300_dx_mcu_mw # Should be less than 10mw dut-control fpmcu_slp:off fpmcu_slp_alt:off minicom -D$(dut-control -o raw_fpmcu_console_uart_pty) > reboot ro # Ctrl-A Q # RO no longer enters low-power-idle. dut-control fpmcu_slp:off fpmcu_slp_alt:off dut-control pp3300_dx_mcu_mw # Should be more than 40mw dut-control fpmcu_slp:on fpmcu_slp_alt:off dut-control pp3300_dx_mcu_mw # Should be more than 40mw dut-control fpmcu_slp:off fpmcu_slp_alt:on dut-control pp3300_dx_mcu_mw # Should be more than 40mw dut-control fpmcu_slp:on fpmcu_slp_alt:on dut-control pp3300_dx_mcu_mw # Should be more than 40mw dut-control fpmcu_slp:off fpmcu_slp_alt:off minicom -D$(dut-control -o raw_fpmcu_console_uart_pty) > gpioget # Check that SLP_ALT_DEV_L is missing. # Ctrl-A Q Signed-off-by: Craig Hesling <hesling@chromium.org> Change-Id: I51057d710ef0a884133e3dab03ee0bac2e74c3b8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3064768 Commit-Queue: Josie Nordrum <josienordrum@google.com> Reviewed-by: Josie Nordrum <josienordrum@google.com>
* dartmonkey/bloonchipper: Disable low-power-idle in ROCraig Hesling2021-08-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In https://crrev.com/c/2657778 and https://crrev.com/c/2673909 sleeping was explicitly forbidden in RO, in addition to moving the sleep lines explicitly to RW. CLs https://crrev.com/c/3012241 and https://crrev.com/c/3052750 bring the sleep lines back to RO (and RW), since they serve to gate host interface communications when the AP is sleeping. This CL restores the part of the original two refactoring CLs that blocks the more complicated low power sleeping. BRANCH=none BUG=b:178746753 TEST=# Connect servo_micro and J-Link to an icetower board. make proj-dartmonkey -j sudo servod --board=icetower ./util/flash_jlink.py --board=dartmonkey --image=./build/dartmonkey/ec.bin # Unplug J-Link dut-control fpmcu_slp:off fpmcu_slp_alt:off dut-control pp3300_dx_mcu_mw # Should be more than 40mw dut-control fpmcu_slp:on fpmcu_slp_alt:off dut-control pp3300_dx_mcu_mw # Should be less than 10mw dut-control fpmcu_slp:off fpmcu_slp_alt:on dut-control pp3300_dx_mcu_mw # Should be less than 10mw dut-control fpmcu_slp:on fpmcu_slp_alt:on dut-control pp3300_dx_mcu_mw # Should be less than 10mw dut-control fpmcu_slp:off fpmcu_slp_alt:off minicom -D$(dut-control -o raw_fpmcu_console_uart_pty) > reboot ro # Ctrl-A Q # RO no longer enters low-power-idle. dut-control fpmcu_slp:off fpmcu_slp_alt:off dut-control pp3300_dx_mcu_mw # Should be more than 40mw dut-control fpmcu_slp:on fpmcu_slp_alt:off dut-control pp3300_dx_mcu_mw # Should be more than 40mw dut-control fpmcu_slp:off fpmcu_slp_alt:on dut-control pp3300_dx_mcu_mw # Should be more than 40mw dut-control fpmcu_slp:on fpmcu_slp_alt:on dut-control pp3300_dx_mcu_mw # Should be more than 40mw dut-control fpmcu_slp:off fpmcu_slp_alt:off minicom -D$(dut-control -o raw_fpmcu_console_uart_pty) > reboot > fpenroll > fpmatch # Ctrl-A Q TEST=# Connect servo_micro to a dragonclaw board. make proj-bloonchipper -j sudo servod --board=dragonclaw ./util/flash_ec --board=bloonchipper dut-control fpmcu_slp:off fpmcu_slp_alt:off dut-control pp3300_dx_mcu_mw # Should be around 20mw dut-control fpmcu_slp:on fpmcu_slp_alt:off dut-control pp3300_dx_mcu_mw # Should be less the 5mw dut-control fpmcu_slp:off fpmcu_slp_alt:on dut-control pp3300_dx_mcu_mw # Should be less the 5mw dut-control fpmcu_slp:on fpmcu_slp_alt:on dut-control pp3300_dx_mcu_mw # Should be less the 5mw dut-control fpmcu_slp:off fpmcu_slp_alt:off minicom -D$(dut-control -o raw_fpmcu_console_uart_pty) > reboot ro # Ctrl-A Q # RO no longer enters low-power-idle. dut-control fpmcu_slp:off fpmcu_slp_alt:off dut-control pp3300_dx_mcu_mw # Should be around 20mw dut-control fpmcu_slp:on fpmcu_slp_alt:off dut-control pp3300_dx_mcu_mw # Should be around 20mw dut-control fpmcu_slp:off fpmcu_slp_alt:on dut-control pp3300_dx_mcu_mw # Should be around 20mw dut-control fpmcu_slp:on fpmcu_slp_alt:on dut-control pp3300_dx_mcu_mw # Should be around 20mw dut-control fpmcu_slp:off fpmcu_slp_alt:off minicom -D$(dut-control -o raw_fpmcu_console_uart_pty) > reboot > fpenroll > fpmatch # Ctrl-A Q Signed-off-by: Craig Hesling <hesling@chromium.org> Change-Id: I7654ec6aa5f56cb0ddfd27784db61784aad9e10f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3052754 Commit-Queue: Josie Nordrum <josienordrum@google.com> Reviewed-by: Josie Nordrum <josienordrum@google.com>
* dartmonkey: Reintroduce sleep lines to ROCraig Hesling2021-08-058-45/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change https://crrev.com/c/2657778 removed the sleep lines from RO in an effort to minimize the RO complexity. Most notably, this isolated the deep-sleep/low-power-idle logic to RW only. Unfortunately, the sleep lines also control whether the SPI host interface is listening, which allows it to ignore spurious communication. It seems safer to reinstate the the sleep line with low power idle active and directly disable CONFIG_LOW_POWER_IDLE in subsequent CL. We reinstate the sleep line gpio logic from the following: crrev.com/c1b5095aa8404709bb447bd7a58f262d7d471a01/board/nocturne_fp/board.c This is the parent commit to the CL that refactors the sleep lines. Considering dartmonkey has a sleep line modification for dev boards, we keep this in RW only. Since nearly all functionality would need to be conditioned and communicated between RO and RW, I decided to just create a clean break between RO and RW board init. The original board.c no longer spans both RO and RW, there are exclusive board_ro.c and board_rw.c files. BRANCH=none BUG=b:178746753 TEST=# Connect servo_micro and J-Link to an icetower board. make proj-dartmonkey -j sudo servod --board=icetower ./util/flash_jlink.py --board=dartmonkey --image=./build/dartmonkey/ec.bin # Unplug J-Link and unplug/replug servo connector. dut-control fpmcu_slp:off fpmcu_slp_alt:off dut-control pp3300_dx_mcu_mw # Should be more than 40mw dut-control fpmcu_slp:on fpmcu_slp_alt:off dut-control pp3300_dx_mcu_mw # Should be less than 10mw dut-control fpmcu_slp:off fpmcu_slp_alt:on dut-control pp3300_dx_mcu_mw # Should be less than 10mw dut-control fpmcu_slp:on fpmcu_slp_alt:on dut-control pp3300_dx_mcu_mw # Should be less than 10mw dut-control fpmcu_slp:off fpmcu_slp_alt:off minicom -D$(dut-control -o raw_fpmcu_console_uart_pty) > reboot ro # Ctrl-A Q # RO does not have the code to adjust to SLP_ALT_DEV_L, thus # it will use SLP_ALT_L, which is 0. This means it will always # think sleep is asserted. dut-control fpmcu_slp:off fpmcu_slp_alt:off dut-control pp3300_dx_mcu_mw # Should be less than 10mw minicom -D$(dut-control -o raw_fpmcu_console_uart_pty) > gpioget # Should see SLP_L=1, SLP_ALT_L=0, and SLP_ALT_DEV_L=1 > reboot > fpenroll > fpmatch # Ctrl-A Q Signed-off-by: Craig Hesling <hesling@chromium.org> Change-Id: Ibb2c8052bc4fb776c5e1c172eeb1f3faf356a147 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3052750 Commit-Queue: Josie Nordrum <josienordrum@google.com> Reviewed-by: Josie Nordrum <josienordrum@google.com>
* Revert "Dartmonkey: Implement get_fp_transport_type"Craig Hesling2021-08-043-21/+2
| | | | | | | | | | | | | | | | | This reverts commit b4125247f556650771bf6c92ccf612de382ad221. The commit being reverted introduces an issue for legacy dartmonkey devices, like nami. BRANCH=none BUG=b:195235710 TEST=# Flash to bard (nami) device and check that cros-ec can bind. # See bug for more details. Signed-off-by: Craig Hesling <hesling@chromium.org> Change-Id: I4aa6d0579ebb587f765cc1e4ab255a4a541e2240 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3066145 Reviewed-by: Jora Jacobi <jora@google.com>
* nocturne_fp/board_rw: Explicitly reset FP_RST_ODL to default on RW initPatryk Duda2021-07-161-0/+9
| | | | | | | | | | | | | | | | | | | | | | | FP_RST_ODL pin is only defined in gpio_rw.inc, so this pin won't be initialized to 1 by RO. Also, RW won't set this pin because sysjump to RW is a warm reset actually and we are not setting GPIO pins to their defaults after the warm reset to avoid undesired effects (see gpio_pre_init() in chip/stm32/gpio.c). As a result fpsensor_hw hardware unit test was not working, because FPMCU was keeping sensor in reset. Build with FP private driver is working because the driver performs sensor reset during initialization. BUG=b:170432597 BRANCH=none TEST=`make BOARD=dartmonkey` Signed-off-by: Patryk Duda <pdk@semihalf.com> Change-Id: Ia62340585da915e7d9f368107d57d3fb74cb831e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3017988 Reviewed-by: Craig Hesling <hesling@chromium.org>
* Dartmonkey: Implement get_fp_transport_typeBhanu Prakash Maiya2021-07-143-2/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch reads GPIO_TRANSPORT_SEL in get_fp_transport_type() to get selected transport on board BRANCH=none BUG=b:192713372 TEST=1. make BOARD=nocturne_fp -j 2. On Icetower check logs 3. fpmcu console logs: ``` [1.099996 UART initialized after sysjump] [Image: RW, dartmonkey_v2.0.9475+375c295d0 cryptoc:v1.9308_26_0.9-3830fff private:v0.0.123-fd096e4 fpc:v0.0.119-cd5a676 2021-07-06 13:03:07 bhanumaiya@bhanumaiya2] [Reset cause: reset-pin power-on soft sysjump ap-off] [1.100221 Inits done] [1.100278 WARNING: Reset flags power-on + ap-off were forged.] [1.100380 TRANSPORT_SEL: UART] [1.100446 TRANSPORT_SEL: UART] ``` Signed-off-by: Bhanu Prakash Maiya <bhanumaiya@chromium.org> Change-Id: I8ed933ce7a4c8b922d9c2da75b32ba4838e10e54 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3004293 Auto-Submit: Bhanu Prakash Maiya <bhanumaiya@google.com> Reviewed-by: Jora Jacobi <jora@google.com> Reviewed-by: Craig Hesling <hesling@chromium.org> Reviewed-by: Bhanu Prakash Maiya <bhanumaiya@google.com> Commit-Queue: Bhanu Prakash Maiya <bhanumaiya@google.com> Tested-by: Bhanu Prakash Maiya <bhanumaiya@google.com>
* COIL: Rename MODULE_SPI_MASTER to MODULE_SPI_CONTROLLERCaveh Jalali2021-06-032-2/+2
| | | | | | | | | | | | | | | | This renames the MODULE_SPI_MASTER to MODULE_SPI_CONTROLLER. BRANCH=none BUG=b:181607131 TEST=make buildall passes; "compare_build.sh -b all" shows no difference Change-Id: I4d33f57fd82c5b57f111c12387113dc82cebe60b Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2932466 Reviewed-by: Craig Hesling <hesling@chromium.org> Reviewed-by: Harry Cutts <hcutts@chromium.org> Commit-Queue: Craig Hesling <hesling@chromium.org>
* COIL: Rename CONFIG_SPI_MASTER to CONFIG_SPI_CONTROLLERCaveh Jalali2021-06-031-1/+1
| | | | | | | | | | | | | | | | This replaces the CONFIG_SPI_MASTERR config option with CONFIG_SPI_CONTROLLER. BRANCH=none BUG=b:181607131 TEST=make buildall passes; "compare_build.sh -b all" shows no difference Change-Id: I3c921085179294765baadf7074652978fe04a4ed Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2932465 Reviewed-by: Craig Hesling <hesling@chromium.org> Commit-Queue: Craig Hesling <hesling@chromium.org>
* config: Populate CONFIG_SUPPRESSED_HOST_COMMANDSGwendal Grignou2021-05-191-2/+0
| | | | | | | | | | | | | | | | | | | | | Commands that are send peridically or in high number are not reported on the console through CONFIG_SUPPRESSED_HOST_COMMANDS variable. Use the same set of commands throughout to avoid misses like newer command EC_CMD_GET_UPTIME_INFO. BUG=none BRANCH=none TEST=buildall Signed-off-by: Gwendal Grignou <gwendal@google.com> Change-Id: I0041576538a8cc659c262118b1503777b9ea8578 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2851452 Reviewed-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Craig Hesling <hesling@chromium.org> Tested-by: Gwendal Grignou <gwendal@chromium.org> Commit-Queue: Gwendal Grignou <gwendal@chromium.org>
* dartmonkey: Check if AP is on when processing HOOK_INIT hooksPatryk Duda2021-05-171-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Call ap_deferred() function directly (not as deferred function) from board_init_rw(). This change causes CS pin interrupt to be enabled while running board_init() init hook, just after SPI initialization. It removes 43ms window when SPI is initialized but we are not able to communicate because interrupt on CS line is not enabled. This change only affects RW firmware. FPMCU log without this change: [Reset cause: reset-pin soft sysjump] [1.322620 Inits done] [1.322665 hook_task: running HOOK_INIT] [1.322713 hook notify 0] [1.322754 spi_init: init] [1.322794 spi_init: SPI initialized] [1.322846 board_init: init] [1.322901 FP_SPI_SEL: DEVELOPMENT] [1.322954 TRANSPORT_SEL: SPI] [1.323009 hook_task: enabling all other tasks] Console is enabled; type HELP for help. > [1.323106 event set 0x0000000000002000] [1.323176 hostcmd init 0x0000000000002000] [1.323238 FP_SENSOR_SEL: FPC] FPC libfpsensor.a v0.2.0.064 [1.365068 hook call deferred 0x8100365] [1.365132 ap_deferred: SLP_L is 1] [1.365180 ap_deferred: SLP_ALT_L is 1] [1.365232 hook notify 6] [1.365271 spi_chipset_startup: enabling interrupt] After main(), only hook task is marked as ready, so we are switching to it and start executing HOOK_INIT hooks (spi_init() and board_init() are called). SPI initialization is performed, but CS interrupt is still not enabled (spi_init() checks if chipset is on). The interrupt is enabled on HOOK_CHIPSET_RESUME. For RW side HOOK_CHIPSET_RESUME is emitted when SLP_L and SLP_ALT_L are set to 1 (see ap_deferred()). ap_deferred() is a deferred function so it is called from hook task context. It is scheduled always in board_init_rw() or in slp_event() when SLP_L and SLP_ALT_L changes. When hook task finishes executing all HOOK_INIT hooks it enables other tasks with task_enable_all_tasks(). Now task with higher priority is scheduled (CONSOLE, HOSTCMD, FPSENSOR tasks have higher priority than HOOK task). When all higher priority tasks are waiting for events hook task is scheduled and we can finally run ap_deferred() function which should enable interrupt on CS pin (if AP is running). FPMCU log with this change, interrupt is enabled 300us after SPI is initialized: [Reset cause: reset-pin soft sysjump] [1.322458 Inits done] [1.322503 hook_task: running HOOK_INIT] [1.322551 hook notify 0] [1.322592 spi_init: init] [1.322632 spi_init: SPI initialized] [1.322684 board_init: init] [1.322740 FP_SPI_SEL: DEVELOPMENT] [1.322793 TRANSPORT_SEL: SPI] [1.322837 ap_deferred: SLP_L is 1] [1.322885 ap_deferred: SLP_ALT_L is 1] [1.322936 hook notify 6] [1.322975 spi_chipset_startup: enabling interrupt] [1.323113 hook_task: enabling all other tasks] BUG=b:185467818 BRANCH=none TEST=make -j buildall Signed-off-by: Patryk Duda <pdk@semihalf.com> Change-Id: I51a30b1cec35d19d6cdf3241a310e7427c750f88 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2891863 Reviewed-by: Craig Hesling <hesling@chromium.org>
* fingerprint: Add test that reads hwidKevin Shelton2021-05-081-0/+1
| | | | | | | | | | | | | | | | | | | | | BUG=b:157576189 BRANCH=none TEST=make buildall -j, Using dragonclaw v0.2 and servo_micro: ./test/run_device_test.py -t fpsensor_hw --flasher=servo_micro, Using icetower and servo_micro: ./test/run_device_test.py -t fpsensor_wh --flasher=servo_micro --board dartmonkey; note: the testrunner hung after printing Test "fpsensor_hw": PASSED, but this hang seems unrelated Cq-Depend: chromium:2872432 Change-Id: I2a3b31776cd40d7f0b422f4845869953b8f07249 Signed-off-by: Kevin Shelton <kmshelton@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2314101 Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* dartmonkey,bloonchipper: Rename sleep lines to be more genericCraig Hesling2021-04-302-15/+21
| | | | | | | | | | | | | | | | | | | | Note that this cannot change the sleep line names in RO FW that is already installed on devices. This means that running "ectool gpioget" when the FPPMCU is still in RO, you will see the old sleep gpio names. BRANCH=none BUG=b:175115925, b:179946521 TEST=make BOARD=dartmonkey TEST=make BOARD=bloonchipper TEST=./util/ide-config.sh vscode all:RW all:RO \ | tee .vscode/c_cpp_properties.json Signed-off-by: Craig Hesling <hesling@chromium.org> Change-Id: Iec3bebd87fe4f806389f78d7dfd8c29cebeb807f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2612005 Commit-Queue: Tom Hughes <tomhughes@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* Revert "fpsensor: Support building firmware that works for both sensors"Tom Hughes2021-04-071-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit ac08c9d1dbc9f587df3ee6b15d58c0203f7e356e. Reason for revert: Breaks public build Original change's description: > fpsensor: Support building firmware that works for both sensors > > This is a refactoring to allow building FPMCU firmware that works for > one FPC sensor and one ELAN sensor. > > 1. When both drivers implement our common functions, e.g. fp_sensor_init(), > rename them to fp_sensor_init_fpc() and fp_sensor_init_elan(). > 2. There are a few functions implemented not in FPC driver but in FPC > private library, e.g. fp_sensor_finger_status(). I kept this as-is for > FPC but renamed the one in ELAN driver to fp_sensor_finger_status_elan() > 3. If building for ELAN, need to hardcode elan=1 in hatch_fp/board.c > because the sensor type GPIO always says FPC. > > BRANCH=none > BUG=b:175158241 > TEST=make run-fpsensor; make run-fpsensor_status; > make run-fpsensor_crypto > TEST=make -j BOARD=dartmonkey > TEST=add CONFIG_FP_SENSOR_ELAN515 to board/hatch_fp/board.h; > make -j BOARD=bloonchipper > Firmware binary fully works on Dragonair (FPC) and Voema (ELAN) > TEST=run device tests with http://crrev/c/2750547 and > http://crrev/i/3654297 on Dragonclaw, all pass > > Change-Id: I789090dbdfe35ac6aefd6a629fa4c7bde89dc437 > Signed-off-by: Yicheng Li <yichengli@chromium.org> > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2727971 > Reviewed-by: Tom Hughes <tomhughes@chromium.org> > Commit-Queue: Tom Hughes <tomhughes@chromium.org> Bug: b:175158241, b:184616069 Change-Id: I2a02a6eefc316e7e13aa188f1ae16672dce2babd Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2809521 Auto-Submit: Tom Hughes <tomhughes@chromium.org> Tested-by: Tom Hughes <tomhughes@chromium.org> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com> Commit-Queue: caveh jalali <caveh@chromium.org>
* fpsensor: Support building firmware that works for both sensorsYicheng Li2021-04-021-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a refactoring to allow building FPMCU firmware that works for one FPC sensor and one ELAN sensor. 1. When both drivers implement our common functions, e.g. fp_sensor_init(), rename them to fp_sensor_init_fpc() and fp_sensor_init_elan(). 2. There are a few functions implemented not in FPC driver but in FPC private library, e.g. fp_sensor_finger_status(). I kept this as-is for FPC but renamed the one in ELAN driver to fp_sensor_finger_status_elan() 3. If building for ELAN, need to hardcode elan=1 in hatch_fp/board.c because the sensor type GPIO always says FPC. BRANCH=none BUG=b:175158241 TEST=make run-fpsensor; make run-fpsensor_status; make run-fpsensor_crypto TEST=make -j BOARD=dartmonkey TEST=add CONFIG_FP_SENSOR_ELAN515 to board/hatch_fp/board.h; make -j BOARD=bloonchipper Firmware binary fully works on Dragonair (FPC) and Voema (ELAN) TEST=run device tests with http://crrev/c/2750547 and http://crrev/i/3654297 on Dragonclaw, all pass Change-Id: I789090dbdfe35ac6aefd6a629fa4c7bde89dc437 Signed-off-by: Yicheng Li <yichengli@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2727971 Reviewed-by: Tom Hughes <tomhughes@chromium.org> Commit-Queue: Tom Hughes <tomhughes@chromium.org>
* fingerprint: Enable more on-device unit testsTom Hughes2021-02-161-0/+6
| | | | | | | | | | | | | | | | BRANCH=none BUG=b:155235321 TEST=On dragonclaw v0.2 with servo micro and jlink: ./test/run_device_test.py --board bloonchipper => tests pass TEST=On icetower v0.1 with servo micro and jlink: ./test/run_device_test.py --board dartmonkey => tests pass Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I884ee93779235a387ed64bfe02643abee2009243 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2692877 Reviewed-by: Craig Hesling <hesling@chromium.org>
* dartmonkey: Use SPI_SEL to configure fingerprint sensor SPITom Hughes2021-02-122-5/+21
| | | | | | | | | | | | BRANCH=none BUG=b:177908650 TEST=Fingerprint sensor works on Icetower v0.1 TEST=Fingerprint sensor works on nocturne Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: Ie9a7acb9bf4de1295fd245eb55e12ff8e7d2524a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2645691 Reviewed-by: Craig Hesling <hesling@chromium.org>
* dartmonkey: Adjust sleep pin based on board typeTom Hughes2021-02-112-2/+12
| | | | | | | | | | | | | | | | | | | | | | Development boards (i.e., icetower v0.1) use a different pin for the sleep signal than production designs. Configure the appropriate GPIO depending on the board being used. BRANCH=none BUG=b:179946521, b:175115925 TEST=With icetower v0.1 and servo micro connected: $ dut-control fpmcu_slp_s0:on ==> Observe debug logging that we took !running path in ap_deferred TEST=On nocturne: $ powerd_dbus_suspend ==> Observe debug logging in /var/log/cros_fp.log after running powerd_dbus_suspend that shows we took the !running path in ap_deferred. Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: If83c616abdd95a63e40a4bb05be14dc9b1230abb Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2689101 Reviewed-by: Craig Hesling <hesling@chromium.org>
* dartmonkey: Remove stm32f_rtc testTom Hughes2021-02-051-1/+0
| | | | | | | | | | | | | | The stm32f_rtc test is specific to the STM32F series, but dartmonkey is a STM32H series chip. BRANCH=none BUG=b:170432597 TEST=make BOARD=dartmonkey tests -j Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: Iff8f29444b4ac46482cbc526f0164ca3fef1752c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2676005 Reviewed-by: Craig Hesling <hesling@chromium.org>
* dartmonkey: Fix fpsensor test compilationTom Hughes2021-02-041-2/+9
| | | | | | | | | | | | | This is the same as what we already do on bloonchipper. BRANCH=none BUG=b:170432597 TEST=make BOARD=dartmonkey test-fpsensor Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I80ba0a95c012fc65d05c9a6d17698c4e97ced416 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2669415 Reviewed-by: Craig Hesling <hesling@chromium.org>
* stm32: assume no vbnvJack Rosenthal2021-02-031-6/+0
| | | | | | | | | | | | | | | | | | CONFIG_HOSTCMD_VBNV_CONTEXT is deprecated and removed. Cleanup preprocessor statements to assume it's never defined. This makes CONFIG_STM32_RESET_FLAGS_EXTENDED obsolete, since it's now always defined, so that gets removed too. BUG=b:178689388 BRANCH=none TEST=buildall Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: Id040ce2ceca95ecde37de0014aafdbfd3087e00d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2668688 Reviewed-by: Edward Hill <ecgh@chromium.org> Reviewed-by: Craig Hesling <hesling@chromium.org>
* dartmonkey: Refactor GPIOs to keep RO minimalTom Hughes2021-01-309-126/+188
| | | | | | | | | | | | | | | | | | | | | We want the amount of code and number of things defined in RO to be as minimal as possible since RO is frozen forever. By keeping RO minimal, we can reduce surface area for attacks and also confusion when GPIOs are removed or renamed. The fingerprint-related code only runs in RW, so move all fingerprint-related GPIOs and associated code into separate files that are only included in RW. BRANCH=none BUG=b:175115925, b:178746753, b:b:177908650 TEST=Flash on icetower v0.1, verify sensor shows up (with SPI_SEL change) TEST=Flash on nocturne, enroll, lock, unlock Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: Id59d4cd8011012ba4fd6823e1464c661784d4689 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2657778 Reviewed-by: Craig Hesling <hesling@chromium.org>
* fpsensor: Move CONFIG_CMD_SPI_XFER to RWTom Hughes2021-01-291-0/+3
| | | | | | | | | | | | | | | | | A followup CL will move the spi_devices variable (fingerprint sensor) to RW, so this command will only work in RW. BRANCH=none BUG=b:178746753 TEST=On icetower v0.1 console: > reboot ro > help => Verify "spixfer" is no longer present Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I2ee89a7eb4fe3be7e57d0f283f60c2b856060a75 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2657777 Reviewed-by: Craig Hesling <hesling@chromium.org>
* fpsensor: Add FP sensor SPI detection logicTom Hughes2021-01-293-0/+31
| | | | | | | | | | | | BRANCH=none BUG=b:177908650 TEST=Flash icetower v0.2, observed FP_SPI_SEL on console TEST=Flash nocturne, observed FP_SPI_SEL on console Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I2b221139fed817de4c58db3b6c8198942ab86e7b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2648731 Reviewed-by: Craig Hesling <hesling@chromium.org>
* spi: Pass in spi_device as argument to spi_enable instead of portTom Hughes2021-01-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | Rather than passing in the port and iterating over the global spi_devices variable, pass in the specific spi_device that is being enabled/disabled. The spi_device_t struct has the port. This change makes the functions in spi.h more consistent since they now all take a spi_device_t*. This change is the first step in making the SPI configuration more dynamic. BRANCH=none BUG=b:177908650 TEST=git grep 'spi_enable(CONFIG' => no results TEST=make buildall TEST=Flash dragonclaw v0.2 and view console to verify FP sensor ID Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I64124e0ebcf898e88496acb77703b5f59ae931c2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2654081 Commit-Queue: Abe Levkoy <alevkoy@chromium.org> Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* Refactor CONFIG_FLASH_SIZE to CONFIG_FLASH_SIZE_BYTESYuval Peress2021-01-151-1/+1
| | | | | | | | | | | | | | | | | | | | | In Zephyr CONFIG_FLASH_SIZE is a Kconfig value that is used throughout. The issue is that the units don't match. In Zephyr the value is in KiB instead of bytes. This refactor simply renames CONFIG_FLASH_SIZE in platform/ec to include the unit (via _BYTES). BRANCH=none BUG=b:174873770 TEST=make buildall be generated by the build instead of per board Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: I44bf3c7a20fcf62aaa9ae15715be78db4210f384 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2627638 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org> Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
* dartmonkey: Note for unused SLP_S4_L and SLP_SUS_LCraig Hesling2020-12-081-1/+5
| | | | | | | | | | | | | | | | | | These sleep lines were never used in code and have since been removed from the reference schematic, but they are driven on nocturne. This means that it would be bad if thee lines were ever accidentally repurposed in the future. Confirmed on A70 PVT/MP schematic. TEST=make BOARD=dartmonkey BUG=b:175115925 Change-Id: I3d1e3bbee5d242026a37464f6f0154243e262972 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2579463 Tested-by: Craig Hesling <hesling@chromium.org> Auto-Submit: Craig Hesling <hesling@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org> Commit-Queue: Craig Hesling <hesling@chromium.org>
* crc32: rename test crc32->crc to allow for crc8Jett Rink2020-11-131-1/+1
| | | | | | | | | | | | | | | Instead of creating a new test for crc8, just make the existing crc32 test more generic. BRANCH=none BUG=none TEST=none Signed-off-by: Jett Rink <jettrink@chromium.org> Change-Id: Ie630d4991d4e2c7dc441842c39d63fc0281ac809 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2532690 Reviewed-by: Tom Hughes <tomhughes@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* Revert "crc32: rename test crc32->crc to allow for crc8"Jett Rink2020-11-111-1/+1
| | | | | | | | | | | | | | | | | Something slipped through CQ coverage. Need to figure out, but in the mean time, revert the 3 CLs that seemed to have caused the issue. BRANCH=none BUG=chromium:1147953 TEST=none This reverts commit 5ec269c5a71643c955fe45191ed9f06794c6113a. Change-Id: I90f812cd4d4f83ea05d34740541db0076abce392 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2533356 Tested-by: Rajat Jain <rajatja@google.com> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* crc32: rename test crc32->crc to allow for crc8Jett Rink2020-11-111-1/+1
| | | | | | | | | | | | | | Instead of creating a new test for crc8, just make the existing crc32 test more generic. BRANCH=none BUG=none TEST=none Signed-off-by: Jett Rink <jettrink@chromium.org> Change-Id: I459e9b721a6cc0d94cef8c0d93102ad372095c34 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2527493 Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* nocturne_fp: Do not build rsa unittestYicheng Li2020-11-111-1/+2
| | | | | | | | | | | | | | | nocturne_fp uses RSA exponent 3 for its own rwsig verification, so the rsa test will fail on a nocturne_fp device. If we modify the test, we won't pass rwsig verification on device. BRANCH=none BUG=b:169256204 TEST=make -j buildall Signed-off-by: Yicheng Li <yichengli@chromium.org> Change-Id: I9ca69da2ee870a672ffb029e962f5e0cc0c17c2c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2464231 Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* include/config.h: Replace CONFIG_FP_SENSOR with CONFIG_FINGERPRINT_MCUTom Hughes2020-10-301-0/+2
| | | | | | | | | | | | | | | | CONFIG_FP_SENSOR was only enabled for RW, but we need a way to know whether the board is a fingerprint MCU when in RO as well. "FINGERPRINT_MCU" is a bit more generic than FP_SENSOR. We still only build the matching-related code for RW. BRANCH=none BUG=b:171370392 TEST=make buildall Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I808faa7a16522791cfb4eb9cc2e163d9eb994804 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2508860 Reviewed-by: Bhanu Prakash Maiya <bhanumaiya@google.com>
* test/fpsensor: Run the fpsensor test on deviceTom Hughes2020-10-301-0/+1
| | | | | | | | | | | | BRANCH=none BUG=b:171370392 TEST=Using dragonclaw v0.2 and servo_micro: ./test/run_device_tests.py -t fpsensor Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: Idc24d9bdd5574ca7099e97e86e3b49011844380c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2507951 Reviewed-by: Bhanu Prakash Maiya <bhanumaiya@google.com>
* stm32: Enable rsa and rsa3 on-device unit testsYicheng Li2020-06-231-0/+2
| | | | | | | | | | | | | | | | | | | | BRANCH=none BUG=b:155235321 TEST=make BOARD=nucleo-dartmonkey tests -j TEST=make BOARD=bloonchipper tests -j TEST=make BOARD=dartmonkey tests -j TEST=make BOARD=nucleo-f412zg tests -j TEST=make BOARD=nucleo-h743zi tests -j TEST=flash rsa unit test binary to nucleo-f412zg, run test => pass TEST=flash rsa3 unit test binary to nucleo-f412zg, run test => pass TEST=flash rsa unit test binary to nucleo-h743zi, run test => pass TEST=flash rsa3 unit test binary to nucleo-h743zi, run test => pass Signed-off-by: Yicheng Li <yichengli@chromium.org> Change-Id: I2ebcf6f322f9c16aba65a3a627a0a83ca00d2a02 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2240516 Commit-Queue: Tom Hughes <tomhughes@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* stm32: Enable utils on-device unit test for fingerprint boardsYicheng Li2020-06-171-0/+1
| | | | | | | | | | | | | | | | BRANCH=none BUG=b:155230812, b:155235321 TEST=make -j BOARD={dartmonkey, bloonchipper, nucleo-dartmonkey, nucleo-f412zg, nucleo-h743zi} test-utils TEST=flash the utils test binary, then runtest on bloonchipper and nucleo-f412zg ==> Pass! Signed-off-by: Yicheng Li <yichengli@chromium.org> Change-Id: Ia45b494111f2a536876a5ca60fdc12c06f870e1f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2242356 Tested-by: Tom Hughes <tomhughes@chromium.org> Commit-Queue: Tom Hughes <tomhughes@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* fpsensor: cleanup multiple fp spi enableBhanu Prakash Maiya2020-06-051-0/+4
| | | | | | | | | | | | | | BUG=b:147849609 BRANCH=none TEST=1. make buildall -j Change-Id: I35146070ec20a3605588792fc19595dc1c1ea3cf Signed-off-by: Bhanu Prakash Maiya <bhanumaiya@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2191733 Tested-by: Bhanu Prakash Maiya <bhanumaiya@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org> Commit-Queue: Bhanu Prakash Maiya <bhanumaiya@chromium.org> Auto-Submit: Bhanu Prakash Maiya <bhanumaiya@chromium.org>
* test: Add test for flash write protectionTom Hughes2020-05-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This test demonstrates the inconsistency between STM32H743 (dartmonkey) and STM32F412 (bloonchipper). BRANCH=none BUG=b:155897971 TEST=On bloonchipper after flashing flash_write_protect.bin test: * Enable HW WP: dut-control fw_wp_en:on * Reboot to RO: reboot ro * Enable flash protection: runtest 1 => PASS * Reboot to RO: reboot ro * Try to disable flash protection: runtest 2 => FAIL TEST=On dartmonkey after flashing flash_write_protect.bin test: * Enable HW WP: dut-control fw_wp_en:on * Reboot to RO: reboot ro * Enable flash protection: runtest 1 => PASS * Reboot to RO: reboot ro * Try to disable flash protection: runtest 2 => PASS Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I6eb69257f84f79a6609984efbdad7dd37803c8f6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2209419 Commit-Queue: Yicheng Li <yichengli@chromium.org> Tested-by: Yicheng Li <yichengli@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
* test: Add flash_physical testTom Hughes2020-05-301-0/+1
| | | | | | | | | | | | | | | | | | | | | This test is intended to be used for testing the physical layer flash APIs. BRANCH=none BUG=b:155897971 TEST=On dragonclaw v0.2 with Segger J-Trace and servo micro connected: ./test/run_device_tests.py -t flash_physical => PASS TEST=On dragontalon with servo micro connected: > runtest => PASS Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: Ifd3c30da5f42ff84e77a7292cd2a7c88e8c594dd Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2220734 Commit-Queue: Yicheng Li <yichengli@chromium.org> Tested-by: Yicheng Li <yichengli@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
* test: Add scratchpad testTom Hughes2020-05-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The first time the test runs it should pass. After rebooting, the test should then fail because the scratchpad register is already set. BRANCH=none BUG=b:157059753 TEST=Build and flash bloonchipper On console: > runtest => PASS > reboot > runtest => PASS, which is WRONG TEST=Build and flash dartmonkey On console: > runtest => PASS > reboot > runtest => FAILS, which is CORRECT Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I348d723d8083ecd0d9f5535785c8049f284a00b6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2209189 Commit-Queue: Abe Levkoy <alevkoy@chromium.org> Reviewed-by: Abe Levkoy <alevkoy@chromium.org>