summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* spherion: support 65w adapterstabilize-14013.B-mainBen Chen2021-06-043-7/+16
| | | | | | | | | | | | | | modify max power and max current to support 65w adapter, SYV682X_HV_ILIM to 5.5A BUG=b:183174897 BRANCH=asurada TEST=make buildall PASS Change-Id: I704ad3a647a2007b808d55928298fd38c34387fe Signed-off-by: Ben Chen <ben.chen2@quanta.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2793851 Reviewed-by: Eric Yilun Lin <yllin@google.com>
* Homestar:POGO: Set POGO VBUS setup later then PP3300_HUBtongjian2021-06-041-1/+5
| | | | | | | | | | | | | | | | | The HUB Spec requires the HUB to power up before it is plugged into the device. BUG=b:189191440 TEST=make -j BOARD=homestar 1.Verify build on EVT board 2.Use oscilloscope to observe the timing of POGO VBUS and PP3300_HUB 3.POGO VBUS setup is later then PP3300_HUB BRANCH=Trogdo Signed-off-by: tongjian <tongjian@huaqin.corp-partner.google.com> Change-Id: I7ca46298b58e5f38a88ccbaa99a38b1d2555e05f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2935642 Reviewed-by: Wai-Hong Tam <waihong@google.com>
* zephyr: Enable coverage support on new boards.Jeremy Bettis2021-06-042-0/+4
| | | | | | | | | | | | | | | | Several new boards were missing the HAS_COVERAGE_SUPPORT Kconfig. BUG=b:183007888 TEST=zmake coverage build/zmake-coverage BRANCH=None Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I249adc6f7937d514ef400a55cf573b1630a419d1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2937740 Tested-by: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
* Trogdor: Update the GPIO names for rev-2Wai-Hong Tam2021-06-043-20/+39
| | | | | | | | | | | | | | Update the GPIO names according to the rev-2 schematic Define the unused pins. BRANCH=None BUG=b:184071830 TEST=Build the Trogdor image and test it on the rev-2 board. Change-Id: Ida8bdbf0dc63984d1f31b4db8b7b6f39f8b33e41 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2911506 Reviewed-by: Stephen Boyd <swboyd@chromium.org>
* chgstv2: Call board_check_extpower on AC changeAseda Aboagye2021-06-041-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | Some boards don't have an interrupt which indicate that extpower is present or not. In some cases, the EC may miss an edge if the call comes to early to check whether AC is ok. However, the charger task periodically polls this state. This commit has the charger task call `board_check_extpower` when it notices that the AC presence has changed. This can ultimately end up triggering the HOOK_AC_CHANGE hook. BUG=b:189911786 BRANCH=dedede TEST=Build and flash boten, plug in charger, suspend DUT, unplug DUT, verify that DUT wakes up even after the first call to check AC OK occurs. Signed-off-by: Aseda Aboagye <aaboagye@google.com> Change-Id: Id0b60289cfb14509fd781942afbcedfa9e127a8a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2937738 Tested-by: Aseda Aboagye <aaboagye@chromium.org> Auto-Submit: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Diana Z <dzigterman@chromium.org>
* COIL: Rename MODULE_SPI_MASTER to MODULE_SPI_CONTROLLERCaveh Jalali2021-06-0339-68/+68
| | | | | | | | | | | | | | | | 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-0321-21/+22
| | | | | | | | | | | | | | | | 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>
* zephyr: Remove a few configs from allowlistPhilip Chen2021-06-032-3/+0
| | | | | | | | | | | | | | | | | | CONFIG_TABLET_MODE_SWITCH is already in zephyr Kconfig. CONFIG_TABLET_SWITCH is not a valid EC config. Remove them from config_allowed.txt. BRANCH=None BUG=None TEST=make buildall Change-Id: I36cd880e7b9f8df0a30503829dd46abcc2f54e07 Signed-off-by: Philip Chen <philipchen@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2935058 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Philip Chen <philipchen@chromium.org> Tested-by: Philip Chen <philipchen@chromium.org>
* tcpmv2: Don't enable USB mode until PD state resolvedKeith Short2021-06-036-1/+47
| | | | | | | | | | | | | | | | | | | | | | Don't enable USB superspeed signals until the PD capability is known. This fixes an issue where platforms that enable the virtual USB mux violate the tSenderResponse timeout when the attached SRC sends the Source Capabilities message. BUG=b:187796705 BRANCH=none TEST=Volteer - connect PD charger, obsserve no hard reset TEST=Connect non-PD USB device, verify USB mode is enabled TEST=Connect USB+DP monitor, verify DP mode entry and USB mode enabled TEST=Connect USB4 dock, verify USB4 entry TEST=faft_pd test suite passes on Voxel Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I4be08874178d1e225cf41939b9626a81b0da0524 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2895424 Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Tested-by: caveh jalali <caveh@chromium.org>
* PD console: add cflush around long console printsBoris Mittelberg2021-06-031-0/+5
| | | | | | | | | | | | | | | | | `pd state` and `pd dualrole` command outputs are non-atomic and even have function calls in the middle of lines. This caused the output to be mixed with non-related prints, and FAFT is sometimes failing to parse the needed lines. Wrapping those commands with `cflush` reduces output corruption. BRANCH=none BUG=b:188881690 TEST=running FAFT PD Signed-off-by: Boris Mittelberg <bmbm@google.com> Change-Id: I0750df0b1ce0bb52b96718769626ca8e2e1b55c6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2932456 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* lindar : Correct EC chipset setting to match HW designamber.chen2021-06-032-1/+2
| | | | | | | | | | | | | | | | Correct EC chipset setting to match HW design (npcx797f) BRANCH=main BUG=b:189250648 TEST=make -j BOARD=lindar Signed-off-by: amber.chen <amber.chen@lcfc.corp-partner.google.com> Change-Id: Iecf331427364dc2e439597f33a6add01bff5e787 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2929069 Reviewed-by: Zhuohao Lee <zhuohao@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Zhuohao Lee <zhuohao@chromium.org> Tested-by: Zhuohao Lee <zhuohao@chromium.org>
* zephyr: Fix uninitialized varJeremy Bettis2021-06-031-1/+1
| | | | | | | | | | | | | | | | | The ret var was uninitialized, and with coverage enabled, the tests failed. BUG=b:184855975 BRANCH=none TEST=zmake configure --coverage --test zephyr/test/drivers Change-Id: Ib3c34c4a87ded0ff5cb1b2ab81fa0b9b2ec65358 Signed-off-by: Jeremy Bettis <jbettis@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2934661 Tested-by: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: brya: enable watchdogYuval Peress2021-06-031-0/+3
| | | | | | | | | | | | | | | | | | | | | | Sample watchdog reset output: 21-06-01 22:52:56.438 �*** Booting Zephyr OS build zephyr-v2.5.0-101-g7a99b4a3ee12 *** 21-06-01 22:52:56.466 21-06-01 22:52:56.466 21-06-01 22:52:56.466 --- UART initialized after reboot --- 21-06-01 22:52:56.468 [Image: RO, brya_zephyr_v2.0.8889+b910a3b4e 2021-05-20 10:42:38 peress@technodrome.c.googlers.com] 21-06-01 22:52:56.480 [Reset cause: watchdog] BRANCH=none BUG=b:188605676 TEST=Add infinite loop in main() after initializing watchdog, observe watchdog reset the EC. Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: Id4fb9343f7e0fb73a4e3e39fbbae824eb8c94d2f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2932461 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* zephyr: brya: enable i2cYuval Peress2021-06-033-1/+91
| | | | | | | | | | | | | | | | | | | | | | | | | Enable (status = "okay") i2c ports for sensors, battery, and charger/ eeprom. uart:~$ i2c scan I2C_7_PORT_0 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- 09 -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: 50 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- 2 devices found on I2C_7_PORT_0 BRANCH=none BUG=b:188605676 TEST=run i2c scan shell command Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: Id841551a09aec86faa56d9bd0977f0aa1f6b24e8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2932460
* zephyr: brya: enable sysinfo console commandYuval Peress2021-06-031-1/+1
| | | | | | | | | | | | BRANCH=none BUG=b:188605676 TEST=run `sysinfo` in EC shell Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: Ie593090e7afc68701e21ae4f648a0a6e3b364fcf Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2932459 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* zephyr: brya: wakeup from hibernationYuval Peress2021-06-033-9/+27
| | | | | | | | | | | | | configure wakeup gpios. BRANCH=none BUG=b:188605676 TEST=`hibernate` in EC console, then press the physical power button to wake up. Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: Ice839bc39393f416fea7548f5497791c10a155ec Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2932458
* asurada: config MKBP host event wake source.Eric Yilun Lin2021-06-031-0/+5
| | | | | | | | | | | | | | | | To explicitly exclude the DP enter mode event as wake source, and allow keyboard matrix and host event. BUG=b:187159670 TEST=verify DP enter mode event won't wake the system from suspend BRANCH=asurada Change-Id: If8f2258579f26ebbb3f521d0614854fe31dc1bad Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2870891 Tested-by: Eric Yilun Lin <yllin@google.com> Reviewed-by: Ting Shen <phoenixshen@chromium.org> Commit-Queue: Eric Yilun Lin <yllin@google.com>
* charge_state_v2: clear charger current after adapter outqinwentao2021-06-031-0/+7
| | | | | | | | | | | | | | | | | | For RAA48900 chip, charge current will affect the Type-C output,so we shall clear charger current after adapter out. BUG=b:187967523 BRANCH=dedede TEST=make BOARD=storo pass Signed-off-by: qinwentao <wangganxiang@huaqin.corp-partner.google.com> Change-Id: I66ff83144ef6f40e5772079b9fe5e6d157728796 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2921971 Reviewed-by: Mike Lee <mike5@huaqin.corp-partner.google.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Mike Lee <mike5@huaqin.corp-partner.google.com> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* storo: Add motion sensor config for lis2dwl/icm-42607Mike Lee2021-06-034-35/+159
| | | | | | | | | | | | | | | | | Add icm-42607 config for new second source base accel/gyro, and lis2dwl lid accel config for new second source. BUG=b:188373185,b:188373186 BRANCH=dedede TEST=Using ectool 'motionsense' verified lid angle goes from 0 to 360 and swtiches to tablet mode after crossing 200 threshold on re-work lis2dwl/icm-42607 DUT. Signed-off-by: Mike Lee <mike5@huaqin.corp-partner.google.com> Change-Id: I2080816aeb0f5f542d773b8dbe219dbe6efd4226 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2912409 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* cret: Modify three battery parameterjohnwc_yeh2021-06-032-24/+21
| | | | | | | | | | | | | | | | | | | | | | | | | Add three battery type for cret. And modify device name and device length to identify. 1. New battery type of manufacture name is same as BATTERY_BYD_1VX1H, BATTERY_SMP_ATL_VM732 and BATTERY_SMP_COS_VM732, so use device name to recognize. 2. The last three strings of the battery device name are the production date, need ignore,so modify the read length of the device name. BUG=b:183875170 BRANCH=dedede TEST=Battery can be found via EC log check and battery can be cutoff by ectool command. Signed-off-by: johnwc_yeh <johnwc_yeh@compal.corp-partner.google.com> Change-Id: I1ab8116d8e6c41d3eeb48852058fbd71bee0eca6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2919151 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>
* battery_fuel_gauge: Check length of device stringAseda Aboagye2021-06-031-1/+4
| | | | | | | | | | | | | | | | | | | | | In the common battery fuel gauge framework, the boards may specify strings for the expected battery packs to be used at runtime. Some specified battery strings may be shorter than what is provided by the fuel gauge as the later portion of the string can vary according to lot code and/or manufacture date. This commit simply checks up to the length of the string provided by the board in order to find a match. BUG=b:183875170 BRANCH=dedede TEST=Build and flash a dedede device, verify that the battery can be found. Signed-off-by: Aseda Aboagye <aaboagye@google.com> Change-Id: Ib1c4690ca2b676e6e019015c4dec1d57899479b1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2934659 Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* blipper: Optimize EC power consumptionwuzhongtian2021-06-033-18/+8
| | | | | | | | | | | | | | | | | | | | From Blipper HW circuit, some GPIO in EC side is NC or unused. So, we can configure it as NC to optimize EC power consumption. 1. HDMI_EN_SUB_ODL (GPE0) 2. EC_SUB_IO_1 (GPF0) 3. EC_SUB_IO_1 (GPL3) 4. EC_SUB_ANALOG (GPL0/ADC13) 5. EC_I2C_SENSOR (GPF6/GPF7) BUG=b:185044041 BRANCH=dedede TEST=make -j BOARD=blipper Signed-off-by: Mike Lee <mike5@huaqin.corp-partner.google.com> Change-Id: I8e04a2ef03fc540a4fc7544ca4ad5b2038ced988 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2918807 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* COIL: Remove CONFIG_SPI_MASTER_NO_CS_GPIOSCaveh Jalali2021-06-032-5/+0
| | | | | | | | | | | | | | This removes the CONFIG_SPI_MASTER_NO_CS_GPIOS config option as no code actually uses it. BRANCH=none BUG=b:181607131 TEST=make buildall passes; "compare_build.sh -b all" shows no difference Change-Id: Iab1c7a79ee0ad973605c768f87ad8e19ed6ef4e7 Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2932470
* COIL: Remove CONFIG_SPI_MASTER_CONFIGURE_GPIOSCaveh Jalali2021-06-032-4/+0
| | | | | | | | | | | | | | This removes the CONFIG_SPI_MASTER_CONFIGURE_GPIOS config option as no code actually uses it. BRANCH=none BUG=b:181607131 TEST=make buildall passes; "compare_build.sh -b all" shows no difference Change-Id: I4083a0ed1b106f9dcf0534625da5286dc0c34552 Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2932469
* COIL: Remove CONFIG_SPI_MASTER_PORTCaveh Jalali2021-06-033-3/+0
| | | | | | | | | | | | | | | This removes the CONFIG_SPI_MASTER_PORT config option as no code actually uses it. BRANCH=none BUG=b:181607131 TEST=make buildall passes; "compare_build.sh -b all" shows no difference Change-Id: Iddcfa2b36e4100063bb6ad36941f09ac56b0be94 Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2932468 Reviewed-by: Harry Cutts <hcutts@chromium.org>
* COIL: spi_nor: Rename spi_master to spi_controllerCaveh Jalali2021-06-032-23/+27
| | | | | | | | | | | | | | | This renames the spi_master struct member of spi_nor_device_t to spi_controller. BRANCH=none BUG=b:163885307 TEST=make buildall passes; "compare_build.sh -b all" shows no difference Change-Id: I446de6e60fa1e4dfa1266dca04d851fbfb6c250b Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2932467 Reviewed-by: Harry Cutts <hcutts@chromium.org>
* Cret: Add SSFC settings for audio codecjohnwc_yeh2021-06-031-0/+5
| | | | | | | | | | | | | | | | Add bits 9 - 11 are for SSFC audio codec. BUG=b:189524295 BRANCH=dedede TEST=make BOARD=cret Signed-off-by: johnwc_yeh <johnwc_yeh@compal.corp-partner.google.com> Change-Id: I6507e8196b7738935837ae00e57941e805cb4bc5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2928677 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>
* cret: Add GPIOC0 EC_ACOK_OTG for AC OTG OVP protect enablejohnwc_yeh2021-06-032-1/+10
| | | | | | | | | | | | | | | | | | When the Type-C AC plug-in 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: Ib59fd7efc387726f4c5afb371804e6e5be311a70 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2910229 Tested-by: Matt Wang <matt_wang@compal.corp-partner.google.com> Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* zephyr: Don't reinitialize gpios on a warm rebootSam Hurst2021-06-034-13/+50
| | | | | | | | | | | | | | Don't reinitialize gpios on a warm reboot BRANCH=none BUG=b:187337449,b:186458444 TEST=Verified that the system booted properly Signed-off-by: Sam Hurst <shurst@google.com> Change-Id: Ie11bdde9fa0124c0bf21cdc9baa3a98a85bbdad2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2904549 Reviewed-by: Wai-Hong Tam <waihong@google.com> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr: brya: enable power managementYuval Peress2021-06-031-0/+6
| | | | | | | | | | | | | | Enable PM for hibernate state. BRANCH=none BUG=b:188605676 TEST=`hibernate` in EC console, then `ecrst pulse` in H1 console Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: I11ce7ad1ece4b58ec041383dbf07edb3000cb6ab Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2932457 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr: brya: Enable vbootYuval Peress2021-06-032-2/+8
| | | | | | | | | | | | | | Enable the vboot feature for brya BRANCH=none BUG=b:188605676 TEST=flash brya and see vboot's hash result Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: Ifeb3564a5a10e9aad77dd5f193d08fd4efd253ad Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2927769 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* Test: Add TC unit test for source disconnect detectionDiana Z2021-06-031-1/+73
| | | | | | | | | | | | | | Add a TC layer test for source disconnect, and also add some infrastructure to detect the test board's Vbus output. BRANCH=None BUG=b:153071799 TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I72f2553d59b939bf236e0ae3ea6248df899ef4ca Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2921283 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* IOEX_CCGXXF: Add 1.8V level GPIOs supportIurii2021-06-032-3/+20
| | | | | | | | | | | | | BUG=none BRANCH=none TEST=Tested voltage levels on CCGXX validation platform Change-Id: Ibc8f0dc05ac4351e96d9479a99227633742ec7bc Signed-off-by: Iurii Berezhanskyi <iurii.berezhanskyi@infineon.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2891837 Tested-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* zephyr/zmake: Increase binman timeoutRaul E Rangel2021-06-021-1/+1
| | | | | | | | | | | | | | | | 5 seconds is too low for the CQ. Increase it to 60 in case the builders are very backed up. BUG=b:189948512 BRANCH=none TEST=CQ Signed-off-by: Raul E Rangel <rrangel@chromium.org> Change-Id: I058b8199df2a1fd855fbbcefdddcaa5e19d1d3c6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2935176 Commit-Queue: Simon Glass <sjg@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
* collis: Config lid rotation matrix.Michael5 Chen12021-06-021-2/+2
| | | | | | | | | | | | | | | | Config lid rotation matrix. BUG=b:189906883 BRANCH=volteer TEST=manual Using ectool command "ectool motionsense lid_angle" and check angle from 0 to 360 degree. Signed-off-by: Michael5 Chen1 <michael5_chen1@pegatron.corp-partner.google.com> Change-Id: I1e7b474d16c36741420de0fc9094c85da9d0721a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2931752 Reviewed-by: Zhuohao Lee <zhuohao@chromium.org> Reviewed-by: Jacky Wang <jacky5_wang@pegatron.corp-partner.google.com>
* brya: LED comments improvementBoris Mittelberg2021-06-021-2/+6
| | | | | | | | | | | | | | Fix typo, add functional description BRANCH=none BUG=b:182329831 TEST=none (changed comments only) Signed-off-by: Boris Mittelberg <bmbm@google.com> Change-Id: Ie36b39291bd0111412fea3b5d3bf963517cf1da3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2932418 Reviewed-by: caveh jalali <caveh@chromium.org> Commit-Queue: caveh jalali <caveh@chromium.org>
* volet: remmove bb control, change tcpc configBen Chen2021-06-023-93/+66
| | | | | | | | | | | | | remove bb config, and modify tcpc c0/c1 Rt1715/ps8751 driver BUG=b:189402479 BRANCH=cros/main TEST=make BOARD PASS, and power on test normal. Change-Id: If55e07a0de457e1e2bdb4c55b523bfefce7c7794 Signed-off-by: Ben Chen <ben.chen2@quanta.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2921695 Reviewed-by: Keith Short <keithshort@chromium.org>
* magister: delay thermal sensor read at first timeBen Chen2021-06-021-0/+1
| | | | | | | | | | | | | | | | Add CONFIG_TEMP_SENSOR_FIRST_READ_DELAY_MS to adjustment delay time of thermal sensor first read. Add 500 ms delay of thermal sensor first read in metaknight. BUG=b:189415292 BRANCH=dedede TEST=DUT do [ec reset|boot from G3] 20 time pass Change-Id: I5136212ead9bd53672e4d55025ca10a6aaca599d Signed-off-by: Ben Chen <ben.chen2@quanta.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2929064 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* zephyr: faft_ec: print time stamped init labelSam Hurst2021-06-021-0/+7
| | | | | | | | | | | | | | | | | Print time stamped label, [<time> Inits done], after initialization is complete. The label is used in the firmware_ECBootTime test. BRANCH=none BUG=b:189218631 TEST=sudo test_that -b trogdor-zephyr 192.168.0.70 firmware_ECBootTime results-1-firmware_ECBootTime [ PASSED ] results-1-firmware_ECBootTime/firmware_ECBootTime [ PASSED ] Signed-off-by: Sam Hurst <shurst@google.com> Change-Id: Ifa96d1eb0035a823d5e25b2f3973f4bb063ca044 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2927464 Reviewed-by: Wai-Hong Tam <waihong@google.com>
* Revert "Mancomb: Increase LPM exit debounce"Diana Z2021-06-011-2/+0
| | | | | | | | | | | | | | | | This reverts commit bfa6f4ddad316ef5b13497504680e25579464be3. It is no longer necessary with the change to the NCT TCPC driver debug accessory bit set. BRANCH=None BUG=b:186799392 TEST=on mancomb, confirm no-battery boots detect powered servo_v4 CC status immediately Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I7e8a5f075f81fb6b3647fb0b7dcb2d7700632f6c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2919944 Reviewed-by: Rob Barnes <robbarnes@google.com>
* Revert "Guybrush: Increase LPM exit debounce"Diana Z2021-06-011-2/+0
| | | | | | | | | | | | | | | This reverts commit 687a7e55d6e79aa83aeb98fff0ddcebb39a27872. It is no longer necessary with the new changes in the NCT TCPC driver to make the debug accessory set conditional. BRANCH=None BUG=b:186799392 TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Id4d5056d800f768dfe4ce91f1b0f6ded9c48b8cf Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2919943 Reviewed-by: Rob Barnes <robbarnes@google.com>
* NCT38xx: Set debug accessory control conditionallyDiana Z2021-06-011-4/+35
| | | | | | | | | | | | | | | | | | | | If we've booted in dead battery mode with a debug accessory connected, then changing the TCPC_CONTROL.DebugAccessoryControl bit will result in a significant delay to detecting the CC line state. Track our boot type and use it plus the presence of a debug accesssory to determine if we'll change this bit. BRANCH=None BUG=b:186799392 TEST=on mancomb, boot and reboot with servo_v4 power only and ensure we detect the CC lines correctly with no dealy. Also plug in servo_v4 with BJ power attached first to ensure we set the debug accessory control bit correctly and verify we can PR swap back and forth. Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I5bcdee1de61ed198cab82bae1ab6ac5996b9e80b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2919942 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* TCPCI: Add definition for power status debug bitDiana Z2021-06-011-0/+1
| | | | | | | | | | | | | | | The POWER_STATUS register has an indication in bit 7 that a debug accessory is connected. This bit appears to be present in both TCPCI Rev 2.0 Ver 1.2 and Rev 1.0 Ver 1.2. BRANCH=None BUG=b:186799392 TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Idc4efe30d328070605b985d5541b71713af25030 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2919941 Reviewed-by: Rob Barnes <robbarnes@google.com>
* Remove CONFIG_BATTERY_DEAD_UNTIL_VALUEDaisuke Nojiri2021-06-014-16/+0
| | | | | | | | | | BUG=none BRANCH=none TEST=buildall Change-Id: Iebf0817c1b605d74348c9b20c01df74bd69468d2 Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2929338
* TCPMv2: Re-enable SOP' transmission on interruption to Vconn swapDiana Z2021-06-011-25/+39
| | | | | | | | | | | | | | | | | | | | | If a Vconn swap is interrupted before we receive a PS_RDY from the partner, re-enable SOP' transition. Note this doesn't matter for the case of no PS_RDY received as we'll proceed to hard reset which will also reset our Vconn role. This is primarily applicable if the interruption is for an unexpected message, which interrupts the swap and leaves us the Vconn source. BRANCH=volteer BUG=b:186886218 TEST=on drobit, ensure cable entry doesn't fail after failed Vconn swap with dock Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I952c04535ae9527f07cb203c403a51182c67cba7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2881020 Tested-by: Benson Leung <bleung@google.com> Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* Homestar:LED:Power LED and Battery LED status amendtongjian2021-06-011-4/+5
| | | | | | | | | | | | | | BUG=b:187539586 TEST=make -j BOARD=homestar Verify build on EVT board BRANCH=Trogdo Signed-off-by: tongjian <tongjian@huaqin.corp-partner.google.com> Change-Id: I90fe26c6911d4b5dd04ae6aa131aeb4e8f7a3e7d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2924484 Reviewed-by: Wai-Hong Tam <waihong@google.com> Commit-Queue: Wai-Hong Tam <waihong@google.com> Tested-by: Wai-Hong Tam <waihong@google.com>
* rt1718s: implement BC1.2 driverTing Shen2021-06-012-1/+264
| | | | | | | | | | | | | BUG=b:177391887 TEST=manually BRANCH=main Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: I250c33c8e7c433679fa3a2fcc31e0c59656190e8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2880133 Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Eric Yilun Lin <yllin@google.com>
* driver/tcpc: implement rt1718s tcpc/ppc driverTing Shen2021-06-016-0/+420
| | | | | | | | | | | | | BUG=b:177391887 TEST=none BRANCH=main Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: I8f017e21b74c1e27ca7f257b76b0ef74fd0343f2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2639734 Reviewed-by: Eric Yilun Lin <yllin@google.com> Tested-by: Ting Shen <phoenixshen@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org>
* flash_fp_mcu: Add automatic service stop/restartCraig Hesling2021-06-011-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The normal invocation of flash_fp_mcu is without biod and timberslide being stopped. This is a problem, since this script unbinds/bind drivers that biod and timberslide have open and can interact with. BRANCH=none BUG=b:188985272 b:181635081 TEST=# On Nocturne scp util/flash_fp_mcu dut1:/usr/local/bin/flash_fp_mcu ssh dut1 flash_fp_mcu --hello # Ensure that the biod and timebrslide were stopped and restarted. # No warnings about other services having files open should occur. ssh dut1 flash_fp_mcu --noservices --hello # Ensure that no services were stopped/started and a warning should # be emitted about processes with the device file open. ssh dut1 flash_fp_mcu --noservices --hello # Should see that the warnings shown now show that the open file # was deleted. Cq-Depend: chromium:2918383, chromium:2918638 Signed-off-by: Craig Hesling <hesling@chromium.org> Change-Id: I021b922fb58defcbe608492239e311a5f5296fca Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2914502 Reviewed-by: Josie Nordrum <josienordrum@google.com>
* delbin: gyro sensor add 2nd source KX022Michael5 Chen12021-05-312-2/+38
| | | | | | | | | | | | | | | | | | Gyro sensor add 2nd source KX022. BUG=b:187138428 BRANCH=volteer TEST=manual 1. Set CBI SSFC 0x10 and using command "ectool motionsense" for sensor kxo22. 2. Using command "ectool motionsense" for sensor BMA253. Signed-off-by: Michael5 Chen1 <michael5_chen1@pegatron.corp-partner.google.com> Change-Id: I82f67e3fa3ad5285db58a7cc0f98aaf112e6898f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2910570 Tested-by: Zhuohao Lee <zhuohao@chromium.org> Reviewed-by: Zhuohao Lee <zhuohao@chromium.org> Commit-Queue: Zhuohao Lee <zhuohao@chromium.org>