summaryrefslogtreecommitdiff
path: root/zephyr/boards
Commit message (Collapse)AuthorAgeFilesLines
* Update license boilerplate text in source code filesMike Frysinger2022-09-1231-31/+31
| | | | | | | | | | | | | | | Normally we don't do this, but enough changes have accumulated that we're doing a tree-wide one-off update of the name & style. BRANCH=none BUG=chromium:1098010 TEST=`repo upload` works Change-Id: Icd3a1723c20595356af83d190b2c6a9078b3013b Signed-off-by: Mike Frysinger <vapier@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3891203 Reviewed-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* zephyr: Delete CONFIG_PLATFORM_EC_ADCKeith Short2022-08-016-0/+24
| | | | | | | | | | | | | | | | | | | CONFIG_PLATFORM_EC_ADC is redundant with the Zephyr Kconfig option, CONFIG_ADC. Use the Zephyr option directly. Note - projects based on the "minimal" config do not compare. The minimal config disabled CONFIG_ADC, but the CONFIG_PLATFORM_EC_ADC_CMD was still enabled. With this CL, CONFIG_PLATFORM_EC_ADC_CMD now depends on CONFIG_ADC. BUG=none BRANCH=none TEST=zmake testall --static; compare binaries Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I129a3f490abd5c8234bc06ed6f86f2d7ff8a13b0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3791659 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* zephyr: rework i2c enumsDawid Niedzwiecki2022-07-281-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add additional enum that is created based on used I2C ports from devicetree. Use the new enums to create i2c enums listed in the named-i2c-ports node. The named-i2c-port enums that point to the same i2c port have the same value. The change should allow getting the i2c enum value from the named-i2c-ports node and the i2c port node(the node created by the chip vendor) alternately. It will be useful in process of moving usbc chips e.g. bc12 under the i2c bus, not in the named-usbc-port node. Since i2c enums using the same port have the same value, the i2c_physical_ports is no longer needed. The commit reduces the usage of memory a bit because I2C_PORT_COUNT is lower and initialization of i2c_physical_ports isn't needed. Also, change how the enum values are defined in the dts files. Only one node should be created per physical i2c port and define multiple enum values. BUG=b:228240586 TEST=zmake testall; make sure all i2c ports work BRANCH=main Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com> Change-Id: I95c3f6845cfb71a69d408f33a6c7b22383f10028 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3763905 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Dawid Niedzwiecki <dawidn@google.com>
* Revert "it8xxx2: temporarily disable I2C CQ mode"Peter Marheine2022-07-282-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 158bd971cc91dd115241155a8dd5af076381b0ef. Reason for revert: no longer needed; https://crrev.com/c/3776893 landed. Original change's description: > it8xxx2: temporarily disable I2C CQ mode > > The Zephyr change that added support for CQ mode has a bug that causes > errors in some transaction types. Disable CQ mode until the fix for that > bug lands. > > BUG=b:227415000 > TEST=I2C errors stopped occurring > BRANCH=none > > Signed-off-by: Peter Marheine <pmarheine@chromium.org> > Change-Id: I57e67cc592d25935494cd7a239c583b22b056568 > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3771362 > Commit-Queue: Andrew McRae <amcrae@google.com> > Reviewed-by: Andrew McRae <amcrae@google.com> Bug: b:227415000 Change-Id: Id289ac8151941ce3aa2e97bd4a4e46d3d9cfb844 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3779999 Reviewed-by: Andrew McRae <amcrae@google.com> Commit-Queue: Peter Marheine <pmarheine@chromium.org> Tested-by: Peter Marheine <pmarheine@chromium.org>
* zephyr: npcx_evb: add GPIO_VOLTAGE_1P8 flag supportMulin Chao2022-07-262-8/+0
| | | | | | | | | | | | | | | | | | Add GPIO_VOLTAGE_1P8 flag support at the related board DT file and remove unused `def-lvol-io-list` node. BRANCH=none BUG=b:239636081 TEST=passed 'zmake build npcx7/npcx9 --clobber' Signed-off-by: Mulin Chao <mlchao@nuvoton.com> Cq-Depend: chromium:3782768, chromium:3782769, chromium:3782770 Change-Id: I594a7a8bf942bd79ba830cdb277e133a1dfec191 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3771325 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr: gpio: Return configured value of output rather than pin valueAndrew McRae2022-07-268-0/+8
| | | | | | | | | | | | | | | | | | When getting the value of an output GPIO, use the configured output of the pin rather than the pin value itself. The configured output is the value that was last set on the GPIO output, whereas the value of the pin may not reflect this setting (i.e the pin may be open-drain with a low voltage, or the GPIO may be an output only GPIO). BUG=b:236094811 TEST=zmake testall; zmake build nivviks; flash & run BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: Ic4a551ffa3c1d2e5e02e22a26645071de3c2395e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3782022 Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: cros_kb_raw: drop the label propertyFabio Baltieri2022-07-201-1/+0
| | | | | | | | | | | | | | Seems like this is unused. BRANCH=none BUG=b:239165779 TEST=zmake testall Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: I059f388fe3301f6d7f48fdbe9cfdb6cb1c5b7ec8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3763911 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Tristan Honscheid <honscheid@google.com>
* it8xxx2: temporarily disable I2C CQ modePeter Marheine2022-07-192-0/+8
| | | | | | | | | | | | | | | | The Zephyr change that added support for CQ mode has a bug that causes errors in some transaction types. Disable CQ mode until the fix for that bug lands. BUG=b:227415000 TEST=I2C errors stopped occurring BRANCH=none Signed-off-by: Peter Marheine <pmarheine@chromium.org> Change-Id: I57e67cc592d25935494cd7a239c583b22b056568 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3771362 Commit-Queue: Andrew McRae <amcrae@google.com> Reviewed-by: Andrew McRae <amcrae@google.com>
* zephyr: adc: drop label usage for ADC channelsFabio Baltieri2022-07-182-9/+0
| | | | | | | | | | | | | | | | | | Zephyr is moving in the direction of reemoving the label property, for the ADC usage it's redundant as we can use the node name directly. Change the shim ADC driver to use the node name and drop the label property from the binding, nodes and documentation. BRANCH=none BUG=b:239165779 TEST=zmake testall TEST=flash brya, ran the "adc" console command Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: I245abe11647c0f15ff5bee3ae42cc20e1fa9faa0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3763907 Reviewed-by: Al Semjonovs <asemjonovs@google.com>
* zephyr: boards: support chip variants of it81202bx and it81302bxTim Lin2022-07-154-6/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | We divide baseboard into it81202bx and it81302bx, which is convenient for maintenance. BUG=none BRANCH=none TEST=zmake build it8xxx2_evb --clobber zmake build krabby --clobber zmake build tentacruel --clobber zmake build nereid --clobber zmake build joxer --clobber zmake build minimal-it8xxx2 --clobber TEST=zmake testall TEST=Make sure gpiok(0xf01690-0xf01697) and gpiol(0xf01698-0xf0169f) group are set as input and pull-down in krabby project and do not be set in nereid project. Change-Id: I5a12e9f97aef2ef14193491cfad46a6614969c8a Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3650301 Commit-Queue: Dino Li <Dino.Li@ite.com.tw> Tested-by: Dino Li <Dino.Li@ite.com.tw> Reviewed-by: Andrew McRae <amcrae@google.com> Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: board: Move common configs to Kconfig.defconfigTim Lin2022-07-142-22/+48
| | | | | | | | | | | | | | | | | | Move common configs to Kconfig.defconfig. BUG=none BRANCH=none TEST=zmake build it8xxx2_evb --clobber zmake build krabby --clobber zmake build nereid --clobber Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com> Change-Id: I4890296d7a80ab9b06f1b65e227bd14dd0082b7b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3745106 Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: cros_system: npcx: implement hibernate with power control deviceMulin Chao2022-07-124-0/+20
| | | | | | | | | | | | | | | This CL uses a power control device with pinctrl mechanism instead of npcx soc-specific utilities for hibernating functionality via PSL circuit. BUG=b:232543902 BRANCH=none TEST=zmake testall --clobber Signed-off-by: Mulin Chao <mlchao@nuvoton.com> Change-Id: I4f4991bd9e62fa9c7f8d7c6e894613f6904b618c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3697271 Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com> Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: board: Move the configs to the projectTim Lin2022-07-111-10/+0
| | | | | | | | | | | | | | | | | | | | | | | These configs should be declared by the project. Note: CONFIG_I2C and CONFIG_PLATFORM_EC_POWER_BUTTON have been declared in corsola\prj.conf and nissa\prj.conf CONFIG_PWM and CONFIG_PWM_SHELL have been declared in nissa\prj.conf BUG=none BRANCH=none TEST=zmake build it8xxx2_evb --clobber zmake build krabby --clobber zmake build nereid --clobber Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com> Change-Id: I10025248a7e842138b6f72787344037cb2a4d06b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3745105 Reviewed-by: Peter Marheine <pmarheine@chromium.org> Reviewed-by: Eric Yilun Lin <yllin@google.com>
* zephyr: cleanup: it8xxx2: Remove the redefined configurationsTim Lin2022-07-111-12/+4
| | | | | | | | | | | | | | | | | | | | | These configurations have been defined in: third_party/zephyr/ main/soc/riscv/riscv-ite/it8xxx2/Kconfig.defconfig.series https://github.com/zephyrproject-rtos/zephyr/blob/main/soc/riscv/riscv-ite/it8xxx2/Kconfig.defconfig.series Note: Clock driver has not been implemented yet, disable CONFIG_CLOCK_CONTROL. BUG=none BRANCH=none TEST=zmake build it8xxx2_evb --clobber zmake build krabby --clobber zmake build nereid --clobber Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com> Change-Id: I3c4b7dc559ef62fc9c32d83d1e949f7417d92bbf Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3745104 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* zephyr: npcx9: Create platform specific keyboard DTS filesSam Hurst2022-06-141-29/+0
| | | | | | | | | | | | | | | | | | | For npcx9 chips, move common keyboard DTS configuration into platform specific keyboard DTS files. BUG=b:229717952 BRANCH=none TEST=zmake testall On herobrine: Plug Non-PD 5V@2A charger into Port0 and Port1 and execute: chgsup port=0, type=3, cur=1500mA, vtg=5000mV, lsm=1 port=1, type=3, cur=1500mA, vtg=5000mV, lsm=1 Signed-off-by: Sam Hurst <shurst@google.com> Change-Id: I8ed884f32ea912d603a578a6443c13185b6e82e3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3628669 Reviewed-by: Eric Yilun Lin <yllin@google.com>
* zephyr: mchp: Support 512KB SPI image generationmartin yan2022-06-091-2/+1
| | | | | | | | | | | | | Adjust configurations to fit SPI image generation BUG=none BRANCH=main TEST=zmake testall Signed-off-by: martin yan <martin.yan@microchip.corp-partner.google.com> Change-Id: I06da9b78fd3b3f42855ef197a37a18bc11ec3711 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3686761 Reviewed-by: Al Semjonovs <asemjonovs@google.com>
* zephyr: npcx: update SHI driver for pinctrlKeith Short2022-06-022-0/+22
| | | | | | | | | | | | | | | | | | | Update the Nuvoton cros_shi_npcx driver to use pinctrl instead of pinmux. This introduces a SHI specific pinctrl state to switch the SHI pins back to GPIO. BUG=b:232543902 BRANCH=none TEST=zmake testall TEST=verify herobrine boots to AP. Verify sysjump to RW works on herobrine. Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: Ic66062d706738792ffffc5797637ae8a5d31593c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3646964 Tested-by: Eric Yilun Lin <yllin@google.com> Reviewed-by: Sam Hurst <shurst@google.com>
* zephyr: npcx: update kb raw driver for pinctrlKeith Short2022-05-313-63/+66
| | | | | | | | | | | | | | | Update the Nuvoton cros_kb_raw driver to use pinctrl instead of pinmux. BUG=b:232543902 BRANCH=none TEST=zmake testall TEST=verify keyboard on herobrine Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I1479d89c597d4d04b71507d63ecd4c42253f8bbf Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3646962 Reviewed-by: Wai-Hong Tam <waihong@google.com> Reviewed-by: Mulin Chao <mlchao@nuvoton.com>
* zephyr: npcx_evb: Add pinctrl driver supportMulin Chao2022-05-235-2/+35
| | | | | | | | | | | | | | | | | | | In order to support 'Road from pinmux to pinctrl' on zephyr community. Nuvoton has summbited the PR for npcx ec pin-muxing and pad's property configuration via pinctrl driver. Hence, this CL collects the necessary changes for npcx7/9 evb. BUG=b:232543902 BRANCH=none TEST=zmake build npcx7 --clobber, zmake build npcx9 --clobber Passed basic verification for peripheral devices on npcx evb. Signed-off-by: Mulin Chao <mlchao@nuvoton.com> Change-Id: I2a3da73e060a4d492e7aec8eecd374ea521f02ae Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3647371 Tested-by: Keith Short <keithshort@chromium.org> Reviewed-by: Sam Hurst <shurst@google.com> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr: npcx: update common board code for pinctrlKeith Short2022-05-235-2/+15
| | | | | | | | | | | | | | | Update the common board code for npcx7, npcx9m3f, and npcx9m7f to use the pinctrl driver instead of the pinmux driver. BUG=b:232543902 BRANCH=none TEST=zmake testall Cq-Depend: chromium:3655283, chromium:3658768 Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I83cfc24ac5e7c8901d3ca4ed9fda86b92313d6ab Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3655282 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* zephyr: it8xxx2_evb: Move the it8xxx2_evb board to project folderTim Lin2022-05-194-434/+0
| | | | | | | | | | | | | | | | The board of it8xxx2_evb should be in project instead of baseboard. And distinguish the dts to each driver. BUG=none BRANCH=none TEST=zmake build it8xxx2_evb --clobber TEST=Make sure the dts and alternate function of each driver setting normal on it8xxx2_evb. Change-Id: Iddf6eb95a9fe4ddbc27a49adb27edaadac6da5dd Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3527893 Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: fix DTS include path for ITE boards.Keith Short2022-05-172-2/+2
| | | | | | | | | | | | | | | Upstream moved the location of the DTS file it8xxx2.dtsi. Update all references to the correct location. BUG=none BRANCH=none TEST=zmake testall Cq-Depend: chromium:3637691 Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: Ieb8ad37f7ef53033647f6de0d6e9f9d91acfa616 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3652375 Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com>
* zephyr: board/arm/npcx9: support multiple chip variantsJun Lin2022-05-176-5/+69
| | | | | | | | | | | | | | | | | | | This commits allows a Zephyr project to select the board with different NPCX9 variants. BRANCH=none BUG=b:217436680 TEST=pass "zmake testall --clobber" TEST=repleace "npcx9m3f" with "npcx9m7f" in zephyr/projects/nissa/BUILD.py;"zmake build nivviks --clobber"; check chip variant change to npcx9m7f in build/zephyr/nivviks. Signed-off-by: Jun Lin <CHLin56@nuvoton.com> Change-Id: I2c6f71a96b508277adde9e3547d41b761cc8e211 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3640833 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Tested-by: CH Lin <chlin56@nuvoton.com> Commit-Queue: CH Lin <chlin56@nuvoton.com>
* zephyr: krabby: Add pinctrl-0 property settingTim Lin2022-05-161-0/+3
| | | | | | | | | | | | | | | | | | | | | The pinctrl driver has been added, so we need to add pinctrl-0 alternate function settings to each driver node. For the I2C related GPIO setting, we can add the property to the &pinctrl node. So remove the I2C related gpios=<...>. BUG=none BRANCH=none TEST=zmake build krabby --clobber Make sure these pins have been set as alternate function. Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com> Change-Id: I52403b22fadf27e93436ef63d7db7ed5bade9a7d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3612831 Commit-Queue: Keith Short <keithshort@chromium.org> Reviewed-by: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Yuval Peress <peress@google.com> Tested-by: Keith Short <keithshort@chromium.org>
* zephyr: it8xxx2_evb: Add pinctrl-0 property settingTim Lin2022-05-161-25/+23
| | | | | | | | | | | | | | | | | | | | | | The pinctrl driver has been added, so we need to add pinctrl-0 alternate function settings to each driver node. For the I2C related GPIO setting, we can add the property to the &pinctrl node. So remove the I2C related gpios=<...>. BUG=none BRANCH=none TEST=zmake build it8xxx2_evb --clobber Make sure these pins have been set as alternate function. Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com> Change-Id: I8236c33aa38681019a3518619f2bfedf54b6f981 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3577329 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org> Tested-by: Keith Short <keithshort@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Yuval Peress <peress@google.com>
* zephyr: it8xxx2: Remove shim of pinmuxTim Lin2022-05-162-8/+0
| | | | | | | | | | | | | | | | | The pinctrl driver has been added, pinmux.c can be removed. BUG=b:223258787 BRANCH=none TEST=none Cq-Depend: chromium:3577329 Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com> Change-Id: I11102db9eff9f5c718869b02684e5768ecfe6b64 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3640983 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org> Tested-by: Keith Short <keithshort@chromium.org> Reviewed-by: Yuval Peress <peress@google.com>
* zephyr: it8xxx2: Do not default GPIO groups K/L to inputsAndrew McRae2022-05-091-0/+5
| | | | | | | | | | | | | | | | | By default groups k/l are set to input/pull down on startup since for some variants they are not exposed on pins. For the IT81302 they are, so do not set these as inputs at startup by default, otherwise it breaks warm reboot for any of these pins that are configured as outputs. BUG=b:231727461 TEST=zmake build nereid; flash & run BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I036b2ef5ec6bb38431b00644b90db44393a9384f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3631842 Reviewed-by: Peter Marheine <pmarheine@chromium.org>
* zephyr: shim: update all pwms nodes to include frequency/periodFabio Baltieri2022-04-281-2/+2
| | | | | | | | | | | | | | | Update all pwms entries to include a frequency/period specification, so that it can be used by higher level drivers. BRANCH=none BUG=b:230093078 TEST=zmake testall Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: I6965f19a688a4cc85fbb0d2dac78c4bed34c8cef Cq-Depend: chromium:3613422 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3602882 Reviewed-by: Wai-Hong Tam <waihong@google.com>
* zephyr: mchp: Add mec1727 board specific configurationmartin yan2022-04-275-0/+347
| | | | | | | | | | | | | Add mec1727 board specific configuration BUG=none BRANCH=main TEST=zmake testall Signed-off-by: martin yan <martin.yan@microchip.corp-partner.google.com> Change-Id: Ia39f959329d7be86b926fa8017a1f6527523ed69 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3606923 Reviewed-by: Yuval Peress <peress@google.com>
* zephyr: shim: set a placeholder period cell for pwms propertyFabio Baltieri2022-04-251-2/+2
| | | | | | | | | | | | | | | | | | | | Update all pwms entries to set a period property. This is part of an ongoing standardization effort in the PWM subsystem in Zephyr, for the moment just set a "0" placeholder (it's not used by any high level driver), will followup setting it to the target value once we'll have the frequency dt macro available, and then use them in the higher level driver and deprecate the old frequency label properties on a later stage. BRANCH=none BUG=b:230093078 TEST=zmake testall Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Cq-Depend: chromium:3605349, chromium:3605359 Change-Id: I38cc7ab4cbbb8a7e256a913e3c592aa7ffd55000 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3602884 Reviewed-by: Yuval Peress <peress@google.com>
* zephyr: fan: rename named-fans to cros-ec,fansFabio Baltieri2022-04-221-3/+2
| | | | | | | | | | | | | | | | The label in named-fans is not really used, so it's not really named since we don't care about the name. Drop the label property and rename the node to cros-ec,fans. BRANCH=none BUG=b:217741090 TEST=zmake testall Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: Ifcf1b54be505a90c9609ecf44d7700a6b817fa2b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3578651 Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: npcx: clock: remove the guard for npcx_clock_get_sleep_ticksJun Lin2022-04-114-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | The function npcx_clock_get_sleep_ticks is currently guarded by CONFIG_PM && CONFIG_NPCX_PM_TRACE. The other codes guarded by CONFIG_NPCX_PM_TRACE is used to trace and will print a lot of messages. The user who wants to use npcx_clock_get_sleep_ticks has to enable this flag and get a lot of console spam. This commit removes the guard CONFIG_NPCX_PM_TRACE and makes this function is available when CONFIG_PM is defined. This CL also removed the unnecessary default CONFIG* to reflect the change. This CL has dependency on PR: https://github.com/zephyrproject-rtos/zephyr/pull/44195 BRANCH=none BUG=b:226593750 TEST=set CONFIG_NPCX_PM_TRACE=n, the deep sleep time can be printed by "idlestats" console command. TEST=pass "zmake testall --clobber" Signed-off-by: Jun Lin <CHLin56@nuvoton.com> Change-Id: I87138f075a80e7389d58ec5dd38a8ead320593b5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3552006 Tested-by: CH Lin <chlin56@nuvoton.com> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr: ITE keyboard driver uses wake up interface for WUC pinsRuibin Chang2022-04-111-7/+0
| | | | | | | | | | | | | | | | | | | | | The cros_kb_raw_ite driver uses wake up interface for WUC pins. BUG=b:188045130 BRANCH=none TEST=on board krabby, console cmd "ksstate on", 1.press multi-key at a time: [289.487304 KB state: -- -- -- 14 -- -- -- -- -- -- -- -- --] [289.579284 KB state: -- -- -- 12 -- -- -- -- -- -- -- -- --] [289.788635 KB state: -- -- -- 02 -- -- 02 -- -- -- -- -- --] 2.press a key at a time: check all keyboard key bit field triggered Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw> Change-Id: I4d0a7d88b73938aaf266f51b6982b86b61c11708 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3359166 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr: convert PLATFORM_EC_I2C to a helper symbolKeith Short2022-04-081-1/+1
| | | | | | | | | | | | | | Convert CONFIG_PLATFORM_EC_I2C to a helper symbol that is automatically enabled if the Zephyr CONFIG_I2C option is enabled. BUG=b:217926701 BRANCH=none TEST=zmake testall Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I5aab26b0dea609a706b07ed752503f7432848136 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3575084 Reviewed-by: Aaron Massey <aaronmassey@google.com>
* zephyr: it8xxx2_evb: convert the named-pwm node to pwm-ledsFabio Baltieri2022-04-071-14/+9
| | | | | | | | | | | | | | Convert the PWM test node in it8xxx2_evb.dts to use the generic Zephyr pwm-leds binding. BRANCH=none BUG=b:217741090 TEST=zmake build it8xxx2_evb Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: I2b79ec25e53dfa84c464a1e2ef7261dd4109c78d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3569766 Reviewed-by: Tristan Honscheid <honscheid@google.com>
* brya: reorganize project filesAl Semjonovs2022-04-075-400/+0
| | | | | | | | | | | | | | Move brya from boards/arm/brya to project/brya. BUG=b:226574243 BRANCH=NONE TEST=zmake build brya Signed-off-by: Al Semjonovs <asemjonovs@google.com> Change-Id: I3506f081d995d09739a7bd54d5308dedbb8c5b09 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3572182 Reviewed-by: Sam Hurst <shurst@google.com> Reviewed-by: Keith Short <keithshort@chromium.org>
* Zephyr: Add general temp sensor compatibleDiana Z2022-04-051-4/+8
| | | | | | | | | | | | | | | Add a general temperature sensor compatible string, so we can easily reference all types of temperature sensors with it. BRANCH=None BUG=b:223837802 TEST=zmake testall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Iba5c0955945d182c33b24064b333c6579dee8394 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3572886 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr: Consolidate stack size configurationAndrew McRae2022-03-291-42/+0
| | | | | | | | | | | | | | Consolidate the task stack size configuration in one config file for clarity. BUG=none TEST=zmake build {nivviks,nereid} BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: Id4b818e40e2d1a5c324da9f9b49bc4d912bbba80 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3522467 Reviewed-by: Keith Short <keithshort@chromium.org>
* npcx: Set SOC log level to ERRAndrew McRae2022-03-242-0/+2
| | | | | | | | | | | | | | Set SOC logging level to ERR so that PM trace LOG_INF messages do not spam the console. BUG=b:216921645 TEST=zmake build nivviks; flash and run BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I401e86a54e437600d502ae4c2c65e261aa5fd6a2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3547916 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* zephyr: update Kconfig for PM to match upstreamYuval Peress2022-03-237-7/+7
| | | | | | | | | | | | | | Upstream changes PM_POLICY_APP to PM_POLICY_CUSTOM. BRANCH=none BUG=none TEST=zmake testall Cq-Depend: chromium:3532365 Signed-off-by: Yuval Peress <peress@google.com> Change-Id: I9f4b3429c7816ddb1d33cca6e22e7268da70ec03 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3543941 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* zephyr: brya: Disable console channelsKeith Short2022-03-231-0/+5
| | | | | | | | | | | | | | | | Disable the console channels "events" and "lpc" to match the legacy EC configuration. Also disable the "hostcmd" channel to further reduce console spam. BUG=none BRANCH=all TEST=boot Zephyr on brya, verify channels disabled using "chan" Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I03a15c2a2db3b0e5b2e6ed0aacd8bb68e3887aec Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3544425 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
* zephyr: drop various empty named-pwms nodesstabilize-14616.B-mainFabio Baltieri2022-03-223-12/+0
| | | | | | | | | | | | | | | Drop few empty named-pwms nodes from top level dts files. Having those laying around generates compiler warning if the board is built with CONFIG_LTO=n. BRANCH=none BUG=b:217741090 TEST=cq dry run Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: Ib18620668716e5ad9a25526585a063e356b02f20 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3542405 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* zephyr: remove Volteer boardDawid Niedzwiecki2022-03-215-395/+0
| | | | | | | | | | | | | | | | Volteer was the first reference board with EC based on Zephyr. At this stage of migrating to Zephyr, the support for Volteer can be dropped, so remove volteer project. BUG=b:218888909 TEST=zmake testall BRANCH=main Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com> Change-Id: Ie78cc69e478267f45446b9d11fc2f433136ebfe0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3521781 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Dawid Niedzwiecki <dawidn@google.com>
* 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: Remove use of GPIO_OUT_HIGH/LOW from dts filesKeith Short2022-03-161-4/+4
| | | | | | | | | | | | | | | | The correct Zephyr GPIO flags are GPIO_OUTPUT_HIGH and GPIO_OUTPUT_LOW. Use these flags in place of GPIO_OUT_HIGH and GPIO_OUT_LOW in all devicetree files. BUG=b:224821728 BRANCH=none TEST=zmake testall TEST=verify Herobrine boots the AP Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I3b21920a7da21973467dfcf04de5bed7a2bdb2c1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3526269 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* zephyr: pwm: de-shim the fan driver PWM APIsFabio Baltieri2022-03-141-5/+2
| | | | | | | | | | | | | | | | | 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>
* zephyr: volteer: delete use of remote-portKeith Short2022-03-111-1/+0
| | | | | | | | | | | | | | | The "remote-port" property is only needed on ARM platforms to directly check the battery and fuel-gauge. The AP firmware and kernel uses the EC_CMD_LOCATE_CHIP to determine the I2C bus for EEPROM and TCPC chips. BUG=none BRANCH=none TEST=zmake testall Change-Id: Ie955317fe4ad22441c97443221c0041bd3580233 Signed-off-by: Keith Short <keithshort@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3518083 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* zephyr: rename CONFIG_SOC_POWER_MANAGEMENT_TRACE to CONFIG_NPCX_PM_TRACEKeith Short2022-03-074-4/+4
| | | | | | | | | | | | | | | | Following an upstream change, rename CONFIG_SOC_POWER_MANAGEMENT_TRACE to CONFIG_NPCX_PM_TRACE. BUG=none BRANCH=none TEST=zmake testall Cq-Depend: chromium:3504556 Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I06d665461eac6ee429e4b4e86e0d3e5dfa3e4c11 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3508152 Reviewed-by: Al Semjonovs <asemjonovs@google.com> Commit-Queue: Al Semjonovs <asemjonovs@google.com>
* zephyr: delete SOC_POWER_MANAGEMENT optionKeith Short2022-03-076-6/+5
| | | | | | | | | | | | | | | | Zephyr upstream deleted the NPCX specific option SOC_POWER_MANAGEMENT. Boards should use CONFIG_PM instead. BUG=none BRANCH=none TEST=zmake testall Cq-Depend: chromium:3504555 Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I6a0f976c605e03beda2446f4cb1ead9896962805 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3508151 Reviewed-by: Al Semjonovs <asemjonovs@google.com> Commit-Queue: Al Semjonovs <asemjonovs@google.com>
* it8xxx2: expand keyscan stackPeter Marheine2022-03-031-1/+1
| | | | | | | | | | | | | | On nereid we've found utilization is high (880/928 bytes at boot) and this stack sometimes overflows. Increase it to prevent that. BUG=b:216262678 TEST=`kernel stacks` now reports 80% usage at boot (880/1088) BRANCH=none Signed-off-by: Peter Marheine <pmarheine@chromium.org> Change-Id: I9dd8b3a0c73ed3b488a798cddcc3bba3c079395b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3499927 Reviewed-by: Yuval Peress <peress@google.com>