summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Taniks: Enable RGB keyboardfactory-guybrush-14600.B-mainDaisuke Nojiri2022-03-197-22/+64
| | | | | | | | | | | | | | This patch enables the RGB keyboard module for Taniks. BUG=b:199995751 BRANCH=None TEST=make BOARD=taniks Change-Id: I2d95bb2f56a5f8e6505cb902aa67ee05e053acf3 Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3394288 Reviewed-by: caveh jalali <caveh@chromium.org> Commit-Queue: caveh jalali <caveh@chromium.org>
* flash_fp_mcu: Add power en gpio on strongbadStephen Boyd2022-03-181-3/+8
| | | | | | | | | | | | | | | There's a gpio for the power enable signal in the latest revision of the hardware (i.e. not rev0/rev1). Search for the gpio by name and use -1 if it fails. BRANCH=none BUG=b:179839337 TEST=flash_fp_mcu on coachz (rev1/rev3) Change-Id: I047236bd9a7bd3b34f2771576ff2b31952e0b094 Signed-off-by: Stephen Boyd <swboyd@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3534745 Reviewed-by: Alexandru Stan <amstan@chromium.org>
* zephyr: test-drivers: Set EC GPIO init before I2CJack Rosenthal2022-03-182-0/+5
| | | | | | | | | | | | | | | | | CL:3520139 changes the I2C init priority from 60 to 50, thus, blowing up a write failed when GPIO wasn't initialized yet. Change the init priority for this test. BUG=none BRANCH=none TEST=With CL:3520139, test passes Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I3ccfbbb2bb160b9b94a29dc10c8a6847221548d3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3536610 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* sn5s330: return when PP FET cannot be enabledTristan Honscheid2022-03-181-0/+3
| | | | | | | | | | | | | | | | | | Bug fixed identified while writing unit tests: the init function should return an error code when the sn5s330_pp_fet_enable() function fails. The fixed code is the intended behavior according to Aseda (aaboagye@google.com), who wrote the original driver. BRANCH=None BUG=b:225245353 TEST=zmake -D configure --test test-drivers Signed-off-by: Tristan Honscheid <honscheid@google.com> Change-Id: Ib85b67da98832cef6b0f820323eae270392bc4f8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3535000 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* zephyr: zmake: Add warnings about deprecated flagsJack Rosenthal2022-03-181-0/+9
| | | | | | | | | | | | | | | | | | Hopefully we can get people to stop using these flags as we want to remove them. Let this land for a week or so then we can rip the band-aid. BUG=b:225379781 BRANCH=none TEST="zmake configure -b lazor" -> see warning "zmake configure --test test-drivers" -> see warning "zmake test test-drivers" -> no warning Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: Ia6e33f438237a5541cacb51b2479d8554197dbac Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3536609 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* zephyr: Add tests for motion_sense host commandsYuval Peress2022-03-183-0/+95
| | | | | | | | | | | | | | | | Add tests for the `dump` motion-sense host command. These tests do not cover the case where the report size is larger than motion_sensor_count. This can only be done with activity sensors which have not yet been added to the drivers test. BRANCH=none BUG=b:224614211 TEST=zmake test test-drivers Signed-off-by: Yuval Peress <peress@google.com> Change-Id: I1e2fb22b29fbcc20c42070eaae258761e9816ccc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3530114 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* zephyr: emul: Add support for reset message from partnerTomasz Michalec2022-03-181-22/+43
| | | | | | | | | | | | | | | | | Add support in TCPCI emulator to send HardReset and CableReset from partner emulator. These two messages are handled differently and require additional actions in TCPCI upon receiving. BUG=b:223766685 BRANCH=none TEST=zmake configure --test test-drivers Signed-off-by: Tomasz Michalec <tm@semihalf.com> Change-Id: I1adfdb7dc363fedd62937e76f66862aa32f9eceb Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3528404 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Tomasz Michalec <tmichalec@google.com> Tested-by: Tomasz Michalec <tmichalec@google.com>
* zephyr: emul: Add support for RECEIVE_DETECT in TCPCITomasz Michalec2022-03-1810-41/+135
| | | | | | | | | | | | | | | | | | | TCPCI handle RECEIVE_DETECT register properly. TCPM should set this register only when it is ready to receive this certain kind of messages. Partner emulators are notified when send fail because of RECEIVE_DETECT value. In real world it would be the same as not receiving GoodCRC message from partner point of view. BUG=b:224927648 BRANCH=none TEST=zmake configure --test test-drivers Signed-off-by: Tomasz Michalec <tm@semihalf.com> Change-Id: Ia6f2c16e94c600a81b9071d11ea79514f02a2081 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3515942 Reviewed-by: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Tomasz Michalec <tmichalec@google.com> Tested-by: Tomasz Michalec <tmichalec@google.com>
* zephyr: emul: Resend source capabilitiesTomasz Michalec2022-03-186-18/+174
| | | | | | | | | | | | | | | | | Resend source capabilities message from TCPC source partner emulator, when previous message couldn't be send. This is in line with PD specification. BUG=b:224927648 BRANCH=none TEST=zmake configure --test test-drivers Signed-off-by: Tomasz Michalec <tm@semihalf.com> Change-Id: I34a6b3d08546f3a17dcad629f4c6f09cd189f15f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3528403 Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com> Tested-by: Tomasz Michalec <tmichalec@google.com> Commit-Queue: Tomasz Michalec <tmichalec@google.com>
* zephyr: emul: Add disconnect callback to TCPCI partnerTomasz Michalec2022-03-188-52/+138
| | | | | | | | | | | | | | | | | | | Add disconnect callback which is used by TCPCI to inform partner emulator. Partner emulator clears delayed messages queue and stops timers on disconnection. PD messages cannot be send when partner emulator is disconnected. BUG=none BRANCH=none TEST=zmake configure --test test-drivers Signed-off-by: Tomasz Michalec <tm@semihalf.com> Change-Id: Idd3023a268affcdd1417b40745a24e297df74f8e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3528402 Reviewed-by: Aaron Massey <aaronmassey@google.com> Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Commit-Queue: Tomasz Michalec <tmichalec@google.com> Tested-by: Tomasz Michalec <tmichalec@google.com>
* zephyr: emul: Fix TCPCI partner emulator hard resetTomasz Michalec2022-03-186-17/+26
| | | | | | | | | | | | | | | | | Sink and source TCPCI partner emulators require pointer to emulator data, not emulator structure in hard reset callback function. DRP TCPCI partner still uses emulator structure. BUG=none BRANCH=none TEST=zmake configure --test test-drivers Signed-off-by: Tomasz Michalec <tm@semihalf.com> Change-Id: I0da673fbeeb3c8ae082987bf0ef21cb7d8d8fed2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3528401 Tested-by: Tomasz Michalec <tmichalec@google.com> Reviewed-by: Sam Hurst <shurst@google.com> Commit-Queue: Tomasz Michalec <tmichalec@google.com>
* zephyr: emul: generate I2C error on too short TCPCI messageTomasz Michalec2022-03-181-0/+8
| | | | | | | | | | | | | | | | TCPCI should generate a FAULT_STATUS.I2CInterfaceError on transmitting too short SOP* message. BUG=b:223766685 BRANCH=none TEST=zmake configure --test test-drivers Signed-off-by: Tomasz Michalec <tm@semihalf.com> Change-Id: Ife86d0581de01fb8980e58ecd675fcafa3e670ed Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3515941 Tested-by: Tomasz Michalec <tmichalec@google.com> Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Commit-Queue: Tomasz Michalec <tmichalec@google.com>
* zephyr: emul: Fix sending Hard and Cable reset in TCPCI emulatorTomasz Michalec2022-03-183-31/+90
| | | | | | | | | | | | | | | | | | | | | Transmitting Hard or Cable reset should alywas set TransmitSOP*MessageSuccessful and TransmitSOP*MessageFailed bits in ALERT register. Now partner emulators aren't reporting message status using tcpci_emul_partner_msg_status() when receive Hard or Cable reset. Instead TCPCI emulator transmit handler set correct ALERT state. Additionally transmitting Hard Reset sets RECEIVE_DETECT register to 0, clears receive buffer and resets mask registers. BUG=b:223766685 BRANCH=none TEST=zmake configure --test test-drivers Signed-off-by: Tomasz Michalec <tm@semihalf.com> Change-Id: I686e4001b65cc05621563861903c76e620224e3e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3515940 Tested-by: Tomasz Michalec <tmichalec@google.com> Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Tomasz Michalec <tmichalec@google.com>
* Banshee: Remove useless functionLeo-Tsai2022-03-183-129/+5
| | | | | | | | | | | | | | | | This patch removes useless function as following: 1. Remove Accelerometers. 2. Remove tablet mode. BUG=none BRANCH=none TEST=make BOARD=banshee Signed-off-by: Leo-Tsai <leocx_tsai@compal.corp-partner.google.com> Change-Id: Id24a45e80e276175594d7fe35ac39e642da07811 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3511588 Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Reviewed-by: Zhuohao Lee <zhuohao@chromium.org>
* krabby: workaround for RT9490 IBUS ADCTing Shen2022-03-182-1/+43
| | | | | | | | | | | | | | | | | Implemented the IBUS ADC workaround for krabby rev0. The code is provided from vendor in b/194967754#comment5. BUG=b:194967754 TEST=none BRANCH=none Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: I4ea98aa91a0d35b8b8665c08db413c0503f7baef Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3415389 Reviewed-by: Eric Yilun Lin <yllin@google.com> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
* zephyr: Add tests for motion_sense.h inline static functionsYuval Peress2022-03-181-0/+35
| | | | | | | | | | | | | | Get the motion_sense header to 100% coverage by testing a simple copy function and a clamp function. BRANCH=none BUG=b:224614211 TEST=zmake test test-drivers Signed-off-by: Yuval Peress <peress@google.com> Change-Id: Ibe254e04ad93f3014d64355fd5a281b1ce98e2c7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3530113 Reviewed-by: Aaron Massey <aaronmassey@google.com>
* zephyr: add tests to math library to fill in the gapsYuval Peress2022-03-1810-0/+173
| | | | | | | | | | | | | Get the coverage of the math_util.c file to 100% BRANCH=none BUG=b:224582527 TEST=zmake test test-math_float && zmake test test-math_fixed Signed-off-by: Yuval Peress <peress@google.com> Change-Id: Iae45f38b56c4bd2573e9981af59edbda0c72e04a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3530112 Reviewed-by: Wai-Hong Tam <waihong@google.com>
* Zephyr: Correct adlrvp and intelrvp baseboard to select correct configBrandon Breitenstein2022-03-174-2/+3
| | | | | | | | | | | | | | | Since there are now multiple intelrvp boards no longer select the power sequencing in the baseboard and move the selection to the specific rvp. Also set the default for icelake to n to avoid always pulling it. BUG=none BRANCH=none TEST=zmake testall and verify that there are no build issues with new prj.conf Signed-off-by: Brandon Breitenstein <brandon.breitenstein@intel.com> Change-Id: I266d74b75628156668ec9d40f6ffec7315c53224 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3516596 Reviewed-by: Keith Short <keithshort@chromium.org>
* power: Add chipset and board callbacks for sleep hangsRob Barnes2022-03-178-26/+79
| | | | | | | | | | | | | | | | | | Instead of passing a callback to host_sleep, define overridable board and chipset callbacks for sleep hang detection. Introduce a sleep_hang_type enum that identifies the type of sleep hang (suspend or resume). These changes make it eaier for boards to implement custom logic to handle sleep hangs. BUG=b:218892808 BRANCH=guybrush TEST=Observe suspend hang detection on Nipperkin with KI Change-Id: Ifacf90f808b1447633f7cfc2d570209d1e233950 Signed-off-by: Rob Barnes <robbarnes@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3529606 Reviewed-by: Diana Z <dzigterman@chromium.org>
* test-drivers: Specify sources explicitlyAbe Levkoy2022-03-171-2/+45
| | | | | | | | | | | | | Do not use globs to avoid stale dependencies during incremental builds. BUG=b:222148760 TEST=zmake testall -c; no change in covered lines BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: I36851a88511f3a2fdf0f945146cc534ddc477f7c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3498712 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* i2c: Add addr_flags and cmd to board_allow_i2c_passthru()Ricardo Quesada2022-03-1714-34/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL adds addr_flags and cmd_id (AKA offset) to board_allow_i2c_passthru(). This CL is a kind-of-cherrypick of this other CL: https://crrev.com/c/1588492 BRANCH=none BUG=b:135642493 TEST=make buildall passes tested in Madoo where I manually added a board_allow_i2c_passthru() function that was blocking port 5 (battery) and did: With EC unlocked: dut # ectool i2cread 8 0x05 22 1 Read from I2C port 5 at 0x16 offset 0x1 = 0x67 With EC locked: dut # ectool i2cread 8 0x05 22 1 EC result 4 (ACCESS_DENIED) Change-Id: Ifba59f21f63f99345b81dd250296214a5cd29eba Signed-off-by: Ricardo Quesada <ricardoq@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3466422 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Ricardo Quesada <ricardoq@chromium.org> Auto-Submit: Ricardo Quesada <ricardoq@chromium.org> Commit-Queue: Ricardo Quesada <ricardoq@chromium.org>
* i2c: move PASSTRHU_RESTRICTED check to check_i2c_paramsRicardo Quesada2022-03-171-8/+6
| | | | | | | | | | | | | | | | | | | | | | This CL moves the check about allowing PASSTHRU_RESTRICED checks from i2c_command_passthru() to check_i2c_params(). The rationale, is that we already have a function to check whether the params are valid and/or allowed. This is similar to what this CL did: https://crrev.com/c/1588492 BRANCH=none BUG=b:135642493 TEST=make buildall passes Change-Id: I5902feae8f5b626e10053f279cb2fe2cdbba2585 Signed-off-by: Ricardo Quesada <ricardoq@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3466415 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Ricardo Quesada <ricardoq@chromium.org> Auto-Submit: Ricardo Quesada <ricardoq@chromium.org> Commit-Queue: Ricardo Quesada <ricardoq@chromium.org>
* Skyrim: Fill in DB chipsDiana Z2022-03-172-134/+48
| | | | | | | | | | | | | | | Add the ANX7483 retimer being used on some DBs, and also clean up references to older guybrush code. Note that retimer configuration calls will be filled in as they're needed during bringup. BRANCH=None BUG=b:208515128 TEST=load on skyrim, confirm ANX mux sets right in fake S0 with DP dongle Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Ic99bf7b1495b1bc84971371da35c4057fcfdd095 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3514506 Reviewed-by: Robert Zieba <robertzieba@google.com>
* zephyr: Fix comment on test functionYuval Peress2022-03-171-3/+3
| | | | | | | | | | | | | | | I missed a comment on a code review asking for this comment to be re-phrased. BRANCH=none BUG=none TEST=none Signed-off-by: Yuval Peress <peress@google.com> Change-Id: I24fd67b9f70d957487e1fbac58b3bab240d9f399 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3530111 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* Hammer/Prism: Disambiguate CONFIG_RW_SIZEDaisuke Nojiri2022-03-172-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently CONFIG_RW_SIZE is defined as CONFIG_FLASH_SIZE_BYTES - CONFIG_RW_MEM_OFF - CONFIG_RO_MEM_OFF. However, if you look at CONFIG_RW_MEM_OFF = CONFIG_ROLLBACK_OFF + CONFIG_ROLLBACK_SIZE where CONFIG_ROLLBACK_OFF = CONFIG_RO_MEM_OFF + CONFIG_RO_SIZE, you can tell CONFIG_RW_MEM_OFF is the offset from the beginning of the flash storage not from CONFIG_RO_MEM_OFF. Thus, we shouldn't subtract CONFIG_RO_MEM_OFF twice to define CONFIG_RW_SIZE. It's currently working because CONFIG_RO_MEM_OFF happens to be zero. Thus, this change won't change any functionality but will disambiguate how CONFIG_RW_SIZE is defined. BUG=b:222318598 BRANCH=None TEST=Vell Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Change-Id: I42e23c0e9f0c5a6b97c5254250a18586e2f9b483 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3504050 Reviewed-by: caveh jalali <caveh@chromium.org>
* cq: Export binary and ram sizes in cq build metricJeremy Bettis2022-03-172-51/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change firmware_builder.py to export metrics. Here is an example ``` { "targetName": "nereid", "platformName": "it8xxx2", "fwSection": [ { "region": "RO_ROM", "used": 298164, "total": 1048576 }, { "region": "RO_RAM", "used": 51764, "total": 57344 }, { "region": "RO_IDT_LIST", "total": 2048 }, { "region": "RW_ROM", "used": 298164, "total": 1048576 }, { "region": "RW_RAM", "used": 51764, "total": 57344 }, { "region": "RW_IDT_LIST", "total": 2048 } ] }, ``` Also formatted to make cros lint happy. BRANCH=None BUG=b:223846977 TEST=Ran commands in README. Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: Ic1c53d0ce2ba273af714b74f8fc057d9237b5b02 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3529669 Reviewed-by: Jett Rink <jettrink@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org>
* zephyr: fix checking SSFCDawid Niedzwiecki2022-03-171-10/+5
| | | | | | | | | | | | | | | | Update usage of cros_cbi_ssfc_check_match function after dropping a driver model in CL:3471596 BUG=b:216802531 BRANCH=main TEST=zmake testall Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com> Change-Id: If90173ad0ed4a1f9e7335a7cc980cf25a707fae9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3528926 Tested-by: Dawid Niedzwiecki <dawidn@google.com> Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Dawid Niedzwiecki <dawidn@google.com>
* nissa: use standard keyboard column 2 invert optionstabilize-14589.B-mainPeter Marheine2022-03-173-4/+5
| | | | | | | | | | | | | | | | | | On Nivviks this was being accomplished by driving the column 2 output with an active-low GPIO, but doing this portably requires setting the dedicated KEYBOARD_COL2_INVERTED option because Nereid's EC does not need to drive the signal as a GPIO in order to invert it and consequently cannot invert it in the device tree in the same way. BUG=b:225082447 TEST=Keyboard column 2 output now idles high on Nereid BRANCH=none Signed-off-by: Peter Marheine <pmarheine@chromium.org> Change-Id: Ia3e5966d642b4ffb458cb1d91015869763ba00b4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3529596 Reviewed-by: Andrew McRae <amcrae@google.com> Commit-Queue: Andrew McRae <amcrae@google.com>
* nissa: Enable charger discharge on AC for testingstabilize-14588.98.B-mainstabilize-14588.14.B-mainstabilize-14588.123.B-mainrelease-R101-14588.B-mainAndrew McRae2022-03-171-0/+2
| | | | | | | | | | | | | | Both Nereid and Nivviks chargers allow discharge on AC which can be enabled for testing. BUG=b:224929764 TEST=zmake build nivviks; ectool chargecontrol discharge BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I8aa9c5ae2974b4a402cb8c634a2078fd6580e883 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3529600 Reviewed-by: Peter Marheine <pmarheine@chromium.org>
* banshee: Modify sense resistor configs of ISL9241Matt Wang2022-03-171-1/+1
| | | | | | | | | | | | | | Meet the ISL9241 spec Adapter Current Limit1(0x3F) is 20mOhm. BUG=b:222038282 BRANCH=none TEST=Charging and discharging normally on banshee Signed-off-by: Matt Wang <matt_wang@compal.corp-partner.google.com> Change-Id: I6345fb0d2b5984f9ecdb7ee475df4fc01bee4c8f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3529597 Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Reviewed-by: caveh jalali <caveh@chromium.org>
* isl9241: add Control3 bit5 input current limitMatt Wang2022-03-171-0/+2
| | | | | | | | | | | | | | | | | | | | | This bit can control to enable/disable the input current limit function. ISL9241 0x4C Control3 bit5 Input Current Limit Loop Disables the input current limit loop. 0 = Enable input current limit loop (default) 1 = Disable input current limit loop BUG=b:222038282 BRANCH=none TEST=On banshee, use this bit can AC only power on the system. Signed-off-by: Matt Wang <matt_wang@compal.corp-partner.google.com> Change-Id: I12bcc968cddcdaf0e91bb6e61dd18dd14a6d07c9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3522202 Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Reviewed-by: Boris Mittelberg <bmbm@google.com> Reviewed-by: caveh jalali <caveh@chromium.org>
* Banshee: Implement fan tableRidden_Liu2022-03-172-18/+24
| | | | | | | | | | | | | | | | | | | Modify the fan rpm min/max/start value. And modify the fan temperature setting. BUG=b:223492897 BRANCH=none TEST=make -j BOARD=banshee. Verify critical temperature of three sensors. Verify max/min of rpm. Signed-off-by: Ridden_Liu <ridden_liu@compal.corp-partner.google.com> Change-Id: I0f9745efcea10677400be5aa9d4db6eda14f0041 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3508984 Reviewed-by: Boris Mittelberg <bmbm@google.com> Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Tested-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Reviewed-by: caveh jalali <caveh@chromium.org> Commit-Queue: caveh jalali <caveh@chromium.org>
* nissa: Swap nivviks volume up/down buttonsAndrew McRae2022-03-172-4/+4
| | | | | | | | | | | | | | Changes to reflect actual button layout. BUG=b:224884220 TEST=zmake build nivviks; flash and run and check buttons BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I33eca0b0ebcf05a7792dccf4fad1d5a4544bed81 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3529595 Reviewed-by: Peter Marheine <pmarheine@chromium.org> Commit-Queue: Peter Marheine <pmarheine@chromium.org>
* Banshee: change LED active port conditionLeo-Tsai2022-03-171-3/+13
| | | | | | | | | | | | | | | | | This patch is modified LEFT and RIGHT port to avoid C0 port can't set colors BUG=b:208182468,b:220954645 BRANCH=none TEST=build make -j BOARD=Banshee pass, verified the C0 port can show color after unit is charger Signed-off-by: Leo-Tsai <leocx_tsai@compal.corp-partner.google.com> Change-Id: I7ac57c9db19d3caeb647325575f35cf739d21fc7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3522473 Reviewed-by: Boris Mittelberg <bmbm@google.com> Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Tested-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com>
* landia: Porting keyboard.Hank Xie2022-03-171-1/+22
| | | | | | | | | | | | | | | | Porting screen lock key for landia. BUG=none BRANCH=dedede TEST=make sure keyboard function of each MB works correctly. Signed-off-by: Hank Xie <hank.xie@quanta.corp-partner.google.com> Change-Id: Iee3ca1c0ad9ce519ab8e11ca218aaf1338433b1a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3517432 Reviewed-by: Devin Lu <Devin.Lu@quantatw.com> Reviewed-by: Tommy Chung <tommy.chung@quanta.corp-partner.google.com> Tested-by: Tommy Chung <tommy.chung@quanta.corp-partner.google.com> Reviewed-by: Diana Z <dzigterman@chromium.org>
* nissa: Workaround for ADC initial read errorAndrew McRae2022-03-172-0/+20
| | | | | | | | | | | | | | | | | | | | It appears the ADC comparator initialisation breaks other ADCs that have not been read, so workaround the issue by initially reading all ADCs so that they are correctly initialised. Also add a check so that zero reads are detected and returned as an error. BUG=b:224900226 TEST=zmake build nivviks; flash and run and check ADCs work. BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: Ifcbebf2ca9b9a336f10fe3659fd3452223474ed3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3528015 Reviewed-by: Peter Marheine <pmarheine@chromium.org> Commit-Queue: Peter Marheine <pmarheine@chromium.org>
* ap_pwrseq: Add signal range checkingAndrew McRae2022-03-171-4/+20
| | | | | | | | | | | | | Add power signal range checking. BUG=b:225049035 TEST=zmake test test-ap_power BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: Ib1ddf1b7976db3060c79cf15278d334cb297d1ae Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3531308 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* cq: Parse memory report files and add to metricsJeremy Bettis2022-03-172-34/+111
| | | | | | | | | | | | | | | | | | | | In the build stage of firmware_builder.py, parse all memsize.txt files and write the sizes to the metrics proto. Document how to run the builder manually. Formatted python code, and fixed cros lint errors. BRANCH=None BUG=b:223846977 TEST=Ran commands in README. Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: Icca1165fc3e13ec89898550e53b12440bbe053d4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3530151 Reviewed-by: Jett Rink <jettrink@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org>
* gimble: do not reset PS8815 when AC only during power onScott Chao2022-03-172-2/+6
| | | | | | | | | | | | | If EC reset PS8815 when AC only, the EN_SINK will not be assert and let SM5360 in dead battery mode. It will result in SM5360's sink power switch keep at close state. BUG=b:223315425 TEST=make -j BOARD=gimble TEST=make sure DUT can boot with AC only after EC reset Signed-off-by: Scott Chao <scott_chao@wistron.corp-partner.google.com> Change-Id: I98c49e19c1266243c1341732e897f72699ba858a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3521001 Reviewed-by: Boris Mittelberg <bmbm@google.com>
* Zephyr: enable motion sensors for guybrush and skyrimRobert Zieba2022-03-178-4/+200
| | | | | | | | | | | | | | | This commits adds the motionsense device tree and config changes required to enable motion sensors for guybrush and skyrim. BUG=b:214619940 TEST=Used `ectool motionsense` and `accelread` to validate sensor readings under zephyr BRANCH=none Signed-off-by: Robert Zieba <robertzieba@google.com> Change-Id: I3ef8e14eadcb07c97c616f938c78a8e1254444bc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3517676 Reviewed-by: Diana Z <dzigterman@chromium.org>
* Zephyr: Enable CONFIG_PM_DEVICE on all boardsDiana Z2022-03-176-0/+8
| | | | | | | | | | | | | | | | This config used to be automatically enabled before CL:3504555. Now, enable the config explicitly and also ensure platforms have NPCX idle stats available. BRANCH=None BUG=b:224579318 TEST=on skyrim, observe no watchdog warnings in G3 with no charger Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Icbb2ea76425dd8750a0ab25e75f65c6da268defd Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3529815 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr: Pop a directory from the brya project pathJack Rosenthal2022-03-1716-0/+0
| | | | | | | | | | | | | | We aren't nesting the directory structure like ${PROGRAM}/${PROJECT} anymore. BUG=none BRANCH=none TEST=zmake build brya Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I44da0d7d43c097cd05e1e003926d302d0c3beb8b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3530959 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* zephyr: Add "ghost" variant of bryaJack Rosenthal2022-03-171-1/+3
| | | | | | | | | | | | | | | | Right now using brya hardware to develop ghost EC. Initially it can be a simple rename of brya. Later we will change the charger chip, which will require a couple of DTS customizations. Eventually, this project will need to move to not be a brya variant at some point. BUG=b:222738712 BRANCH=none TEST=builds (don't have hardware for testing yet) Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I3c713e12bd0685d08ed31c40bd103c2685416d78 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3530958 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* zephyr: zmake: Add a syntax to make simple variants of a buildJack Rosenthal2022-03-174-10/+94
| | | | | | | | | | | | | | Add a BUILD.py syntax to copy another project and make simple modifications. BUG=b:224998797 BRANCH=none TEST=provided unit test passes Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I87f0fe6b0e02c3ac34bec6de09d38e620fc293e3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3530957 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* herobrine: Fix LED config for hoglinMatthias Kaehlcke2022-03-161-0/+7
| | | | | | | | | | | | | | | | | | | | | Hoglin has a single blue/red LED on the right side, adjust the LED configuration to reflect that. BUG=b:223102797 TEST=ectool led right query Brightness range for LED 4: red : 0x1 green : 0x0 blue : 0x1 yellow : 0x0 white : 0x0 amber : 0x0 BRANCH=None Change-Id: Ia005a0de2c94bfbbcf8025492a57858b78888da6 Signed-off-by: Matthias Kaehlcke <mka@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3530953 Reviewed-by: Wai-Hong Tam <waihong@google.com>
* ec: Write memory usage report to fileJeremy Bettis2022-03-162-0/+5
| | | | | | | | | | | | | | | | | | Change the linker command for all board builds to pass the --print-memory-usage flag and save the results to a file. BRANCH=None BUG=b:223846977 TEST=make buildall_only -j16 Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I63733ce205a5453e7dc16809f7fd033873d67d07 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3530150 Tested-by: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: 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>
* zephyr: avoid duplicate IN_RANGE macroFabio Baltieri2022-03-161-0/+5
| | | | | | | | | | | | | | | | This has been added to Zephyr, avoid redefining it. BRANCH=none BUG=none TEST=zmake -j2 configure -b brya Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Cq-Depend: chromium:3519923 Change-Id: I7992c643b82648240ccbfdb77014a6bcc8034f5c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3528400 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Jack Rosenthal <jrosenth@chromium.org> Tested-by: Jack Rosenthal <jrosenth@chromium.org>
* ap_pwrseq: Clear default debug flags.Andrew McRae2022-03-162-1/+6
| | | | | | | | | | | | | | | | Reduce the noise by not enabling all the debug mask bits. powerindebug can be used to set the mask as desired. BUG=b:201000950 TEST=xmake build nivviks BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: Iae56960ecbf0bbd653df9242999aa6ed2e2cc253 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3528454 Reviewed-by: Divya S Sasidharan <divya.s.sasidharan@intel.com> Reviewed-by: Peter Marheine <pmarheine@chromium.org>
* zephyr: test: Attach src & snk using TCPCI rev2Aaron Massey2022-03-161-8/+18
| | | | | | | | | | | | | | | | Herobrine ports are configured with TCPCI revision 2. Switch test suites attaching src and snk using TCPCI revision 2 for all associated ports and TCPCI emulators. BRANCH=none BUG=b:209907615 TEST=zmake configure --test test-drivers Signed-off-by: Aaron Massey <aaronmassey@google.com> Change-Id: I392c1025fecc6a988212797f03dc5aa2fff387c1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3516541 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* zephyr: gpio: Do not change the output state for open-drain outputsWai-Hong Tam2022-03-161-2/+16
| | | | | | | | | | | | | | | | | | | | | | In the GPIO init, for each OUTPUT GPIO, it changes its output state according to its current state. It works for a push-pull OUTPUT. But for an open drain output, its current value doesn't imply the previous output state. The current low state is either 1) the EC previously drove the pin low; 2) the EC previously high-Z'ed the pin. These 2 cases can't be differentiated, so skip overriding the output state. BRANCH=None BUG=b:224616711 TEST=Verified the EC RW can boot the AP into the logic prompt. Change-Id: Ifdd1c6bac74b80edd95e9075744e1e583d553a0e Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3530149 Reviewed-by: Keith Short <keithshort@chromium.org>