summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* jhl8040: Rename *gpios to *pinAndrew McRae2022-02-013-13/+13
| | | | | | | | | | | | | Do not use -gpio to refer to a named-gpio BUG=b:216402316 TEST=zmake configure -b brya BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: Ia0b58b410dd7ab0228811dc40f9c73fae72720be Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3418799 Reviewed-by: Peter Marheine <pmarheine@chromium.org>
* zephyr: Convert wake-pins to use interrupt configAndrew McRae2022-02-0117-91/+142
| | | | | | | | | | | | | | Convert the hibernate wake-pins to use the new interrupt config. BUG=b:214608987,b:216869126 TEST=zmake testall BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Cq-Depend: chromium:3423294,chromium:3423295 Change-Id: Iaaf03da88ead8bce7b2b428c265434a5a17b4ab7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3422856 Reviewed-by: Wai-Hong Tam <waihong@google.com>
* nissa: Use aliases for sub-board GPIOsAndrew McRae2022-02-016-75/+87
| | | | | | | | | | | | | Use GPIO aliases for sub-board GPIOs BUG=none TEST=zmake configure -b {nivviks,nereid} BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I9816ba1b44f209e10a8f5235498d43e5626d95e6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3428599 Reviewed-by: Peter Marheine <pmarheine@chromium.org>
* zephyr: Add GPIO_DT_FROM_{NODE,ALIAS} macrosAndrew McRae2022-02-011-4/+12
| | | | | | | | | | | | | | | Add GPIO_DT_FROM_NODE and GPIO_DT_FROM_ALIAS macro. Similar to GPIO_DT_FROM_NODELABEL, but references the spec from a node or alias, not a node label. BUG=none TEST=zmake testall BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I17c51335ca4d05bfcd6195f0badbd834e1f32ba6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3423295 Reviewed-by: Peter Marheine <pmarheine@chromium.org>
* zephyr test: Set ISL923x in natural unitsAbe Levkoy2022-01-314-21/+19
| | | | | | | | | | | | | | Accept voltage in mV as an argument to isl923x_emul_set_adc_vbus. Test using this interface. BUG=b:216497851 TEST=zmake testall BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: I8a0ec6019f1d4ef7853d731b11726e4fb1bdf136 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3425638 Reviewed-by: Yuval Peress <peress@google.com>
* zephyr test: Check charging in 5V charger testAbe Levkoy2022-01-311-6/+20
| | | | | | | | | | | | | | Check charging state after attaching 5V 3A charger. Rename the 5V and 20V charger tests to more accurately distinguish between them. BUG=b:216830930 TEST=zmake testall BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: If656def75036e20ceae40dd816e1ff4afc6a6bcc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3425637 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* skyrim: Migrate GPIO access to Zephyr APIAndrew McRae2022-01-317-44/+56
| | | | | | | | | | | | | Migrate GPIO access to use the Zephyr GPIO API BUG=b:216466985 TEST=zmake configure -b {skyrim,guybrush} BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I50759479c62eac112e77d4e94a292541dff4adce Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3426251 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* brya: Migrate GPIO access to Zephyr APIAndrew McRae2022-01-314-12/+21
| | | | | | | | | | | | | First phase of migrating GPIO access to Zephyr API. BUG=b:216466985 TEST=zmake configure -b brya BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I674e93fbe295604aa79eb9a93cf565c1d52567d8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3426247 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* ln9310: Move *gpio to *pinAndrew McRae2022-01-313-6/+6
| | | | | | | | | | | | | Avoid referencing named-gpio with a *gpio property BUG=b:216402316 TEST=zmake configure --test test/drivers BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: Iecd35e771319da9b4b3431277bb46de5e049736e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3418800 Reviewed-by: Sam Hurst <shurst@google.com>
* lazor: Migrate GPIO access to Zephyr APIAndrew McRae2022-01-312-4/+4
| | | | | | | | | | | | | Migrate the GPIO access to use the Zephyr GPIO API. BUG=b:216466985 TEST=zmake configure -b lazor BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I4a7b516977aa2d9ba193b6c1ab48d32134bc4da2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3426252 Reviewed-by: Aaron Massey <aaronmassey@google.com>
* npcx9: Do not turn on CONFIG_SOC_POWER_MANAGEMENT_TRACE by defaultAndrew McRae2022-01-311-1/+0
| | | | | | | | | | | | | | | The default config for npcx9 turns on CONFIG_SOC_POWER_MANAGEMENT_TRACE but this causes considerable console spam when CONFIG_LOG=y BUG=b:216921645 TEST=zmake configure -b nivviks; flash and run BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I56bffdd3b421d35ebd9492689dc857a151370def Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3426238 Reviewed-by: Wai-Hong Tam <waihong@google.com> Commit-Queue: Wai-Hong Tam <waihong@google.com>
* herobrine: Include the missing project configWai-Hong Tam2022-01-311-0/+1
| | | | | | | | | | | | | | | | | Need to include the project config prj_herobrine_npcx9.conf to the build. It defines CONFIG_BOARD_HEROBRINE_NPCX9=y. The board specific alternative component code (alt_dev_replacement.c) requires this Kconfig option. BRANCH=None BUG=b:216836197 TEST=Booted the herobrine_npcx9 image. No PPC access error and PD message loop. Change-Id: I73a9987ff49a4dfb346ebe7c994418278817c03b Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3422771 Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr test: Factor charging checks into functionsAbe Levkoy2022-01-311-36/+54
| | | | | | | | | | | | | | | | Create functions to check the responses to EC_CMD_CHARGE_STATE and EC_CMD_TYPEC_STATUS based on expected charger properties. This is almost certainly not the final form of the libraries to do this, but it will make it easier to functionally complete the in-progress tests. BUG=b:216830930,b:213908743 TEST=zmake testall BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: I70e6dbe5cad1d9fbf82f379d48a3260fc60091a4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3425596 Reviewed-by: Keith Short <keithshort@chromium.org>
* Skyrim: Add backlight enableDiana Z2022-01-312-1/+3
| | | | | | | | | | | | | | Add our active low backlight enable signal. BRANCH=None BUG=b:195137794,b:208515128 TEST=on guybrush, verify backlight reliably turns on during boot Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Iede02ecc3703d086354b2d5e31627810958a6b2e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3425760 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* Zephyr: Add support for active low backlight enableDiana Z2022-01-314-1/+13
| | | | | | | | | | | | | | Add support for having an active low line in our backlight enable code. BRANCH=None BUG=b:208515128,b:195137794 TEST=zmake testall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Id60de51d400740db1480e34fb9d3ed6d2a860042 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3425759 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* nissa: Consolidate common code into a single file.Andrew McRae2022-01-317-228/+143
| | | | | | | | | | | | | Consolidate common code for nivviks/nereid into a common file BUG=b:217091028 TEST=zmake configure -b {nereid,nivviks} BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I87d49f63073a861455f7a868e3ce18d4fc46fc68 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3426244 Reviewed-by: Peter Marheine <pmarheine@chromium.org>
* ectool: fix "ectool thermalget" ioctl errorB R, Harsha2022-01-311-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | thermalget throws ioctl error as looping exceeds the valid sensor count/id. Add condition to check if the loop count/sensor_id is valid or invalid based on the flag EC_TEMP_SENSOR_NOT_PRESENT. CPU Console: localhost ~ # ectool thermalget sensor warn high halt fan_off fan_max name 0 0 358 363 308 333 DDR and SOC 1 0 358 363 308 333 Ambient 2 0 378 393 308 338 Charger 3 0 403 403 308 333 WWAN (all temps in degrees Kelvin) BUG=none BRANCH=none TEST=make buildall -j, zmake testall, Run ectool thermalget on CPU console (on brya & gimble) Signed-off-by: B R, Harsha <harsha.b.r@intel.com> Change-Id: I400e6159bfe8593a93c37de8d6413be2e20fab4f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3369162 Reviewed-by: Harsha BR <harsha.b.r@intel.corp-partner.google.com> Tested-by: Harsha BR <harsha.b.r@intel.corp-partner.google.com> Reviewed-by: caveh jalali <caveh@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* nissa: Move nivviks specific code to src/nivviksAndrew McRae2022-01-313-2/+2
| | | | | | | | | | | | | Move nivviks specific code to src/nivviks BUG=b:217090502 TEST=zmake configure -b {nivviks,nereid} BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I1d8298fb962bb006d7a546d292803bfffa349294 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3426243 Reviewed-by: Peter Marheine <pmarheine@chromium.org>
* nissa: Nivviks config fixesAndrew McRae2022-01-311-4/+5
| | | | | | | | | | | | | | | | | | Fix some config items: - Use charger TCPC to detect VBUS - Remove redundant SYSINFO config (on by default) - Turn off CONFIG_SOC_POWER_MANAGEMENT_TRACE until chromium:3426238 lands BUG=b:201000681 TEST=zmake configure -b nivviks; flash and run BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Cq-Depend: chromium:3426239 Change-Id: I05390aa4a8ba81a0871c9df016e087940f58a41a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3426240 Reviewed-by: Peter Marheine <pmarheine@chromium.org>
* nissa: Move sub_usb_a1_vbus to nivviks_overlayAndrew McRae2022-01-313-5/+128
| | | | | | | | | | | | | | | | Should be marked as no-auto-init since it is only used for some sub-boards. Also add nissa.csv as the source of the generated data. BUG=none TEST=zmake configure -b nivviks BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I812019aaee7a386d29883f141839a9da2c34872d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3423616 Reviewed-by: Peter Marheine <pmarheine@chromium.org>
* npcx9: Adjust default stack sizes for npcx9Andrew McRae2022-01-301-2/+5
| | | | | | | | | | | | | | | | | | Observations on Nivviks indicate that the default stack sizes are too small: main stack size 1200, unused 92, usage 1108 / 1200 (92 %) sysworkq stack size 1024, unused 180, usage 844 / 1024 (82 %) CHARGER stack size 1024, unused 212, usage 812 / 1024 (79 %) BUG=b:201000681 TEST=zmake testall; flash and run on nivviks BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: Ic15bd0205ce0e5846d07699362cdf24fc60cce5a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3426239 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* Revert "Makefile: Switch to the Python script for CONFIG checking"David Stevens2022-01-305-17/+232
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 5b4c6473a341ebbd88463c908b39bb2820e5c43b. Reason for revert: b:216919905 - breaks chromeos CQ Original change's description: > Makefile: Switch to the Python script for CONFIG checking > > Now that the Python script seems to do what we need, switch over to > use that for checking for allowed ad-hoc CONFIGs. > > Sadly we need a work-around for the very old Python 3 version used in > the chroot. > > The new script is better at finding Kconfig options, so this allows some > reductions in the config_allowed.txt file. > > Delete the now-unused shell scripts. > > BUG=b:181323955 > BRANCH=none > TEST=python3 util/test_kconfig_check.py > > Signed-off-by: Simon Glass <sjg@chromium.org> > Change-Id: I2dafc9dfe9d9020638f4e49b5c5ee0fc0b10000b > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2923233 > Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Bug: b:181323955 Change-Id: I9b5514f9d2df43033cfd95555612e2e89e6ce724 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3426237 Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Nicolas Norvez <norvez@chromium.org> Tested-by: Nicolas Norvez <norvez@chromium.org>
* PCHG: Enable MKBP wake maskDaisuke Nojiri2022-01-291-0/+1
| | | | | | | | | | | | | | MKBP wakeup will be enabled by https://review.coreboot.org/c/coreboot/+/61383. We need this change to prevent MKBP events except PCHG from waking up the system. BUG=b:205675485 TEST=Redrix Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Change-Id: I6a795e785752f71781e95f2c2dfa89c60c7b298c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3413180 Reviewed-by: Rob Barnes <robbarnes@google.com>
* dojo: Re-config EN_KB_BL for dojoTommy Chung2022-01-291-2/+2
| | | | | | | | | | | | | | Re-config EN_KB_BL to meet dojo's GPIO pin define. BUG=b:213541078 BRANCH=cherry TEST=make sure that EN_KB_BL works correctly. Signed-off-by: Tommy Chung <tommy.chung@quanta.corp-partner.google.com> Change-Id: I142e5297a1c3900f492b6c46d26f15ca976033b4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3412630 Reviewed-by: Devin Lu <Devin.Lu@quantatw.com> Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* cherry: Move PWM config to board levelTommy Chung2022-01-296-46/+88
| | | | | | | | | | | | BUG=none BRANCH=cherry TEST=make BOARD=cherry, dojo, tomato Signed-off-by: Tommy Chung <tommy.chung@quanta.corp-partner.google.com> Change-Id: I74918f310c472848320b93a3dac6f89860bd14af Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3411515 Reviewed-by: Devin Lu <Devin.Lu@quantatw.com> Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* zephyr: Convert remaining irq-gpio to irq-pinAndrew McRae2022-01-293-3/+3
| | | | | | | | | | | | | | | It appears some new interrupts were added after the conversion was done. BUG=b:216402316 TEST=zmake testall BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: Ifa3c7c97a475c3dac3d42a40e1a91e267b612535 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3423294 Reviewed-by: Piotr Pawliczek <pawliczek@chromium.org> Commit-Queue: Piotr Pawliczek <pawliczek@chromium.org>
* Makefile: Switch to the Python script for CONFIG checkingSimon Glass2022-01-285-232/+17
| | | | | | | | | | | | | | | | | | | | | | Now that the Python script seems to do what we need, switch over to use that for checking for allowed ad-hoc CONFIGs. Sadly we need a work-around for the very old Python 3 version used in the chroot. The new script is better at finding Kconfig options, so this allows some reductions in the config_allowed.txt file. Delete the now-unused shell scripts. BUG=b:181323955 BRANCH=none TEST=python3 util/test_kconfig_check.py Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: I2dafc9dfe9d9020638f4e49b5c5ee0fc0b10000b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2923233 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* drawcia_riscv: Remove EC_CROS_GPIO_INTERRUPTSAndrew McRae2022-01-281-20/+0
| | | | | | | | | | | | | Remove the empty EC_CROS_GPIO_INTERRUPTS define BUG=b:214608987 TEST=zmake testall BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I024c93c02deb5c54e8c97d9dd405d628d7162bbe Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3422860 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* zephyr: adlrvp: Add initial gpio configurationRajesh Kumar2022-01-281-0/+251
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added gpio configuration generated from gpio.inc, Property 'enum-name' is excluded from this CL, We will keep adding 'enum-name' as and when required in later CL's. Steps to generate named gpios: 1. gcc -o <bin> util/gpios_to_zephyr_dts.c -I board/adlrvpp_npcx/ -I . 2. ./<bin> 3. remove "label= <>;" from genearted gpio's and use in gpio.dts file. / { named-gpios { compatible = "named-gpios"; <use output from step 3> }; }; BUG=none BRANCH=none TEST=none Signed-off-by: Rajesh Kumar <rajesh3.kumar@intel.com> Change-Id: I04246291f8fedeba08a2513e9605bc3538c77fd0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3421745 Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Sam Hurst <shurst@google.com>
* zephyr: Remove legacy interrupt supportAndrew McRae2022-01-281-203/+9
| | | | | | | | | | | | | | Now that EC_CROS_GPIO_INTERRUPTS has been completely removed, remove the legacy interrupt support. BUG=b:214608987 TEST=zmake testall BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I82fac3ab2cf1af6297cd2df485426144510ba3bf Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3422862 Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: test: battery present in integration usbAaron Massey2022-01-282-0/+11
| | | | | | | | | | | | | | | | | | The usb integration tests require the EC to know that a battery is present to charge. Now this happens without a test order dependency on the bc12 test suite. BRANCH=none BUG=b:209907615 TEST=zmake configure --test test-drivers with bc12 tests TEST=zmake configure --test test-drivers without bc12 tests Signed-off-by: Aaron Massey <aaronmassey@google.com> Change-Id: I7415cd9430fa708a2b40eff1d4ba2d31906b01cb Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3421747 Reviewed-by: Yuval Peress <peress@google.com>
* zephyr: drivers: Fix GPIO zephyr/ec flag conversionAl Semjonovs2022-01-281-4/+4
| | | | | | | | | | | | | Any bitwise AND with 0 will always be FALSE BRANCH=none BUG=b:216483477 TEST=zmake testall Signed-off-by: Al Semjonovs <asemjonovs@google.com> Change-Id: I5806d6f4189b587e2ae22ed836e2eb2bba649d74 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3417022 Reviewed-by: Yuval Peress <peress@google.com>
* zephyr: drivers: Improve code coverage of gpio.cAl Semjonovs2022-01-285-1/+361
| | | | | | | | | | | | | | | Add test cases to improve code coverage of gpio.c Created new GPIO_TEST enum to avoid affecting other test cases. BRANCH=none BUG=b:216483477 TEST=zmake -D configure --coverage --test zephyr/test/drivers/ Signed-off-by: Al Semjonovs <asemjonovs@google.com> Change-Id: I2ead3610e3ed64b04702488707aa96988f38f378 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3417013 Reviewed-by: Yuval Peress <peress@google.com>
* pi3usb9201: User new interrupt handling.Andrew McRae2022-01-285-11/+12
| | | | | | | | | | | | | Use new interrupt handling for pi3usb9201. BUG=b:214608987 TEST=zmake testall BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I679e573ecf2215a3538ea2019baf43413962f67d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3421906 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* zephyr: Rename irq-gpio to irq-pinAndrew McRae2022-01-2822-243/+249
| | | | | | | | | | | | | | Avoid the need for #gpio-cells by renaming irq-gpio to irq-pin BUG=b:216402316 TEST=zmake testall BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I3c489e7835c487e45ef86b838fab96f55336e061 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3419357 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* SPI0: Use Zephyr API for interrupt enabling of SPI0Andrew McRae2022-01-283-3/+2
| | | | | | | | | | | | | Use Zephyr API for SPI0 interrupt enable. BUG=b:214608987 TEST=zmake configure -b krabby BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I2c9d06096b8d4914f57f0e73e40b15ac044c52a0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3423612 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* zephyr: Convert sensor interrupts to new frameworkAndrew McRae2022-01-2814-17/+27
| | | | | | | | | | | | | | Migrate the motion sense interrupt handling to refer to interrupts rather than GPIOs. BUG=b:214608987 TEST=zmake testall BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I0d19cd87e2021acae6e167ef3e3c59b7e501a181 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3419426 Reviewed-by: Yuval Peress <peress@google.com>
* util: Support updating the list of allowed configsSimon Glass2022-01-282-15/+109
| | | | | | | | | | | | | | | When there are unneeded ad-hoc configs in the 'allowed configs' file, require the user to add their removal to the CL. This helps to ensure that config_allowed.txt reduces in size over time. BUG=b:181323955 BRANCH=none TEST=python3 util/test_kconfig_check.py Change-Id: I56784bd2a147637e2bf98f7e8353584292019f51 Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2923232 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* util: Support using kconfiglib in the CONFIG checkerSimon Glass2022-01-282-45/+165
| | | | | | | | | | | | | | | | | | | | | Update this to use kconfiglib so that it might be easier to maintain. This needs a more correct Kconfig setup in the tests. Also we need to provide the root Kconfig instead of just the directory. Overall this takes about 50% more time, but the total is only about 50ms, so this is not a significant factor in build performance. We must leave it optional, since U-Boot is unlikely to want this extra dependency. BUG=b:181323955 BRANCH=none TEST=python3 util/test_kconfig_check.py Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: I5cce2ca1fa16a7c334cef15b1f66dd7ede2644bd Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2923227 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* Add an updated KconfiglibSimon Glass2022-01-281-0/+7196
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add some changes to allow this library to work with Zephyr: - Ability to have Kconfig files in multiple projects directories - Ability to ignore variable expansion failures, since there are so many Kconfig variables in Zephyr These changes have been sent upstream here: https://github.com/ulfalizer/Kconfiglib/pull/112 and to Zephyr here: https://github.com/zephyrproject-rtos/zephyr/pull/42233 so this also includes the one Zephyr-local commit: 66d1b3ce106 kconfig: kconfiglib.py: Backup files only All three commits are based on Kconfiglib 14.1.0 BUG=b:181323955 BRANCH=none TEST=python3 util/test_kconfig_check.py Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: Iac24a90fe3707cacab40d45210addc663bb17f60 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3390708 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* zephyr: brya: Remove unreachable ACCELGYRO configsCaveh Jalali2022-01-281-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | This removes: CONFIG_PLATFORM_EC_ACCELGYRO_BMI_COMM_SPI CONFIG_PLATFORM_EC_ACCELGYRO_ICM_COMM_SPI since they are only meaningful when PLATFORM_EC_ACCELGYRO_BMI PLATFORM_EC_ACCELGYRO_ICM are enabled. brya does not use these sensors. BRANCH=none BUG=b:211877647,b:216410108 TEST="zmake configure --clobber -B ~/build-brya/ -b brya" runs without warnings Change-Id: I2f0bf6912bbfb6ce43099f7e26158950a60dbc23 Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3421748 Reviewed-by: Boris Mittelberg <bmbm@google.com> Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: kconfig: Add FLASH_SIZE_BYTES & MAPPED_STORAGE_BASEWealian Liao2022-01-287-18/+37
| | | | | | | | | | | | | | | | | | This adds PLATFORM_EC_FLASH_SIZE_BYTES & PLATFORM_EC_MAPPED_STORAGE_BASE kconfig option which fetch value from cros-ec,flash node. BUG=b:216385443 BRANCH=none TEST=zmake testall TEST=check FLASH_SIZE_BYTES & MAPPED_STORAGE_BASE have the same value on volteer Signed-off-by: Wealian Liao <whliao@nuvoton.corp-partner.google.com> Change-Id: I9ab133e79b870625625e9b5206d67999c96e60a3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3419435 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr: flash: Rename cros-ec,flash to cros-ec,flash-controllerWealian Liao2022-01-283-5/+5
| | | | | | | | | | | | | | | Rename cros-ec,flash to cros-ec,flash-controller. So we can distinguish the flash and flash-controller node. BUG=b:216385443 BRANCH=none TEST=zmake testall Signed-off-by: Wealian Liao <whliao@nuvoton.corp-partner.google.com> Change-Id: Ibd892a903f6efab2729961681267c6c98eb5762d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3419434 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr: add missing Kconfigs for AP throttlingMichał Barnaś2022-01-283-4/+47
| | | | | | | | | | | | | | | | | This commit adds missing Kconfigs for AP throttling based on battery level and discharging current. It will allow to enable them and specify the thresholds beyond which the AP should be throttled. BUG=b:177676794 BRANCH=main TEST=Enable AP throttling on lazor board and check if all configs are properly set Change-Id: Ifff7753e7775c18555ea17b7ecee7e79a112db52 Signed-off-by: Michał Barnaś <mb@semihalf.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3420910 Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com>
* zephyr: remove HOST_EVENT_MASK macroMichał Barnaś2022-01-286-72/+70
| | | | | | | | | | | | | | | | | | | | | | This macro was introduced as workaround to differences in host events definitions between CrOS EC and Zephyr. Since zephyr macros define masks, instead of offsets, it will be easier to define _NONE as 0, instead of BIT(0) and rest of the fields as bit masks. It will remove the differences between host-event-wakeup-mask and event-wakeup-mask definitions in device tree. They use the same compatible string, so there shouldn't be requirement about using macro in only one of the definitions. BUG=none BRANCH=main TEST=Same test as in commit that introduced this macro: Suspend DUT with powerd_dbus_suspend, and make sure the EC command "hostevent set 0x0000000002000000" wakes up the board. Change-Id: Ie582ecd805b1999d09ec71b10cdeff0b5ac1ec82 Signed-off-by: Michał Barnaś <mb@semihalf.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3417698 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* zephyr: fix license in wake_mask_event_defines.hMichał Barnaś2022-01-281-3/+3
| | | | | | | | | | | | | This commit changes the license header in wake_mask_event_defines.h BUG=none BRANCH=main TEST=none Change-Id: Ifcf6bd07c2d9182c0ed16e6040abab977a8873a5 Signed-off-by: Michał Barnaś <mb@semihalf.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3417697 Reviewed-by: Aaron Massey <aaronmassey@google.com>
* pinmap: Remove #gpio-cells from GPIO generationAndrew McRae2022-01-282-5/+0
| | | | | | | | | | | | | Remove #gpio-cells from GPIO bindings. BUG=b:216402316 TEST=go test ./... BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I8339f27caf6aa1594baedee7852c6fbaa9b718b0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3412629 Reviewed-by: Eizan Miyamoto <eizan@chromium.org>
* nissa/nereid: configure USB-C1 TCPCPeter Marheine2022-01-282-7/+37
| | | | | | | | | | | | | | | It was configured as an EC-internal TCPC, but that was incorrect: that port (if present) is controlled by a PS8745 combination TCPC and redriver on the sub-board. BUG=b:201000844,b:215650649 TEST=zmake build BRANCH=none Change-Id: I0304625cf2ea980fe6e43d18721a0d300f4d9e67 Signed-off-by: Peter Marheine <pmarheine@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3422857 Reviewed-by: Andrew McRae <amcrae@google.com>
* zephyr: mchp: Add cros_system drivermartin yan2022-01-285-0/+306
| | | | | | | | | | | | | Add cros_system driver and related configs BUG=none BRANCH=main TEST=zmake testall Signed-off-by: martin yan <martin.yan@microchip.corp-partner.google.com> Change-Id: I58cb735adfe6f631c48d14eeccfcba9e110d7942 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3390288 Reviewed-by: Yuval Peress <peress@google.com>
* vell: Enable keyboard factory scanningDevin Lu2022-01-282-0/+24
| | | | | | | | | | | | | This patch adds the factory keyboard connector test. BUG=b:216351386 BRANCH=none TEST=Short keyboard pins and make sure "ectool kbfactorytest" works. Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: Ib402d143c934e63b5226eacc1cf021df9f6aa692 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3413606 Reviewed-by: Boris Mittelberg <bmbm@google.com>