summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* bloonchipper: Reintroduce sleep lines to ROCraig Hesling2021-08-097-81/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change https://crrev.com/c/2673909 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: https://crrev.com/c5545464431669029f42829d542fa491d767ee5f/board/hatch_fp/board.c This is the parent commit to the CL that refactors the sleep lines. BRANCH=none BUG=b:178746753 TEST=make -j tests-bloonchipper 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 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 > fpenroll > fpmatch > reboot # Ctrl-A Q Signed-off-by: Craig Hesling <hesling@chromium.org> Change-Id: Ibb9e1aac4d242a70ed39e043daef39bab9ccc4d6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3078823 Reviewed-by: Josie Nordrum <josienordrum@google.com>
* chgstv2/sustainer: Add tests for full battery and ACDaisuke Nojiri2021-08-092-16/+64
| | | | | | | | | | | | | | | | | | Currently, unit tests do not check whether the battery sustainer can be enabled when the battery is already full or when the AC is already present. This patch adds tests which check the battery sustainer can be enabled when the battery is already full or when the AC is already present. BUG=b:188457962 BRANCH=None TEST=run-sbs_charging_v2 Change-Id: I4ec9785554d126baca0b60e889c4a2dabbfb628a Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3078401 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* util: Add strcspnRob Barnes2021-08-093-1/+46
| | | | | | | | | | | | | | | Add the standard string function strcspn. strcspn calculates the length of the initial segment of s which consists entirely of bytes not in reject. BUG=None TEST=make run-utils_str BRANCH=None Signed-off-by: Rob Barnes <robbarnes@google.com> Change-Id: I3eb9a4fff42cb0fdcdb288d00f8070e0f22b2179 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3057730 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* chgstv2: call sustain_battery_soc without checking previous statesTommy Chung2021-08-091-1/+4
| | | | | | | | | | | | | | | | | | | | When we enalbe battery sustain after battery returns that it is full, we need to add this condition for sustain_battery_soc(). Also, add this test condition for battery sustainer. BUG=b:188457962 BRANCH=none TEST=make sure the battery sustain works when enabling it after battery returns that it is full. Also, make sure that "make run-sbs_charging_v2" pass. Signed-off-by: Tommy Chung <tommy.chung@quanta.corp-partner.google.com> Change-Id: If10b9fd0264717abfb7cdbb7ddc947b370291895 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3070946 Reviewed-by: Devin Lu <Devin.Lu@quantatw.com> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org>
* chip/mt_scp: move video capability to chip specificTzung-Bi Shih2021-08-097-19/+75
| | | | | | | | | | | BRANCH=none BUG=b:185977882 TEST=make BOARD=asurada_scp -j && make BOARD=cherry_scp -j Signed-off-by: Tzung-Bi Shih <tzungbi@chromium.org> Change-Id: Id5eaa5ddc0e21c9b33a1a4197393de6c6ef331e6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3080541
* bland: add MICMUTE keyTing Shen2021-08-091-5/+1
| | | | | | | | | | | | | BUG=b:194460146 TEST=make BRANCH=trogdor Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: I58aac61fab5c9b09623b98214dd8d9d9ee25c7c6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3073441 Reviewed-by: Wai-Hong Tam <waihong@google.com> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
* stm32/usb_hid_keyboard; implement new top row keysTing Shen2021-08-091-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the hid usage mapping from drivers/hid/hid-input.c: Page 0xB, Usage 0x2F -> KEY_MICMUTE Page 0xC, Usage 0x7C -> KEY_KBDILLUMTOGGLE BUG=b:194460146 TEST=Map the new keys to F1/F2 on homestar, and verify 1) kernal can get the expected key code. Event: -------------- SYN_REPORT ------------ Event: type 4 (EV_MSC), code 4 (MSC_SCAN), value b002f Event: type 1 (EV_KEY), code 248 (KEY_MICMUTE), value 1 Event: -------------- SYN_REPORT ------------ Event: type 4 (EV_MSC), code 4 (MSC_SCAN), value b002f Event: type 1 (EV_KEY), code 248 (KEY_MICMUTE), value 0 Event: -------------- SYN_REPORT ------------ Event: type 4 (EV_MSC), code 4 (MSC_SCAN), value c007c Event: type 1 (EV_KEY), code 228 (KEY_KBDILLUMTOGGLE), value 1 Event: -------------- SYN_REPORT ------------ Event: type 4 (EV_MSC), code 4 (MSC_SCAN), value c007c Event: type 1 (EV_KEY), code 228 (KEY_KBDILLUMTOGGLE), value 0 2) `cat /sys/class/input/*/device/function_row_physmap` BRANCH=trogdor Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: Ibf342b881ee428598adaeb73a63bf242cd220004 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3073440 Reviewed-by: Wai-Hong Tam <waihong@google.com> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
* chgstv2: rework "charge_command_charge_control()"Tommy Chung2021-08-091-1/+1
| | | | | | | | | | | | | | | | Condition of judging whether to enable or disable the battery sustainer should be the mode host commands give, not the current chg_ctl_mode. BUG=b:194219157 BRANCH=none TEST=make sure that the battery sustainer will not be incorrectly enabled when giving "ectool chargecontrol discharge" or "ectool chargecontrol idle" under CHARGE_CONTROL_NORMAL mode. Signed-off-by: Tommy Chung <tommy.chung@quanta.corp-partner.google.com> Change-Id: I8a28970164a7e80805601817f2761d6684b183cf Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3070328 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* redrix: cleanup: Remove kb backlight unused codeDevin Lu2021-08-072-9/+0
| | | | | | | | | | | | BUG=none BRANCH=none TEST=make BOARD=redrix Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: I9bb42cd5295785d525c063931f425228dc02968d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3077585 Reviewed-by: Zick Wei <zick.wei@quanta.corp-partner.google.com> Reviewed-by: caveh jalali <caveh@chromium.org>
* docs: Update Reducing EC Image SizeKeith Short2021-08-061-3/+98
| | | | | | | | | | | | | | | | Mark some additional console commands as required for testing. Add sections detailing CONFIG_LTO, CONFIG_CHIP_INIT_ROM_REGION, and CONFIG_COMMON_GPIO_SHORTNAMES. BUG=none BRANCH=none TEST=View output with gitiles Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I58ac5bde1440ac6dae0caf9f8b6e2ff76bb2ff6f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3078043 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* docs: Fix link referencesKeith Short2021-08-062-4/+4
| | | | | | | | | | | | | | Correct some links between markdown documents local to the EC code. BUG=none BRANCH=none TEST=verify links with gitiles Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I8e31b7775d25e48f62180c4a754fc6a49ca0e8d9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3078042 Commit-Queue: Abe Levkoy <alevkoy@chromium.org> Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* cret: Modify EC_ACOK_OTG enable/disable conditionjohnwc_yeh2021-08-061-1/+6
| | | | | | | | | | | | | | | | | | When the Type-C AC plug-in and got AC status from RAA489000 then enables charger the OTP/OVP protect function. BUG=b:188567172 BRANCH=dedede TEST=Test on the proj-cret the GPIOC0 when Type-C device plug-in is low and the Type-C AC plug-in is high Signed-off-by: johnwc_yeh <johnwc_yeh@compal.corp-partner.google.com> Change-Id: I112ff5437c2c8195003a03437e51eb6012a42740 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3054213 Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* mchp: Optimize spi_flash_read() APImartin yan2021-08-064-1/+20
| | | | | | | | | | | | | | | | | | Optimize SPI flash read timing, MEC172x QMSPI controller controls CS# by hardware, it will add several system clock cycles delay between CS deassertion to CS assertion at the start of the next transaction, this guarantees SPI back to back transactions, so 1ms delay can be removed to optimze timing. BUG=none BRANCH=none TEST=Tested on ADL RVP and MCHP1727 MECC system via FAFT ECBootTime job save 720ms as EC performs 180KB RW code's SHA256 hash computation Signed-off-by: martin yan <martin.yan@microchip.corp-partner.google.com> Change-Id: I5cf9c668efb1cd008b91cdd8aa09f7351c017af0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3074767 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* make: disable kconfig option checkJack Rosenthal2021-08-061-1/+4
| | | | | | | | | | | | | | This check is currently suspected to be causing widespread commit queue failures. Disable for now. BUG=b:195718112 BRANCH=none TEST=make buildall -j32 Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I58ff77eb4ff8a8fae4f856c116cb592aede634ee Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3078400 Reviewed-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
* pazquel: Modify battery informationqijun tang2021-08-062-36/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Modify battery information to match spec BUG=b:188393713 BRANCH=trogdor TEST= > battery Status: 0x00e0 FULL DCHG INIT Param flags:00000002 Temp: 0x0bd1 = 302.5 K (29.4 C) V: 0x21d3 = 8659 mV V-desired: 0x0000 = 0 mV I: 0x0000 = 0 mA I-desired: 0x0000 = 0 mA Charging: Not Allowed Charge: 100 % Display: 100.0 % Manuf: BMSPow Device: SG20 Chem: GF Serial: 0x0007 V-design: 0x1db0 = 7600 mV Mode: 0x0000 Abs charge:99 % Remaining: 5641 mAh Cap-full: 5650 mAh Design: 5650 mAh Time-full: 0h:0 Empty: 0h:0 full_factor:0.97 shutdown_soc:4 % Signed-off-by: qijun tang <qijun.tang@ecs.corp-partner.google.com> Change-Id: Idbef7873107025bf1e426910a163bf5293ed288e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3054224 Reviewed-by: Philip Chen <philipchen@chromium.org> Commit-Queue: Philip Chen <philipchen@chromium.org>
* redrix: Configure thermal sensorsDevin Lu2021-08-062-36/+72
| | | | | | | | | | | | | | | | | | | | | | | | | There are 4 thermal sensors on Redrix. The sensor map as following: ADC_TEMP_SENSOR_1_DDR: Close to DDR. ADC_TEMP_SENSOR_2_SOC: Close to SOC. ADC_TEMP_SENSOR_3_CHARGER: Close to charger. ADC_TEMP_SENSOR_4_REGULATOR: Close to 5V regulator. BUG=b:195673113 BRANCH=none TEST=EC console "temps". > temps DDR : 319 K = 46 C 73% SOC : 322 K = 49 C 93% Charger : 316 K = 43 C 20% Regulator : 319 K = 46 C 40% Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: I51548faa34e70ffcbd809d18b2ca5996992e3753 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3076600 Reviewed-by: Zick Wei <zick.wei@quanta.corp-partner.google.com> Reviewed-by: caveh jalali <caveh@chromium.org>
* DP/TBT/USB4: Retimer WA resolved Brya TBT lane bonding issue in AP modemadhusudanarao amara2021-08-063-0/+46
| | | | | | | | | | | | | | | | | In AP Mode DP exit to TBT entry is causing TBT lane bonding issue. Issue is not seen by calling the retimer reset as WA at the time of disconnect mode configuration. Revert this patch after getting the actual fix. BUG=b:193402306 BRANCH=None TEST=Checked TBT enumeration in AP Mode TOREVERT=b:195375738 Signed-off-by: madhusudanarao amara <madhusudanarao.amara@intel.corp-partner.google.com> Change-Id: Ia22e061a863940b2a13ad5a38f4fe130737c5c20 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3058157 Reviewed-by: Keith Short <keithshort@chromium.org>
* i2c_controller: Check if get_i2c_port returns NULLLukasz Hajec2021-08-061-0/+3
| | | | | | | | | | | | | | | | | This patch fixes an issue, when nonexistent port number parameter is passed to i2cxfer and causes panic due to using null pointer. Add check if get_i2c_port returns NULL and return EC_ERROR_INVAL. BUG=b:186873536 BRANCH=none TEST=Run i2cxfer command with different parameters on servo_v4p1, nocturne and grunt - do not observe panic. Signed-off-by: Lukasz Hajec <lha@semihalf.com> Change-Id: I8bd90d898e1097b59ca6c9a1eff850bc2dc808e4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3074620 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
* rt1718s: add proper define guardTing Shen2021-08-061-0/+2
| | | | | | | | | | | | | | | | | The original code can't compile if CONFIG_USB_PD_TCPC_LOW_POWER not defined. Compiler complains that tcpci_enter_low_power_mode not found. BUG=none TEST=make BRANCH=none Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: If59bf9e82bf5db879d83eb02b64a36c32c9613b8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3076474 Tested-by: Ting Shen <phoenixshen@chromium.org> Auto-Submit: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Eric Yilun Lin <yllin@google.com> Commit-Queue: Eric Yilun Lin <yllin@google.com>
* zephyr: shim: use NPCX_CLK_CTRL_NODE for clock controlFabio Baltieri2021-08-064-4/+4
| | | | | | | | | | | | | | | | | Zephyr NPCX drivers has been switched to the link time device definition, and now NPCX_CLK_CTRL_NODE is available to point to the pcc node directly. Use that in the EC code as well for the clock API. BRANCH=none BUG=none TEST=build and run on volteer Cq-Depend: chromium:3000806, chromium:3070703 Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: I8a5b5426c5e6a9167cd232fc72e50d372958b31c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3001584 Reviewed-by: Yuval Peress <peress@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* Revert "bloonchipper: Reintroduce sleep lines to RO"Hsu Wei-Cheng2021-08-066-66/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 5e2a0808b7dfc736676daf8ba4d6cf683076d961. Reason for revert: It may broke CQ BUG=b:195718112 Original change's description: > bloonchipper: Reintroduce sleep lines to RO > > Change https://crrev.com/c/2673909 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: > https://crrev.com/c5545464431669029f42829d542fa491d767ee5f/board/hatch_fp/board.c > This is the parent commit to the CL that refactors the sleep lines. > > BRANCH=none > BUG=b:178746753 > 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 > > 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 > > fpenroll > > fpmatch > > reboot > # Ctrl-A Q > > Signed-off-by: Craig Hesling <hesling@chromium.org> > Change-Id: I503cb3b62740300b265a4ddb165e29d9e36727fd > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3012241 > Commit-Queue: Josie Nordrum <josienordrum@google.com> > Reviewed-by: Josie Nordrum <josienordrum@google.com> Bug: b:178746753 Change-Id: If610fdffaef778f26c712bbad360e84651df61bf Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3077589 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: 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-062-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* brya: Fix fan turn high and low momentary in G3 and DC onlyOwen_Ou2021-08-061-2/+2
| | | | | | | | | | | | | | | | | Base on nuvoton's suggest modify PWM's flags and frequency. BUG=b:194935446 BRANCH=None TEST=Brya fan can keep 33% and can't turn high and low momentary in G3 and DC only. Signed-off-by: Owen_Ou <Owen_Ou@compal.corp-partner.google.com> Change-Id: Ie0321d904d8cd2aa9de7dbc8559521b4cba12b8c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3070808 Auto-Submit: Owen Ou <owen_ou@compal.corp-partner.google.com> Tested-by: Owen Ou <owen_ou@compal.corp-partner.google.com> Commit-Queue: Owen Ou <owen_ou@compal.corp-partner.google.com> Reviewed-by: caveh jalali <caveh@chromium.org>
* redrix: Fix lsm6dsm initial dataDevin Lu2021-08-061-1/+1
| | | | | | | | | | | | | Add the lsm6dsm initial data to avoid unexpected exception occurs. BUG=b:195377407 BRANCH=none TEST=Boot EC success. Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: Ic3a898fe4fde6a4d4ceb702f8a2e8a0bdf223806 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3073704 Reviewed-by: caveh jalali <caveh@chromium.org>
* gimble: switch T8 and T9 keyWill Tsai2021-08-061-2/+2
| | | | | | | | | | | | | We have micmute at T8 and keyboard backlight at T9. BUG=b:194146863 BRANCH=none TEST=make -j BOARD=gimble Signed-off-by: Will Tsai <will_tsai@wistron.corp-partner.google.com> Change-Id: Ibdfaf7f0bc70dc0396112c058d675ea66ccb1c09 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3073701 Reviewed-by: caveh jalali <caveh@chromium.org>
* zephyr: linker: riscv: provide __image_size symbolDino Li2021-08-061-0/+3
| | | | | | | | | | | | | | | This makes riscv core providing __image_size symbol for calculating hash. BRANCH=none BUG=b:194794622 TEST=__image_size is equal to ro/rw binarys' size. Signed-off-by: Dino Li <Dino.Li@ite.com.tw> Change-Id: I7ffd8da6d0bb94362cb137458bf9962a5cf69c62 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3066837 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: it8xxx2: re-configure ROM_BASE address for RW imageDino Li2021-08-061-0/+10
| | | | | | | | | | | | | | RW image is at the CROS_EC_RW_MEM_OFF offset from the beginning of flash. BRANCH=none BUG=b:194794622 TEST=sysjump rw/ro, sysinfo Signed-off-by: Dino Li <Dino.Li@ite.com.tw> Change-Id: I7456376a790a354876b1b7312310e9a6a5fcef44 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3063100 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* gimble: add custom fan controlWill Tsai2021-08-063-1/+152
| | | | | | | | | | | BUG=b:195378817 BRANCH=none TEST=make -j BOARD=gimble Signed-off-by: Will Tsai <will_tsai@wistron.corp-partner.google.com> Change-Id: Id6a5119d16291beb34dcc7da8f48d668f47b5297 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3067287 Reviewed-by: Boris Mittelberg <bmbm@google.com>
* cappy2:Battery voltage can reach 8.8vwangganxiang2021-08-062-0/+22
| | | | | | | | | | | | | | | Modified so that the battery can reach 8.8V after fully charged. BRANCH=keeby BUG=b:195080060 TEST=make BOARD=cappy2 Signed-off-by: wangganxiang <wangganxiang@huaqin.corp-partner.google.com> Change-Id: I952abe577060e1b4b96b7c72b74bb6eed0edca59 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3062059 Reviewed-by: Weimin Wu <wuweimin@huaqin.corp-partner.google.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* redrix: Initialize the vivaldi keyboardDevin Lu2021-08-064-7/+74
| | | | | | | | | | | | | | Redrix has 2 keyboard layouts. One for privacy screen keyboard layout. Other for default keyboard layout. BUG=b:193752537 BRANCH=none TEST=evtest, make sure the keycode is correct. Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: I7777866d1cfe91ee940eee97bdc03e26559c2481 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3073702 Reviewed-by: caveh jalali <caveh@chromium.org>
* gimble: enable ectool control battery ledScott Chao2021-08-061-3/+0
| | | | | | | | | | | | | | We will use ectool led battery amber [white] to test if led is working. BUG=b:193600290 BRANCH=none TEST=make -j BOARD=gimble TEST=led can turn on when use ectool control it. Signed-off-by: Scott Chao <scott_chao@wistron.corp-partner.google.com> Change-Id: I08dd9c1d13803a3aef4c27b42339acd3fb19d0b9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3070326 Reviewed-by: caveh jalali <caveh@chromium.org>
* primus: add Sunwoda battery supportScott Chao2021-08-062-46/+16
| | | | | | | | | | | | BUG=b:195568649 BRANCH=none TEST=make -j BOARD=primus TEST=check battery cutoff work Signed-off-by: Scott Chao <scott_chao@wistron.corp-partner.google.com> Change-Id: I6732c9a9ce50f0d498bce4395c86d678942286f0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3073699 Reviewed-by: caveh jalali <caveh@chromium.org>
* zephyr: zmake: use -j1 until we switch to GNU MakeJack Rosenthal2021-08-051-1/+8
| | | | | | | | | | | | | | | | | | | Ninja doesn't know how to talk to a jobserver, and so all of our ninjas go out of control, each trying to hit the CPU on all available cores. We have enough builds now that this is actually becoming problematic as well. -j1 forces sequential execution of the ninjas, which will mitigate the problem until we switch to GNU Make. BUG=b:178196029 BRANCH=none TEST="zmake -D testall" executes sequentially Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I45516e22cca150a99f2da7a7b784d15c3fc78aab Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3075401 Reviewed-by: Simon Glass <sjg@chromium.org>
* Drop some obsolete boardsJack Rosenthal2021-08-0584-11310/+1
| | | | | | | | | | | | | | | | | | | | | samus: AUE in M91, M92 pushed to stable already samus_pd: samus pd chip dragonegg: canceled cheza: canceled flapjack_scp: flapjack was canceled atlas_ish: atlas shipped, but ish project canceled sklrvp,glkrvp: these are pretty old intel reference boards and the portage overlays were already deleted ... assume nobody needs the EC firmware anymore either BUG=none BRANCH=none TEST=buildall Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I794867ac82f37ffa2267e2e59ac02bc381688c57 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3069716 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* flash_fp_mcu: Add FPMCU power cycleCraig Hesling2021-08-051-3/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a workaround for the dartmonkey RO flash init bug, where a boot loop occurs when HW-WP is disabled, but SW-WP is still enabled. We force a true power-on-reset so that flash init function in RO sees that SW-WP cannot be removed (and is "stuck"). BRANCH=none BUG=b:146428434,b:187387061,b:143374692 TEST=# Test on helios, bard, and nocturne scp util/flash_fp_mcu ${DUT_HOSTNAME}:/usr/local/bin/flash_fp_mcu ssh ${DUT_HOSTNAME} ectool --name=cros_fp reboot_ec ssh ${DUT_HOSTNAME} ectool --name=cros_fp uptimeinfo # No power-on reset flag should be set. ssh ${DUT_HOSTNAME} flash_fp_mcu # Check that power-on reset flag is set. # If you were to check the uptimeinfo after flash_fp_mu # finished, you would see a few seconds later that the # power-on flag is gone. This is because biod's startup # would reinitialize entropy and cause reset. TEST=# Test on morphius scp util/flash_fp_mcu ${DUT_HOSTNAME}:/usr/local/bin/flash_fp_mcu ssh ${DUT_HOSTNAME} flash_fp_mcu # Just make sure we didn't break the script. Signed-off-by: Craig Hesling <hesling@chromium.org> Change-Id: Ib8e239c6c0d5e5de66da2e664374a80479eb4098 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3032665 Commit-Queue: Josie Nordrum <josienordrum@google.com> Reviewed-by: Josie Nordrum <josienordrum@google.com>
* 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-052-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* bloonchipper: Reintroduce sleep lines to ROCraig Hesling2021-08-056-81/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change https://crrev.com/c/2673909 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: https://crrev.com/c5545464431669029f42829d542fa491d767ee5f/board/hatch_fp/board.c This is the parent commit to the CL that refactors the sleep lines. BRANCH=none BUG=b:178746753 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 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 > fpenroll > fpmatch > reboot # Ctrl-A Q Signed-off-by: Craig Hesling <hesling@chromium.org> Change-Id: I503cb3b62740300b265a4ddb165e29d9e36727fd Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3012241 Commit-Queue: Josie Nordrum <josienordrum@google.com> Reviewed-by: Josie Nordrum <josienordrum@google.com>
* zephyr: asurada: enable CONFIG_PLATFORM_EC_HOST_COMMAND_STATUSTim Lin2021-08-051-0/+1
| | | | | | | | | | | | | Enable the config of CONFIG_PLATFORM_EC_HOST_COMMAND_STATUS BUG=b:195342437 BRANCH=none TEST=command from AP: ectool flasherase 0x80000 0x80000 Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com> Change-Id: I6db7efa406768a1fa4b75aa7d097a4c1d1b317c3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3070798 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* zephyr: shim/src: task: add in_interrupt_context routineTim Lin2021-08-051-0/+5
| | | | | | | | | | | | | | | This routine is needed when enable CONFIG_HOST_COMMAND_STATUS. This routine allows the caller to customize its actions, depending on whether it is a thread or an ISR. BUG=b:195342437 BRANCH=none TEST=zmake testall Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com> Change-Id: Id2a948c67de81fbc8ee161e5711cff17b8ac359d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3070941 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* zephyr/drivers: flash: enable SHI interrupt to handle AP's commandTim Lin2021-08-051-0/+8
| | | | | | | | | | | | | | EC still need to handle AP's EC_CMD_GET_COMMS_STATUS command during flash erasing. BUG=b:195342437 BRANCH=none TEST=zmake testall Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com> Change-Id: Ie6ad4d409673a73efb7b8f2ec8353187f76fa996 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3070940 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* zephyr: add support for CONFIG_HOST_COMMAND_STATUSTim Lin2021-08-052-0/+17
| | | | | | | | | | | | | Add Kconfig option for CONFIG_HOST_COMMAND_STATUS. BUG=b:195342437 BRANCH=none TEST=zmake testall Change-Id: Ia5adab17904cb3982788d642bc7c08b0bef69b6f Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3068489 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* zephyr/drivers: flash: add watchdog reload in flash erasingTim Lin2021-08-051-1/+30
| | | | | | | | | | | | | | | | When a large size of data is erased, the watchdog needs to be reloaded, otherwise it will cause the watchdog timeout. BUG=b:195328245 BRANCH=none TEST=console command: flasherase 0x80000 0x80000 watchdog will not timeout to cause reboot. Change-Id: Ic483101b481b58c2870f18b3745cee511504a809 Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3068488 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* zephyr: kohaku: support v2.6Jack Rosenthal2021-08-051-0/+1
| | | | | | | | | | | | | | | | Add 2.6 to list of supported versions. Note: need to drop the USE flag from hatch overlay before we can drop v2.5 support in zmake.yaml. BUG=b:195571108 BRANCH=none TEST=flash on kohaku, boot to S0 Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: Ia50e62155826f21aee094ccf80cb699a99a18978 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3072415 Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com>
* redrix: add PCHG supportZick Wei2021-08-054-0/+37
| | | | | | | | | | | | | This patch add PCHG:ctn730 support on redrix. BUG=none BRANCH=none TEST=verify PCHG work as intended. Signed-off-by: Zick Wei <zick.wei@quanta.corp-partner.google.com> Change-Id: I8bf0abc3df9e28e7a018ddeb4fb971d2ede46039 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3066828 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* zephyr: npcx_evb: Set the hibernate wake-up pinsWealian Liao2021-08-052-6/+24
| | | | | | | | | | | | | | Currently, npcx7/9_evb choose low-power RAM as hibernate method. This CL sets the hibernate wake-up pins for npcx7/9_evb. BUG=none BRANCH=none TEST='hibernate' & wake-up ec by ac_present, power_button_l, lid_open Signed-off-by: Wealian Liao <whliao@nuvoton.corp-partner.google.com> Change-Id: I5a3f5f0e7346040853bd035ca559b7e997c5b07b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3070800 Reviewed-by: Yuval Peress <peress@chromium.org>
* zephyr: npcx_evb: Enable power managementWealian Liao2021-08-054-0/+18
| | | | | | | | | | | | | This CL enables power management for npcx7/9_evb BUG=none BRANCH=none TEST=Check evb can enter sleep by 'idlestats' console command Signed-off-by: Wealian Liao <whliao@nuvoton.corp-partner.google.com> Change-Id: I3ef9776f492388b2943a42d99686de952c7def05 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3068843 Reviewed-by: Yuval Peress <peress@chromium.org>