summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* zephyr: shim: add single charge task supportFabio Baltieri2022-06-039-12/+109
| | | | | | | | | | | | | | | | | | | | | | | | Add an option to run the charger code in a single task. This is enabled by default in Zephyr builds, but explicitly disabled for a couple of platforms that currently have task dependent board code. Should be enough to start testing the configuration, will work on handling the remaining boards (corsola and nissa) later. BRANCH=none BUG=b:226411332 TEST=make buildall TEST=zmake testall TEST=cq dry run TEST=run on Brya, connect/disconnect usb devices Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: I75a63f7b0a9545e6c824114de7f81b71924e0789 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3663748 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-by: Aaron Massey <aaronmassey@google.com>
* kinox: update the charge manager infoMatt Wang2022-06-031-2/+14
| | | | | | | | | | | | | | | | | | | Modify the charge info for the host command EC_CMD_USB_PD_POWER_INFO can get which one type the adapter plugin then set the corresponding intel power limit parameters. The CHARGE_SUPPLIER_PROPRIETARY for TIO1 and TIO2. The CHARGE_SUPPLIER_DEDICATED for TINY. BUG=b:231911918 BRANCH=none TEST=The host can get the correct adpater type.(b:231911918#comment12) Signed-off-by: Matt Wang <matt_wang@compal.corp-partner.google.com> Change-Id: I801fba3a7630c77271abe6b07ebcf53734537d02 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3662863 Reviewed-by: Ricky Chang <rickytlchang@chromium.org> Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com>
* servo_updater: Add retries for flash2Yi Chou2022-06-031-2/+2
| | | | | | | | | | | | | A workaround for the remaining character in the USB buffer. BRANCH=None BUG=b:232156962 TEST=servo_updater -b servo_micro Signed-off-by: Yi Chou <yich@google.com> Change-Id: I0334172c0bc10d16201ff9c4d54d66c02ea283f6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3688769 Reviewed-by: Brian Nemec <bnemec@google.com>
* nereid: bring charger out of LPM on S0 entryPeter Marheine2022-06-031-0/+47
| | | | | | | | | | | | | | This appears to fix VBUS sourcing, though we don't understand why. It may also prevent charger damage with as-yet-unexplained cause. BUG=b:231920135,b:230712704 TEST=VBUS sourcing works when AP is in S0 BRANCH=none Signed-off-by: Peter Marheine <pmarheine@chromium.org> Change-Id: Ia4d74f4211eb97b532882914d077e3dde5e59f64 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3686012 Reviewed-by: Andrew McRae <amcrae@google.com>
* tablet_mode: remove tablet command in clamshell systemarthur.lin2022-06-031-0/+2
| | | | | | | | | | | | | | | | | | | Remove console tablet mode command when undefine CONFIG_MKBP_INPUT_DEVICE and CONFIG_TABLET_MODE for wake source test. BUG=b:231930177 BRANCH=none TEST=make buildall -j TEST=on taniks, run test_that -b brya "IP" power_WakeSources can get pass result. TEST=on taeko/tarlo, run test_that -b brya "IP" power_WakeSources can get pass result. Signed-off-by: arthur.lin <arthur.lin@lcfc.corp-partner.google.com> Change-Id: I678e404c46c061d67737165e77d885d6afd4eed3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3670655 Reviewed-by: Boris Mittelberg <bmbm@google.com> Reviewed-by: Parth Malkan <parthmalkan@google.com>
* zephyr: herobrine: Define battery-level property as int rangeParth Malkan2022-06-031-4/+8
| | | | | | | | | | | | | | | | Currently battery-level property is defined using enums. This patch changes this to use int range instead. BRANCH=None BUG=b:233953617 TEST=Manual test on Lazor by modifying nodes to include battery-level range, use battfake to set different levels and observe LED behavior. Cq-Depend: chromium:3669088 Signed-off-by: Parth Malkan <parthmalkan@google.com> Change-Id: I18ef922a41ce17d509f03a1774e9d9437fc7065d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3669089 Reviewed-by: Wai-Hong Tam <waihong@google.com>
* zephyr: LED: Define battery-level property as int rangeParth Malkan2022-06-034-24/+62
| | | | | | | | | | | | | | | | Currently battery-level property is defined using enums. This patch changes this to use int range instead. BRANCH=None BUG=b:233953617 TEST=Manual test on Lazor by modifying nodes to include battery-level range, use battfake to set different levels and observe LED behavior. Cq-Depend: chromium:3669089, chromium:3669090 Signed-off-by: Parth Malkan <parthmalkan@google.com> Change-Id: Idfe516addfe20d5141e5106afd338b49f10a6349 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3669088 Reviewed-by: Wai-Hong Tam <waihong@google.com>
* zephyr: skyrim: Define battery-level property as int rangeParth Malkan2022-06-031-2/+6
| | | | | | | | | | | | | | | | Currently battery-level property is defined using enums. This patch changes this to use int range instead. BRANCH=None BUG=b:233953617 TEST=Manual test on Lazor by modifying nodes to include battery-level range, use battfake to set different levels and observe LED behavior. Cq-Depend: chromium:3669088 Signed-off-by: Parth Malkan <parthmalkan@google.com> Change-Id: I502b7a85420b0c017494739a977c468fd009dfde Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3669090 Reviewed-by: Wai-Hong Tam <waihong@google.com>
* Replace power_get_state calls with chipset_in_statePeter Marheine2022-06-032-31/+13
| | | | | | | | | | | | | | | | | | | | The `power_get_state` function does not exist when using the Zephyr native power sequencing subsystem. Use the chipset_in_state family of functions instead, because those are available in either configuration. For PD power state change, this means S4 cannot be returned because chipset_in_state doesn't currently provide an option for S4 specifically. BUG=b:233681784 TEST=make buildall; zmake testall BRANCH=none Signed-off-by: Peter Marheine <pmarheine@chromium.org> Change-Id: I14af373ec4473b0c19bf46ebae0c503e5139e114 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3685929 Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-by: Jameson Thies <jthies@google.com> Tested-by: Jameson Thies <jthies@google.com>
* kinox: Add control type-c adapter OBP methodMatt Wang2022-06-022-18/+102
| | | | | | | | | | | | | | | | | | | The barrel jack OBP method at CL:3521743, this CL add for type-c adapter. Use the charge manager info to get the adapter source capacity to set the OBP pointer then trigger PROCHOT. BUG=b:211806236;b:213955278 BRANCH=none TEST=Kinox can get the barrel(90w) type-c(65w/45w) adapter. Signed-off-by: Matt Wang <matt_wang@compal.corp-partner.google.com> Change-Id: I3e1af004aa5e22ff61af06c89690237059cce00b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3644747 Commit-Queue: Ricky Chang <rickytlchang@chromium.org> Reviewed-by: Elmo Lan <elmo_lan@compal.corp-partner.google.com> Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Reviewed-by: Ricky Chang <rickytlchang@chromium.org>
* USB Mux: Set an event when AP mux sets completeDiana Z2022-06-022-0/+12
| | | | | | | | | | | | | | | | | The AP will need to know when its selected mux has finished setting. For now, most boards have at most one mux and one retimer, and so add events for each of those. BRANCH=None BUG=b:208882941,b:155889939 TEST=on nipperkin, set muxes via the AP console and view the corresponding events are set Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I52fcfe861f80e60bd01ab4bd610edb7cadf1e049 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3687080 Commit-Queue: Abe Levkoy <alevkoy@chromium.org> Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* TCPMv2: Add a host command to allow the AP to set muxesDiana Z2022-06-023-1/+55
| | | | | | | | | | | | | | | Add a sub-command onto the TYPEC_CONTROL command in order to permit the AP to set muxes and retimers. BRANCH=None BUG=b:208882941,b:155889939 TEST=on nipperkin, ensure muxes can be changed from ectool Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I08ed46474693ec09b1db155b469b83d4acec8fbb Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3687079 Commit-Queue: Abe Levkoy <alevkoy@chromium.org> Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* Ectool: Correct TYPEC_CONTROL switchDiana Z2022-06-021-0/+1
| | | | | | | | | | | | | | | | Add a "break" to the case for the enter mode command. Otherwise, it would fall through to the UFP policy state. BRANCH=None BUG=None TEST=on nipperkin, verify enter mode request is queued up (though not acted on, since AP driven mode entry isn't enabled) Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I2e93661110350d2df4566e4565c1d0dab5590447 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3687078 Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Commit-Queue: Abe Levkoy <alevkoy@chromium.org>
* USB mux: Allow single muxes or retimers to be setDiana Z2022-06-022-22/+66
| | | | | | | | | | | | | | | | | The AP may want to only set a single mux or retimer in a chain, so create an interface to allow this to happen. Existing APIs will default to setting all muxes in the chain, as they did before. BRANCH=None BUG=b:208882941,b:155889939 TEST=make -j buildall, on nipperkin ensure a monitor still works normally Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Iebfa55d9ad1b89c9ea0f626728c9f2028b490ac1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3687077 Commit-Queue: Abe Levkoy <alevkoy@chromium.org> Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* USB mux: Add CONFIG for AP driven mux controlDiana Z2022-06-023-0/+15
| | | | | | | | | | | | | | Add a CONFIG option to support the AP directing mux and retimer sets. BRANCH=None BUG=b:208882941,b:155889939 TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Ic42e256126f68684bbfdd27654f41c0e5290caf9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3687076 Commit-Queue: Keith Short <keithshort@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* Guybrush: Convert SBU GPIO set from full mux member to board_setDiana Z2022-06-021-26/+4
| | | | | | | | | | | | | | | | | As we move towards allowing the AP to control our muxes and retimers, it will be the most intuitive for any non-muxes such as the SBU protection chip to be folded into the mux sets. BRANCH=None BUG=b:208882941 TEST=on nipperkin, ensure the SBU flip is set correctly when plugging in a dongle Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I2c5806726e637679f1be0b8841f53732752b904a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3674033 Commit-Queue: Robert Zieba <robertzieba@google.com> Reviewed-by: Robert Zieba <robertzieba@google.com>
* zephyr:test: Resolve linker conflict with gpio_ledAl Semjonovs2022-06-021-1/+1
| | | | | | | | | | | | | | LOG module caused linker conflict with gpio_led when compiling test-drivers BUG=b:233607287 BRANCH=NONE TEST=zmake testall Signed-off-by: Al Semjonovs <asemjonovs@google.com> Change-Id: Ie319efe92a1b26a2c1b1294faf333f29db573edd Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3687094 Reviewed-by: Aaron Massey <aaronmassey@google.com>
* zephyr: npcx: update SHI driver for pinctrlKeith Short2022-06-029-17/+71
| | | | | | | | | | | | | | | | | | | Update the Nuvoton cros_shi_npcx driver to use pinctrl instead of pinmux. This introduces a SHI specific pinctrl state to switch the SHI pins back to GPIO. BUG=b:232543902 BRANCH=none TEST=zmake testall TEST=verify herobrine boots to AP. Verify sysjump to RW works on herobrine. Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: Ic66062d706738792ffffc5797637ae8a5d31593c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3646964 Tested-by: Eric Yilun Lin <yllin@google.com> Reviewed-by: Sam Hurst <shurst@google.com>
* corsola: Create common host interface devicetreeKeith Short2022-06-022-1/+2
| | | | | | | | | | | | | | | Create a common devicetree file to setup the host interface for Corsola boards based on the Nuvoton NPCX chippset. BUG=none BRANCH=none TEST=zmake testall Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I11a0c6223cd2cd8666babe49154357ab025a9f23 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3674032 Reviewed-by: Eric Yilun Lin <yllin@google.com> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* zephyr: npcx-cros-dbg: Update driver for pinctrlKeith Short2022-06-023-14/+31
| | | | | | | | | | | | | Update the npcx-cros-dbg driver for pinctrl support. BUG=b:232543902 BRANCH=none TEST=zmake testall Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I283982d44033ff600383c9ffd56e5f768716e75a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3646963 Reviewed-by: Yuval Peress <peress@google.com>
* task: change task_set_event return type to voidFabio Baltieri2022-06-0213-31/+14
| | | | | | | | | | | | | | | No implementation does nothing other than return 0 on task_set_event(), change the return type to void so that the API is clear. BRANCH=none BUG=none TEST=cq dry run Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: I88b20f53aa6dffa291ce78f4776888b21985f57f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3683769 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr: Remove cros_fwid from version outputRobert Zieba2022-06-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently the ec version output prints the value of cros_fwid. However, this string isn't set up for zephyr and is in the process of being deprecated. This commit disables the Zephyr Kconfig for this feature by default. This is done instead of removing it to pass a CQ test that will fail because it identifies `CONFIG_CROS_FWID_VERSION` as an orphan config. Example EC console output: ``` 22-05-26 13:07:39.852 Chip: Nuvoton npcx9m3f 00160207 22-05-26 13:07:39.855 Board: 2 22-05-26 13:07:39.855 RO: skyrim_v3.1.49995-ec:15e362,os: 22-05-26 13:07:39.858 RW: skyrim_v3.1.49995-ec:15e362,os: 22-05-26 13:07:39.860 Build: skyrim_v3.1.49995-ec:15e362,os:<...> 22-05-26 13:07:39.868 2022-05-26 13:04:44 <...> ``` BRANCH=none BUG=b:232468323 TEST=Ran version command Signed-off-by: Robert Zieba <robertzieba@google.com> Change-Id: Ic80efaec46f67b971ccdde0441538545d3321d20 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3671455 Reviewed-by: Diana Z <dzigterman@chromium.org>
* ec: stm32: Use EC_SPI_RX_READY macroSam Hurst2022-06-021-1/+1
| | | | | | | | | | | | | | | | Using EC_SPI_RX_READY instead of EC_SPI_OLD_READY prevents the SDO line going high when the AP shuts down. BUG=b:216831450 BRANCH=none TEST=make -j buildall Verified on scope that SHI_SDO does not pulse high during AP Shutdown Signed-off-by: Sam Hurst <shurst@google.com> Change-Id: Idb0d125969bc0de91c20229b0e3f85303ebfebdf Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3685849 Reviewed-by: Eric Yilun Lin <yllin@google.com>
* kinox: modify fan frequencyMatt Wang2022-06-021-2/+2
| | | | | | | | | | | | | | Modify fan freq to 25kHz and remove the PWM_CONFIG_DSLEEP flag. BUG=b:231380285 BRANCH=none TEST=ectool pwmsetfanrpm 1000 and the ectool pwmgetfanrpm can nearly 1000rpm. Signed-off-by: Matt Wang <matt_wang@compal.corp-partner.google.com> Change-Id: Ic09d741c319cbcfbdfcb3147d371e8eef4264d0a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3685930 Reviewed-by: Ricky Chang <rickytlchang@chromium.org>
* osiris: Update PWM settingYu-An Chen2022-06-021-3/+3
| | | | | | | | | | | | | Update PWM setting, osiris PWM setting is follow kano BUG=b:234545460 b:229039902 BRANCH=none TEST=build pass Signed-off-by: Yu-An Chen <yu-an.chen@quanta.corp-partner.google.com> Change-Id: I2c9aeee96be7869008f6b98029bdf242d67d8afa Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3682985 Reviewed-by: Kenny Pan <kennypan@google.com>
* nissa: nivviks: Correct base form factor config.Andrew McRae2022-06-022-6/+7
| | | | | | | | | | | | | | Correct the nivviks form factor FW_CONFIG bit so that it is aligned with the Boxster config. BUG=b:233144358 TEST=zmake build nivviks; flash & run & check BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I6ed6f948e64e2624edd03d42889bd459e27fc95e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3686010 Reviewed-by: Peter Marheine <pmarheine@chromium.org>
* dooly: update GPIO status in HOOK_INITZick Wei2022-06-021-0/+2
| | | | | | | | | | | | | | Set GPIO_EC_PCH_RTCRST to low in HOOK_INIT. BUG=b:234105289 BRANCH=puff TEST=make sure tool can keep going when EC cold boot with specific RO and RW firmeware version. Signed-off-by: Zick Wei <zick.wei@quanta.corp-partner.google.com> Change-Id: I93cadf278df36bf78e7ee797683a642980428a21 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3676898 Reviewed-by: Andrew McRae <amcrae@google.com>
* zephyr: override HOOK task priority in EC APP's default KconfigJun Lin2022-06-022-9/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | The Zephyr-EC application leverages the system workqueue thread to implement the hook task. By default, its priority level is the lowest cooperative priority and higher than any EC task. The priority is overridden to 24 (NUM_PREEMPT_PRIORITIES - 1) after the application starts to run for a while. Before it is changed, it violates the CROS-EC's principle (HOOK task's priority should be only higher than the IDLE task) and may cause unexpected behavior like #5 in b:230663570. This CL overrides the priority level in APP's default Kconfig and removes the runtime priority setting to make it consistent at level 24 all the time. BRANCH:none BUG=b:230663570 TEST= "zmake testall --clobber" TEST= the symptom in #5 is fixed Signed-off-by: Jun Lin <CHLin56@nuvoton.com> Change-Id: Ia4bfe4e657b299294024cffe6e07685324f56498 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3682979 Reviewed-by: Wai-Hong Tam <waihong@google.com> Tested-by: Wai-Hong Tam <waihong@google.com> Tested-by: CH Lin <chlin56@nuvoton.com> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: CH Lin <chlin56@nuvoton.com>
* Zephyr: npcx: Add clock turbo mode for NPCX9Sam Hurst2022-06-011-0/+9
| | | | | | | | | | | | | Add clock turbo mode for NPCX9 BUG=b:230663570 BRANCH=none TEST=zmake testall Signed-off-by: Sam Hurst <shurst@google.com> Change-Id: If3e3161b83ddd47c2123511c8fd269de4d246e7a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3652223 Reviewed-by: Wai-Hong Tam <waihong@google.com>
* trogdor: Remove incorrect volume config from kingoftown/pazquelKnox Chiou2022-06-014-4/+10
| | | | | | | | | | | | | | | | | There's no side volume button for kingoftown/pazquel. Remove incorrect config. BUG=b:234175434 BRANCH=trogdor TEST=emerge-trogdor chromeos-ec and check ectool mkbpget button Signed-off-by: Knox Chiou <knoxchiou@google.com> Change-Id: Ica13644dc9947b38219aa27aacfe7661cec15e86 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3677835 Tested-by: Knox Chiou <knoxchiou@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com> Commit-Queue: Wai-Hong Tam <waihong@google.com> Auto-Submit: Knox Chiou <knoxchiou@chromium.org>
* ec: Add sleep in stillness_detector testJeremy Bettis2022-06-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Sometimes some of the background tasks, that don't affect test results, haven't even started or are still doing their initialization at the end of the test. Wait a short time (2s was determined through trial and error) before printing the test results. This should cause the test to emit a consistent number of lines in the coverage report. BRANCH=None BUG=b:213374060,b:234225228 TEST=Ran this command many times make clobber ; \ make TEST_COVERAGE=y build/coverage/stillness_detector.info \ >&/dev/null && lcov --summary build/coverage/stillness_detector.info \ && lcov --list build/coverage/stillness_detector.info \ | grep common/mkbp_event.c Change-Id: Ic889dfa55ed8f8dba3e26ef94c85c760ed47037b Signed-off-by: Jeremy Bettis <jbettis@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3681941 Tested-by: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org>
* Dewatt: update thermal table for temp sensor CPUSue Chen2022-06-011-3/+4
| | | | | | | | | | | | | | | | | temp_host WARN 100'C HIGH 105'C HALT 108'C temp_host_release HIGH 85'C BUG=b:232981797, b:212658444 BRANCH=guybrush TEST=verify by thermal team Signed-off-by: Sue Chen <sue.chen@quanta.corp-partner.google.com> Change-Id: I22c5f93b4a398275ada68b2fff38c3406f4e28ad Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3682978 Reviewed-by: Jonathon Murphy <jpmurphy@google.com> Commit-Queue: Jonathon Murphy <jpmurphy@google.com>
* zephyr:test: Add dock with power button test caseJameson Thies2022-06-013-1/+113
| | | | | | | | | | | | | | | | | | | | | | | This CL adds a dock with power button test case and updates the source emulator to support all the messages required for this currently enabled in TCPMV2. The new tests will notify a series of power state changes to the ec with hook_notify, and TCMPV2 will then have a Alert->Get_Status->Status transaction with the emulated partner. This test also includes a Get_Revision->Revision transaction with the partner to enable the 7-byte status message defined in USB PD Revision 3.1. BUG=b:232536412,b:233455723 BRANCH=NONE TEST=zmake test --coverage test-drivers --clobber Signed-off-by: Jameson Thies <jthies@google.com> Change-Id: Ide0d60e9a2f7e7098af545a70ab5c417acb5d934 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3680767 Reviewed-by: Tristan Honscheid <honscheid@google.com> Commit-Queue: Jameson Thies <jthies@google.com> Reviewed-by: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jameson Thies <jthies@google.com>
* kingler: update virtual-battery remote portEric Yilun Lin2022-06-011-1/+2
| | | | | | | | | | | | | | | | | | | | | To align to the kernel side update. Also, the origin selected remote port(remote 5 -> local 7) is happened to be conflicted with the I2C_PORT_EEPROM(5). I2C_PORT_EEPROM doesn't have a zephyr remote i2c port remap currently, so the accessing EEPROM from AP will access the physical port 5, and this will falsely access to local i2c port 7. BUG=b:214325092 TEST=pass firmware_ECCbiEEPRom BRANCH=none Change-Id: I29c53929226f1b39d715b48459a9a1dd7b65b9b0 Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3670656 Commit-Queue: Eric Yilun Lin <yllin@google.com> Tested-by: Eric Yilun Lin <yllin@google.com> Auto-Submit: Eric Yilun Lin <yllin@google.com> Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* steelix: enable USB-A1 portwen zhang2022-06-014-1/+19
| | | | | | | | | | | | | | enable the power control for USB-A1 port BUG=b:232050545 BRANCH=none TEST=the USB-A1 of steelix works well Change-Id: I89eb851f7f73e28b650372fe74cf1fac914dbcac Signed-off-by: wen zhang <zhangwen6@huaqin.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3682982 Reviewed-by: Mike Lee <mike5@huaqin.corp-partner.google.com> Reviewed-by: Eric Yilun Lin <yllin@google.com>
* zephyr: add GPIO enum GPIO_EN_PP5000_USB_A1_VBUSwen zhang2022-06-011-0/+1
| | | | | | | | | | | | | | It's missing so add the enum. BUG=b:232050545 BRANCH=none TEST=the USB-A1 of steelix works well Change-Id: I5521b323efa0b336a0373593f88b0b342a4a7048 Signed-off-by: wen zhang <zhangwen6@huaqin.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3682986 Reviewed-by: Mike Lee <mike5@huaqin.corp-partner.google.com> Reviewed-by: Eric Yilun Lin <yllin@google.com>
* Zephyr: adlrvp: Implement custom LED behaviorRajesh Kumar2022-06-016-2/+274
| | | | | | | | | | | | | | | Implemented custom LED behavior for Intel RVP using PWM. BUG=none BRANCH=None TEST=zmake build adlrvp_npcx Observed LED behviour Signed-off-by: Rajesh Kumar <rajesh3.kumar@intel.com> Change-Id: Ieb391dfe0c23e7b27211f23485f2720f7ac40a73 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3654481 Reviewed-by: Sam Hurst <shurst@google.com> Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com>
* Mithrax: Configure LED behaviorLeila Lin2022-06-013-31/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mithrax has a battery LED and no power LED. Battery LED AC mode: Charging (0%-94%): Amber Full charged: White Battery LED DC mode: S0: Solid White S3/S0ix: Blinking White, 1 sec on/3 sec off S5: Led off Battery Low(S0): Blinking Amber, 1 sec on/3 sec off Battery Low(S3/S0ix): Blinking White, 1 sec on/3 sec off Battery Low(S5): Led off Battery Error(S0): Blinking Amber, 1 sec on/1 sec off Battery Error(S3/S0ix): Blinking White, 1 sec on/3 sec off Battery Error(S5): Led off BUG=b:232889856 BRANCH=none TEST=make BOARD=mithrax, and verify the led behavior on mithrax Signed-off-by: Leila Lin <leilacy_lin@compal.corp-partner.google.com> Change-Id: Ice0c1ccf90c279ba7559adc4e8445c62b181fe4c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3658670 Reviewed-by: Ricky Chang <rickytlchang@chromium.org> Commit-Queue: LeilaCY Lin <leilacy_lin@compal.corp-partner.google.com.test-google-a.com> Reviewed-by: LeilaCY Lin <leilacy_lin@compal.corp-partner.google.com.test-google-a.com> Tested-by: LeilaCY Lin <leilacy_lin@compal.corp-partner.google.com.test-google-a.com> Reviewed-by: Elmo Lan <elmo_lan@compal.corp-partner.google.com> Reviewed-by: Boris Mittelberg <bmbm@google.com>
* vell: Correct battery charging OTP pointDevin Lu2022-06-011-1/+1
| | | | | | | | | | | | | | Regarding battery specification. The OTP is 51 degree while battery is charging. BUG=b:214885316 BRANCH=none TEST=build. Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: I72eb4f5330787e376d26d04f4c116782b1688306 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3676604 Reviewed-by: Boris Mittelberg <bmbm@google.com>
* zephyr: npcx: update kb raw driver for pinctrlKeith Short2022-05-316-104/+82
| | | | | | | | | | | | | | | Update the Nuvoton cros_kb_raw driver to use pinctrl instead of pinmux. BUG=b:232543902 BRANCH=none TEST=zmake testall TEST=verify keyboard on herobrine Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I1479d89c597d4d04b71507d63ecd4c42253f8bbf Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3646962 Reviewed-by: Wai-Hong Tam <waihong@google.com> Reviewed-by: Mulin Chao <mlchao@nuvoton.com>
* anahera: Fix FAN acoustic while EC resettingDevin Lu2022-05-311-1/+1
| | | | | | | | | | | | BUG=b:199246802 BRANCH=none TEST=Verify FAN acoustic is not loud while EC resetting. Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: I9120c548a08863cebe8876c22487db0b709c1d64 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3676602 Reviewed-by: Boris Mittelberg <bmbm@google.com> Commit-Queue: Boris Mittelberg <bmbm@google.com>
* ec: ite: Use EC_SPI_RX_READY macroSam Hurst2022-05-311-1/+1
| | | | | | | | | | | | | | | | Using EC_SPI_RX_READY instead of EC_SPI_OLD_READY prevents the SDO line going high when the AP shuts down. BUG=b:216831450 BRANCH=none TEST=zmake testall Verified on scope that SHI_SDO does not pulse high during AP Shutdown Signed-off-by: Sam Hurst <shurst@google.com> Change-Id: I08e0045b7712944fe5a951ef88d9b5a9504a2093 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3674598 Reviewed-by: Wai-Hong Tam <waihong@google.com>
* ec: npcx: Use EC_SPI_RX_READY macroSam Hurst2022-05-311-1/+1
| | | | | | | | | | | | | | | | Using EC_SPI_RX_READY instead of EC_SPI_OLD_READY prevents the SDO line going high when the AP shuts down. BUG=b:216831450 BRANCH=none TEST=zmake testall Verified on scope that SHI_SDO does not pulse high during AP Shutdown Signed-off-by: Sam Hurst <shurst@google.com> Change-Id: I4f95b972513c71628d910ecaef1ff9a074aa6a2d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3674597 Reviewed-by: Wai-Hong Tam <waihong@google.com>
* zephyr: ite: Use EC_SPI_RX_READY macroSam Hurst2022-05-311-1/+1
| | | | | | | | | | | | | | | | Using EC_SPI_RX_READY instead of EC_SPI_OLD_READY prevents the SDO line going high when the AP shuts down. BUG=b:216831450 BRANCH=none TEST=zmake testall Verified on scope that SHI_SDO does not pulse high during AP Shutdown Signed-off-by: Sam Hurst <shurst@google.com> Change-Id: I0ac0eeb26fdb558cfb6c9fc0dbfe61240e2195ff Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3674596 Reviewed-by: Wai-Hong Tam <waihong@google.com>
* kingoftown: Remove tablet modeTommy Chung2022-05-312-5/+1
| | | | | | | | | | | | | | | | Since kingoftown doesn't support tablet mode, remove it to avoid unexpected triggering. BUG=none BRANCH=trogdor TEST=make BOARD=kingoftown Signed-off-by: Tommy Chung <tommy.chung@quanta.corp-partner.google.com> Change-Id: I82acd6a56b944199e9f3dcce027199d0947429ab Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3667236 Reviewed-by: Wai-Hong Tam <waihong@google.com> Commit-Queue: Bob Moragues <moragues@chromium.org> Reviewed-by: Bob Moragues <moragues@chromium.org>
* zephyr: npcx: Use EC_SPI_RX_READY macroSam Hurst2022-05-311-1/+1
| | | | | | | | | | | | | | | | Using EC_SPI_RX_READY instead of EC_SPI_OLD_READY prevents the SDO line going high when the AP shuts down. BUG=b:216831450 BRANCH=none TEST=zmake testall Verified on scope that SHI_SDO does not pulse high during AP Shutdown Signed-off-by: Sam Hurst <shurst@google.com> Change-Id: Iab326967a45871df7f350c19f10290aa429b8ec5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3658008 Reviewed-by: Wai-Hong Tam <waihong@google.com>
* ec: Change EC_SPI_RX_READY host commandSam Hurst2022-05-311-2/+6
| | | | | | | | | | | | | | | | The EC_SPI_RX_READY macro has been changed so that MSB is low if it is placed on the SDO lin when the CS goes low. BUG=b:216831450 BRANCH=none TEST=zmake testall Verified on scope that SHI_SDO does not pulse high during AP Shutdown Signed-off-by: Sam Hurst <shurst@google.com> Change-Id: I851633855e1c2bcb91f98ca81612cbdea8330ee0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3668647 Reviewed-by: Wai-Hong Tam <waihong@google.com>
* zephyr: defconfig: default to LEGACY_INCLUDE_PATH=nFabio Baltieri2022-05-311-0/+3
| | | | | | | | | | | | | | | Now that the code base compiles with LEGACY_INCLUDE_PATH=n, turn the option to no by default so that we won't add any more non prefixed include. BRANCH=none BUG=none TEST=cq dry run Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: Ie95e79e659e755de869c8512d0bdfdc9523e1afa Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3637580 Reviewed-by: Yuval Peress <peress@google.com>
* zephyr: fix few more legacy #includeFabio Baltieri2022-05-314-7/+7
| | | | | | | | | | | | | Fix few more #include lacking the zephyr/ prefix. BUG=none BRANCH=none TEST=cq dry run Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: I7c5f5d522d311a28bdda699f072a497b9016b4d3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3673074 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* osiris: Initialize the vivaldi keyboardYu-An Chen2022-05-312-6/+46
| | | | | | | | | | | | | | | Initialize the vivaldi keyboard. BUG=b:220800586 BRANCH=none TEST=check all top row keys working Signed-off-by: Yu-An Chen <yu-an.chen@quanta.corp-partner.google.com> Change-Id: I29c6a517aff72affc4c902e6c66c2a0f66a841e0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3663673 Reviewed-by: Kenny Pan <kennypan@google.com> Commit-Queue: Kenny Pan <kennypan@google.com> Reviewed-by: Boris Mittelberg <bmbm@google.com>