summaryrefslogtreecommitdiff
path: root/zephyr/projects/asurada
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-165-331/+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>
* zephyr: asurada: watchdog: reenable the watchdogDenis Brockus2021-07-151-3/+2
| | | | | | | | | | | | | | | | | | The bugs causing the system to boot loop have been fixed and turning the watchdog back on. BUG=b:192071175 BRANCH=none TEST=boot the system to kernel Signed-off-by: Denis Brockus <dbrockus@google.com> Change-Id: Ib0c2232ec791841410f87e16cdc1440dea7a6da1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3027744 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: adjust stack size to fix fatal errorDino Li2021-07-141-0/+15
| | | | | | | | | | | | | | | After rebase to ToT, fatal error occurred frequently during booting. Adjust stack size of tasks (usage < 80%) to fix the error. BRANCH=none BUG=none TEST=On asurada, no fatal error occurred during booting. Signed-off-by: Dino Li <Dino.Li@ite.com.tw> Change-Id: I97198785f402836de9ed41ff1a6788c644a4f77b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3023684 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: asurada: enable remote-port property of i2cDino Li2021-07-081-0/+1
| | | | | | | | | | | | | | This CL fixed invalid param error of I2C_PASSTHRU host command (0x9e) BUG=none BRANCH=none TEST=No 0x9e command error on ec console. Signed-off-by: Dino Li <Dino.Li@ite.com.tw> Change-Id: I23db8513a4be813ff38e2ce82b5306514c0d5818 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3007378 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: enable PWM functionRuibin Chang2021-07-054-0/+78
| | | | | | | | | | | | | | | | | 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: increase stack size for PD_C0 and PD_C1Dino Li2021-07-021-0/+3
| | | | | | | | | | | | | | | | | kernel threads command shows stack size of unused PD_C1 is 56, so increase it. BRANCH=none BUG=b:189855648 TEST=unused stack size > 256 Signed-off-by: Dino Li <Dino.Li@ite.com.tw> Change-Id: I6acaa19c2b578d9c93f29c7948ec6e4133c9d5ca Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3001487 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org> Tested-by: Denis Brockus <dbrockus@chromium.org>
* zephyr: asurada: enable flash console command configurationTim Lin2021-07-022-0/+2
| | | | | | | | | | | | | | | | | | | | Enable flash console command configuration and access by commands. BUG=b:187192628 BRANCH=none TEST=console cmd: "flashread 0 0x100" "flashwrite 0x80000 0x100" "flasherase 0x80000 0x1000" Cq-Depend: chromium:2981388 Cq-Depend: chromium:2991398 Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com> Change-Id: I7fefb6fb51d26f7cb6f482bd7ebcc42fa764e01c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2991399 Tested-by: Keith Short <keithshort@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: 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: enable CONFIG_SOC_FLASH_ITE_IT8XXX2Dino Li2021-06-291-0/+1
| | | | | | | | | | | | | | | | Enable this option to make ramcode section works. BUG=b:187192628 BRANCH=none TEST=zmake configure -b $PROJ_HAYATO TEST=verify no error for __ram_code section on link Signed-off-by: Dino Li <Dino.Li@ite.com.tw> Change-Id: I7192e84913b4e192fcae4d70fce2af5352a08d10 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2988740 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org> Tested-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>
* zephyr: asurada: watchdog: watchdog is causing power seq boot loopDenis Brockus2021-06-251-2/+3
| | | | | | | | | | | | | | | | | | | When powering the AP, the watchdog is causing a power sequence boot loop. Temporarily disabling this until the watchdog issue has been corrected. BUG=b:192071175 BRANCH=none TEST=boot asurada AP Signed-off-by: Denis Brockus <dbrockus@google.com> Change-Id: I24fabe83ec3ff6bf52418751b12c2eba69f81f88 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2989253 Tested-by: Denis Brockus <dbrockus@chromium.org> Auto-Submit: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Yuval Peress <peress@chromium.org> Reviewed-by: Yuval Peress <peress@chromium.org>
* zephyr: asurada: EN_PP5000_A is getting cleared on bootDenis Brockus2021-06-251-0/+1
| | | | | | | | | | | | | | | | | | | | | CONFIG_PLATFORM_EC_POWERSEQ_PP5000_CONTROL is being set to 'y' as default and that is causing CONFIG_POWER_PP5000_CONTROL to get enabled which in turn disables EN_PP5000_A. This should not be enabled on Asurada. BUG=b:191909038 BRANCH=none TEST=verify I2C_2:0x40 and I2C_4:0x40 is not resetting bus Signed-off-by: Denis Brockus <dbrockus@google.com> Change-Id: I6b813124954d00822c0980a6ae23b7e42afc9db6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2989252 Tested-by: Denis Brockus <dbrockus@chromium.org> Auto-Submit: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Yuval Peress <peress@chromium.org> Reviewed-by: Yuval Peress <peress@chromium.org>
* zephyr: asurada: Enable shell tab completionKeith Short2021-06-241-0/+3
| | | | | | | | | | | | | | Enable shell tab completion and history. BUG=none BRANCH=none TEST=Boot zephyr on hayato, verify tab completion and history. Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: Ibbecb7eebbfab62ef15a0140544c8b9d774fedea Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2984176 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
* zephyr: asurada: set USB-C1 MUX to correct i2c busDenis Brockus2021-06-231-1/+1
| | | | | | | | | | | | | | | BUG=b:189855648 BRANCH=none TEST=verify USB-C1 MUX is not failing to set correctly in console Signed-off-by: Denis Brockus <dbrockus@google.com> Change-Id: Ib77036ec0c2fa711b8a54c13f4471fbde3fb4d9a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2983984 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: enable watchdog configRuibin Chang2021-06-091-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable watchdog config on board it8xxx2_evb and hayato. BUG=b:187190711 BRANCH=none TEST=on it8xxx2_evb, 1.console cmd "waitms 1500": print message and not reset 21-05-20 13:38:06.302 --- UART initialized after reboot --- 21-05-20 13:38:06.315 [Image: RO, it8xxx2_evb_zephyr_v2.0.8855-5b 2021-05-20 13] 21-05-20 13:38:06.333 [Reset cause: unknown] 21-05-20 13:38:06.340 ec wdt init 21-05-20 13:38:07.453 Watchdog deadline is close! 21-05-20 13:38:07.851 [1.569641 event set 0x0000000000002000] 21-05-20 13:38:07.869 [1.581176 hostcmd init 0x0000000000002000] 21-05-20 13:38:07.954 uart:~$ 2.console cmd "waitms 1601": print message and reset 21-05-20 13:41:33.908 --- UART initialized after reboot --- 21-05-20 13:41:33.919 [Image: RO, it8xxx2_evb_zephyr_v2.0.8855+5b 2021-05-20 13] 21-05-20 13:41:33.935 [Reset cause: unknown] 21-05-20 13:41:33.942 ec wdt init 21-05-20 13:41:35.055 Watchdog deadline is close! 21-05-20 13:41:35.560 *** Booting Zephyr OS build zephyr -v2.5.0-87-ga0c36e043cf* Cq-Depend: chromium:2936162 Change-Id: Ia465951d71043a469ed78d4089dfb6af30c5999e Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2905171 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr: asurada: Add more I2C informationSimon Glass2021-06-091-0/+20
| | | | | | | | | | | | | | | Add the I2C ports used by USB-C, 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: I59ce2ad3b9158cf01dac7d89ab56c46c668a07e4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2941813 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: Add the rest of the ADC channelsSimon Glass2021-06-091-2/+13
| | | | | | | | | | | | | | | | | A few of these are missing. Update them so we can use the full ADC capabilities, needed for Zephyr. BUG=b:189855648 BRANCH=none TEST=with other CLs, build asurada for Zephyr Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: I9d52404086b3aa8dda847a015a264d1fcfd805f9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2941811 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Keith Short <keithshort@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>