summaryrefslogtreecommitdiff
path: root/zephyr/projects/asurada/hayato
Commit message (Collapse)AuthorAgeFilesLines
* ish: Trim down the release branchstabilize-wristpin-14469.59.B-ishstabilize-voshyr-14637.B-ishstabilize-quickfix-14695.187.B-ishstabilize-quickfix-14695.124.B-ishstabilize-quickfix-14526.91.B-ishstabilize-14695.85.B-ishstabilize-14695.107.B-ishstabilize-14682.B-ishstabilize-14633.B-ishstabilize-14616.B-ishstabilize-14589.B-ishstabilize-14588.98.B-ishstabilize-14588.14.B-ishstabilize-14588.123.B-ishstabilize-14536.B-ishstabilize-14532.B-ishstabilize-14528.B-ishstabilize-14526.89.B-ishstabilize-14526.84.B-ishstabilize-14526.73.B-ishstabilize-14526.67.B-ishstabilize-14526.57.B-ishstabilize-14498.B-ishstabilize-14496.B-ishstabilize-14477.B-ishstabilize-14469.9.B-ishstabilize-14469.8.B-ishstabilize-14469.58.B-ishstabilize-14469.41.B-ishstabilize-14442.B-ishstabilize-14438.B-ishstabilize-14411.B-ishstabilize-14396.B-ishstabilize-14395.B-ishstabilize-14388.62.B-ishstabilize-14388.61.B-ishstabilize-14388.52.B-ishstabilize-14385.B-ishstabilize-14345.B-ishstabilize-14336.B-ishstabilize-14333.B-ishrelease-R99-14469.B-ishrelease-R98-14388.B-ishrelease-R102-14695.B-ishrelease-R101-14588.B-ishrelease-R100-14526.B-ishfirmware-cherry-14454.B-ishfirmware-brya-14505.B-ishfirmware-brya-14505.71.B-ishfactory-kukui-14374.B-ishfactory-guybrush-14600.B-ishfactory-cherry-14455.B-ishfactory-brya-14517.B-ishJack Rosenthal2021-11-0511-855/+0
| | | | | | | | | | | | | | | | | | | | | | In the interest of making long-term branch maintenance incur as little technical debt on us as possible, we should not maintain any files on the branch we are not actually using. This has the added effect of making it extremely clear when merging CLs from the main branch when changes have the possibility to affect us. The follow-on CL adds a convenience script to actually pull updates from the main branch and generate a CL for the update. BUG=b:204206272 BRANCH=ish TEST=make BOARD=arcada_ish && make BOARD=drallion_ish Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I17e4694c38219b5a0823e0a3e55a28d1348f4b18 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3262038 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* zephyr: hayato: enable hibernate mode on hayatoTim Lin2021-09-101-3/+10
| | | | | | | | | | | | | | | | | | | | | | The GPIO interrupts that can be waked up in hibernate mode include GPIO_AC_PRESENT, GPIO_LID_OPEN and GPIO_POWER_BUTTON_L. BUG=b:198305804 BRANCH=none TEST=test1: console command: hibernate Wake-up GPIO interrupt: GPIO_AC_PRESENT, GPIO_LID_OPEN and GPIO_POWER_BUTTON_L test pass! test2: console command: hibernate [seconds] [microseconds] After the specified seconds, the EC will wake-up from sleep mode. Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com> Change-Id: Ibd19f14b3a5e2bf47f8edd9205761333d7b0318f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3146774 Commit-Queue: Keith Short <keithshort@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* asurada: move the hibernate routine into separate fileTim Lin2021-09-101-0/+1
| | | | | | | | | | | | | | | | | | Move the hibernate routine from baseboard.c to separate hibernate.c files. BUG=b:198305804 BRANCH=none TEST=make BOARD=asurada -j The interrupt of GPIO_AC_PRESENT can wake up CPU in hibernate mode. Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com> Change-Id: I0aea0b812f535c907ac8963fc1f09206dfef5956 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3146773 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr: define hayato's batteries in device tree and change enum nameMichał Barnaś2021-09-032-8/+3
| | | | | | | | | | | | | | | | | | | This commit adds asurada/hayato's batteries definitions to device tree and removes old battery.c usage in Zephyr. BRANCH=main BUG=b:183544739 TEST=Compile and flash CrOS EC firmware to hayato. It should work the same as without this commit. TEST=Compile and flash Zephyr, battery should be detected correctly and its model should be logged in EC console. Change-Id: I009a1b6d25e72e1c0145f5e8dda38243dfb9a8c8 Signed-off-by: Michał Barnaś <mb@semihalf.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3107389 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org> Tested-by: Keith Short <keithshort@chromium.org>
* zephyr: zmake: implement multiple toolchain support/probingJack Rosenthal2021-09-011-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our GitLab builder uses different toolchains than the supported ones we use for development. At present, this means that the GitLab CI needs to call -t for each build with the desired toolchain, preventing us from using the more general commands "zmake coverage" or "zmake testall". Extend the idea of toolchain in our config files to be "supported toolchains" instead (i.e., multiple toolchains can be supported instead of one. We do this by refactoring our toolchain support code to consist of two related methods: - "probe" returns True if the toolchain is detected on the system, or False otherwise - "get_toolchain_config" returns the BuildConfig associated with the toolchain for the system, mirroring the functionality previously implemented in lambda functions. Also dropped support for arm-none-eabi, as I believe this was only used early on during scarlet development, and am not aware of any current users. BUG=b:178731498 BRANCH=none TEST=./run_tests.sh TEST=zmake testall Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I9b2ad508ae6703f0c3b56518fc32606c0ff1777c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3134668 Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* zephyr: rename kconfig PLATFORM_EC_VBOOTJack Rosenthal2021-08-111-1/+1
| | | | | | | | | | | | | | | | | | | Rename CONFIG_PLATFORM_EC_VBOOT to CONFIG_PLATFORM_EC_VBOOT_EFS2, since this is what is actually toggled by the config. EFS2 is only a small component of verified boot, and we have many boards which don't actually use it (e.g., trogdor family) for verified boot, making the existing name very confusing. BUG=none BRANCH=none TEST=zmake testall Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I68ea5815b4a001c680fc78196bb7a02815799b52 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3088164 Commit-Queue: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* zephyr: asurada: enable zephyr_print use printkDenis Brockus2021-08-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | Asurada is not currently able to output fast enough using shell_fprintf and they timeout unrelated functionality. For this case it will be allowed to use a define CONFIG_PLATFORM_EC_CONSOLE_USES_PRINTK to force zephyr_print to use printk BUG=b:193585176 BRANCH=none TEST=zmake configure -b $PROJ_HAYATO TEST=boot asurada Signed-off-by: Denis Brockus <dbrockus@google.com> Change-Id: Ia9c3d38754e298e3ef7fe8e72ff1e30a7dc775d3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3082329 Commit-Queue: Jack Rosenthal <jrosenth@chromium.org> Tested-by: Denis Brockus <dbrockus@chromium.org> Auto-Submit: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: asurada: enable CONFIG_PLATFORM_EC_HOST_COMMAND_STATUSTim Lin2021-08-051-0/+1
| | | | | | | | | | | | | Enable the config of CONFIG_PLATFORM_EC_HOST_COMMAND_STATUS BUG=b:195342437 BRANCH=none TEST=command from AP: ectool flasherase 0x80000 0x80000 Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com> Change-Id: I6db7efa406768a1fa4b75aa7d097a4c1d1b317c3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3070798 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* lid_angle: Create a common callback for lid angle changesWai-Hong Tam2021-08-052-33/+0
| | | | | | | | | | | | | | | | | | | | | | Each board defines its own callback lid_angle_peripheral_enable(). The implementation is very similar. Create a common implementation and reduce the duplicated code. This CL removes the board callbacks which are identifical to the common callback. If it is slightly different, keep it and add the __override tag. The check of TEST_BUILD is unnecessary as the board callback is not linked in the test build. BRANCH=None BUG=b:194922043 TEST=Build all the images. Change-Id: I73d381730f35b80eff69399cdfc5fb54f839aee0 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3069175 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* zephyr: asurada: cleanup board id/versionDenis Brockus2021-07-291-2/+0
| | | | | | | | | | | | | | | | | Make board_get_version an __override function. Removed unused CONFIG_PLATFORM_EC_BOARD_VERSION_ defines. BUG=b:195037412 BRANCH=none TEST=zmake configure -b $PROJ_HAYATO Signed-off-by: Denis Brockus <dbrockus@google.com> Change-Id: Ie8bb565fb5d649c5e0de771e0dfd6fecaee07a53 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3061264 Tested-by: Denis Brockus <dbrockus@chromium.org> Auto-Submit: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
* zephyr: asurada: reorganize prj.conf CONFIGsDenis Brockus2021-07-281-34/+35
| | | | | | | | | | | | | | BUG=none BRANCH=none TEST=zmake configure -b $PROJ_HAYATO Signed-off-by: Denis Brockus <dbrockus@google.com> Change-Id: I945901a78a62e353c6af3dd2178101fd2a23d68a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3056516 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org> Tested-by: Denis Brockus <dbrockus@chromium.org>
* zephyr: asurada: Enable VBoot_HashDenis Brockus2021-07-281-2/+5
| | | | | | | | | | | | | | | | | | | asurada does not support EFS2, so leave CONFIG_PLATFORM_EC_VBOOT=n Enable VBoot_Hash and sysinfo BUG=b:194794622 BRANCH=none TEST=boot Signed-off-by: Denis Brockus <dbrockus@google.com> Change-Id: Ie3254327cb072b1a78259293738cbdb1d0580f1c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3056515 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org> Tested-by: Denis Brockus <dbrockus@chromium.org>
* zephyr: asurada: leverage USB_PD configs from cros-ecDino Li2021-07-271-0/+4
| | | | | | | | | | | | | cros-ec didn't enable these four configs on asurada, so disable them. BRANCH=none BUG=none TEST=build Signed-off-by: Dino Li <Dino.Li@ite.com.tw> Change-Id: Icd7661d8cbbf1b86b09b05d3961c607e6b0a612b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3053137 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* zephyr: it8xxx2: shi: enable CS interruptDino Li2021-07-271-1/+3
| | | | | | | | | | | | | | | This interrupt will be needed in the future to enable low power mode on idle task in S0 state. BRANCH=none BUG=b:185176098 TEST=the interrupt can be triggered correctly on asurada. Signed-off-by: Dino Li <Dino.Li@ite.com.tw> Change-Id: I04b066de0129f01adf2c7ba4c9f60788b3d46cbc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3034781 Reviewed-by: Tim2 Lin <tim2.lin@ite.corp-partner.google.com> Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* zephyr: asurada: enable _EVENT_WAKEUP_MASKDino Li2021-07-271-0/+4
| | | | | | | | | | | | | Only allow the defined MKBP events to wake host up. BRANCH=none BUG=none TEST=Running suspend test x50. Signed-off-by: Dino Li <Dino.Li@ite.com.tw> Change-Id: I978a3db3ac0da6e761b8f953e2e89c97b9cbc23e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3053135 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* zephyr: asurada: enable voltage regulatorDino Li2021-07-232-0/+3
| | | | | | | | | | | | | | | Fixed error of host commands (0x12c~0x130) for controlling voltage regulator. BUG=b:189855648 BRANCH=none TEST=Verified that no error on regulator host commands. (verified on both cros-ec and zephyr fw image) Change-Id: Ib7c5782e80262a38be0517181afbd78160847040 Signed-off-by: Dino Li <Dino.Li@ite.com.tw> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3007380 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* zephyr: asurada: move to zephyr v2.6Denis Brockus2021-07-191-1/+1
| | | | | | | | | | | | | | | BUG=b:193465122 BRANCH=none TEST=build and boot to kernel without reboot issues Signed-off-by: Denis Brockus <dbrockus@google.com> Change-Id: I8b68d8bda4e98e8faaa6b11ccb60361527d7bab8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3039959 Tested-by: Denis Brockus <dbrockus@chromium.org> Auto-Submit: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* zephyr: move all the boards directories under zephyr/boardsJack Rosenthal2021-07-161-2/+0
| | | | | | | | | | | | | | | | | | | | Move all the boards directories together under zephyr/boards from their scattered locations under projects/. This is the first step towards de-coupling the concept of a Zephyr board from baseboard/board/model, as it currently is. Further work will be required to actually unify these directories and delete the baseboard-specific names from our tree. BUG=b:193814903 BRANCH=none TEST=zmake testall Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I33a344af6890b2c2c54f1e91f0f0fa85caaf19d3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3035222 Commit-Queue: Yuval Peress <peress@chromium.org> Reviewed-by: Yuval Peress <peress@chromium.org>
* zephyr: asurada: enable CONFIG_PLATFORM_EC_SWITCHDino Li2021-07-151-1/+1
| | | | | | | | | | | | | | | | Fixed the following error message from AP console: error, assuming lid is open error, assuming power button not pressed BRANCH=none BUG=b:180980668 TEST=No the error message above. Signed-off-by: Dino Li <Dino.Li@ite.com.tw> Change-Id: I33c85bf69f045ce1d52821b79ff916ad9c20c250 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3030001 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
* system: Clean up system_get_board_version()Philip Chen2021-07-091-1/+2
| | | | | | | | | | | | | | | | | | | Refactor system_get_board_version() a bit so that we can remove CONFIG_BOARD_VERSION_CUSTOM and CONFIG_BOARD_VERSION from config.h. BRANCH=None BUG=b:186264627 TEST=make buildall -j TEST=zmake testall Cq-Depend: chromium:3015243 Change-Id: Id5ab809493c297b7d330ea13dcd6934ec00042a6 Signed-off-by: Philip Chen <philipchen@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3004112 Commit-Queue: Philip Chen <philipchen@chromium.org> Tested-by: Philip Chen <philipchen@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* zephyr: asurada: enable interrupt of AP_EC_WARM_RST_REQ signalDino Li2021-07-081-1/+3
| | | | | | | | | | | | | | fixed reboot command on AP. BUG=none BRANCH=none TEST=run reboot command on AP. Signed-off-by: Dino Li <Dino.Li@ite.com.tw> Change-Id: I5c7413346498605e2ab4c756e51e6e222d2f7eb6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3007542 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: enable PWM functionRuibin Chang2021-07-053-0/+72
| | | | | | | | | | | | | | | | | Enable PWM function on board it8xxx2_evb and hayato. BUG=b:187189596 BRANCH=none TEST=on it8xxx2_evb, check by oscilloscope: 1.PWM channel0 (GPA0) output frequency is same with setting 100Hz. 2.Setting PWM_POLARITY_INVERTED flag let waveform invert. Cq-Depend: chromium:3001087 Change-Id: I7cbeb05550367b9bf346f3c85409d8259432144a Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2935650 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: asurada: make USB-C config changesDenis Brockus2021-06-301-4/+13
| | | | | | | | | | | | | | | | | Include more battery and charger configs. Move the USB-A out of the USB-C configs. BUG=b:189855648 BRANCH=none TEST=see that battery is detected Signed-off-by: Denis Brockus <dbrockus@google.com> Change-Id: I2eedfbf71a596238623e737d14f572b9a2ba8259 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2994751 Tested-by: Denis Brockus <dbrockus@chromium.org> Auto-Submit: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Yuval Peress <peress@chromium.org> Reviewed-by: Yuval Peress <peress@chromium.org>
* zephyr: asurada: add board_allow_i2c_passthruDenis Brockus2021-06-302-0/+20
| | | | | | | | | | | | | | BUG=b:189855648 BRANCH=none TEST=zmake configure -b $PROJ_HAYATO Signed-off-by: Denis Brockus <dbrockus@google.com> Change-Id: I9146fe2d7aee9d7320ea012c744efe4a275eb81b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2994750 Tested-by: Denis Brockus <dbrockus@chromium.org> Auto-Submit: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Yuval Peress <peress@chromium.org> Reviewed-by: Yuval Peress <peress@chromium.org>
* zephyr: implement ro/rw packing for hayatoJack Rosenthal2021-06-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | The "npcx" packer in zmake was hard-coded for Nuvoton devices. Restructure into a new packer, BinmanPacker, which makes no Nuvoton assumptions, and subclass it for the NpcxPacker. Note: there's some file size check here which was coded for Nuvoton only. I think it's not actually necessary since binman already checks to see if the region overflowed, and will error if it did. The best thing to do here is to keep the existing behavior and evaluate if that Nuvoton-only size check can just be removed from zmake. BUG=b:192401039 BRANCH=none TEST=zmake testall TEST=inspected fmap of hayato image, note I don't have a device to test on right now Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: Ic45a030d0dd02451834161305f048487f7b273e4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2995602 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* zephyr: asurada: remove PD_INT_Cx tasksDino Li2021-06-291-1/+2
| | | | | | | | | | | | | | | The tasks aren't required on integrated TCPC architecture. BUG=b:189855648 BRANCH=none TEST=run "kernel threads" command to check if the tasks are present. Signed-off-by: Dino Li <Dino.Li@ite.com.tw> Change-Id: Ia146ef718d6d4431c8e3fb66d518c133879c0476 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2988741 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org> Tested-by: Denis Brockus <dbrockus@chromium.org>
* zephyr: asurada: enable interrupts of power sequence pinsDino Li2021-06-291-1/+7
| | | | | | | | | | | | | BUG=b:192073810 BRANCH=none TEST=verified that power off sequence works Signed-off-by: Dino Li <Dino.Li@ite.com.tw> Change-Id: I5b09b7d5f3a73fb152cb43a5ea9c917a002feccb Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2988746 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org> Tested-by: Denis Brockus <dbrockus@chromium.org>
* zephyr: asurada: Enable using ppc_is_vbus_presentDenis Brockus2021-06-291-0/+1
| | | | | | | | | | | | | | | | | | | | Zephyr does not blindly define BOARD_HAYATO so make sure and add it to the CMakeLists.txt so the correct path will be taken when deciding if ppc_is_vbus_preset should be used instead of the ADC. BUG=b:189855648 BRANCH=none TEST=zmake configure -b $PROJ_HAYATO TEST=USB-C should see VBus Signed-off-by: Denis Brockus <dbrockus@google.com> Change-Id: I640b2d6c2c6fa13d1f5c2b54579cc44e0ccb962b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2993558 Tested-by: Denis Brockus <dbrockus@chromium.org> Auto-Submit: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr: asurada: Enable SYSTEM_UNLOCKED for USB-C bringupDenis Brockus2021-06-281-0/+2
| | | | | | | | | | | | | | | | | | | Enable CONFIG_PLATFORM_EC_SYSTEM_UNLOCKED to allow PD to be enabled when the system in not running in RW code. This is just for USB-C bringup. BUG=b:189855648 BRANCH=none TEST=zmake configure -b $PROJ_HAYATO Signed-off-by: Denis Brockus <dbrockus@google.com> Change-Id: I78e931d137f6f7f5bf2d7fb87c9e1899f5a24239 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2992388 Commit-Queue: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org> Tested-by: Denis Brockus <dbrockus@chromium.org> Auto-Submit: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* mt8192: move power_signal to includeDenis Brockus2021-06-221-10/+5
| | | | | | | | | | | | | | | | | | enum power_signal was duplicated in a few places and really belonged in an include file. This has been created as include/power/mt8192.h BUG=b:180980668 BRANCH=none TEST=make buildall Signed-off-by: Denis Brockus <dbrockus@google.com> Change-Id: Ibdcecc73feffcfa6d5b72fa8ef503f1802e14925 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2980811 Tested-by: Denis Brockus <dbrockus@chromium.org> Auto-Submit: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: hayato: Add XHCI init interruptSimon Glass2021-06-222-1/+9
| | | | | | | | | | | | | | | | This interrupt appears to be missing from the GPIO list. Add it. Note: It is marked as open-drain so I am not sure how to describe it in the gpio_map, but have made an attempt. BUG=b:189855648 BRANCH=none TEST=see that it builds OK with the new interrupt handler Change-Id: Id6c23cc67a17fd221eb977faab18e6bdfa14f324 Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2957550 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* zephyr: hayato: Enable USB-C supportSimon Glass2021-06-223-4/+72
| | | | | | | | | | | | | | Add the required Kconfig options for this feature and bring in the associated source code. Add the interrupts also. BUG=b:189855648 BRANCH=none TEST=with other CLs, build asurada for Zephyr Change-Id: Iac1cb23ccd66eac06339d12372dd0ae7eb85941d Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2935952 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* zephyr: hayato: Include board_id implementationSimon Glass2021-06-151-1/+2
| | | | | | | | | | | | | Add this to hayato so we can detect the board ID. BUG=b:190213172 BRANCH=none TEST=with other CLs, build asurada for Zephyr Change-Id: I2bf383f5f4cbe3d1c008bf2de8146cffe224ad5e Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2956086 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* zephyr: asurada: Correct ec_batt_pres_odlSimon Glass2021-06-111-1/+1
| | | | | | | | | | | | | | | This has the wrong enum. Fix it. BUG=b:189855648 BRANCH=none TEST=with other CLs, build asurada for Zephyr Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: Ie465d662c463e043e2123d91f21f6771552ae025 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2941816 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org> Tested-by: Denis Brockus <dbrockus@chromium.org>
* zephyr: asurada: Add battery informationSimon Glass2021-06-092-0/+15
| | | | | | | | | | | | | | | | Add battery information so we can support charging. BUG=b:189855648 BRANCH=none TEST=with other CLs, build asurada for Zephyr Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: I638c5789a2a494bdf811c13f66d5b892f4ebded2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2941812 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Yuval Peress <peress@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org> Tested-by: Denis Brockus <dbrockus@chromium.org>
* zephyr: asurada: Enable MotionSenseDenis Brockus2021-06-077-3/+223
| | | | | | | | | | | | | | | BUG=b:189857004 BRANCH=none TEST=zmake testall TEST=Flash on hayato and check sensors Signed-off-by: Denis Brockus <dbrockus@google.com> Change-Id: I9426b5a9cb2673da0ec8280aa15768815f47014c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2934359 Tested-by: Denis Brockus <dbrockus@chromium.org> Auto-Submit: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Yuval Peress <peress@chromium.org> Commit-Queue: Yuval Peress <peress@chromium.org>
* zephyr: asurada: Enable main displayDenis Brockus2021-06-041-1/+6
| | | | | | | | | | | | | | BUG=b:180980668 BRANCH=none TEST=boot and see if the display enables Signed-off-by: Denis Brockus <dbrockus@google.com> Change-Id: I080f0a0be417fe63a2b25b41bcdae3d2188bf5d6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2940566 Tested-by: Denis Brockus <dbrockus@chromium.org> Auto-Submit: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr: asurada: move options to be board level choicesDenis Brockus2021-05-271-37/+0
| | | | | | | | | | | | | | | | | | Until there is a variant that needs to have a CONFIG_ option as a different value, they should stay in the top level board configuration. BUG=b:180980668 BRANCH=none TEST=zmake configure -b $PROJ_ASURADA Signed-off-by: Denis Brockus <dbrockus@google.com> Change-Id: I78890978489be5a90656d283c6489a92060305c1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2920626 Tested-by: Denis Brockus <dbrockus@chromium.org> Auto-Submit: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Yuval Peress <peress@chromium.org> Commit-Queue: Yuval Peress <peress@chromium.org>
* zephyr: hayato: Enable config to support keyboard scanRuibin Chang2021-05-251-1/+4
| | | | | | | | | | | | | | | | | Enable config for keyboard scan function, and we use default keyboard scan timing config on board hayato. BUG=b:187192587 BRANCH=none TEST=on hayato, console cmd "ksstate" then press key: [115.097839 KB state: -- -- -- 02 -- -- 02 -- -- -- -- -- --] [116.462371 KB state: -- -- -- -- -- -- 02 -- -- -- -- -- --] [116.499633 KB state: -- -- -- -- -- -- -- -- -- -- -- -- --] Change-Id: Ie717d7333c2ff3f4279ec7c2f8c01fcb306fc5ad Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2883376 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* zephyr: asurada: remove BRINGUP modeDenis Brockus2021-05-201-1/+0
| | | | | | | | | | | | | | BUG=b:188577674 BRANCH=none TEST=boot to kernel Signed-off-by: Denis Brockus <dbrockus@google.com> Change-Id: Ic565f6f737245a61db56a1994d2b956bf622c191 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2906533 Tested-by: Denis Brockus <dbrockus@chromium.org> Auto-Submit: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr: asurada: enable 1.8v signalsDino Li2021-05-201-16/+21
| | | | | | | | | | | BRANCH=none BUG=none TEST=build asurada. Signed-off-by: Dino Li <Dino.Li@ite.com.tw> Change-Id: I1fb117060ecab8091ee1f54b7be2d0e93fcfcf16 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2905037 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* zephyr: asurada: Enable power button and sequencingDenis Brockus2021-05-193-2/+34
| | | | | | | | | | | | | BUG=b:180980668 BRANCH=none TEST=get powerbtn command in shell Signed-off-by: Denis Brockus <dbrockus@google.com> Change-Id: I1af4673b7eff84149e3aabad7ff09445a1f96e1b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2895306 Tested-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Yuval Peress <peress@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
* zephyr: asurada: shi: enable serial host interfaceDenis Brockus2021-05-171-0/+6
| | | | | | | | | | | | | | | BUG=b:187210461 BRANCH=none TEST=AP is not booting yet, so just make sure this builds Signed-off-by: Denis Brockus <dbrockus@google.com> Change-Id: I9054cdb830f961f86aa083e67c2b0b0b2d1f11f2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2895791 Tested-by: Denis Brockus <dbrockus@chromium.org> Auto-Submit: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Yuval Peress <peress@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Yuval Peress <peress@chromium.org>
* zephyr: asurada: enable lid switchDenis Brockus2021-05-172-3/+8
| | | | | | | | | | | | | | | | | | AP is not running, so not a lot of testing that can happen other than see if it builds. This is required to be enabled before AP can be enabled. BUG=b:180980668 BRANCH=none TEST=zmake configure -b zephyr/projects/asurada/hayato Signed-off-by: Denis Brockus <dbrockus@google.com> Change-Id: Ie106e3b3b086d5c68e83a19977209d12245349b3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2895304 Tested-by: Denis Brockus <dbrockus@chromium.org> Auto-Submit: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Yuval Peress <peress@chromium.org> Commit-Queue: Yuval Peress <peress@chromium.org>
* zephyr: asurada: Add ADC supportDenis Brockus2021-05-171-1/+5
| | | | | | | | | | | | | | | BUG=b:187210461 BRANCH=none TEST=ec shell "adc" Signed-off-by: Denis Brockus <dbrockus@google.com> Change-Id: Id1915e380389bea8b3eee8d7dc4780609533ab9d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2876868 Tested-by: Denis Brockus <dbrockus@chromium.org> Auto-Submit: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Yuval Peress <peress@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Yuval Peress <peress@chromium.org>
* zephyr: asurada: Enable I2CDenis Brockus2021-05-132-15/+18
| | | | | | | | | | | | | | | | | | | Hold off on merging this until https://chromium-review.googlesource.com/#/q/2859183 and https://chromium-review.googlesource.com/#/q/2857993 or their equivalent have been landed by ITE BUG=b:180980668,b:186673243 BRANCH=none TEST=i2c shell "i2c scan I2C_0" Signed-off-by: Denis Brockus <dbrockus@google.com> Change-Id: I6c8bbe9e6aef1ab24fc25797e379b0e5cf8a070f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2855217 Tested-by: Denis Brockus <dbrockus@chromium.org> Auto-Submit: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Yuval Peress <peress@chromium.org>
* config: rename CONFIG_FLASH to CONFIG_FLASH_CROSJeremy Bettis2021-04-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 4ac1d81e1430dbfbfba1376a23ab19dfa845d7ef. The config name collides with the same config name in zephyr. Also, renames zephyr Kconfig CONFIG_PLATFORM_EC_FLASH to CONFIG_PLATFORM_EC_FLASH_CROS as the corresponding change at Kconfig side. BUG=chromium:1202406,b:180980668 TEST=make -j16 runhosttests buildall && zmake testall && \ /mnt/host/source/src/platform/ec/zephyr/firmware_builder.py --metrics \ /tmp/tmplt8ty8ci test ; echo $? BRANCH=none Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I5b5e58b30d936b5232e049827f458d9a2ed06340 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2855320 Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: asurada: Enable GPIOsDenis Brockus2021-04-271-0/+319
| | | | | | | | | | | | | | | | Enable GPIO and include GPIO DTS BUG=b:180980668 BRANCH=none TEST=ec console "gpioget" Signed-off-by: Denis Brockus <dbrockus@google.com> Change-Id: Ied6fddfb69071fae246e1331c055b2fb61d34825 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2854335 Tested-by: Denis Brockus <dbrockus@chromium.org> Auto-Submit: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Yuval Peress <peress@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
* zephyr: initial bringup for asuradaDenis Brockus2021-04-236-0/+103
EC should boot with UART active BUG=b:180980668 BRANCH=none TEST=zmake configure -b $PROJ_HAYATO Signed-off-by: Denis Brockus <dbrockus@google.com> Change-Id: Idae8453c5803442c2f9853c45462a7eb74d5c268 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2844770 Tested-by: Denis Brockus <dbrockus@chromium.org> Tested-by: Jack Rosenthal <jrosenth@chromium.org> Auto-Submit: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>