summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* nipperkin: update led behaviorstabilize-14396.B-mainZick Wei2021-12-131-5/+19
| | | | | | | | | | | | | | | | | Update LED behavior as below: Battery < 10%: amber 1 second On, 1 second Off for each LED. Battery error: amber 0.5 second On, 0.5 second Off for each LED. BUG=b:209729573 BRANCH=none TEST=verify LED behavior as intended. Signed-off-by: Zick Wei <zick.wei@quanta.corp-partner.google.com> Change-Id: I45e7245530ae155b98150b951505305c2f1009aa Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3329181 Reviewed-by: Devin Lu <Devin.Lu@quantatw.com> Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-by: Rob Barnes <robbarnes@google.com>
* Revert "flash_fp_mcu: Drop -kernelnext from platform name"stabilize-14395.B-mainStephen Boyd2021-12-111-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit edaeb40e16a8bc50a2049cca774b89082ff8fc0d. Reason for revert: The script already supports finding the platform basename. The failures due to strongbad-kernelnext should be fixed a different way. Original change's description: > flash_fp_mcu: Drop -kernelnext from platform name > > If we're running flash_fp_mcu on a board that has a kernelnext variant, > then it's essentially the same platform, but using a new kernel. Let's > just drop the variant name so that everything else works like before and > the flashing script can be run on new kernel variant testing boards. > > BRANCH=None > BUG=b:201110424 > TEST=tast run $strongbad_kernelnext_dut firmware.FpFlashFpMcuHello > > Change-Id: Id35f9f06b4a3ecc27891a6d22a8958cc99b36b04 > Signed-off-by: Stephen Boyd <swboyd@chromium.org> > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3318784 > Reviewed-by: Alexandru Stan <amstan@chromium.org> Bug: b:201110424 Change-Id: I19a74b75afcaa35e8eabf488d7462de4b4e0e96d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3331460 Auto-Submit: Stephen Boyd <swboyd@chromium.org> Tested-by: Stephen Boyd <swboyd@chromium.org> Reviewed-by: Alexandru Stan <amstan@chromium.org> Commit-Queue: Alexandru Stan <amstan@chromium.org>
* duck: initial commitSue Chen2021-12-112-0/+14
| | | | | | | | | | | | | | | | Create initial commit for Quackingstick keyboard. BUG=b:208588161 BRANCH=trogdor TEST=bootable on Quackingstick/Zed Signed-off-by: Sue Chen <sue.chen@quanta.corp-partner.google.com> Change-Id: Ifc78a8a41763fff8aa702b08ca78e362dbfe3ee7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3319609 Reviewed-by: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Bob Moragues <moragues@chromium.org> Commit-Queue: Bob Moragues <moragues@chromium.org> Tested-by: Bob Moragues <moragues@chromium.org>
* quackingstick: support thermal charge policySue Chen2021-12-111-0/+38
| | | | | | | | | | | | | | | | | | | | | | | The charging limitation: While the DUT is enter OS, sample temperature as charger task Level | low T'C | high T'C | current | (Tsens > T) | (Tsens < T) | (mA) ------------------------------------------------ 0 | 0 | 50 | 3000 (Normal charge) 1 | 48 | 53 | 1500 2 | 51 | 56 | 1000 3 | 54 | 100 | 800 BUG=b:196997371 BRANCH=trogdor TEST=use console cmd chgstate to check requested_current is as expected. Signed-off-by: Sue Chen <sue.chen@quanta.corp-partner.google.com> Change-Id: I1665f65d952cfd6bd292188b573997100384278f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3255091 Reviewed-by: Wai-Hong Tam <waihong@google.com> Commit-Queue: Bob Moragues <moragues@chromium.org>
* baseboard/trogdor: move usbc_config.c to board levelSue Chen2021-12-1121-11/+567
| | | | | | | | | | | | | | | | | | | move baseboard/trogdor/usbc_config.c to board file to let board modify charger_profile_override. BUG=none BRANCH=trogdor TEST="make BOARD" build pass for trogdor family (pompom, pazquel, coachz, lazor, marzipan, homestar, wormdingler, trogdor, mrbland, quackingstick, kingoftown) "zmake -D testall" without ERROR message. Signed-off-by: Sue Chen <sue.chen@quanta.corp-partner.google.com> Change-Id: I6dc71f64a1275fa1a71692f43611d3888f780cb6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3255090 Reviewed-by: Wai-Hong Tam <waihong@google.com> Commit-Queue: Bob Moragues <moragues@chromium.org>
* core/cortex-m0: Fix div.S compilation with clangTom Hughes2021-12-111-2/+3
| | | | | | | | | | | | | | | | | | Add an additional label at the same address as __aeavi_uidivmod to work around a linker crash crash when using clang: ld.lld: error: core/cortex-m0/div.S:51:(.text+0x10): internal linker error: cannot read addend for relocation R_ARM_THM_JUMP8 BRANCH=none BUG=b:172020503, b:205351146 TEST=./util/compare_build.sh -b all -j 120 => MATCH Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I5a7f682377311e881ac2bcdb85b854127f5907ba Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3265867 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* core/cortex-m[0]: Replace numeric index with readable nameTom Hughes2021-12-112-38/+49
| | | | | | | | | | | | | | | The code is easier to read with human readable names instead of numeric values. BRANCH=none BUG=b:172020503, b:207001076 TEST=./util/compare_build.sh -b all -j 120 => MATCH Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: Ie7474729dcb43edb9b6a728b9b944b55d76a1f0f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3299273 Reviewed-by: Diana Z <dzigterman@chromium.org>
* gitlab: Specify absolute paths to lcovJeremy Bettis2021-12-111-4/+4
| | | | | | | | | | | | | | | | | | lcov needs absolute paths, or */dir patterns. Change remove paths to be absolute. BRANCH=None BUG=None TEST=Ran commands by hand Change-Id: I4878fc429ff4dcd75684d51aa88971ed592c198f Signed-off-by: Jeremy Bettis <jbettis@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3330724 Tested-by: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Yuval Peress <peress@google.com> Commit-Queue: Yuval Peress <peress@google.com>
* Storo: Add battery second source informationMike Lee2021-12-102-4/+36
| | | | | | | | | | | | | | | | Add new battery config BUG=b:206895271 BRANCH=dedede TEST=Check battery info in console and cutoff function work. Signed-off-by: Mike Lee <mike5@huaqin.corp-partner.google.com> Change-Id: I245bbe4a1333e3350b79d22958e888ce01ccadd8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3289579 Reviewed-by: wen zhang <zhangwen6@huaqin.corp-partner.google.com> Reviewed-by: Henry Sun <henrysun@google.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* kakadu/katsu: fix bugged bits in chargerTing Shen2021-12-103-5/+36
| | | | | | | | | | | | | | | | | | | | | The charger on some shipped device can not charge because a hidden bit (BYPASS_MODE) is flipped. Implement a quick fix to reset the reserved bits on these bugged devices. BUG=b:207456334 TEST=make BRANCH=kukui Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: I73d7865648162f420181f4bf067502bc0226cbda Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3319466 Tested-by: wen zhang <zhangwen6@huaqin.corp-partner.google.com> Reviewed-by: wen zhang <zhangwen6@huaqin.corp-partner.google.com> Reviewed-by: Eric Yilun Lin <yllin@google.com> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
* zephyr: corsola: refactor usb_pd_policyEric Yilun Lin2021-12-103-80/+91
| | | | | | | | | | | | | | | | | | Move corsola/usb_pd_policy to krabby folder. Kingler hasn't configured USBC yet, and kingler/krabby use very different USB-C components. BUG=b:206553789 b:203739613 TEST=zmake testall BRANCH=none Change-Id: I2d0568e73135b81290c73d0af5f1d8ff73431ffd Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3306758 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>
* mchp: Add CONFIG_I2C_BITBANG and increase WDT expired timemartin yan2021-12-102-0/+7
| | | | | | | | | | | | | | Add CONFIG_I2C_BITBANG and increase WDT expired time as heavy I2C traffic (board ID / battery / charger / Typec ports) as POR BUG=none BRANCH=none TEST=Tested on ADL RVP and MCHP1727 MECC board Signed-off-by: martin yan <martin.yan@microchip.corp-partner.google.com> Change-Id: I873f636e58a0a5de0d1449a592406abcd17c078d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3328104 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* magolor: support Pen detected with fw_configBen Chen2021-12-103-1/+44
| | | | | | | | | | | | | control pen control by stylus fw_config fiedl to enable/disable. BUG=b:167983049 BRANCH=dedede TEST=build BOARD PASS and EE check is PASS. Change-Id: Ifce1799ef36540b2df4dd6fe60de82869160c4b5 Signed-off-by: Ben Chen <ben.chen2@quanta.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3322219 Reviewed-by: Diana Z <dzigterman@chromium.org>
* zephyr: use chosen flash and sram nodes for configsPeter Marheine2021-12-101-7/+9
| | | | | | | | | | | | | | | | Rather than assuming a 'flash0' device always exists for defining RAM and program memory base addresses, use the chosen flash and SRAM devices (which are typically the same as those conventionally called flash0 and sram0). BUG=b:205615358 TEST=zmake testall BRANCH=none Change-Id: I4aa3bb559f1860cfe710c372b3e96e61affed604 Signed-off-by: Peter Marheine <pmarheine@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3322217 Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: hayato: enable power management configurationTim Lin2021-12-091-0/+5
| | | | | | | | | | | | | | | | | | Enable power management configuration. BUG=b:192354255 BRANCH=none TEST=zmake testall TEST=Enter deep doze: S3: power saving=4.41mA G3: power saving=5.12mA Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com> Change-Id: I4e48fbf999a89f7af3cbee3ad36d71c6ef5db5b6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3233466 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr: gpio: configure unused gpio pinTim Lin2021-12-093-2/+56
| | | | | | | | | | | | | | | | | | | | Configure unused gpio pin. BUG=b:192354255 BRANCH=none TEST=zmake testall TEST=compared with unconfigured: S0: power saving ~0.07mA S3: power saving ~0.19mA G3: power saving ~0.29mA hibernate: power saving ~0.3mA Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com> Change-Id: I30fe7954929dd7f818cef193967730ef43f9d7b4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3315765 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr: hayato: adjust hook tick intervalTim Lin2021-12-091-0/+3
| | | | | | | | | | | | | | | | | | | | | The hook tick interval refers to the setting of it8xxx2 of CROS adjusted to 500ms(default:250ms), which will reduce power consumption. BUG=b:192354255 BRANCH=none TEST=zmake testall TEST=compared with 250ms: S0: power saving ~0.21mA S3: power saving ~0.29mA G3: power saving ~0.34mA Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com> Change-Id: I542e622605662f2d84a1dbc6b1d9e71dcec4a4c7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3315764 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr: pm: it8xxx2: add power policyTim Lin2021-12-092-0/+77
| | | | | | | | | | | | | | | | | | | | | | | | This power policy defines that if deep sleep is allowed and an interval of five seconds, the system can enter the suspend state. The UART driver uses pm_constraint_set counter to indicate that UART Tx is in use. And use constraint_get in the power policy to get the counter determine if the system can enter the suspend state. BUG=b:192354255 BRANCH=none TEST=zmake testall And test on hayato. If CONFIG_PM, CONFIG_DEVICE, CONFIG_PM_POLICY_APP are enabled, the console messages normally before system enters suspend. Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com> Change-Id: I25a9de8202c84fbb069fe66e95ce0415b2b87470 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3267759 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr: emul: Add custom PDOs to charger emulatorTomasz Michalec2021-12-092-18/+174
| | | | | | | | | | | | | | | | Add custom PDOs to charger emulator which are used in capabilities message. BUG=none BRANCH=none TEST=make configure --test zephyr/test/drivers Signed-off-by: Tomasz Michalec <tm@semihalf.com> Change-Id: Id4ac089dcde6966bc6461a22b0986787ef5a5548 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3322913 Reviewed-by: Tristan Honscheid <honscheid@google.com> Tested-by: Tomasz Michalec <tmichalec@google.com> Commit-Queue: Tomasz Michalec <tmichalec@google.com>
* asurada: disable DCI function on PS8743 to save powerTing Shen2021-12-092-1/+10
| | | | | | | | | | | | | BUG=b:209528621 TEST=manually BRANCH=asurada Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: Ia85a861f8895d055dea48463cb2bcdd93e8ea569 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3320081 Reviewed-by: Eric Yilun Lin <yllin@google.com> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
* ps8743: add i2c_field_update and DCI mode config registerTing Shen2021-12-092-0/+18
| | | | | | | | | | | | | | | Add helper function and registers for Asurada. BUG=b:209528621 TEST=make BRANCH=asurada Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: Ia1b6f8761ce4cc23a1f671ca752b6004ac16eaaf Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3320080 Reviewed-by: Eric Yilun Lin <yllin@google.com> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
* dedede: Set MKBP event wake mask to 0Aseda Aboagye2021-12-091-0/+1
| | | | | | | | | | | | | | | | | | Now that we're sending button events to the AP via MKBP, we should not send any of those events while in suspend. This commit simply enforces that for the dedede platform. BUG=b:207805856 BRANCH=dedede,keeby TEST=Build and flash a dedede convertible device, suspend DUT, press a volume button, verify that DUT does not resume. Signed-off-by: Aseda Aboagye <aaboagye@google.com> Change-Id: I86cd2c22592a234e75e5f2040b15f64c3f8ef1f7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3324685 Tested-by: Jongpil Jung <jongpil19.jung@samsung.corp-partner.google.com> Reviewed-by: Henry Sun <henrysun@google.com> Commit-Queue: Henry Sun <henrysun@google.com>
* baseboard: cherry: enable CONFIG_IT83XX_I2C_CMD_QUEUEDino Li2021-12-091-0/+1
| | | | | | | | | | | | BRANCH=none BUG=b:208383454, b:197599515 TEST=Cherry boots. EC console haven't prompt i2c error. PD negotiation works on port 1. Signed-off-by: Dino Li <Dino.Li@ite.com.tw> Change-Id: I806a80c4560ac69b0363b3bc13480238561f7c01 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3322224 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* it83xx: i2c: add support for command queue modeDino Li2021-12-095-13/+276
| | | | | | | | | | | | | | | The mode eliminates byte interval from i2c single transaction. BRANCH=none BUG=b:208383454, b:197599515 TEST=buildall passes, cherry boots. EC console haven't prompt i2c error. Change-Id: I860ff0d02f82cf395acccb4b149d11f8cc51520c Signed-off-by: Dino Li <Dino.Li@ite.com.tw> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3314486 Reviewed-by: Ting Shen <phoenixshen@chromium.org> Tested-by: Parker Lin <parkerlin@google.com>
* dedede: add stylus fw_configBen Chen2021-12-092-0/+17
| | | | | | | | | | | | | | Add Stylus FW_Config Sheet define as bit 4, and get method. BUG=b:167983049 BRANCH=dedede TEST=build BOARD is PASS Change-Id: Ia91281aee4ab405a70aa2d8fca7b1e362861f26b Signed-off-by: Ben Chen <ben.chen2@quanta.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3322218 Reviewed-by: Henry Sun <henrysun@google.com> Reviewed-by: Diana Z <dzigterman@chromium.org>
* kingoftown: Update LED configTommy Chung2021-12-091-12/+18
| | | | | | | | | | | | | | | Update LED config to meet the new defined LED spec as shown in the following BUG tracker. BUG=b:202464175 BRANCH=trogdor TEST=make sure that all LED behaviors correct. Signed-off-by: Tommy Chung <tommy.chung@quanta.corp-partner.google.com> Change-Id: Ic91e8fb1ddd99628d4c2265f0bd6d49dc2b7c04b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3319995 Reviewed-by: Devin Lu <Devin.Lu@quantatw.com> Reviewed-by: Wai-Hong Tam <waihong@google.com>
* nissa: Add autogenerated Nivviks GPIOsAndrew McRae2021-12-092-108/+252
| | | | | | | | | | | | | | Add auto-generated GPIOS for Nivviks. Uses 'pinmap' to generate GPIO config. BUG=b:201000681 TEST=zmake configure -b nivviks BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I6f2ab86ef17bdadc2c3ed9311adf04d38834e5ee Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3325621 Reviewed-by: Wai-Hong Tam <waihong@google.com>
* zephyr test: Test VBUS sink enable/disableAbe Levkoy2021-12-091-0/+44
| | | | | | | | | | | | | Verify register values after enabling VBUS sink and after disabling it. BUG=b:190519131 TEST=zmake congfigure --test zephyr/test/drivers BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: Ibfb17252d3c31131101a6ba5682584148f747164 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3318726 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* zephyr: Add current limit and pullup configsAbe Levkoy2021-12-092-0/+22
| | | | | | | | | | | | | | Add configs for SYV682x high-voltage current limit and default CC Rp value to Zephyr Kconfig and shim. BUG=b:190519131 TEST=zmake configure --test zephyr/test/drivers BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: Id0854df49a53a19178b1ab3effc4555d7ff8f7bd Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3318724 Reviewed-by: Keith Short <keithshort@chromium.org>
* Zephyr: Guybrush: Add ADC channelsDiana Z2021-12-093-0/+47
| | | | | | | | | | | | | | | Add our 5 ADC channels to the zephyr image device tree. BRANCH=None BUG=b:195137794 TEST=on guybrush, verify ADC levels are similar to what they show with ECOS running Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I38d7a9209a2895d010a858bc4aa9d459d3e36a0e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3325242 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
* Zephyr: Add more ADC enum namesDiana Z2021-12-091-0/+4
| | | | | | | | | | | | | | Add more enum names for boards to use on their ADC channels. BRANCH=None BUG=b:195137794 TEST=zmake testall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I0a49dd0de29a3110179e6bf438306919a26b7405 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3325241 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
* it8xxx2: Restore raw_kb config to common it8xxx2 configAndrew McRae2021-12-086-69/+36
| | | | | | | | | | | | | | | Restore keyboard scanning config to common it8xxx2 config. Projects that do not have keyboards can disable it separately. V2 - remove keyboard config from drawcia_riscv. BUG=b:209324248 TEST=zmake configure -b krabby BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: Iab6844b696ce49c5700a8479df47542705a90643 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3322214 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* adlrvp: configure USB_C1_HPD PCA9675 I/O expander gpioDeepti Deshatty2021-12-081-0/+1
| | | | | | | | | | | | | | | | | | | Adlrvpn type-c port 1 has Aux switch for usb/dp mode. Switch connects or disconnects type-c port SBU lines to the SoC. USB_C1_HPD controls the Aux usb/dp switch. Hence set USB_C1_HPD to GPIO_OUT_LOW which ensures switch is in closed state. BUG=none BRANCH=none TEST=Verified USB and DP on adlrvpn type-c port1 Signed-off-by: Deepti Deshatty <deepti.deshatty@intel.corp-partner.google.com> Change-Id: I3f4fb23450bf58bd3cd488c91075b11a5b09abba Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3282977 Reviewed-by: Poornima Tom <poornima.tom@intel.com> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr: lis2dw12: Finish init() testsTristan Honscheid2021-12-082-0/+82
| | | | | | | | | | | | | | | Add tests for the remainder of the LIS2DW12 init() function. Also added the CTRL3 register to the emulator since this is accessed in the init routine. BRANCH=None BUG=b:200046770 TEST=zmake -D configure --test test-drivers; make runhosttests Signed-off-by: Tristan Honscheid <honscheid@google.com> Change-Id: Iacb767f384474801c69159476a5ce446df1f9ae0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3318820 Reviewed-by: Aaron Massey <aaronmassey@google.com>
* zephyr: lis2dw12: Add test for read() functionTristan Honscheid2021-12-081-1/+103
| | | | | | | | | | | | | Tests reading and processing samples from the accelerometer. BRANCH=None BUG=b:200046770 TEST=zmake -D configure --test test-drivers; make runhosttests Signed-off-by: Tristan Honscheid <honscheid@google.com> Change-Id: I56e324471c64b48a3aa47879826f8aaee968707f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3318819 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* zephyr: emul: set/read accel data support for LIS2DW12 emulatorTristan Honscheid2021-12-083-0/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support to the LIS2DW12 emulator for the following. This is needed by an upcoming driver unit test for reading data from the sensor * Add support for reading the status and output data registers via I2C. Multi-byte reads are supported for the data regs. All of these will assert if written to because they are listed as read-only. * Add two new emulator control functions: * lis2dw12_emul_set_accel_reading - Allows the test to set a fake accelerometer reading. The X, Y, Z values are copied in to the internal register store in the appropriate format. The data ready bit in the status register is set. * lis2dw12_emul_clear_accel_reading - Reset the data registers to 0 and clear the data ready flag. * Add macro definitions for the min and max acceleromter values. These are used for validating readings passed to lis2dw12_emul_set_accel_reading(). BRANCH=None BUG=b:200046770 TEST=zmake -D configure --test test-drivers; make runhosttests Signed-off-by: Tristan Honscheid <honscheid@google.com> Change-Id: I56c93677e3e5d067f070d9b3fd98e2b25f80eac7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3318818 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* zephyr: lis2dw12: Test set_data_rate()Tristan Honscheid2021-12-081-0/+116
| | | | | | | | | | | | | | | Unit test for the LIS2DW12 set_data_rate function. Covers turning the device off by setting a rate of 0, and exercises the rounding and clamping functionality. BRANCH=None BUG=b:200046770 TEST=zmake -D configure --test test-drivers; make runhosttests Signed-off-by: Tristan Honscheid <honscheid@google.com> Change-Id: I1ba28a7b192b4921593085b922269adc172ba6ad Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3311183 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* zephyr: lis2dw12: Add convenience functions to emulatorTristan Honscheid2021-12-082-0/+77
| | | | | | | | | | | | | | | Add some functions for peeking at the registers in the LIS2DW12 emulator and helpers for accessing the ODR, MODE, and LPMODE bits in the control register. These will be used for an upcoming driver test BRANCH=None BUG=b:200046770 TEST=zmake -D configure --test test-drivers; make runhosttests Signed-off-by: Tristan Honscheid <honscheid@google.com> Change-Id: Ia4134c3a8b2edac1f9929bb3fca52f37d3fc8496 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3311182 Reviewed-by: Yuval Peress <peress@google.com>
* zephyr: lis2dw12: Remove redundant min data rate clampTristan Honscheid2021-12-081-3/+0
| | | | | | | | | | | | | | | | The set_data_rate() function checks if the requested data rate is below the minimum supported by the chip, but this check happens after the odr_to_normalize() and odr_to_reg() have clamped it. So this check is redundant and unreachable. BRANCH=None BUG=b:200046770 TEST=zmake -D configure --test test-drivers; make runhosttests Signed-off-by: Tristan Honscheid <honscheid@google.com> Change-Id: Ib3f85e251ec0a8f15891a7ceec1844695c37278a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3311181 Reviewed-by: Sam Hurst <shurst@google.com>
* zephyr: brya: Enable PMIC mp2964 configurationRajesh Kumar2021-12-085-0/+26
| | | | | | | | | | | | | This enables the configuration for power management IC MP2964. BUG=b:209023139 BRANCH=none TEST=make configure -B ~/tmp/brya/ brya -b Signed-off-by: Rajesh Kumar <rajesh3.kumar@intel.com> Change-Id: I2bf39eea0db05103ca82e096cba07941b2f23ee4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3315227 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* zephyr: lis2dw12: Test set_range functionTristan Honscheid2021-12-082-1/+44
| | | | | | | | | | | | | | Add a test for the set_range function. There's a possible bug in this function that is documented in b:207691864 BRANCH=None BUG=b:200046770 TEST=zmake -D configure --test test-drivers; make runhosttests Signed-off-by: Tristan Honscheid <honscheid@google.com> Change-Id: If11144b74307ef62ef4149fb8e6401f0bdb1f8c8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3311180 Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: lis2dw12: Add tests for set_power_mode()Tristan Honscheid2021-12-083-13/+49
| | | | | | | | | | | | | | | | | | | | | | * Export set_power_mode() in case of unit tests. We need direct access to this function in order to exercise all of this cases, because it is only ever called within the driver using fixed args that don't hit all cases. * Rename set_power_mode() to lis2dw12_set_power_mode to prevent naming collisions * Add a test BRANCH=None BUG=b:200046770 TEST=zmake -D configure --test test-drivers; make runhosttests Signed-off-by: Tristan Honscheid <honscheid@google.com> Change-Id: I96b102c5a1a4c2524b775a32587afe16675a3cd1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3296683 Reviewed-by: Aaron Massey <aaronmassey@google.com> Tested-by: Tristan Honscheid <honscheid@google.com> Commit-Queue: Tristan Honscheid <honscheid@google.com>
* ampton: add second source battery informationjames_chao2021-12-082-0/+29
| | | | | | | | | | | | BUG=b:207102217 BRANCH=main,octopus TEST=Check the dut power on normally with new battery Signed-off-by: james_chao <james_chao@asus.corp-partner.google.com> Change-Id: I599433fbb6b4743285122c34cff94cce3d7da949 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3289580 Reviewed-by: Henry Sun <henrysun@google.com> Reviewed-by: Diana Z <dzigterman@chromium.org>
* flash_fp_mcu: Drop -kernelnext from platform nameStephen Boyd2021-12-081-0/+1
| | | | | | | | | | | | | | | | If we're running flash_fp_mcu on a board that has a kernelnext variant, then it's essentially the same platform, but using a new kernel. Let's just drop the variant name so that everything else works like before and the flashing script can be run on new kernel variant testing boards. BRANCH=None BUG=b:201110424 TEST=tast run $strongbad_kernelnext_dut firmware.FpFlashFpMcuHello Change-Id: Id35f9f06b4a3ecc27891a6d22a8958cc99b36b04 Signed-off-by: Stephen Boyd <swboyd@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3318784 Reviewed-by: Alexandru Stan <amstan@chromium.org>
* zephyr: Cleanup boolean shell config supportJack Rosenthal2021-12-081-5/+0
| | | | | | | | | | | | | | Cleanup support that was still around for v2.7 branch. BUG=b:205884929 BRANCH=none TEST=zmake testall Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I373b000208178d26323ffeca7efdc9e7de468e02 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3322237 Reviewed-by: Tristan Honscheid <honscheid@google.com> Commit-Queue: Tristan Honscheid <honscheid@google.com>
* Blipper: Disable vol keys functionMike Lee2021-12-082-1/+6
| | | | | | | | | | | | | | | | | Blipper does not have side volume buttons, and needs to disable the volume button function, otherwise the EC will think that the volume buttons are always triggered. BUG=b:208951409 BRANCH=dedede TEST=press power button can shutdown at firmware screen. Signed-off-by: Mike Lee <mike5@huaqin.corp-partner.google.com> Change-Id: I8a606ac6cca7ec891ac71a84aca6197c6303f8ab Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3316156 Reviewed-by: wen zhang <zhangwen6@huaqin.corp-partner.google.com> Reviewed-by: Henry Sun <henrysun@google.com> Commit-Queue: Henry Sun <henrysun@google.com>
* redrix: Blinking with each side LED while battery error.Devin Lu2021-12-081-2/+9
| | | | | | | | | | | | | This patch fixes the battery error LED should be blinking on each side. BUG=b:208912133 BRANCH=none TEST=Verify LED blink quickly while battery error on each side. Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: Ifaa2c5a09b32bdd1329839e6031d127fda2e66f8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3322216 Reviewed-by: Boris Mittelberg <bmbm@google.com>
* atomic: use atomic_t where it is possibleDawid Niedzwiecki2021-12-0824-31/+38
| | | | | | | | | | | | | | | | | | | | | | | There are several places where atomic_t can be a type variables that are use with atomic_* operation, so use it. It sometimes has an impact on the asm code, but it is not significant. 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: I5c7fa6b74b84454b22074a2a00b5f10003ee9843 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3306358 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org> Commit-Queue: Dawid Niedzwiecki <dawidn@google.com>
* zephyr test: Verify SYV682x device connectionAbe Levkoy2021-12-081-0/+24
| | | | | | | | | | | | | | | Verify that device connection and disconnection succeeds and enables and disables force VBUS discharge as appropriate. BUG=b:190519131 TEST=zmake configure --test zephyr/test/drivers BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: I49074b25a47430126416d23fcdc31511e28d6c2d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3315229 Reviewed-by: Yuval Peress <peress@google.com> Commit-Queue: Yuval Peress <peress@google.com>
* zephyr: update to new power management APIKeith Short2021-12-081-1/+1
| | | | | | | | | | | | | | | | Rename PM_STATE_INFO_DT_ITEMS_LIST to PM_STATE_INFO_LIST_FROM_DT_CPU to match latest API from Zephyr. BUG=b:209504852 BRANCH=none Cq-Depend: chromium:3316689 TEST=firmware-zephyr-cq Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I3a85d65496bf720d7d1cc78906dcc9f0bb7f04a5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3318722 Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Yuval Peress <peress@google.com>