summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* zephyr: herobrine: enable CONFIG_BOARD_RESET_AFTER_POWER_ONSam Hurst2021-12-081-0/+1
| | | | | | | | | | | | | | | | | Enable the CONFIG_BOARD_RESET_AFTER_POWER_ON on herobrine so the system boots properly with a dead battery. BRANCH=main BUG=b:205883173 TEST=System boots properly with a dead battery Signed-off-by: Sam Hurst <shurst@google.org> Change-Id: I72df7373162de64b610684a1d387406a43506752 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3321383 Tested-by: Sam Hurst <shurst@google.com> Reviewed-by: Wai-Hong Tam <waihong@google.com> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Sam Hurst <shurst@google.com>
* nissa: Create zephyr image for reworked dedede with IT81302Andrew McRae2021-12-087-0/+201
| | | | | | | | | | | | | | Create a Zephyr image for testing a IT81302 EC on a JSL reference platform. BUG=b:204231736 TEST=make -g buildall; zmake configure -b drawcia_riscv BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I5e3a916c701fcb6c03b524df46e3dd4db5f4ec17 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3316158 Reviewed-by: Keith Short <keithshort@chromium.org>
* pazquel: correct configuration for ps8805Bob Moragues2021-12-081-0/+1
| | | | | | | | | | | | BUG=b:208556654 TEST=Verify PS8805 firmware update in factory flow BRANCH=trogdor Signed-off-by: Bob Moragues <moragues@chromium.org> Change-Id: Icc5bb8c0f07d6ef2ff7763621fc13a05a17b6575 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3314292 Reviewed-by: Wai-Hong Tam <waihong@google.com> Reviewed-by: Henry Sun <henrysun@google.com>
* Dewatt: fix orientation of Base accel BMI260Sue Chen2021-12-081-3/+3
| | | | | | | | | | | | | | | | orientation -1, 0, 0 0, 1, 0 0, 0, -1 BUG=b:209523571 BRANCH=none TEST=The lid angle and display are correct. Signed-off-by: Sue Chen <sue.chen@quanta.corp-partner.google.com> Change-Id: I3e1168e5211e63f1f1ddf91233bc9a2ec6443ec6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3319619 Reviewed-by: Diana Z <dzigterman@chromium.org>
* zephyr: use a chosen device for raw keyboard shimPeter Marheine2021-12-084-33/+22
| | | | | | | | | | | | | | | | | Rather than assuming the keyboard is named cros_kb_raw, get the device from a chosen cros-ec,raw-kb node instead. To make this work whether the keyboard is in use or not, also move the cros_kb_raw node to live in the main it8xxx2.dtsi file, rather than being duplicated for those boards that use it. BUG=b:205615358 TEST=zmake testall BRANCH=none Signed-off-by: Peter Marheine <pmarheine@chromium.org> Change-Id: Id0e6208e03a3cfa06a38c63b34282736fc3a3489 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3312505 Reviewed-by: Keith Short <keithshort@chromium.org>
* AmptonE: Add motion sensor interrupt processMichael5 Chen12021-12-083-1/+11
| | | | | | | | | | | | | | | | Add motion interrupt process for icm42607 BUG=b:206526996 BRANCH=firmware-octopus-11297.B TEST=manual 1. watch ectool motionsense 2. watch ectool motionsense lid_angle Signed-off-by: Michael5 Chen1 <michael5_chen1@pegatron.corp-partner.google.com> Change-Id: I5875ca2a5391a3762eddfa9d2de0266737b6fe6e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3319989 Reviewed-by: Henry Sun <henrysun@google.com> Reviewed-by: Diana Z <dzigterman@chromium.org>
* zephyr: use a chosen device for bbram shimPeter Marheine2021-12-087-49/+32
| | | | | | | | | | | | | | | | | | | | Rather than assume the bbram device is named 'bbram', get the device from a chosen cros-ec,bbram node instead. To accommodate this in testing, this also converts the system test that exercises bbram shimming to use a Zephyr emulated bbram device rather than rolling its own that replaces the one in the shim only. An unused include file is also removed. BUG=b:205615358 TEST=zmake testall BRANCH=none Change-Id: I68c31b7be6b63c065ada65aba3b49ec0e6df7448 Signed-off-by: Peter Marheine <pmarheine@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3312509 Reviewed-by: Yuval Peress <peress@google.com> Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: brya: Enable RTC configurationRajesh Kumar2021-12-082-0/+4
| | | | | | | | | | | | | | | This enables the support to print out the RTC value on console to help correlate EC and kernel logs. BUG=b:209023135 BRANCH=none TEST=make configure -B ~/tmp/brya/ brya -b Signed-off-by: Rajesh Kumar <rajesh3.kumar@intel.com> Change-Id: If4f6720322d1a6388f8ec264187dfee5eb0cbd5b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3315219 Reviewed-by: Tanu Malhotra <tanu.malhotra@intel.com> Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* gingerbread: set USB 3.1 gen 2 ports to 1.5A current limitScott Collyer2021-12-081-1/+7
| | | | | | | | | | | | | | | | | This CL fixes adds to a previous CL when change the current limit via the gpio.inc initialization value. This adds the same change in board.c for devices which have RO locked and the 990mA default set. BUG=b:206059703 BRANCH=quiche TEST=verify levels are set high in RW Signed-off-by: Scott Collyer <scollyer@google.com> Change-Id: If2612de3b9360e256215bd70693e53addcc902f2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3321396 Tested-by: Scott Collyer <scollyer@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Scott Collyer <scollyer@chromium.org>
* Zephyr: Guybrush: Configure hibernateDiana Z2021-12-072-0/+25
| | | | | | | | | | | | | | | Configure the PSL_IN pins for hibernate. BRANCH=None BUG=b:195137794,b:208706360 TEST=load onto guybrush, and verify the EC can go into hibernate and all wake sources are able to wake from it Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I470e5bd945f1a7e33c6940e04bdff8f791ca28f6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3311884 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
* Zephyr: Guybrush: Actually enable tab completionDiana Z2021-12-071-0/+1
| | | | | | | | | | | | | | | | Add the CONFIG_SHELL_TAB option to actually enable tab completion in the shell. BRANCH=None BUG=None TEST=load on guybrush and observe the wonder that is automatic tab completion Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I8866fdfc60011570a45aa74944e1d88c48164cc4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3321391 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
* flash_ec: check for ccd in servo_type for is_ccdMary Ruthven2021-12-071-2/+1
| | | | | | | | | | | | | | | All ccd servos contain "ccd" in the servo_type. check for "ccd" instead of checking for specific ccd types. BUG=b:209445520 BRANCH=none TEST=flash hatch with servo micro and ccd. Change-Id: Ia272b6a86f03e780ccf7696d1174603defabfbda Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3321395 Reviewed-by: Jett Rink <jettrink@chromium.org> Commit-Queue: Jett Rink <jettrink@chromium.org>
* nissa: Add temperature sensor configAndrew McRae2021-12-072-1/+33
| | | | | | | | | | | | | Add ADC temperature sensor config to Nivviks BUG=b:209515631 TEST=zmake configure -b nivviks BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I04c9f6dfcb74abeb237fbe6aa2e16c9e569d24d1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3319622 Reviewed-by: Wai-Hong Tam <waihong@google.com>
* TCPMv2: Refactor retimer update for USB MUX taskDiana Z2021-12-071-6/+34
| | | | | | | | | | | | | | | | | | | Now that mux sets may be completed in the USB_MUX task on boards which enable it, refactor the retimer update mux get to wait when sets are pending. When sets are pending, the HOOKS task can come in later and fill in the last_result with the mux state. Additionally, set and validate cur_port any time an op comes in and is then processed by the PD task. BRANCH=None BUG=b:208355638 TEST=on brya, ensure retimer FW update passes Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Ied8ed1d90d1a2ea90b79ff4021ed77b858a65431 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3315216 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* ectool: Fix ec_rate command invocationShobhit Srivastava2021-12-071-7/+10
| | | | | | | | | | | | | | The ec_rate host command expects the sensor number to be passed as an argument. However the ectool was not sending that value BUG=b:208966957 TEST=ectool motionsense ec_rate <sensor num> displays ec rate Signed-off-by: Shobhit Srivastava <shobhit.srivastava@intel.com> Change-Id: I30c3ebadf245c209c1d471e9ddc24fa111a51b05 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3314491 Reviewed-by: Boris Mittelberg <bmbm@google.com> Commit-Queue: YH Lin <yueherngl@chromium.org>
* zephyr: kingler: enable shell auto-completeEric Yilun Lin2021-12-071-0/+2
| | | | | | | | | | | | | | BUG=b:203739613 TEST=i2c scan <TAB> and see outputs BRANCH=none Change-Id: I578f70b8251f0a4b8d8b354231a6179dbf5714fa Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3319982 Tested-by: Eric Yilun Lin <yllin@google.com> Auto-Submit: Eric Yilun Lin <yllin@google.com> Reviewed-by: Ting Shen <phoenixshen@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org>
* zephyr: kingler: correct battery typeEric Yilun Lin2021-12-071-2/+2
| | | | | | | | | | | | | | | | Fix the copied battery info. BUG=b:203739613 TEST=zmake configure -b kingler BRANCH=none Change-Id: Ic412c489231742c6d8bf0a13312efe4b4353147f Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3312507 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>
* ppc/syv682x: change the type sink_ocp_count to atomic_tDawid Niedzwiecki2021-12-071-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | sink_ocp_count is used with atomic_* calls, so change its type to atomic_t. Since atomic_t is a signed type, the commit changes asm code where fifo_entries is compared e.g. sink_ocp_count[port] < OCP_COUNT_LIMIT changes the comparison instruction for cortex-m from bgeu to bge (unsigned vs signed comparison). There are similar changes for other architectures. There is no risk of overflow which would cause an invalid result of the comparison(OCP_COUNT_LIMIT=3). The change will be useful for incoming commits related to modifying atomic_t caused by a change in Zephyr upstream (atomic_t from int to long). BUG=b:207082842 TEST=make buildall && zmake testall BRANCH=main Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com> Change-Id: I79e76cf413afca7cf4686988db042ffca59618c3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3306357 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Dawid Niedzwiecki <dawidn@google.com>
* mkbp: change the type fifo_entries to atomic_tDawid Niedzwiecki2021-12-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fifo_entries is used many times with atomic_* calls, so change its type to atomic_t. Since atomic_t is a signed type, the commit changes asm code where fifo_entries is compared e.g. if (fifo_entries >= fifo_max_depth) { changes the comparison instruction for cortex-m from bhi.n to bgt.n (signed vs unsigned comparison). There are similar changes for other architectures. It is not an issue, because the maximum value of fifo_entries is FIFO_DEPTH=16 and fifo_max_depth is uint8_t, so there is no risk of overflow which would cause an invalid result of the comparison. The change will be useful for incoming commits related to modifying atomic_t caused by a change in Zephyr upstream (atomic_t from int to long). BUG=b:207082842 TEST=make buildall && zmake testall BRANCH=main Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com> Change-Id: I5890eae25601514bd48043ac1feadd2d21f9539c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3301715 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Dawid Niedzwiecki <dawidn@google.com>
* task: use atomic_t for some variablesDawid Niedzwiecki2021-12-076-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | Use the atomic_t variable type for tasks_ready, tasks_enabled and waiters in struct mutex. The generated asm code is different around the line: char is_ready = ((uint32_t)tasks_ready & BIT(i)) ? 'R' : ' '; for all cores, so cast tasks_ready to an unsigned variable to make sure is works as intended regardless of architecture. The change will be useful for incoming commits related to modifying atomic_t caused by a change in Zephyr upstream (atomic_t from int to long). BUG=b:207082842 TEST=make buildall && zmake testall BRANCH=main Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com> Change-Id: I0a55c71947401e4137b30fc62adba84d867f56f8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3301710 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Dawid Niedzwiecki <dawidn@google.com>
* usb: use atomic_t where possibleDawid Niedzwiecki2021-12-0713-58/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | There are many places where atomic_t can be used and passed to atomic_* function without casting, so change that. Since atomic is a signed type, do not modify the type timer_active, timer_disabled and dpm_dp_flag, because mixing types in the shift operations create differences in asm code. It shouldn't change the generated code. The change will be useful for incoming commits related to modifying atomic_t caused by a change in Zephyr upstream (atomic_t from int to long). BUG=b:207082842 TEST=make buildall && zmake testall BRANCH=main Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com> Change-Id: Ia1e5447c8c47ca3deccbe5c250ac4d45ceb5b133 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3302208 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Dawid Niedzwiecki <dawidn@google.com>
* cherry: disable PD logstabilize-14385.B-mainTing Shen2021-12-072-2/+1
| | | | | | | | | | | | | | | | | | | | We found that disabling *all* console outputs makes PD response time 30% faster. Since we can't disable all outputs, try to remove a few redundant things first. BUG=b:193753475 TEST=Measure the delay between Source_Cap and Request message. 15ms after this patch. BRANCH=none Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: I59047e9fb83eefe0f5d1c587401309dc2ffb7ef3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3310298 Reviewed-by: Eric Yilun Lin <yllin@google.com> Reviewed-by: Rong Chang <rongchang@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
* phaser: undef hibernate psl and keep KSI1/3 high in deep sleepreno.wang2021-12-072-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | It's workaround to reduce keyboard's "Silver Migration". From keyboard vendor's feedback, there are two factors to cause "Silver Migration". 1. A voltage potential between trace 2. The presence of an electrolyte , such as moisture. The reason cause voltage potential between KSIxx trace is EC enter ec hibernate PSL and turn EC's VCC1 power off. Besides KSI2, the other KSIxx will be turn off. KSI2 is powered by H1. To avoid voltage potential is keep KSI1, KSI2, and KSI3 on. That means not to enter ec hibernate PSL. BUG=b:203442963 BRANCH=None TEST=make -j BOARD=taeko, KSxx keep 3.3V under DC mode after calling system_hibernate(). Signed-off-by: reno.wang <reno.wang@lcfc.corp-partner.google.com> Change-Id: I44a99f9df22e6d21729540507b1947e12cc3189d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3252568 Reviewed-by: Henry Sun <henrysun@google.com> Reviewed-by: Diana Z <dzigterman@chromium.org>
* zephyr: use a chosen device for watchdog shimPeter Marheine2021-12-073-5/+4
| | | | | | | | | | | | | | This uses a chosen cros-ec,watchdog DT node to locate the watchdog device to shim, rather than assuming it is called twd0. BUG=b:205615358 TEST=zmake buildall BRANCH=none Signed-off-by: Peter Marheine <pmarheine@chromium.org> Change-Id: Id6e2dcc8d75740797d6630134c0d4413ac7338ee Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3312504 Reviewed-by: Keith Short <keithshort@chromium.org>
* Dewatt: Fix board fw configSue Chen2021-12-071-17/+3
| | | | | | | | | | | | | | The C1 mux only use PS8818. All skus are convertible now. BUG=b:208167982, b:204347734 BRANCH=none TEST=Can initialize successfully C1 MUX PS8818 and motion sensors with empty fw_config. Signed-off-by: Sue Chen <sue.chen@quanta.corp-partner.google.com> Change-Id: I44dc387c50e0cb2c7f7dc4f99ff0fb8841143d52 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3315763 Reviewed-by: Rob Barnes <robbarnes@google.com>
* it8xxx2: Move non-core config to per-project configAndrew McRae2021-12-077-60/+62
| | | | | | | | | | | | | | | | | | Move non-base configuration from default it8xxx2 configuration to project level configuration: - keyboard enabling - keyboard scanning - wake mask - cros kb shim BUG=b:209324248 TEST=zmake configure -b {krabby,kinger} BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I9db3aab59f68602afdf5274a7eb4c9a77e778bf0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3316164 Reviewed-by: Sam Hurst <shurst@google.com>
* Dewatt: fix LED behavior for Ver1 boardSue Chen2021-12-071-8/+31
| | | | | | | | | | | | | | | Ver1 board: GPIOC4(PWM2) -> Blue LED GPIO80(PWM3) -> Amber LED BUG=b:208179462 BRANCH=none TEST=LED behavior is correct for all states. Signed-off-by: Sue Chen <sue.chen@quanta.corp-partner.google.com> Change-Id: I6f07b69119583675651a76cf9f0f67caff5afad1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3312918 Reviewed-by: Rob Barnes <robbarnes@google.com>
* Dewatt: Modify LED color and LED behavior definitionSue Chen2021-12-071-9/+10
| | | | | | | | | | | | | | | | | | | | | | Modify the color of EC_PWM_LED_FULL_L to blue, LED spec: Charging Amber on (S0/S3/S5) Full Charged Blue on (S0/S3/S5) Discharge in S3 Amber on 1sec, off 3sec Discharge in S5 Off Error Amber on 1sec, off 1sec Discharge in S0 Blue on Factory mode Blue on 2sec, Amber on 2 sec BUG=b:208179462 BRANCH=none TEST=LED behavior is correct for all states. Signed-off-by: Sue Chen <sue.chen@quanta.corp-partner.google.com> Change-Id: I9549c6b5c290b9d73fa9b18ec8d40480591c9a6e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3312516 Reviewed-by: Rob Barnes <robbarnes@google.com>
* AmptonE: Implement EC motion sensorMichael5 Chen12021-12-072-1/+77
| | | | | | | | | | | | | | | | Implement gyro sensor ICM42607 and lid sensor KX022. BUG=b:206526996 BRANCH=firmware-octopus-11297.B TEST=manual 1. watch ectool motionsense 2. watch ectool lid_angle Signed-off-by: Michael5 Chen1 <michael5_chen1@pegatron.corp-partner.google.com> Change-Id: Ib33d59dc359e1c4b189a6515ab6e31c5bc84e690 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3314480 Reviewed-by: Henry Sun <henrysun@google.com> Reviewed-by: Diana Z <dzigterman@chromium.org>
* redrix: Update charging LEDs behaviorDevin Lu2021-12-071-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | This patch updates the LEDs behavior. Change as below: 1. battery error: Original - Blinking white quickly. (0.5 sec ON, 0.5 sec OFF) New - Blinking amber quickly. (0.5 sec ON, 0.5 sec OFF) 2. battery low: Original - Blinking white slowly on right side led. (1 sec ON, 1 sec OFF) New - Blinking amber slowly on both side leds. (1 sec ON, 1 sec OFF) BUG=b:208912133 BRANCH=none TEST=Verify LEDs worked indeed. Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: I2ce233d57eb168b47d8dbcb724890e6e5f196f77 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3314261 Commit-Queue: Boris Mittelberg <bmbm@google.com> Reviewed-by: Boris Mittelberg <bmbm@google.com>
* bq257x0: Fix step size of minimum system voltagereno.wang2021-12-071-2/+2
| | | | | | | | | | | | | | | The step size of minimum system voltage for bq25710 is 256mv and bq25720 is 100mv. BRANCH=none BUG=b:209343612 TEST=buildall passes Signed-off-by: reno.wang <reno.wang@lcfc.corp-partner.google.com> Change-Id: I1b07a2a5122703046ef4158b6eae645c4861fdc0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3315766 Reviewed-by: Boris Mittelberg <bmbm@google.com> Commit-Queue: Boris Mittelberg <bmbm@google.com>
* gimble: Enable VCONN control on C1 (ps8815)Sugnan Prabhu S2021-12-071-1/+2
| | | | | | | | | | | | | | | | | This enables TCPC based VCONN control for port C1 (ps8815). BUG=None BRANCH=none TEST=TBT monitor detected on typec port 1 Signed-off-by: Sugnan Prabhu S <sugnan.prabhu.s@intel.com> Change-Id: I2f8beea567f5ff7e66d046aa5c539d7ab7bfcf2c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3306084 Tested-by: Abhijeet Rao <abhijeet.rao@intel.com> Reviewed-by: Deepti Deshatty <deepti.deshatty@intel.corp-partner.google.com> Reviewed-by: Abhijeet Rao <abhijeet.rao@intel.com> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr: herbrine: move ppc replacement to a new fileDawid Niedzwiecki2021-12-064-21/+38
| | | | | | | | | | | | | | | | Move replacement of alternate devices, ppc in this case, to a new separate file. This will allow handling different chips based on board versions, cbi fields, etc. in one place. BUG=b:202451919 TEST=zmake testall & Make sure PD works on Herobrine on both ports BRANCH=main Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com> Change-Id: I27fd01ee74523a18083f77a92c1051058cf7c814 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3289206 Commit-Queue: Keith Short <keithshort@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: improve handling CBI SSFCDawid Niedzwiecki2021-12-063-20/+29
| | | | | | | | | | | | | | | | | | | The improvements include: -Use better names for SSFC related things. -Do not call checking SSFC and replacing alternate sensors automatically. Let the board-code call the replacement, since it is very specific operation. BUG=b:202451919 TEST=zmake testall & test if an alternate sensors are used as it is done in CL:3310639 BRANCH=main Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com> Change-Id: I77a720d5b2ce09ea85902b681c5266d44eb6d144 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3289205 Commit-Queue: Keith Short <keithshort@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: move probing of alt sensors to a functionDawid Niedzwiecki2021-12-065-126/+150
| | | | | | | | | | | | | | | | | | | Remove a function to probe all alternate motion sensors, but prepare a function to probe a specific sensor. It introduces more flexibility. Also, create a separated header file motionsense_sensors_defs.h with definitions needed in board.h. BUG=b:202451919 TEST=zmake testall & test if an alternate sensors are used as it is done in CL:3310639 BRANCH=main Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com> Change-Id: Ibfab10cbff39e17c8a86aad0c6d7c5897285a0a4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3289415 Commit-Queue: Keith Short <keithshort@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: herobrine: Update I2C bus labelsKeith Short2021-12-061-4/+6
| | | | | | | | | | | | | | | | | | | | The EC chip provides a default label for every I2C bus. Override the default label with a label matching the schematic net name. Typing "i2c scan <tab>" on Herobrine now shows the following labels: uart:~$ i2c scan I2C_SENSOR I2C_EEPROM I2C_RTC I2C_USB_C1_PD I2C_USB_C0_PD I2C_POWER BUG=none BRANCH=none TEST=Boot Zephyr on herobrine, verify the new I2C bus labels Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I41c4bfbffca5ee49b66d6ffbfc0a6d73ea06db8d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3300665 Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
* zephyr: i2c: Remove label from named-i2c-portsKeith Short2021-12-0617-109/+1
| | | | | | | | | | | | | | | | | | | | | | The label property was stored in the name field of i2c_ports[]. However the name field is only used by the legacy I2C console commands and not used by Zephyr builds. Remove the label property from named-i2c-ports and remove the name field from i2c_ports[] for Zephyr builds, saving a modest amount of flash space. BUG=none BRANCH=none TEST=zmake testall TEST=Boot zephyr on Herobrine, verify I2C console commands still functional. Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I22c743c4e362d05d51432fa67f5be16989d39574 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3300664 Commit-Queue: Abe Levkoy <alevkoy@chromium.org> Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* Quackingstick: fix orientation for accelgyro BMI160Sue Chen2021-12-061-2/+2
| | | | | | | | | | | | | | | | | | | Modify lid_standard_ref to 0, 1, 0 -1, 0, 0 0, 0, 1 BUG=b:208865381 BRANCH=none TEST=The display orientation is correct on the BMI160 board. Signed-off-by: Sue Chen <sue.chen@quanta.corp-partner.google.com> Change-Id: Ica254ebe7e805771f7a6a2514196a7123a7908d8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3316163 Reviewed-by: Wai-Hong Tam <waihong@google.com> Reviewed-by: Bob Moragues <moragues@chromium.org> Commit-Queue: Bob Moragues <moragues@chromium.org>
* zephyr: herobrine: GPIOB6 and GPIOB7 config change.Sam Hurst2021-12-061-2/+8
| | | | | | | | | | | | | | | | | | For Herobrine board version 1, pin GPIOB7 is unused and GPIOB6 is configured as input (HiZ). BRANCH=main BUG=b:202008595 TEST=Built the Zephyr image. Needs testing when version 1 boards are available. Signed-off-by: Sam Hurst <shurst@google.org> Change-Id: Ia18dda97b65122ed768fe89f64f0857da4356b89 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3315752 Tested-by: Sam Hurst <shurst@google.com> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org> Commit-Queue: Sam Hurst <shurst@google.com>
* zephyr: Disable DPTF on nivviksJeremy Bettis2021-12-062-0/+3
| | | | | | | | | | | | | | | | | | | | | Add a static assert to catch DPTF being used without temp sensors defined in the dts. Disable DPTF on nivviks. This fixes a build error on gitlab. https://gitlab.com/zephyr-ec/ec/-/pipelines/422163729 BRANCH=None BUG=b:201000681 TEST=zmake configure --build nivviks Change-Id: I273a7267783f119391d1d739c598ed2a059d1286 Signed-off-by: Jeremy Bettis <jbettis@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3317781 Reviewed-by: Yuval Peress <peress@google.com> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org>
* taeko: Correct base sensor's y/z axisreno.wang2021-12-061-3/+3
| | | | | | | | | | | | | | | | | | | In some angle, dut should keep clamshell mode, but change to tablet mode and lock keyboard because of wrong y/z axis setting. This CL is used to correct it. BRANCH=none BUG=b:201504044 TEST=make -j BOARD=taeko, verify base sensor's x/y/z via checking ectool motionsense. Signed-off-by: reno.wang <reno.wang@lcfc.corp-partner.google.com> Change-Id: Id3d48b184b7e20744961f4219bbae1be06136ddf Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3306765 Reviewed-by: Boris Mittelberg <bmbm@google.com> Reviewed-by: YH Lin <yueherngl@chromium.org> Reviewed-by: Parth Malkan <parthmalkan@google.com> Commit-Queue: Boris Mittelberg <bmbm@google.com>
* gimble: revise battery LED behaviorWill Tsai2021-12-061-2/+2
| | | | | | | | | | | | | Modify LED behavior to meet the revised specification BUG=b:193600290 BRANCH=none TEST=make -j BOARD=gimble Signed-off-by: Will Tsai <will_tsai@wistron.corp-partner.google.com> Change-Id: I3961b8083d30e582320cad1e4852746367e9a0a1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3312514 Reviewed-by: Boris Mittelberg <bmbm@google.com>
* zephyr: battery: add SMP L20M3PG2Eric Yilun Lin2021-12-063-0/+55
| | | | | | | | | | | | | | | Add SMP L20M3PG2 battery. BUG=b:203739613 TEST=zmake testall BRANCH=none Change-Id: I86c39e5cbe3a9b9aed19781d30528e3f43effcf5 Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3312506 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Eric Yilun Lin <yllin@google.com> Tested-by: Eric Yilun Lin <yllin@google.com>
* pazquel: change panel blacklight PWM frequency to 20kTang Qijun2021-12-051-3/+2
| | | | | | | | | | | | | | | | | | | The noise is related to the LCD panel and brightness PWM. Change the PWM frequency of the panel backlight to 20kHz, the display is normal, and no noise can be heard. BUG=b:207585489 BRANCH=trogdor TEST=No noise can be heard when booting into the operating system, and the screen display is normal. Signed-off-by: Tang Qijun <qijun.tang@ecs.corp-partner.google.com> Change-Id: I2ba8f7530743bbd1ee6f462be8f79c621eb3217a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3301560 Commit-Queue: Bob Moragues <moragues@chromium.org> Tested-by: Bob Moragues <moragues@chromium.org> Reviewed-by: Wai-Hong Tam <waihong@google.com> Reviewed-by: Alexandru M Stan <amstan@chromium.org>
* zephyr: Use a different way of handling no host commandsSimon Glass2021-12-041-7/+13
| | | | | | | | | | | | | | | | | When CONFIG_PLATFORM_EC_HOSTCMD is not enabled we want to silently drop the handler routines from the build. The current approach works for gcc but not for clang. Use an exported function instead. BUG=b:208648337 BRANCH=none TEST=CQ and gitlab Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: I63f74e8081556c726472782f60bddbbfbc3e9bf0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3313320 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* docs: Add Zephyr New Board checklistKeith Short2021-12-042-0/+121
| | | | | | | | | | | | | Add the initial new board checklist for Zephyr ECs. BUG=b:207403708 BRANCH=none TEST=View docs using gerrit preview/browse Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I1e2585709eaf9b1f9db4f57c9ae665797b3e5608 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3296745 Reviewed-by: Yuval Peress <peress@google.com>
* zephyr test: Verify SYV682x busy bit checkAbe Levkoy2021-12-033-0/+67
| | | | | | | | | | | | | | | | Support setting CONTROL_3[BUSY] in the SYV682x emulator. Verify that writes fail if this bit stays set for too long but succeed if it clears quickly. BUG=b:190519131 TEST=zmake configure --test zephyr/test/drivers BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: I58386f73c8df20239b3eaf13f8eab37be0b11bbf Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3315225 Reviewed-by: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
* drawcia: Don't report HDMI_HPD to CPU when power state S5Tommy Chung2021-12-031-3/+32
| | | | | | | | | | | | | | | | | | | | Since PP5000_HDMI is enabled by EN_PP5000_U, which means that it's still turned on when power state S5, VOLUP_BTN_ODL_HDMI_HPD will be asserted when HDMI is plugged in. If we report this to CPU through EC_AP_USB_C1_HDMI_HPD, there will be leakage current on CPU side which might lead to unabling to power on the system. BUG=none BRANCH=dedede TEST=make sure that EC_AP_USB_C1_HDMI_HPD is deasserted when power state S5 and HDMI plugged in, while it can work when system resume. Signed-off-by: Tommy Chung <tommy.chung@quanta.corp-partner.google.com> Change-Id: I67d1af60b74343611e0ca6f54773216cf4caa895 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3306791 Reviewed-by: Devin Lu <Devin.Lu@quantatw.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* zephyr: pm: npcx: add pm constraint check in PM policyJun Lin2021-12-031-5/+12
| | | | | | | | | | | | | | | | | | | | | | | | In PR:40802, the UART driver uses the pm_constraint counter to indicate if the UART Tx is still ongoing or not. The pm policy should check the counter with the pm_constraint_get function to determine if the system can enter the suspend state or stay in the active one. BUG=none BRANCH=none TEST=pass "zmake testall" TEST=build npcx9_evb and volteer with PR:40802, make sure they can boot up and enter deep sleep. Make sure the console messages don't break. Signed-off-by: Jun Lin <CHLin56@nuvoton.com> Signed-off-by: Wealian Liao <WHLIAO@nuvoton.com> Change-Id: I0803d9bb8454825a7ae876abaac58c65e7db1550 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3306790 Tested-by: CH Lin <chlin56@nuvoton.com> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr: brya: backlight lid configuration cleanupRajesh Kumar2021-12-031-2/+0
| | | | | | | | | | | | | | | | | | Fix conflicting configuration for backlight lid. CONFIG_PLATFORM_EC_BACKLIGHT_LID will be enabled by default, no need to enable explicitly, removing this from prj.conf. BUG=b:208787653 BRANCH=none TEST=zmake configure -B ~/tmp/brya/ brya -b Signed-off-by: Rajesh Kumar <rajesh3.kumar@intel.com> Change-Id: Ia44ae2c51b913817b1b7ac31aa1cb16ef623aa27 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3313322 Reviewed-by: Divya S Sasidharan <divya.s.sasidharan@intel.com> Reviewed-by: Tanu Malhotra <tanu.malhotra@intel.com> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>