summaryrefslogtreecommitdiff
path: root/baseboard/asurada/baseboard.c
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-051-101/+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>
* asurada: move the hibernate routine into separate fileTim Lin2021-09-101-23/+0
| | | | | | | | | | | | | | | | | | 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>
* adc: Remove adc_chip.h where adc.h is usedCaveh Jalali2021-08-271-1/+0
| | | | | | | | | | | | | | This removes the use of adc_chip.h where adc.h is also used. In this case, adc_chip.h is redundant. BRANCH=none BUG=b:181271666 TEST=buildall passes Change-Id: Id7baf9aef949447a4d47934242f9bae97c971262 Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3120317 Reviewed-by: Keith Short <keithshort@chromium.org>
* lid_angle: Create a common callback for lid angle changesWai-Hong Tam2021-08-051-21/+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>
* asurada: move regulator code into a separate fileDino Li2021-07-061-39/+0
| | | | | | | | | | | | | | With this CL, cros ec and zephyr are both able to build the code. BUG=none BRANCH=none TEST=boot asurada and there is no error on regulator host commands (0x12c~0x130) Signed-off-by: Dino Li <Dino.Li@ite.com.tw> Change-Id: I2cc34891d5d1118ed90d976d404bab1f7b5ce5e4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3004126 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* asurada: Move baseboard USB-C code into a separate fileSimon Glass2021-06-161-402/+0
| | | | | | | | | | | | | | | | | Move this code into a new file so that zephyr can build it as well as ECOS. Put the definition of board_get_sub_board() at the top so we don't need the forward declaration. BUG=b:189855648 BRANCH=none TEST=make BOARD=asurada -j30 Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: Id04730161efd4fb5ec4366352bc26cfd11d8bbee Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2941891 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* asurada: Add interrupt functions to a header fileSimon Glass2021-06-151-7/+3
| | | | | | | | | | | | | | | | | | | | | | | We need to split the implementation of USB-C into multiple files, since Zephyr cannot build board.c or baseboard.c This means that we cannot use static definitions for the interrupt functions, since it forces gpio_list.h to be included by only a single C file. Instead we must put them in a header file so they can be defined in any of the files that are built. Update these functions and add them to the baseboard_common header. BUG=b:190213172 BRANCH=none TEST=with other CLs, build asurada for Zephyr Change-Id: I99980db47820d903403a7b030d4bc33ff53373f4 Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2941817 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* zephyr: asurada: Enable main displayDenis Brockus2021-06-041-14/+0
| | | | | | | | | | | | | | 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>
* asurada: implement customized usb port power controlTing Shen2021-05-261-0/+10
| | | | | | | | | | | | | | | | | | | | | Some Sandisk stickers would enter fault status (down-train to USB2 or not detected) if Vbus is applied before xhci initialization. To fix this, copy usb_port_power_dumb.c to baseboard folder to implement board-specific enable mechanic. BUG=b:187149602 TEST=manually BRANCH=asurada Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: I80536b640b4f67a4c17a3da7b193c92ab2f7b3eb Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2909972 Tested-by: Ting Shen <phoenixshen@chromium.org> Auto-Submit: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Eric Yilun Lin <yllin@google.com> Commit-Queue: Eric Yilun Lin <yllin@google.com>
* asurada: relocate power_signal_list for common use with zephyrDenis Brockus2021-05-171-8/+0
| | | | | | | | | | | | | | BUG=none BRANCH=none TEST=make buildall Signed-off-by: Denis Brockus <dbrockus@google.com> Change-Id: Idb71acc9b8d6d903766e51bd3848a3200e1e50e6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2895305 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>
* hayato: Modify HS Detector threshold of PS8743 setting valueMichael5 Chen12021-05-101-14/+1
| | | | | | | | | | | | | | | Modify HS detector threshold setting (0x3C) to 0x60 for USB-C C1 port signal quality. BUG=b:177980418 BRANCH=asurada TEST=manual Run command "ectool i2cread 8 4 0x20 0x3c" to check register value. Signed-off-by: Michael5 Chen1 <michael5_chen1@pegatron.corp-partner.google.com> Change-Id: I97b6bb16e7c5298ff42e35d936e0f9e60ec3b730 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2845564 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* asurada: move board_get_vbus_adc to common codeEric Yilun Lin2021-04-271-0/+13
| | | | | | | | | | | | | | BUG=none TEST=make buildall -j BRANCH=asurada Change-Id: I03bc55c3d55927866355b457ec4b17f75d32f60f Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2852359 Tested-by: Eric Yilun Lin <yllin@google.com> Auto-Submit: Eric Yilun Lin <yllin@google.com> Reviewed-by: Ting Shen <phoenixshen@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org>
* spherion: config ADC thermal sensor and KB_BL_ENBen Chen2021-04-131-28/+0
| | | | | | | | | | | | | | config adc temp senosr enable, re-config KB_BL_EN to gpioG3 from GPIOI7 BUG=b:184885443 BRANCH=asurada TEST=make buildall PASS Change-Id: Ia0d12724ca33295f2817ee2a9a32dbff09aba87a Signed-off-by: Ben Chen <ben.chen2@quanta.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2816939 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* asurada : measure VBUS by ADC.Eric Yilun Lin2021-04-081-1/+16
| | | | | | | | | | | | | | | | | | | | Dual VBUS ADC are supported since board revision >= 4. This is to address the inaccurate VBUS present detection on SYV682x. SYV682X assumes can only recognize VBUS equals Vsafe5V or Vsafe0V. If the VBUS is not falling at the both range, it assume the VBUS > vSafe5V and thus VBUS is presented. But if the votlage is fallint between Vsafe5V and Vsafe0V, it still thinks VBUS presented, and this is a false positive. BUG=b:181203590 TEST=ensure VBUS ADC reports reasonable value BRANCH=asurada Change-Id: I1b57395216f1d6788bcd09306b503bdd3b49ddc8 Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2793853 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* spherion: enable GPIO_EN_SPL_Z at hibernate processBen Chen2021-03-251-1/+1
| | | | | | | | | | | | | Default implement GPIO_EN_SLP_Z at hibernate process BUG=b:183574877 BRANCH=asurada TEST=make buildall PASS Change-Id: I58c26fa8505c4f528507e5eae4d48d4751fceda5 Signed-off-by: Ben Chen <ben.chen2@quanta.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2784325 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* spherion: config PWM KB backlight controlBen Chen2021-03-191-33/+0
| | | | | | | | | | | | | | | | | | Move asurada baseboard PWM channels definition to board control. Config gpio keyboard backlight en pin, and enable/disable in power on/off sequence BUG=b:181799718 BRANCH=none TEST=make buildall TEST=run 'kblight' EC console command to verify keyboard backight TEST=run 'ectool verify pwmsetkblight' to verify keyboard backlight Change-Id: If7afbd4f21dd6b0500525d08ec7786071c3523c1 Signed-off-by: Ben Chen <ben.chen2@quanta.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2738494 Reviewed-by: Ting Shen <phoenixshen@chromium.org> Commit-Queue: Yilin Yang (kerker) <kerker@chromium.org>
* asurada: enable virtual mux for DPEric Yilun Lin2021-03-111-0/+14
| | | | | | | | | | | | | | EC needs to inform AP the DP mode status with virtual mux or ANX7625 might miss the status change. BUG=b:181942052 TEST=ensure EC_HOST_EVENT_USB_MUX is set when DP status change BRANCH=main Change-Id: I079debdd59d80912b1a4668582ed673bfc79cf8a Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2744809 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* cleanup: rename ite tcpm driverRuibin Chang2021-02-261-2/+2
| | | | | | | | | | | | | | | | Rename it83xx_tcpm_drv to it8xxx2_tcpm_drv for chip it8xxx2 series. BUG=none BRANCH=none TEST=1.make buildall -j 2.on hayato, connecting to adapter and dongle can go to ready state. Signed-off-by: Ruibin Chang <ruibin.chang@ite.com.tw> Change-Id: I2622e7fe0884d3ae20a63ec48219de00d5537bc6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2717430 Tested-by: Ruibin Chang <Ruibin.Chang@ite.com.tw> Reviewed-by: Eric Yilun Lin <yllin@chromium.org> Commit-Queue: Ruibin Chang <Ruibin.Chang@ite.com.tw>
* baseboard/asurada: refactor to support baseboard buildEric Yilun Lin2021-02-051-0/+635
guidelines: 1. sensors are in the board, since this may changes most of the time 2. PPC/Charger/BC12/TCPC/PD are in the baseboard, this is unlikely changing 3. sub-board detection is in the baseboard 4. power signals, power sequence are in the baseboard 5. ADC/PWM this might change, but we keep them in the baseboard for now 6. it5205_sbu is not currently used for now, move it to baseboard 7. battery, led are kept in the board BUG=b:178439840 TEST=boot hayato to OS BRANCH=none Change-Id: I21bf5d1f7901a10c3538ad5646362f2b402652af Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2675328 Reviewed-by: Ting Shen <phoenixshen@chromium.org>