summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* nissa: Update nissa.csv to latest spreadsheet downloadAndrew McRae2022-03-151-116/+120
| | | | | | | | | | | | | | Update nissa.csv reference CSV to latest spreadsheet download BUG=none TEST=generate pinmaps and confirm they match BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I15bfe1e3640a894c5398b4eae0d53c3465d201af Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3524445 Reviewed-by: Peter Marheine <pmarheine@chromium.org> Commit-Queue: Peter Marheine <pmarheine@chromium.org>
* Skyrim: Add FW_CONFIGDiana Z2022-03-151-0/+43
| | | | | | | | | | | | | | | Add device tree entries for FW_CONFIG defined for skyrim. BRANCH=None BUG=b:208515128 TEST=zmake testall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I31eed725880381a25d95037196a786f189b802f2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3514505 Reviewed-by: Rob Barnes <robbarnes@google.com> Reviewed-by: Jonathon Murphy <jpmurphy@google.com> Commit-Queue: Jonathon Murphy <jpmurphy@google.com>
* power: Add base code for Meteorlake power sequencingVijay Hiremath2022-03-159-0/+313
| | | | | | | | | | | | | | | | Added base code for Meteorlake power sequencing. Implementation closely follows Intel Icelake power sequencing as reference and modified the logic based on Meteorlake Platform Development Guide. BUG=b:223985632 BRANCH=none TEST=Able to boot MTLRVP to S0 Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Signed-off-by: Brandon Breitenstein <brandon.breitenstein@intel.com> Change-Id: Ia551a1e226c648d9f23aff05ad3d44c3735a2495 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3516600 Reviewed-by: Keith Short <keithshort@chromium.org>
* ec/util: Add support for EC flashing/debugging through OpenOCDrobertzieba@google.com2022-03-154-0/+352
| | | | | | | | | | | | | | | | | | The existing flash_ec script does have support for OpenOCD, however it also requires running servo as well. And it does not support the NPCX99nf line of microcontrollers, nor does it support directly flashing NPCX devices. This change adds a ec_openocd.py script that serves as a wrapper around OpenOCD and gdb to make it easy to perform flashing and debugging through OpenOCD. BUG=b:208517780 BRANCH=none TEST=Verified that flashing and debugging worked as expected Change-Id: I8f4e127ada871f31840b07d20855cb2aa4d9cc54 Signed-off-by: robertzieba@google.com <robertzieba@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3498594 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* ANX7483: Add DriverDiana Z2022-03-158-0/+179
| | | | | | | | | | | | | | | | | Add driver support for the ANX7483 linear redriver. More functions may be added later to access and modify the equalizer/flat gain/output swing. BRANCH=None BUG=b:208515128,b:219898719 TEST=zmake testall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Iec2872bf2e35276f5161a6ef8750aad1c5c346ba Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3514504 Tested-by: Jonathon Murphy <jpmurphy@google.com> Reviewed-by: Andrew McRae <amcrae@google.com> Commit-Queue: Andrew McRae <amcrae@google.com>
* USB MUX: Update low power mode of MUX anx7447 used as MUX onlyTeddy Shih2022-03-151-0/+1
| | | | | | | | | | | | | | | | | | | | In order to improve power consumption of daughter board in Beadrix project, we figure out the key components include MUX. We add a low power mode function of anx7447 used as MUX only. The measured power consumption of daughter board is reduced from 90~108 mW to 5~10 mW. BRANCH=main BUG=b:216050967 TEST=on beadrix, measure power consumption of daughterboard with PD C1 MUX ANX3447QN-AC-R. The measured power consumption of daughterboard is improved. Signed-off-by: Teddy Shih <teddyshih@ami.corp-partner.google.com> Change-Id: Ia1907415b9976bb79f163e9b881d78a9303eea9e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3487086 Reviewed-by: Henry Sun <henrysun@google.com> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Ivan Chen <yulunchen@google.com>
* nissa: Gate the temperature sensor reads with power enableAndrew McRae2022-03-153-0/+4
| | | | | | | | | | | | | | The temperature sensors are powered off the P3300_S5 signal, so include the GPIO check in the sensor driver. BUG=b:224667136 TEST=zmake build nivviks; flash and run BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I453bb2d876dba1d52d52b063aaf5ee02742624b4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3522251 Reviewed-by: Peter Marheine <pmarheine@chromium.org>
* ectool: support dps enable/disable commandEric Yilun Lin2022-03-153-0/+55
| | | | | | | | | | | | | | | | Support dps host command for factory test. BUG=b:223937130 TEST=ectool usbpddps disable|enable BRANCH=cherry Change-Id: I050c724b5caab41644248a6f72704edbc76554a0 Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3522247 Tested-by: Eric Yilun Lin <yllin@google.com> Auto-Submit: Eric Yilun Lin <yllin@google.com> Reviewed-by: Rong Chang <rongchang@chromium.org> Commit-Queue: Rong Chang <rongchang@chromium.org>
* dps: move disable process to dps_enable()Eric Yilun Lin2022-03-151-3/+6
| | | | | | | | | | | | | | | | Move the code to an appropriate place. BUG=none TEST=dps dis, and DUT issue a new power request BRANCH=none Change-Id: Ice41f0b77c1867c0742fc9f517089c2da879e118 Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3522246 Tested-by: Eric Yilun Lin <yllin@google.com> Auto-Submit: Eric Yilun Lin <yllin@google.com> Reviewed-by: Rong Chang <rongchang@chromium.org> Commit-Queue: Rong Chang <rongchang@chromium.org>
* nissa/nereid: shrink hostcmd console bufferPeter Marheine2022-03-151-0/+3
| | | | | | | | | | | | | | | | | | | We need more memory for the USB mux task, and this buffer is a convenient place to get it from, at the cost of getting less history from logs gathered by the host processor. This change also removes the board-specific serial buffer size option, since it's also set in prj.conf. BUG=b:223044986,b:223749568 TEST=nereid build succeeds with USB mux task enabled BRANCH=none Signed-off-by: Peter Marheine <pmarheine@chromium.org> Change-Id: I68db610756fd80135529cd7eda582ad1f697d042 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3524064 Reviewed-by: Andrew McRae <amcrae@google.com> Commit-Queue: Andrew McRae <amcrae@google.com>
* nereid: adjust stack and buffer sizes for AP power-onPeter Marheine2022-03-151-0/+14
| | | | | | | | | | | | | | | | Powering on the AP requires more stack for a number of tasks, so this adjusts assorted stacks that became near-full (or overflowed) and frees up some memory by shrinking other things. BUG=b:223044986,b:201000950 TEST=Nereid AP power control runs, stacks do not overflow BRANCH=none Signed-off-by: Peter Marheine <pmarheine@chromium.org> Change-Id: Icce4d76022a5bac602d2f0f23541c395b0b04ada Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3522204 Reviewed-by: Andrew McRae <amcrae@google.com> Commit-Queue: Andrew McRae <amcrae@google.com>
* anahera: Tune USBA retimer EQDevin Lu2022-03-152-0/+67
| | | | | | | | | | | | | Tune USBA retimer EQ for USB A0, USB A1 port. BUG=b:203837657 BRANCH=none TEST=i2cxfer to read setting is correct. Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: Ia81d8a2559a3a9ac6c6b220fbd4bb31a83482a4d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3490453 Reviewed-by: caveh jalali <caveh@chromium.org>
* taniks: enable FRS on ports 0 and 1arthur.lin2022-03-153-2/+7
| | | | | | | | | | | | | | | enable FRS on ports 0 and 1 BUG=b:221391649 BRANCH=none TEST=make buildall -j TEST=(on taniks) EE test FRS dongle and get pass result. Signed-off-by: arthur.lin <arthur.lin@lcfc.corp-partner.google.com> Change-Id: I58ea993e84bce86b54ad460a4f4ed12b335d00a0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3505687 Reviewed-by: Parth Malkan <parthmalkan@google.com> Reviewed-by: caveh jalali <caveh@chromium.org>
* lantis: Add SSFC field for 2nd source Touchscreen driverRobert Chen2022-03-151-1/+11
| | | | | | | | | | | | | Due to landrid's ELAN touch screen use different driver but the same i2c slave address 0x10 as lantis. This patch adds SSFC field to support 2nd source touchscreen driver. BUG=b:222976965 TEST= emerge-dedede chromeos-ec and make sure works normally on lantis. Change-Id: I44fe6a5c0320fee9c7220bd27ae6af9c1798576e Signed-off-by: Robert Chen <robert.chen@quanta.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3509336 Reviewed-by: Henry Sun <henrysun@google.com>
* krabby: set EN_EC_ID_ODL high by defaultTing Shen2022-03-151-1/+1
| | | | | | | | | | | | | | | Same as CL:3515423 BUG=none TEST=`gpioget en_ec_id_odl` BRANCH=none Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: I3953954cbbe43c275a6cf801a59c5e0533356e15 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3521084 Reviewed-by: Eric Yilun Lin <yllin@google.com> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
* nissa: enable USB-A port controlPeter Marheine2022-03-156-2/+44
| | | | | | | | | | | | | | | | | This allows the USB-A shim to control VBUS for the USB ports and control current limits via the console or host command. BUG=b:223937974 TEST=usbchargemode command is now available on nereid console; `usbchargemode 0 1` turns on en_usb_a0_vbus, `usbchargemode 0 2` also turns on usb_a0_ilimit_sdp, `usbchargemode 0 0` turns off both BRANCH=none Signed-off-by: Peter Marheine <pmarheine@chromium.org> Change-Id: I58e8f554e7927da5a4976faef36bed2452c102da Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3517930 Reviewed-by: Andrew McRae <amcrae@google.com>
* zephyr: support smart USB-A port controlPeter Marheine2022-03-1511-13/+91
| | | | | | | | | | | | | | | | | | | | | This enables support for "smart" USB-A ports in addition to the existing "dumb" support, allowing one of them to be selected as well as implementing kconfig support for most of the other options for "smart" ports. For existing boards that enabled USB-A support with the default "dumb" support, their configuration is changed to specifically select that mode because the new choice option cannot have a default. BUG=b:223937974 TEST="smart" port control can be turned on for Nereid BRANCH=none Signed-off-by: Peter Marheine <pmarheine@chromium.org> Change-Id: If5b0fb393451d31a937c73be2aa3b9623c69307f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3517929 Reviewed-by: Andrew McRae <amcrae@google.com>
* zephyr: Convert HOOK_CHIPSET calls to AP power callbacksAndrew McRae2022-03-1511-136/+299
| | | | | | | | | | | | | Convert HOOK_CHIPSET_ hooks to AP power callback handling. BUG=b:223800037 TEST=zmake testall BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I1a9574cacd5746467494facf9133f360a31cc3d5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3518465 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* voxel: Add 2nd source InvenSense ICM-42607-Pben chen2022-03-152-2/+63
| | | | | | | | | | | | | | config icm42607 device in voxel project to support accelgyro source by SSFC control. BUG=b:221175309 BRANCH=volteer TEST=make BOARD voxel is PASS Change-Id: I952db68f8a6aee08e7769c022c51ef24639a407b Signed-off-by: Ben Chen <ben.chen2@quanta.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3490513 Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: Hide gpio_enable_interrupt if no dt nodesJeremy Bettis2022-03-151-26/+26
| | | | | | | | | | | | | | | | | | | | | Move cros_ec_gpio_interrupts into the block, as it depends on gpio_enable_dt_interrupt, which is there. Tests that don't define any cros_ec,gpio_interrupts fail to build on gitlab, but succeed in the chroot for an unknown reason. This change should make the breakages happen earlier and be more obvious. BRANCH=None BUG=b:222934152 TEST=zmake configure --test test-ap_power Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I34a502be8314422113d31c0190679ff9caf03d0e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3523202 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Andrew McRae <amcrae@google.com>
* zephyr: support a dedicated USB mux taskPeter Marheine2022-03-153-1/+24
| | | | | | | | | | | | | | | | Support for a dedicated task to run USB mux set operations was added for Brya, and Nissa will require it as well. Implement Zephyr support for it so Nissa can enable it. BUG=b:223749568 TEST=nereid now runs a USB_MUX task after enabling CONFIG_PLATFORM_EC_USB_MUX_TASK BRANCH=none Change-Id: Ibb3ecf8afea42b5542ba1fa74af4dfe4347a2a1f Signed-off-by: Peter Marheine <pmarheine@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3518705 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* zephyr: hooks: avoid copying constant fields to RAMPeter Marheine2022-03-152-10/+21
| | | | | | | | | | | | | | | | | Placing the hook function pointer, priority, and type in RAM requires each of those fields be stored in flash for initialization, but they also get copied into RAM at startup. By storing a pointer to that information (in Flash) in RAM rather than a copy, we can save a typical 4 bytes per hook handler. BUG=b:223044986 TEST=zmake testall; RAM usage on Nereid is reduced by 672 bytes BRANCH=none Signed-off-by: Peter Marheine <pmarheine@chromium.org> Change-Id: If9e57198ed6dfc73a966755a493a580e5feee915 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3505650 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* vell: Change FAN pwm to 25000 frequencyDevin Lu2022-03-151-2/+2
| | | | | | | | | | | | BUG=b:223950148 BRANCH=none TEST=On Vell. Fan works normally. Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: I4417113898573509909097c60640820bc596029b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3518805 Reviewed-by: caveh jalali <caveh@chromium.org> Commit-Queue: caveh jalali <caveh@chromium.org>
* primus: fix keyboard backlight in G3Peter Chi2022-03-151-1/+3
| | | | | | | | | | | | BRANCH=none BUG=b:224438397 TEST=make -j BOARD=primus Signed-off-by: Peter Chi <peter_chi@wistron.corp-partner.google.com> Change-Id: I36d06976efdfac96b02c8ef857dcf29529bbab04 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3517430 Reviewed-by: caveh jalali <caveh@chromium.org> Commit-Queue: caveh jalali <caveh@chromium.org>
* zephyr: shim: drop empty pwm.dts overlaysFabio Baltieri2022-03-1513-66/+7
| | | | | | | | | | | | | | | Make the PWM shim compile with no named-pwms node defined and drop all empty pwm.dts files. This also drops the one adlrvp_npcx, that currently defines an fan PWM but no matching named-fan. BRANCH=none BUG=b:217741090 TEST=cq dry run Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: Ib2d4e3a12ed688ba38fb6bbba9afb11f9d900ee6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3521941 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* ap_pwrseq: Add callbacks for resume, suspend and shutdownAndrew McRae2022-03-141-6/+7
| | | | | | | | | | | | | | Add power event callbacks for resume, suspend and shutdown. BUG=b:201000950 TEST=zmake build nivviks; flash and run BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I1daf21bca9e0d52de085021b0eb8d6458091418e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3521150 Reviewed-by: Divya S Sasidharan <divya.s.sasidharan@intel.com> Reviewed-by: Peter Marheine <pmarheine@chromium.org>
* ap_pwrseq: Directly access DTS config propertiesAndrew McRae2022-03-145-72/+29
| | | | | | | | | | | | | | | | | | Directly access DTS config properties so that when external board level functions are defined, they can can also access the configuration properties. BUG=b:223923728 TEST=zmake build nivviks; flash and run BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: Id97e03fdc743de1e1a645c19a9a514626986534a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3516768 Reviewed-by: Peter Marheine <pmarheine@chromium.org> Reviewed-by: Divya S Sasidharan <divya.s.sasidharan@intel.com> Reviewed-by: Bernardo Perez Priego <bernardo.perez.priego@intel.com> Tested-by: Bernardo Perez Priego <bernardo.perez.priego@intel.com>
* zephyr: test chgoverride console command for invalid portYuval Peress2022-03-141-0/+10
| | | | | | | | | | | | | | Add a test to execute the chgoverride console command using a port number that's too big (CHARGE_PORT_COUNT). BRANCH=none BUG=b:222630005 TEST=zmake test test-drivers Signed-off-by: Yuval Peress <peress@google.com> Change-Id: I592fd0742f28dd383ce6e9005dcb5f71de2e2f4e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3518069 Reviewed-by: Aaron Massey <aaronmassey@google.com>
* zephyr: test chgoverride console command for disconnectedYuval Peress2022-03-141-0/+6
| | | | | | | | | | | | | | | | Add a test to execute the chgoverride console command. The test starts with the override in the off position and passes 0 (the port number). Since nothing is connected, the port is considered a sink and the override will be set to port 0. BRANCH=none BUG=b:222630005 TEST=zmake test test-drivers Signed-off-by: Yuval Peress <peress@google.com> Change-Id: I044eeef577e0d58abaf574c2733f658d744c5194 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3516711 Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: test chgoverride console command for sink portYuval Peress2022-03-141-2/+76
| | | | | | | | | | | | | | | | Add a test to execute the chgoverride console command. The test starts with the override in the off position, connects a sink and passes 0 (the port number of the sink). It then verifies that the override is set to port 0. BRANCH=none BUG=b:222630005 TEST=zmake test test-drivers Change-Id: I974347df68b632e5b7c04e9245a04cd3ff977ae8 Signed-off-by: Yuval Peress <peress@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3516710 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* zephyr: test chgoverride -2 console commandYuval Peress2022-03-141-1/+14
| | | | | | | | | | | | | | | Add a test to execute the chgoverride console command. The test starts with the override in the off position and passes -2 (disable) as an argument. BRANCH=none BUG=b:222630005 TEST=zmake test test-drivers Signed-off-by: Yuval Peress <peress@google.com> Change-Id: Ia3772c3e9690962afa0806579d560bceddfd2acf Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3516709 Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com>
* zephyr: test chgoverride -1 console commandYuval Peress2022-03-141-0/+6
| | | | | | | | | | | | | | | Add a test to execute the chgoverride console command. The test starts with the override in the off position and also passes -1 (off) as an argument. No change is expected. BRANCH=none BUG=b:222630005 TEST=zmake test test-drivers Signed-off-by: Yuval Peress <peress@google.com> Change-Id: I7fe44d09940612cd0585034351e231c93ec61525 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3516708 Reviewed-by: Tristan Honscheid <honscheid@google.com>
* zephyr: test chgoverride console commandYuval Peress2022-03-141-0/+9
| | | | | | | | | | | | | | | Add a test to execute the chgoverride console command. The test can only verify that the command ran with a result of 0 since no arguments simply prints the current override port. BRANCH=none BUG=b:222630005 TEST=zmake test test-drivers Signed-off-by: Yuval Peress <peress@google.com> Change-Id: I91c323bb5d1b46fea816066a4efbe48513d3b11e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3516707 Reviewed-by: Aaron Massey <aaronmassey@google.com>
* zephyr: test chgsup console commandYuval Peress2022-03-141-0/+23
| | | | | | | | | | | | | | | Add a test to execute the chgsup console command. The test can only verify that the command ran with a result of 0 since all the command does is print to the console. BRANCH=none BUG=b:222630005 TEST=zmake test test-drivers Signed-off-by: Yuval Peress <peress@google.com> Change-Id: I6e411f21447fe8a3b9ceff977048fbcf277fb87a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3513661 Reviewed-by: Tristan Honscheid <honscheid@google.com>
* zephyr: test: Set VBUS detection on attach_src_snkAaron Massey2022-03-141-0/+24
| | | | | | | | | | | | | | Explicitly enable VBUS detection on TCPCI rev1 tests in the attach src and snk usb PD integration tests. BRANCH=none BUG=b:209907615 TEST=zmake configure --test test-drivers Signed-off-by: Aaron Massey <aaronmassey@google.com> Change-Id: Ia5b2b28d12d5fcd02117a663ba707db2bdd7d0b3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3516540 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* zephyr: test: default typec attach snk then srcAaron Massey2022-03-141-0/+60
| | | | | | | | | | | | | | Verify default typec info host command after attaching snk then src to board. BRANCH=none BUG=b:209907615 TEST=zmake configure --test test-drivers Signed-off-by: Aaron Massey <aaronmassey@google.com> Change-Id: I81f9f8e3cf50c50a858c29dc5625cd3bf8a2fcd7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3499291 Reviewed-by: Tristan Honscheid <honscheid@google.com>
* zephyr: sn5s330: Test I2C fails in init functionTristan Honscheid2022-03-141-0/+76
| | | | | | | | | | | | | | Write a unit test for handling failed I2C read/write ops in the sn5s330_init() function in the SN5S330 driver. BRANCH=None BUG=b:184856672 TEST=zmake -D configure --test test-drivers Signed-off-by: Tristan Honscheid <honscheid@google.com> Change-Id: I7fc09b84e502b357dd754d6b00114d58c65a653d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3517867 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* zephyr: sn5s330: Test register dump functionTristan Honscheid2022-03-141-0/+50
| | | | | | | | | | | | | Write a unit test for the reg_dump() function in the SN5S330 driver. BRANCH=None BUG=b:184856672 TEST=zmake -D configure --test test-drivers Signed-off-by: Tristan Honscheid <honscheid@google.com> Change-Id: Ib4b1ca701cb8e58c0ade7b6f28ec7604783cea37 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3517866 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* fpsensor: Tidy up fp_match_successAndrea Grandi2022-03-141-10/+4
| | | | | | | | | | | | | | Simplify logic and replace #ifdef with the compiler hint that the function might not be used in certain builds (e.g. tests). BRANCH=none BUG=b:222592305 TEST=make buildall -j Signed-off-by: Andrea Grandi <agrandi@google.com> Change-Id: I8091cd2bd8e2770d9aa62a80a67d654ddfea1c75 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3508717 Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* zmake: Remove warning detectionJeremy Bettis2022-03-141-8/+0
| | | | | | | | | | | | | | | | | | The warning detection in zmake consistently has false positives. Remove it. BRANCH=None BUG=None TEST=zmake test -a Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I8bd90801f7e188efc66227975387a9a281576e54 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3523203 Tested-by: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
* zephyr: Add missing lid gpio interrupt configJeremy Bettis2022-03-141-0/+9
| | | | | | | | | | | | | | | | | | The lid switch driver enables interrupts on the gpio, so the interrupt must be configured in the dts file. BUG=b:222934152 TEST=zmake configure --test test-ap_power BRANCH=none Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: Ia578d89158298d40735a22c0467e4b88332b7fbc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3523201 Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Commit-Queue: Abe Levkoy <alevkoy@chromium.org>
* ec: Add .gitmessage to .gitignoreAndrea Grandi2022-03-141-0/+2
| | | | | | | | | | | | | | Add the optional commit message template file to .gitignore. See https://crbug.com/gerrit/10963 for details. BRANCH=none BUG=none TEST=none Signed-off-by: Andrea Grandi <agrandi@google.com> Change-Id: Ic8939bc7202c8a09c76e472b2884773ac34451ef Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3508713 Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* zephyr: test: usb integration test detach permutationsAl Semjonovs2022-03-141-45/+292
| | | | | | | | | | | | | | Test USB detach permutations sink then source, source then sink, sink only, source only BRANCH=none BUG=b:209907799, b:209907946, b:209907950 TEST=zmake configure --test-drivers Signed-off-by: Al Semjonovs <asemjonovs@google.com> Change-Id: Iaa6ea7a875cd48e0b732e226ede28b1bd27e8688 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3474633 Reviewed-by: Yuval Peress <peress@google.com>
* zephyr: fan: rename fan structured to a data/config pairFabio Baltieri2022-03-141-56/+58
| | | | | | | | | | | | | | | | | | | This renames fan_status_t to fan_data and fan_control_t to fan_config, which is one step closer to the Zephyr style for driver variables and constants, and also avoids the enum collision and drop the awkward _t suffix which makes it looks like this is a typedef. This leaves struct fan_t, but that's used in other EC code so it has to stay. BRANCH=none BUG=none TEST=zmake testall Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: Ib0fe21778c1d9b532c2e1b08bcaaa9eeb4051deb Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3497453 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* zephyr: pwm: de-shim the fan driver PWM APIsFabio Baltieri2022-03-1414-100/+105
| | | | | | | | | | | | | | | | | Refactor the fan driver to drop the shimmed PWM code and use the Zephyr PWM APIs directly. Drop the corresponding dts entries, leaving few pwm.dts files empty, will clear those at a later stage. BRANCH=none BUG=b:217741090 TEST=zmake testall TEST=build and run on volteer, play with faninfo and fanset Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: I7eac734938c3b30768544a60af52b37d39a164fc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3497452 Reviewed-by: Tristan Honscheid <honscheid@google.com> Reviewed-by: Keith Short <keithshort@chromium.org>
* corsola: turn off en_hdmi_pwr (ec_x_gpio1) in S3Ting Shen2022-03-141-2/+6
| | | | | | | | | | | | | | | As suggested in b/221013032#comment6 BUG=b:221013032 TEST=manually gpioget in S0/S3 to verify BRANCH=none Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: I9228f263282a624ddaab24a651c83bc81d313bfe Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3515121 Reviewed-by: Eric Yilun Lin <yllin@google.com> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
* dojo: Control charging current with temperature charging tableTommy Chung2022-03-143-0/+86
| | | | | | | | | | | | | | | | Set a temperature charging table to control charging current to meet thermal request. BUG=b:219834480 BRANCH=cherry TEST=make sure that charging current can be controlled by temperature measured with thermistor according to the temperature charging table. Signed-off-by: Tommy Chung <tommy.chung@quanta.corp-partner.google.com> Change-Id: I6b31e5d9f06c60b1490d6ca6e5c74f970dac2173 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3468921 Reviewed-by: Devin Lu <Devin.Lu@quantatw.com> Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* lantis: Add SSFC field for 2nd source Audio codecRobert Chen2022-03-141-1/+12
| | | | | | | | | | | | | This patch adds SSFC field to support 2nd source audio codec. BUG=b:222976965 TEST= emerge-dedede chromeos-ec and make sure works normally on lantis. Change-Id: Ibd596b46cf2470f07cb8cfd051e86f5c91f683f1 Signed-off-by: Robert Chen <robert.chen@quanta.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3509335 Reviewed-by: Henry Sun <henrysun@google.com> Commit-Queue: Henry Sun <henrysun@google.com>
* volteer: add gyro sensdor ICM42607 SSFC fieldsBen Chen2022-03-141-1/+2
| | | | | | | | | | | | | | add SSFC bit maps of gryo sensor ICM4207, the value is 3 of bit 0-2. BUG=b:221175309 BRANCH=volteer TEST=make BOARD PASS. Change-Id: I644cf5ac0fa188a46e3334862b866edee8eb06f4 Signed-off-by: Ben Chen <ben.chen2@quanta.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3448060 Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: Add unit tests for AP power eventsAndrew McRae2022-03-142-1/+220
| | | | | | | | | | | | | | Add unit tests for AP power event notifications. BUG=b:201000950 TEST=zmake configure --test test-ap_power BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Cq-Depend: chromium:3509611 Change-Id: I17d03e3b6a2e5e28f6001dd240d68346a961c84a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3518774 Reviewed-by: Peter Marheine <pmarheine@chromium.org>