summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Zephyr: Add SB TSI devicetree supportDiana Z2022-01-182-0/+39
| | | | | | | | | | | | | | | | Add support for the SB TSI temperature sensor in devicetree. Note that only one SB TSI sensor can exist on a board, and the driver is written to have one and only one sensor. BRANCH=None BUG=b:195137794 TEST=zmake testall, add second SB-TSI to guybrush and ensure an error is thrown Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I6c09e08a12eabd0910c3f5270393a0d8d4a4b219 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3384486 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* SB TSI: Move headerDiana Z2022-01-182-1/+1
| | | | | | | | | | | | | | Move the SB TSI header to a common location so it can be used in the zephyr shim build. BRANCH=None BUG=b:195137794 TEST=zmake testall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I2cf2385dc401a51c1a5948bd77a2ded3812e908a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3384485 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* zephyr: zmake: Create stable ordering of kconfig filesJack Rosenthal2022-01-182-2/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When two BuildConfigs get merged, the previous merge algorithm would dump the kconfig paths into a set (to remove duplicates), and then back into a list. This has two big problems: 1. The ordering of a set is unstable. That is, we can get lists with different ordering on different runs of zmake. This is problematic for two reasons: we can potentially create inconsistent build behavior, and, on top of that, .as_json() can produce inconsistent results, causing unnecessary clobbering. 2. It's not possible to create a specific ordering of kconfig .conf files, or to include a file twice. Instead, the duplicate-removing technique we want should be much like how the "uniq" command works, e.g., [1, 1, 2, 1, 3] should become [1, 2, 1, 3]. The logic behind this is that, if we specify the same .conf file twice, it does nothing. But if we specify a .conf file, a different .conf file that possibly changed settings in the original .conf file, and then the original .conf file again, the second inclusion of the original .conf file could have changes. For example: a.conf - CONFIG_A=y CONFIG_B=y b.conf - CONFIG_B=n CONFIG_C=y An ordering of a.conf, then b.conf, then a.conf should produce a net configuration of: CONFIG_A=y CONFIG_B=y CONFIG_C=y (if we were to remove the second inclusion of a.conf, then CONFIG_B would be n, which would be incorrect). BUG=b:214321770 BRANCH=none TEST=added a unit test for this case Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I643254f165ef4f9ca3728e5cae5dd68e4881fac2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3390872 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* nissa: Add board hibernate functionAndrew McRae2022-01-181-0/+18
| | | | | | | | | | | | | | | | Add board hibernate function. Hibernate the chargers, and then activate the GPIO to hibernate the EC. Will be woken up by any of the configured wake pins. BUG=b:214478293 TEST=enter 'hibernate' cmd, confirm power off, press power, wakes up. BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: If42dfc8279bc0d4ceb7aaa4701a2acc046350299 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3397149 Reviewed-by: Peter Marheine <pmarheine@chromium.org>
* zephyr: kingler: configure USB MUXEric Yilun Lin2022-01-182-1/+29
| | | | | | | | | | | | | | | | C0: ANX3447 integrated TCPC C1: PS8743 redriver BUG=b:203739613 TEST=Mux is able to switch to SS and DP BRANCH=none Change-Id: I830b431b371c956ee4452c430cd06f1f25ec3262 Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3359163 Reviewed-by: Ting Shen <phoenixshen@chromium.org> Commit-Queue: Eric Yilun Lin <yllin@google.com> Tested-by: Eric Yilun Lin <yllin@google.com>
* zephyr: kingler: enable bc12Eric Yilun Lin2022-01-183-0/+31
| | | | | | | | | | | | | | | Enable C0 RT1718S and C1 PI3USB9201 BC12 driver. BUG=b:211363424 TEST=Test C0 and C1 that DCP/CDP/SDP can be detected respectively BRANCH=none Change-Id: Iaf6afe6c4b59ae1598bfbccbfd3a15ee17f73926 Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3353053 Reviewed-by: Ting Shen <phoenixshen@chromium.org> Commit-Queue: Eric Yilun Lin <yllin@google.com> Tested-by: Eric Yilun Lin <yllin@google.com>
* zephyr: kingler: configure USBCEric Yilun Lin2022-01-189-14/+441
| | | | | | | | | | | | | | | | | | | This CL configures USB-C and charger drivers: - TCPC C0: RT1718S, C1: ANX3447 - PPC C0/C1: NX20P3483 - Charger ISL9238C - ChargeManager BUG=b:203739613 TEST=Battery can be charged. C0/C1 can act as SNK and SRC. BRANCH=none Change-Id: I83c87c0059fbe3d9880fdd2a9d214782cfa12a31 Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3306759 Reviewed-by: Ting Shen <phoenixshen@chromium.org> Commit-Queue: Eric Yilun Lin <yllin@google.com> Tested-by: Eric Yilun Lin <yllin@google.com>
* nissa: For bringup, turn off TCPC low power modeAndrew McRae2022-01-181-0/+3
| | | | | | | | | | | | | | Turn off TCPC low power mode for bringup. BUG=b:214881978 TEST=zmake configure -b nivviks BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I3632f2d04241301489843fdbdea0002b1f7181e3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3397133 Reviewed-by: Peter Marheine <pmarheine@chromium.org> Commit-Queue: Peter Marheine <pmarheine@chromium.org>
* RAA489000: Make low power mode conditional on configAndrew McRae2022-01-181-0/+2
| | | | | | | | | | | | | | Make low power mode conditional on config. BUG=b:214883916 TEST=zmake configure -b nissa; flash and run BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I3eacc2b76b2e2d02a69eccb3f19c8e5466a0d00d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3397132 Reviewed-by: Peter Marheine <pmarheine@chromium.org> Commit-Queue: Peter Marheine <pmarheine@chromium.org>
* usbc: Allow setting CONFIG_USB_PD_TCPC_LOW_POWER=nAndrew McRae2022-01-181-0/+7
| | | | | | | | | | | | | | | | By default, CONFIG_USB_PD_TCPC_LOW_POWER is enabled, and if it is set to 'n', there are compile errors. Allow setting the config to disable low power mode. BUG=b:214883916 TEST=zmake configure -b nissa; flash and run BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I217645e6b169550efc075cd06a2fa62aa440e197 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3392105 Reviewed-by: Peter Marheine <pmarheine@chromium.org> Commit-Queue: Peter Marheine <pmarheine@chromium.org>
* usbc: Exit the charging task if the port does not exist.Andrew McRae2022-01-181-0/+7
| | | | | | | | | | | | | | | | | Exit the charging task if the port does not exist. Some boards were using task_disable_task to disable the task, but with Zephyr this function is not implemented, so check in the task itself. BUG=b:214880218 TEST=make buildall BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I22ef7eea58560d17a7ead4b984e7f33801e0ebb7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3392104 Reviewed-by: Peter Marheine <pmarheine@chromium.org> Commit-Queue: Peter Marheine <pmarheine@chromium.org>
* gitlab: Add npcx7/9_evb to build testWealian Liao2022-01-181-0/+10
| | | | | | | | | | | | | This adds npcx7/9_evb to the GitLab CI build test. BUG=none BRANCH=none TEST=run on gitlab server Signed-off-by: Wealian Liao <whliao@nuvoton.corp-partner.google.com> Change-Id: I479293d7c77816a84cf2ef6d3e8dd36f41f010d4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3392110 Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com>
* docs: zephyr: add an initial Zephyr GPIO doc pageFabio Baltieri2022-01-172-0/+217
| | | | | | | | | | | | | Add documentation for configuring GPIO on Zephyr. BRANCH=none BUG=b:208436570 TEST=browse on gerrit Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: I72d571e8c43ec0d507615b3870410e25b791b5cd Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3367270 Reviewed-by: Keith Short <keithshort@chromium.org>
* tomato: set pd log level to 1Ting Shen2022-01-171-1/+1
| | | | | | | | | | | | | | | | | log level = 0 can't pass FAFT, so we have to revert CL:3310298 BUG=b:214119711 TEST=none BRANCH=none Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: I8d992a6f2b1ac32227bd7cf051d7a63b848cd1e1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3386136 Reviewed-by: Tzung-Bi Shih <tzungbi@chromium.org> Reviewed-by: Eric Yilun Lin <yllin@google.com> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org> Auto-Submit: Ting Shen <phoenixshen@chromium.org>
* nissa: Add some initial sub-board setup for nivviksAndrew McRae2022-01-178-36/+205
| | | | | | | | | | | | | | | Sub-board initial setup for nivviks. V2 - disable port 1 charging task BUG=b:212490923 TEST=zmake configure -b nivviks; flash & run BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I1a41db88053514f8b0b8b5e41ede4f049d6db35b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3379788 Reviewed-by: Peter Marheine <pmarheine@chromium.org>
* Zephyr: Include build support for SB TSIDiana Z2022-01-153-0/+13
| | | | | | | | | | | | | | Introduce the Kconfig and build support needed to use the SB TSI driver. BRANCH=None BUG=b:195137794 TEST=zmake testall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Ie9544df827197b7085e35fdc5f6edc5f2844046f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3384484 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
* zephyr: drivers: Add DRP plug testTomasz Michalec2022-01-142-2/+36
| | | | | | | | | | | | | | | | Add test of plugging dual role device. It is plugged as sink, but TCPM should try power swap and switch DRP device to power source. BUG=none BRANCH=none TEST=make configure --test zephyr/test/drivers Signed-off-by: Tomasz Michalec <tm@semihalf.com> Change-Id: I17880f266d8359fb223559327e40237ed5cb6ce0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3368265 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Tested-by: Tomasz Michalec <tmichalec@google.com> Commit-Queue: Tomasz Michalec <tmichalec@google.com>
* zephyr: drivers: Add DRP TCPCI partnerTomasz Michalec2022-01-144-3/+385
| | | | | | | | | | | | | | | | | Add dual role TCPCI partner emulator which can be attached to TCPCI emulator as sink or source. DRP emulator use sink and source partner emulators as components. BUG=none BRANCH=none TEST=make configure --test zephyr/test/drivers Signed-off-by: Tomasz Michalec <tm@semihalf.com> Change-Id: I83951c8daa14ce3129a7ab344523b1664b380322 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3358579 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Tested-by: Tomasz Michalec <tmichalec@google.com> Commit-Queue: Tomasz Michalec <tmichalec@google.com>
* zephyr: emul: Separate data and partner emulatorTomasz Michalec2022-01-147-187/+313
| | | | | | | | | | | | | | | | | Separate data of sink and source TCPCI partner emulators from TCPCI partner emulator itself. It is possible to use data of basic partner emulators as components of more complicated partner emulator. BUG=none BRANCH=none TEST=make configure --test zephyr/test/drivers Signed-off-by: Tomasz Michalec <tm@semihalf.com> Change-Id: Iaa1c4535f781c1daa68d365a448bbca5bed3bdbc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3358578 Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Tested-by: Tomasz Michalec <tmichalec@google.com> Commit-Queue: Tomasz Michalec <tmichalec@google.com>
* zephyr: emul: Add common handler for TCPCI partnerTomasz Michalec2022-01-146-31/+301
| | | | | | | | | | | | | | | Add common handler for messages send to TCPCI partner emulator. BUG=none BRANCH=none TEST=make configure --test zephyr/test/drivers Signed-off-by: Tomasz Michalec <tm@semihalf.com> Change-Id: Ib2d9ef0005e377efd8de04afdc24ed3a6bd7ff1d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3358577 Reviewed-by: Sam Hurst <shurst@google.com> Tested-by: Tomasz Michalec <tmichalec@google.com> Commit-Queue: Tomasz Michalec <tmichalec@google.com>
* zephyr: emul: Use thread for sending delayed TCPCI messagesTomasz Michalec2022-01-142-9/+51
| | | | | | | | | | | | | | | | | | | | | | Work queue which was used before doesn't guarantee that scheduled work will execute at given time. Because of that some messages were delayed by much more time then expected, which may cause hard reset in TCPM. To fix that, separate thread is created, that is responsible to send delayed TCPCI partner message as soon as possible after timer expire. It allows to schedule messages with accuracy of +/- 1 ms, which is acceptable for TCPCI partner emulators. BUG=none BRANCH=none TEST=make configure --test zephyr/test/drivers Signed-off-by: Tomasz Michalec <tm@semihalf.com> Change-Id: I74bd2b965f29b940c001a441e6faad7abd80f84e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3368264 Reviewed-by: Sam Hurst <shurst@google.com> Tested-by: Tomasz Michalec <tmichalec@google.com> Commit-Queue: Tomasz Michalec <tmichalec@google.com>
* zephyr: drivers: Add sink plug testTomasz Michalec2022-01-141-0/+34
| | | | | | | | | | | | | | | | Add simple test of plugging sink device to USB-C port. It is tested if TCPM reach SNK ready state. BUG=b:209907609 BRANCH=none TEST=make configure --test zephyr/test/drivers Signed-off-by: Tomasz Michalec <tm@semihalf.com> Change-Id: I6686e3adf704437d9fcce6e372d6f637f9ecb266 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3347663 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Tested-by: Tomasz Michalec <tmichalec@google.com> Commit-Queue: Tomasz Michalec <tmichalec@google.com>
* zephyr: emul: Fix TCPCI alert on power status changeTomasz Michalec2022-01-141-7/+32
| | | | | | | | | | | | | | | | | | | | | Fix TCPCI emulator to generate alert when power status change while connecting or disconnecting TCPCI emulator partners. Now setting POWER_STATUS, FAULT_STATUS, EXT_STATUS or ALERT_EXT register using tcpci_emul_set_reg() will also set corresponding bit in ALERT register. BUG=none BRANCH=none TEST=make configure --test zephyr/test/drivers Signed-off-by: Tomasz Michalec <tm@semihalf.com> Change-Id: I79a61866fad69253ced9c468d301988e270cc793 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3368262 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Tested-by: Tomasz Michalec <tmichalec@google.com> Commit-Queue: Tomasz Michalec <tmichalec@google.com>
* zephyr: emul: Fix clearing message queue in TCPCI partnerTomasz Michalec2022-01-141-3/+2
| | | | | | | | | | | | | | | | | SYS_SLIST_CONTAINER evaluate first argument two times, so it cannot be used with expressions that have side effects. Because of that it is replaced with CONTEINER_OF to obtain message from list node. BUG=none BRANCH=none TEST=make configure --test zephyr/test/drivers Signed-off-by: Tomasz Michalec <tm@semihalf.com> Change-Id: Ib67b08468a9ab397a289dfdabc4a1d71f0362536 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3368263 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Tested-by: Tomasz Michalec <tmichalec@google.com> Commit-Queue: Tomasz Michalec <tmichalec@google.com>
* zephyr: drivers: Add test utilsTomasz Michalec2022-01-142-0/+60
| | | | | | | | | | | | | | | | | Add place where common test utils can be stored. Right now there is only function test_set_chipset_to_s0() which makes sure that chipset is in S0 and stay in that state. BUG=b:209907609 BRANCH=none TEST=make configure --test zephyr/test/drivers Signed-off-by: Tomasz Michalec <tm@semihalf.com> Change-Id: If7f12f9823fc77111586431fb19108c2d52a8e36 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3347662 Reviewed-by: Sam Hurst <shurst@google.com> Tested-by: Tomasz Michalec <tmichalec@google.com> Commit-Queue: Tomasz Michalec <tmichalec@google.com>
* Reland "intelrvp: Remove TGLRVP & JSLRVP boards and MECC0.9"Vijay Hiremath2022-01-1426-1545/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a reland of eaa6e6a4939437075f13d9f91beda09fd150b1cc Original change's description: > intelrvp: Remove TGLRVP & JSLRVP boards and MECC0.9 > > As support for TGLRVP & JSLRVP has reached end of life remove these > boards and also support for MECC0.9 that applies only to TGLRVP & > JSLRVP. > > BUG=none > BRANCH=none > TEST=make buildall -j > > Cq-Include-Trybots: luci.chromeos.cq:cq-orchestrator > Change-Id: Ic2acb2e87c6db8395a9e8caeaedf130b9dbc3891 > Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3238255 > Reviewed-by: Poornima Tom <poornima.tom@intel.com> > Reviewed-by: Keith Short <keithshort@chromium.org> > Commit-Queue: Keith Short <keithshort@chromium.org> Bug: none Change-Id: Ib417e66ec7ac9d80febe09d4681c9f59a356dfc3 Cq-Include-Trybots: luci.chromeos.cq:cq-orchestrator Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3388062 Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Keith Short <keithshort@chromium.org> Tested-by: Keith Short <keithshort@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Poornima Tom <poornima.tom@intel.com> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr: it8xxx2: pinmux: read pinctrl-0 property instead of hardcodingTim Lin2022-01-141-10/+23
| | | | | | | | | | | | | | | | | | | | The parameters in pinmux_pin_set() are read by pinctrl-0 property instead of hardcoding. Since the i2c alternate function will be set to GPIO input in shim:gpio.c if gpio.dts has a corresponding set. So it must be set back to i2c alternate. BUG=b:210800948 BRANCH=none TEST=zmake configure -b zephyr/projects/it8xxx2_evb/ Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com> Change-Id: I079f4091ef7627d252a435107ef39b0363265faf Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3346769 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr: Test power_common_state S5 caseJeremy Bettis2022-01-141-0/+1
| | | | | | | | | | | | | | | | | Get back some coverage that was lost, by running power_common_state with S5. BRANCH=None BUG=b:214409194 TEST=zmake configure --coverage --test zephyr/test/drivers Change-Id: I48bc4cbf7c94160db1a62fe05708629782b405c7 Signed-off-by: Jeremy Bettis <jbettis@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3387600 Tested-by: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* docs: Add doc on how to use Goma to compile the EC codeJack Rosenthal2022-01-143-0/+55
| | | | | | | | | | | | | | | | Simple steps on how to use Goma. Not under the zephyr/ directory since I intend to eventually get the Makefile working with Goma as well. BUG=b:214323409 BRANCH=none TEST=view in gitiles Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I5a50a32f009c3c0816e43e1bb8dd9c9708753dcf Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3385777 Reviewed-by: Aaron Massey <aaronmassey@google.com> Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: Add branch coverage to all lcov cmdsJeremy Bettis2022-01-143-18/+17
| | | | | | | | | | | | | | | | | | | If you don't include --rc lcov_branch_coverage=1 on every lcov command, lcov will drop the branch information at that stage of processing. Add --rc lcov_branch_coverage=1 to all lcov commands. BRANCH=None BUG=None TEST=None Change-Id: I3fd2a036f9f2fcfaeec60bdc55cfcba28e6c8228 Signed-off-by: Jeremy Bettis <jbettis@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3381536 Tested-by: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Aaron Massey <aaronmassey@google.com> Commit-Queue: Aaron Massey <aaronmassey@google.com>
* cherry: remove virtual mux driverTing Shen2022-01-142-15/+0
| | | | | | | | | | | | | | | | Cherry does not have host-controlled mux, thus this is not needed. BUG=b:213122469 TEST=no USB_MUX host event sent to AP BRANCH=main Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: Ic51e56429d15a881f0ff2fc46083fc227d5dc85d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3388594 Reviewed-by: Eric Yilun Lin <yllin@google.com> Reviewed-by: Chen-Yu Tsai <wenst@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
* zephyr: corsola: drop overridden svdm_exit_dp_modeEric Yilun Lin2022-01-141-14/+0
| | | | | | | | | | | | | | | | The function is exactly the same as the proto, so drop it. BUG=b:212326930 TEST=zmake BRANCH=none Change-Id: Iaf4171054d717a7da31fa245442c429a5e4ff313 Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3384128 Reviewed-by: Ting Shen <phoenixshen@chromium.org> Commit-Queue: Eric Yilun Lin <yllin@google.com> Tested-by: Eric Yilun Lin <yllin@google.com> Auto-Submit: Eric Yilun Lin <yllin@google.com>
* Cherry: enable PWM_CONFIG_DSLEEP flags for keyboard backlightSue Chen2022-01-141-1/+1
| | | | | | | | | | | | | | For keyboard backlight flicker issue, enable PWM_CONFIG_DSLEEP for keyboard backlight channel. BUG=b:214165183 BRANCH=none TEST=set kblight pwm to 20% duty and kb backlight isn't flicker. Signed-off-by: Sue Chen <sue.chen@quanta.corp-partner.google.com> Change-Id: Ic3c92ddac6116a03ed8d91f922dec0ba4a3c5ca2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3386976 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* nissa: Fix USB pd port count from sub-boardAndrew McRae2022-01-141-0/+2
| | | | | | | | | | | | | | | Try putting a break into the case statement. C is not Go, case statements fall through... BUG=b:213996924 TEST=zmake configure -b nivviks; flash and run BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I8165409686c6dd77357ddf304854c7528b227a99 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3386979 Reviewed-by: Peter Marheine <pmarheine@chromium.org> Commit-Queue: Peter Marheine <pmarheine@chromium.org>
* kingoftown: Change refresh key to row 3Tommy Chung2022-01-141-0/+1
| | | | | | | | | | | | | | | | | Vivaldi keyboard is adopted on kingoftown, the refresh key should be row 3 instead of row 2. BUG=b:198859405 BRANCH=trogdor TEST=make sure that the system can enter recovery mode when AC only. Signed-off-by: Tommy Chung <tommy.chung@quanta.corp-partner.google.com> Change-Id: Icfa3aa2e50f4828a5060820a475440e4ba6947f1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3385457 Reviewed-by: Devin Lu <Devin.Lu@quantatw.com> Reviewed-by: Bob Moragues <moragues@chromium.org> Reviewed-by: Ting Shen <phoenixshen@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org>
* zephyr: brya: Enable batteryRajesh Kumar2022-01-147-0/+68
| | | | | | | | | | | | | | This enables the configuration for battery BUG=b:202701454 BRANCH=none TEST=Checked battery info using EC console command "battery" Signed-off-by: Rajesh Kumar <rajesh3.kumar@intel.com> Change-Id: I5a0f67c03b531a7e239da2719b785aba357dad86 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3384482 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr: herobrine: Fix host event wakeup mask right-shifted by 1 bitWai-Hong Tam2022-01-141-8/+9
| | | | | | | | | | | | | | | The host event wakeup mask needs to be wrapped by HOST_EVENT_MASK macro which right-shifts the bit by 1. So the mask can be used consistently as in the CrOS EC. BUG=b:213653745 BRANCH=None TEST=The RTC wake source can wake the device up. Change-Id: I56912f50f587b93297c3e62698d7382fa443360c Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3381907 Reviewed-by: Sam Hurst <shurst@google.com>
* zephyr: battery: Support LGC and POWERTECH batteriesRajesh Kumar2022-01-143-0/+120
| | | | | | | | | | | | | | | | Added support for LGC ac17a8m and POWERTECH batgqa05l22 batteries. BUG=none BRANCH=none TEST=zmake testall; TEST=battery can be probed and check battery info using EC command "battery" Signed-off-by: Rajesh Kumar <rajesh3.kumar@intel.com> Change-Id: I59548d580d32978837e1a222c823eb341c574c1d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3384483 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr: zmake: Don't use temp directories for testallJack Rosenthal2022-01-141-12/+1
| | | | | | | | | | | | | | | | | | | | | | | Using build/zephyr/<project_name> for testall builds enables: - Faster testall when only a minor change is made (only 27s with Goma enabled!). - Easy access to the build artifacts for inspection or flashing. Seems like a no brainer to make this change... the temp directories was just a thing from when zmake did not have the default directories in the early days. BUG=b:214321770 BRANCH=none TEST=only 27s for a second testall with goma enabled Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I5ed149051e74f5ba3d0e4cdca4ec7530cf8eeee2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3385776 Reviewed-by: Yuval Peress <peress@google.com> Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* zephyr: zmake: Add a --goma flag for hyperspeed compilationJack Rosenthal2022-01-143-30/+69
| | | | | | | | | | | | | | | | | | | | | | | | Add a new global zmake flag, --goma, which enables distributed compilation using go/ma. This service is only available for Googlers, at the moment. Additionally, it's only available for chroot users at the moment. On my machine, using the goma flag speeds up a testall greater than 4x, from 8m20s without --goma, and 1m55s with --goma, and additional improvements are possible in the future. Markdown documentation for setting up goma and using the flag follows in the follow-up CL. BUG=b:214323409 BRANCH=none TEST=zmake --goma testall Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I9659d62f2c440f1430a30b784d3bdbb502c3952b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3385775 Reviewed-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Aaron Massey <aaronmassey@google.com>
* zephyr: zmake: Only re-run cmake when requiredJack Rosenthal2022-01-146-11/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prior to this commit, when `zmake configure` was run on an existing build directory, the build directory would always clobber. Since most people are building by using "zmake configure -b ${PROJECT_NAME}" each time, this means that we almost never can do incremental builds. Most of the time we can actually save the existing cmake configuration when running configure however, but we do have to be careful to not save it too often: a change of configuration options such as the toolchain could mean that the build directory really does need clobbered. This CL adds logic to clobber build directories only when necessary by an actual configuration difference. We do so by serializing the build configuration into a JSON file at ${BUILD_DIR}/cfg-{ro,rw}.json after a successful run of cmake. Then, before running cmake each time, if this JSON file exists and has the same build configuration we're about to run cmake for, we simply skip running cmake entirely. BUG=b:214321770 BRANCH=none TEST="zmake configure -b volteer", then do it again. Second run only recompiles version file and then links. Change-Id: Iee7e6a15f36af9dc398a8a795884bf42b1a38833 Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3384403 Reviewed-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* docs: Cleanup "-l INFO" argument on call to zmakeJack Rosenthal2022-01-141-30/+11
| | | | | | | | | | | | | -l INFO is the default, no need to specify it manually. BUG=none BRANCH=none TEST=none Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I9c687f53a952839be58739759ad3c46fd2a76a14 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3382555 Reviewed-by: Keith Short <keithshort@chromium.org>
* nissa: Adjust nereid config for bring-upAndrew McRae2022-01-131-15/+21
| | | | | | | | | | | | | | ITE have fixed the kb-raw dependencies, so adjust the nereid config items ready for bringup. BUG=b:201000844 TEST=zmake configure -b nereid BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I0cfce7b343049783beda6c1812e5dc6d8c04548c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3385387 Reviewed-by: Peter Marheine <pmarheine@chromium.org>
* primus: fix Goodix touchpad initialize failedScott Chao2022-01-132-4/+20
| | | | | | | | | | | | | | | | | | | Goodix touchpad AVDD need to pull low to 0V when poweroff. Setting PS2 module in GPIO.inc will let AVDD have 0.9V offset. So we need to enable PS2 module later than PLTRST# to avoid the 0.9V offset. BUG=b:214150759 BRANCH=none TEST=make -j BOARD=primus TEST=verified by Goodix Signed-off-by: Scott Chao <scott_chao@wistron.corp-partner.google.com> Change-Id: I49869d26262948f7f7242ebe494eef86e459a42c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3376688 Reviewed-by: Boris Mittelberg <bmbm@google.com> Reviewed-by: caveh jalali <caveh@chromium.org> Commit-Queue: caveh jalali <caveh@chromium.org>
* volmar: Modify USB type-c configurationYu-An Chen2022-01-135-224/+30
| | | | | | | | | | | | | | | Change C0 TCPM to RT1715 Change C1 PPC to syv682x Remove C2 function BUG=b:211891086 BRANCH=none TEST=boot on kano, check pd 0 can switch to 20V Signed-off-by: Yu-An Chen <yu-an.chen@quanta.corp-partner.google.com> Change-Id: I12c07e19e969a1a7c31fc357e2d8ab0ee50093f5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3385875 Reviewed-by: caveh jalali <caveh@chromium.org> Commit-Queue: caveh jalali <caveh@chromium.org>
* zephyr: battery: Separate battery conf from chargerRajesh Kumar2022-01-133-11/+13
| | | | | | | | | | | | | | | | | | | | | | Removing dependecy of PLATFORM_EC_BATTERY_FUEL_GAUGE from PLATFORM_EC_CHARGER by moving this out from 'if PLATFORM_EC_CHARGER' zephyr/shim/src/battery.c belongs to PLATFORM_EC_BATTERY, and it should be part of source if PLATFORM_EC_BATTERY conf is enabled instead of PLATFORM_EC_BATTERY_FUEL_GAUGE. BUG=none BRANCH=none TEST=zmake testall TEST=zephyr/shim/src/battery.c and common/battery_fuel_gauge.c is included in source list and compilation is successful if we enable battery without enabling charger. Signed-off-by: Rajesh Kumar <rajesh3.kumar@intel.com> Change-Id: I419502281e8f22c710119a76eacf4e3bfca3a3ca Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3384477 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* volmar: Add battery AP19B8MYu-An Chen2022-01-132-1/+31
| | | | | | | | | | | | | Add battery AP19B8M for early stage support BUG=b:213127419 BRANCH=none TEST=make BOARD=volmar Signed-off-by: Yu-An Chen <yu-an.chen@quanta.corp-partner.google.com> Change-Id: If4aa3075d6d892be8378d4cb056ddaed46427fc9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3385876 Reviewed-by: caveh jalali <caveh@chromium.org> Commit-Queue: caveh jalali <caveh@chromium.org>
* zephyr: adc: switch to using io-channelsDawid Niedzwiecki2022-01-1319-75/+75
| | | | | | | | | | | | | | | | | | | | | | | There is a special property named "io-channels" which can be used to specify ADC module and channel. Switch to use the "io-channels" property in the named-adc-channels node instead of custom "channel" property. The "io-channels" also specifies the ADC module, so there is no more need of choosing "cros-ec,adc" in dts files. BUG=b:213210342 TEST=zmake testall && make sure the 'adc' console command shows correct values BRANCH=main Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com> Change-Id: I8b5b6a46ad6141fb0446cb9051cfd4eaa0c732fe Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3379806 Tested-by: Dawid Niedźwiecki <dn@semihalf.com> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* power: Change power_signal_get_level prototype to override_protoBernardo Perez Priego2022-01-131-1/+1
| | | | | | | | | | | | | | | | | Observed issue where function was not being overridden when building Madoo with Zephyr EC, also __override_proto seems more consistent. BUG=b:203184102 BRANCH=None TEST=`make -j buildall` Tested on Madoo, observed overridable function is called. Signed-off-by: Bernardo Perez Priego <bernardo.perez.priego@intel.com> Change-Id: I0083270036648ec16ac6fbcc433013aa17675220 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3363438 Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* scout: Enable mics on boards without EC_MIC_OE in ROStefan Adolfsson2022-01-131-0/+6
| | | | | | | | | | | | | | | | RW firmware does not initialize GPIOs, so the GPIO needs to be set explicitly. BUG=b:214228751 BRANCH=puff TEST=Measure EC_MIC_OE with oscilloscope. Change-Id: Ifbc77b18ef11816fd2f443abb9ac6b502524c1e8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3386837 Reviewed-by: Joe Tessler <jrt@chromium.org> Auto-Submit: Stefan Adolfsson <sadolfsson@chromium.org> Tested-by: Stefan Adolfsson <sadolfsson@chromium.org> Commit-Queue: Stefan Adolfsson <sadolfsson@chromium.org>