summaryrefslogtreecommitdiff
path: root/baseboard/volteer
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-0515-1307/+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: Fix broken volteer buildJeremy Bettis2021-09-271-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On github, the volteer build was failing with error: undefined reference to `ppc_is_vbus_present' but it was building in the chroot. It seems the chroot linker can determine that the pd_snk_is_vbus_provided function is never called, but the zephyr toolchain linker cannot, or perhaps it does missing function detection before removing unused functions. Remove pd_snk_is_vbus_provided if CONFIG_USB_PD_VBUS_DETECT_PPC is not set. BRANCH=None BUG=b:194375840 TEST=In docker container: PROJECT=volteer; PROJECT_SUBDIR=volteer/; VERSION=26; unset TOOLCHAIN zmake -j1 --zephyr-base "${ZEPHYR_BASE}${VERSION}" \ --modules-dir "${MODULES_DIR}" -l DEBUG configure -b \ -B "${BUILD_DIR}/${PROJECT}" -t ${TOOLCHAIN:-zephyr} \ zephyr/projects/${PROJECT_SUBDIR}${PROJECT} In chroot: zmake configure -b zephyr/projects/volteer/volteer Change-Id: I59679a12e89e8b2e5fa2f62dc5fa60d108234d23 Signed-off-by: Jeremy Bettis <jbettis@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3188214 Reviewed-by: Yuval Peress <peress@google.com> Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com> Reviewed-by: Aaron Massey <aaronmassey@google.com> Reviewed-by: Parth Malkan <parthmalkan@google.com> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Yuval Peress <peress@google.com> Commit-Queue: Fabio Baltieri <fabiobaltieri@google.com> Tested-by: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org>
* TCPM: Rename enum tcpm_sop_type and its constantsAbe Levkoy2021-08-311-1/+1
| | | | | | | | | | | | | | | As a followup to CL:3104290, give the TCPCI TRANSMIT and RX_BUF_FRAME_TYPE types more consistent names. Most of them can be used for receiving, not just transmitting. Fix lint errors thus revealed. BUG=b:155476419 TEST=make buildall BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: I399ec479eacc18622fc4d3f55f8bdabf4560fcff Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3125995 Reviewed-by: Keith Short <keithshort@chromium.org>
* adc: Update board files to match adc.h refactorCaveh Jalali2021-08-271-1/+1
| | | | | | | | | | | | | | This updates a few board files that were including adc_chip.h instead of adc.h. adc_chip.h should not be included explicitly in most cases. BRANCH=none BUG=b:181271666 TEST=buildall passes Change-Id: I42f8b5b2129ebe18a96d089f0355b581cba1b274 Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3120316 Reviewed-by: Keith Short <keithshort@chromium.org>
* voema: Remove base sensor support kx022David Huang2021-07-291-2/+1
| | | | | | | | | | | | | | | Remove base sensor support kx022 due to kx022 not support gyro and base sensor need gyro. BUG=b:192301309 BRANCH=volteer TEST=make buildall -j succeeded. Signed-off-by: David Huang <david.huang@quanta.corp-partner.google.com> Change-Id: I6ff1bf9488d816be680a395334ea3008b9280890 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3029802 Commit-Queue: Keith Short <keithshort@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* keyboard: Use __override for keyboard_scan_configDaisuke Nojiri2021-07-231-1/+1
| | | | | | | | | | | | | | | | | Currently keyboard_scan_config is defined by each board using CONFIG_KEYBOARD_BOARD_CONFIG. This patch makes it defined as __override hence removes CONFIG_KEYBOARD_BOARD_CONFIG. BUG=None BRANCH=None TEST=buildall Change-Id: I53a356741ba4d00e829ca59b74ee6dc704188728 Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3044403 Tested-by: Gwendal Grignou <gwendal@chromium.org> Commit-Queue: Gwendal Grignou <gwendal@chromium.org> Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
* chgstv2: Unify power-on and shutdown battery thresholdsDaisuke Nojiri2021-06-231-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, power-on battery SoC and shutdown battery SoC are independently configured by each board. This patch will unify the setting as follows: CONFIG_CHARGER_MIN_BAT_PCT_FOR_POWER_ON = 2 (don't boot if soc < 2%) CONFIG_BATT_HOST_SHUTDOWN_PERCENTAGE = 2 (shutdown if soc <= 2%) BATTERY_LEVEL_SHUTDOWN = 3 (shutdown if soc < 3%) CONFIG_BATTERY_EXPORT_DISPLAY_SOC = Y (removed) CONFIG_CHARGER_MIN_BAT_PCT_FOR_POWER_ON_WITH_AC = 1 This allows us to show the low battery alert whenever we can because EC doesn't inhibit power-on even if it knows the host would immediately shut down. With CONFIG_BATTERY_EXPORT_DISPLAY_SOC, boards will start using the CONFIG_BATT_HOST_SHUTDOWN_PERCENTAGE = 2% as the low battery threshold (and the SoC will be agreed between the EC and Powerd). Boards with CONFIG_CHARGER_MIN_BAT_PCT_FOR_POWER_ON = 1 will keep the same threshold. This is for avoiding degrading the UX by increasing the power-on threshold (even though a question that 1% may not be enough for soft sync to finish consistently remains to be answered). Boards with CONFIG_CHARGER_MIN_BAT_PCT_FOR_POWER_ON > 2 will have a lower threshold but we think 2% is enough to finish the software sync. A lower threshold also improves the UX by showing the low battery alert in the situation where otherwise the system would leave the user uninformed by not responding to a power button press. BUG=b:191837893 BRANCH=None TEST=buildall Change-Id: If6ff733bc181f929561a3fffb8a84e760668ce37 Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2981468 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* config: Rename CONFIG_CROS_BOARD_INFOPhilip Chen2021-06-161-1/+1
| | | | | | | | | | | | | | | | | | Rename CONFIG_CROS_BOARD_INFO to CONFIG_CBI_EEPROM to make it clear that the information comes from on-board EEPROM. It sets up the groundwork for adding more options of CBI sources later. BRANCH=None BUG=b:186264627 TEST=make buildall -j Signed-off-by: Philip Chen <philipchen@google.com> Change-Id: I9a6feee0a8b35bbf29e445544243485507767ad8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2945792 Reviewed-by: Philip Chen <philipchen@chromium.org> Commit-Queue: Philip Chen <philipchen@chromium.org> Tested-by: Philip Chen <philipchen@chromium.org>
* voema: support kx022/bma255 with ssfc bits mapBen Chen2021-04-191-4/+5
| | | | | | | | | | | | | | | | config kx022 or bma255 motion sensor by ssfc bits map, and rename volteer ssfc bits map. BUG=b:178447173 BRANCH=main TEST=Using ectool 'motionsense' verified lid angle now goes from 0 to 360 and swtiches to tablet mode after crossing 200 threshold on re-work kx022/bma255 DUT. Change-Id: I2901b0cc980e50324eb4f20d073c5f3a4c3f80e3 Signed-off-by: Ben Chen <ben.chen2@quanta.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2825719 Reviewed-by: Keith Short <keithshort@chromium.org>
* volteer: Add SSFC_LIGHTBAR definitionreno.wang2021-04-142-4/+24
| | | | | | | | | | | | | | | Add LIGHTBAR to volteer's SSFC structure. BUG=b:183826778 BRANCH=volteer TEST=make buildall. Signed-off-by: reno.wang <reno.wang@lcfc.corp-partner.google.com> Change-Id: Idadc216bbe055d5d5cfa2dc45ced9b39e5594e8c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2814163 Reviewed-by: Zhuohao Lee <zhuohao@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* Revert "ps8815: delete CONFIG_USB_PD_TCPM_PS8815_FORCE_DID"Zhuohao Lee2021-03-251-0/+1
| | | | | | | | | | | | | | | | | This reverts commit e2761c8be4571adcfc425a9187290872ffa9d02d. In order to support the old TCPC chip which bcd revision is smaller than 0x7, we need to bring back the CONFIG_USB_PD_TCPM_PS8815_FORCE_DID and force the TCPC firmware be updated in the factory line. BUG=b:177251013, b:159289062, b:182018599, b:178978970 BRANCH=firmware-volteer-13672.B TEST=the old TCPC chip can update its firmware. Signed-off-by: Zhuohao Lee <zhuohao@chromium.org> Change-Id: I66d12aee569137cc7823a186e3251ca8b187e767 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2784327 Reviewed-by: Keith Short <keithshort@chromium.org>
* delbin: Setting charger switching frequency to 724kHz.Michael5 Chen12021-03-081-0/+2
| | | | | | | | | | | | | | | Setting charger switching frequency to 724kHz. BUG=b:180779740 BRANCH=volteer TEST=manual 1. Check charger register 0x3C 2. Check waveform Signed-off-by: Michael5 Chen1 <michael5_chen1@pegatron.corp-partner.google.com> Change-Id: I97512742dfc778c22615f8385fbe1fecf5ff2d7b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2719786 Reviewed-by: Keith Short <keithshort@chromium.org>
* TCPMv2: VOLTEER: Correctly set ID Header VDOSam Hurst2021-02-241-2/+2
| | | | | | | | | | | | | | | | When responding to a DiscId message, return the ID Header VDO with the USB Communications Capable as a USB Device bit to zero and the Product Type(UFP) bits to 000b. BUG=b:173028252 BRANCH=none TEST=Passes TD.PD.VNDI.E1 VDM Identity Signed-off-by: Sam Hurst <shurst@google.org> Change-Id: I57a62db92eee0f63e081bdb9b6d49e6e3206a41c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2707252 Commit-Queue: Sam Hurst <shurst@google.com> Tested-by: Sam Hurst <shurst@google.com> Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* volteer: Enable button console commandMadhu M2021-02-191-0/+6
| | | | | | | | | | | | | | | | | | | | Enabled compiler switch for volteer board to simulate button operations. BUG=None BRANCH=None TEST=Tested on delbin/voxel board. From EC console, entered the below commands: $ button vup 1000 Observed volume UP key press on display $ button vdown 1000 Observed volume DOWN key press on display Signed-off-by: Madhu M <madhu.m@intel.corp-partner.google.com> Change-Id: I5ba3abfba25e29bbd96997c9321e3718b4b1c0bd Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2686975 Reviewed-by: Keith Short <keithshort@chromium.org> Tested-by: Madhu M <madhu.m@intel.com> Commit-Queue: Keith Short <keithshort@chromium.org>
* volteer: Add version number of productli feng2021-02-122-2/+4
| | | | | | | | | | | | | | | Per PD Rev3.0 Spec, VDM Product VDO has a field bcdDevice, it's version number relevant to the release version of the product. BUG=b:157163664 BRANCH=none TEST=make buildall Signed-off-by: li feng <li1.feng@intel.com> Change-Id: Ie735b64c9d4a1dec2f3402b2c521c107a9769ee0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2420469 Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* retimer: support retimer firmware updateli feng2021-02-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To support AP to update firmware during boot up, one byte EC RAM is allocated for AP <-> EC communication. AP queries PD port/requests EC to perform operations via EC_CMD_ACPI_WRITE; and fetches result from EC via EC_CMD_ACPI_READ. The flow is: 1. AP queries EC PD ports which port supports retimer firmware update. 2. AP queries current MUX. 3. a) If no device attached, AP requests EC to suspend PD task of the port. Then AP requests EC to set MUX to USB mode, Safe mode, TBT mode. After entering TBT mode, the OS can either enumerate the retimers or do firmware update on the enumerated retimers. Once done, AP requests EC to disconnect MUX and resume PD task. 3. b) If device attached, AP moves on as usual. Retimer firmware update is not performed. BUG=b:162528867 BRANCH=none TEST=Tested NDA case on Voxel board, together with coreboot and kernel changes. Coreboot changes are merged. Kernel patches list is: https://chromium-review.googlesource.com/c/chromiumos/ third_party/kernel/+/2670719 After power up, host scans retimers, in sysfs localhost ~ # ls /sys/bus/thunderbolt/devices/ 0-0 0-0:1.1 0-0:3.1 domain0 On PD port 1, manually update retimer firmware. Copy firmware to nvm_non_active1/nvmem, then authenticate it. Host starts flow to update firmware. After it's done, PD port 1 resumes. Hotplug DP dongle/TBT device, devices should function fully. TEST=Tested DA cases on Voxel board, together with coreboot and kernel changes. USB4/TBT devices function as usual. Signed-off-by: li feng <li1.feng@intel.com> Change-Id: Ie976e75f892d5caf48a948598a058a4f42e07eb3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2594492 Reviewed-by: Keith Short <keithshort@chromium.org>
* config: Fix inconsistent VBUS measurement configAbe Levkoy2021-01-221-1/+0
| | | | | | | | | | | | | | | | | | Remove CONFIG_USB_PD_VBUS_MEASURE_NOT_PRESENT from boards that define CONFIG_USB_PD_VBUS_MEASURE_CHARGER. This change is a no-op, because charge_manager.c is the only place where CONFIG_USB_PD_VBUS_MEASURE_NOT_PRESENT is checked, and it is only checked if CONFIG_USB_PD_VBUS_MEASURE_CHARGER is not defined. BUG=b:178102402 TEST=make buildall TEST=Build sizes before and after change are the same BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: Ia3caa57a8531a5cba549b64c9087c337996af9c5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2642892 Reviewed-by: Diana Z <dzigterman@chromium.org>
* volteer: Move x86 power info into a separate fileSimon Glass2021-01-223-51/+57
| | | | | | | | | | | | | | | Move this out of the baseboard file into a new power.c file so that Zephyr can use it, instead of duplicating the same code separately. BUG=b:173787365 BRANCH=none TEST=make BOARD=volteer build zephyr on volteer Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: If67909ecbf2a44e7f09dbfe401f8f08739f55252 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2631099 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* Refactor CONFIG_FLASH_SIZE to CONFIG_FLASH_SIZE_BYTESYuval Peress2021-01-151-1/+1
| | | | | | | | | | | | | | | | | | | | | In Zephyr CONFIG_FLASH_SIZE is a Kconfig value that is used throughout. The issue is that the units don't match. In Zephyr the value is in KiB instead of bytes. This refactor simply renames CONFIG_FLASH_SIZE in platform/ec to include the unit (via _BYTES). BRANCH=none BUG=b:174873770 TEST=make buildall be generated by the build instead of per board Signed-off-by: Yuval Peress <peress@chromium.org> Change-Id: I44bf3c7a20fcf62aaa9ae15715be78db4210f384 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2627638 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org> Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
* ps8815: delete CONFIG_USB_PD_TCPM_PS8815_FORCE_DIDKeith Short2021-01-131-1/+0
| | | | | | | | | | | | | | | | Delete config option CONFIG_USB_PD_TCPM_PS8815_FORCE_DID as it is no longer required. All PS8815 devices ship with firmware version 0xE or later. The BCD Device identifier was fixed in PS8815 A1 revision 7 firmware. BUG=b:159289062, b:177251013 BRANCH=none TEST=make buildall Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I604ab00b92931425f197a00c53109d7b072f45a4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2625800 Reviewed-by: caveh jalali <caveh@chromium.org>
* volteer: Split out baseboard CBI code into its own fileSimon Glass2021-01-125-49/+76
| | | | | | | | | | | | | Move this out of baseboard.c so we can use it on Zephyr. BUG=b:175434113 BRANCH=none TEST=make BOARD=volteer -j30 With a zephyr-chrome CL, build volteer on zephyr Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: I3783211d2e566f09b476043b045b5fed734164b7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2617367
* volteer: Create a header file for baseboard usbc configSimon Glass2021-01-123-5/+20
| | | | | | | | | | | | | | | | | There are a few function prototypes defined in baseboard.h that really should be available to zephyr. Move them into a separate file to permit that. BUG=b:175434113 BRANCH=none TEST=make BOARD=volteer -j30 With a zephyr-chrome CL, build volteer on zephyr Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: Idf72aeb993c74fec3419627e77c68ada0f33902f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2617366 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* volteer: Separate out some baseboard USB-C config codeSimon Glass2021-01-093-55/+77
| | | | | | | | | | | | | | | | | | These three functions are needed by the charger task and are currently not compiled on Zephyr. Move them out into their own file so that they can be. Update the isl9241 interface slightly to add a needed define. BUG=b:175434113 BRANCH=none TEST=make BOARD=volteer -j30 build volteer on zephyr Change-Id: Ia28c406c865003d8aec1c31add590bfdef57601d Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2617038 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* Split out some USB-C config into new filesSimon Glass2021-01-092-82/+90
| | | | | | | | | | | | | | | | | | | | | | | | | The Zephyr build needs this information but cannot use the whole board.c file. It is pretty big anyway, so let's move some of the USB-C config info into a separate file. Add a header file for the part specific to this config. We can progressively move more as Zephyr is able to build it. This requires the addition of many Kconfig options, so will be done in stages. BUG=b:175434113 BRANCH=none TEST=make -j30 buildall With a zephyr-chrome CL, build volteer on zephyr Check for other boards: for b in $(grep volteer board/*/build.mk |awk -F/ '{print $2}'); do \ echo $b; grep -A5 "enum usbc_port" board/$b/board.h; done Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: I2a4bb0af2b8571ce992cdbbc8362dec25176872e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2605277 Reviewed-by: Keith Short <keithshort@chromium.org>
* volteer/baseboard: Change power gate signal for thermistorDevin Lu2021-01-081-1/+1
| | | | | | | | | | | | | | | | | Original thermistor power on signal is referring to GPIO_EN_PP3300_A. However, PP3300_A is not raise up immediately for thermistor. This patch change power gate signal to GPIO_PG_EC_DSW_PWROK. BUG=b:176878252 BRANCH=firmware-volteer-13672.B-main TEST=On elemi, hibernate the system and wake up by power button. Make sure no any thermal halt/alert event. Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: I1e91637ac0ae1e20db05005b0126abf77f196c62 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2607222 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* BB retimer: Set UFP mode of BB retimerAyushee2021-01-072-10/+2
| | | | | | | | | | | | | | | | | | | | | This CL enables getting the enter mode information received from DFP and sets the following BB retimer bits accordingly. Bit 2: RE_TIMER_DRIVER Bit 18: CABLE_TYPE Bit 19: VPRO_DOCK_DETECTED Bit 20: TBT_ACTIVE_LINK_TRAINING Bit 22: ACTIVE/PASSIVE Bits 27-25: TBT Cable speed Bits 29-28: TBT_GEN_SUPPORT BUG=b:157163664 BRANCH=None TEST=Tested with volteer as UFP, able to set the retimer bits Signed-off-by: Ayushee <ayushee.shah@intel.com> Change-Id: I661aa4630b42fbaa136ff3855c4f70e3dee61546 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2382634 Reviewed-by: Keith Short <keithshort@chromium.org>
* Create a public header for isl9241Simon Glass2021-01-071-1/+1
| | | | | | | | | | | | | | | | | Add a separate public header for this chip so we can include it from Zephyr. Update the charger file to use that header, so it builds on Zephyr. BUG=b:175434113 BRANCH=none TEST=make BOARD=volteer -j30 With a zephyr-chrome CL, build volteer on zephyr Change-Id: I562177e2259931730b7dae4d8e43edd5ea96deb7 Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2611893 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* Split out charger information into a new fileSimon Glass2021-01-063-10/+19
| | | | | | | | | | | | | | | | The Zephyr build needs this information but cannot use the whole baseboard.c file. It is pretty big anyway, so let's move the charger info into a separate file. BUG=b:175434113 BRANCH=none TEST=make BOARD=volteer -j30 With a zephyr-chrome CL, build volteer on zephyr Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: Ib91ae850358e5045e6530e2308a49835aee6a3f5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2607507 Reviewed-by: Keith Short <keithshort@chromium.org>
* Volteer: Initiate the first version of parsing SSFC of CBIBen Chen2020-12-303-0/+95
| | | | | | | | | | | | | | Initiate the helper functions to parse the SSFC of CBI. The first component define lid / base sensors in this version. BUG=b:176039213, b:175843510 BRANCH=main TEST=Make buildall PASS. Change-Id: I63254e94d4953c5046868b15f3684f7a8a40f1ab Signed-off-by: Ben Chen <ben.chen2@quanta.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2599638 Reviewed-by: Keith Short <keithshort@chromium.org>
* TCPMv2: Update source-out configsDiana Z2020-12-242-11/+0
| | | | | | | | | | | | | | | | | | | | Now that the DPM will be handling source-out decisions for TCPMv2, remove references to its old configuration options from TCPMv2 boards in order to avoid any confusion as to what code is running now. Also remove the charge manager notifications of sink attach/detach since the policy is being centralized into the DPM. Note that the previous configuration options only ever allocated one 3.0 A port, and so the default number of 3.0 A ports has been set to 1. BRANCH=None BUG=b:168862110,b:141690755 TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Ie452e3da32b04226503539daa67b6b9f4a58aa58 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2597431 Reviewed-by: Keith Short <keithshort@chromium.org>
* TCPMv2: support TBT Alt mode as UFPli feng2020-12-211-0/+137
| | | | | | | | | | | | | | | | | | | Implemented SVDM responders for TBT Alt mode BUG=b:148528713,b:157163664,b:162986785 BRANCH=none TEST=1. Build ec with CL:2382634; OS CPFE 13447, CB CPFE 13535 2. Boot up Volteer, run "pd trysrc 0" on EC console; 3. Then connect port 1 to TGL Windows RVP TBT port; 4. Thunderbolt connection is established. Volteer port 1 as UFP, Windows RVP TBT port as DFP. From host console, thunderbolt0 is listed as network interface in ifconfig. Signed-off-by: li feng <li1.feng@intel.com> Change-Id: If4c80418677f541e9c1c7c8c84446357000aaecb Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2370045 Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Aashay Shringarpure <aashay@google.com>
* task_set_event: remove the wait argumentDawid Niedzwiecki2020-12-141-2/+2
| | | | | | | | | | | | | | | | | | | | There is an option in the task_set_event function which force the calling task to wait for an event. However, the option is never used thus remove it. This also will help in the Zephyr migration process. BUG=b:172360521 BRANCH=none TEST=make buildall Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com> Change-Id: Ic152fd3d6862d487bcc0024c48d136556c0b81bc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2521599 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
* power: move headers to include/powerJack Rosenthal2020-12-031-1/+1
| | | | | | | | | | | | | | This makes the headers visible to the Zephyr build. BUG=b:173798264 BRANCH=none TEST=buildall Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I3b6d27c1234b3924ee8902a86eec5fdb2ccd9998 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2571897 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* eldrid: add FW_CONFIG support for different keyboard layoutScott Chao2020-11-122-1/+18
| | | | | | | | | | | | | | BUG=b:172133632 BRANCH=firmware-volteer-13521.B-master TEST=make buildall TEST= ectool cbi get = 0x14902 ectool cbi set 0x114902 4 Signed-off-by: Scott Chao <scott_chao@wistron.corp-partner.google.com> Change-Id: I0decd978bf6c21dddd315857bb1a29ac20dbf276 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2528732 Reviewed-by: Keith Short <keithshort@chromium.org>
* usb: Remove references to usb23Caveh Jalali2020-11-061-1/+0
| | | | | | | | | | | | | | | | | The TCSS port mapping is not used by the EC and the higher layers no longer query the EC for this mapping. We can remove this feature and disable CONFIG_INTEL_VIRTUAL_MUX which was added to enable it. BRANCH=none BUG=b:153941950 TEST=buildall passes Change-Id: I2d7f51212f3e64d74827d7f82654eb93534b8db4 Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2427632 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Commit-Queue: Keith Short <keithshort@chromium.org>
* volteer: move thermal setting to variantScott Chao2020-10-071-53/+0
| | | | | | | | | | | | | | | Since each variant may have different thermal sensor placement. Move thermal params and configs from baseboard to variant. BUG=b:170143672 BRANCH=none TEST=make -j BOARD=eldrid TEST=make buildall Signed-off-by: Scott Chao <scott_chao@wistron.corp-partner.google.com> Change-Id: Ie12f4cecad5f93c491e51a5fadfe856829f5b2e3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2449510 Reviewed-by: Keith Short <keithshort@chromium.org>
* volteer: Enable SW charge rampingKeith Short2020-10-012-1/+25
| | | | | | | | | | | | | | | | Enable CONFIG_CHARGE_RAMP_SW because hardware based charge ramping doesn't work on the ISL9241. BUG=b:169350714, b:168960587 BRANCH=none TEST=make buildall TEST=Connect 1.5A CDP device to Volteer and verify charge ramp from 0.5A to 1.5A over about 7 seconds. Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I81e8a3913bd776d0d3fda6d294fdeabbde5df62a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2438912 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* Revert "volteer: Move USB PID to board files"Abe Levkoy2020-09-281-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 6ed9b65ae38977118f0d5f02d6f5c61da23c5f24. Reason for revert: Historically, Octopus variants used the baseboard VID and PID. Original change's description: > volteer: Move USB PID to board files > > Add TODOs to update variants boards. > > BUG=none > TEST=make buildall > BRANCH=none > > Signed-off-by: Abe Levkoy <alevkoy@chromium.org> > Change-Id: If0d8d0dd544c06114f355dcf281b2841a8397aee > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2417348 > Reviewed-by: Keith Short <keithshort@chromium.org> BUG=b:168826898,b:168827570,b:168827133,b:168827128,b:168827420 BUG=b:168827418,b:168826886,b:168826868,b:168827029,b:168826914 Change-Id: I5b9b1cee25e34a4b922fd604b49deabc9591b4e8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2431687 Tested-by: Abe Levkoy <alevkoy@chromium.org> Reviewed-by: YH Lin <yueherngl@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Abe Levkoy <alevkoy@chromium.org>
* eldrid: limit input current to 90%Scott Chao2020-09-231-1/+1
| | | | | | | | | | | | | | | Protect adapter provide overcurrent. And follow OEM charger policy to set 90% input current limit when S0. BUG=b:169025944 BRANCH=none TEST=make -j BOARD=eldrid TEST=make buildall Signed-off-by: Scott Chao <scott_chao@wistron.corp-partner.google.com> Change-Id: Idc5aa532aaf5f4c7db45d9db2e1ce66032611a53 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2413810 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* volteer: encode the keyboard backlight and numeric pad to fw_configZhuohao Lee2020-09-222-8/+44
| | | | | | | | | | | | | | | | In order to support the keyboard backlight and numeric pad switching, we need to encode the keyboard backlight and numeric pad feature to the fw_config. BUG=b:166707536 BRANCH=None TEST=flash the ec.bin to the DUT and checked the keyboard function. Change-Id: I2f85377acd85a0dae635d7bf4fe36c47ce01e9d7 Signed-off-by: Zhuohao Lee <zhuohao@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2397933 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* eldrid: fix battery cutoffScott Chao2020-09-212-0/+28
| | | | | | | | | | | | | | | | | | | Eldrid's battery need to apply charging voltage input>3V and aleast 2 sec to let C/D FET will turn on. So add board_battery_is_initialized to check battery initialization. And try to provide pre-charge current to battery when battery have no response. BUG=b:165780074 BRANCH=none TEST=make -j BOARD=eldrid TEST=make buildall Signed-off-by: Scott Chao <scott_chao@wistron.corp-partner.google.com> Change-Id: I4265538b5a789b76a85d21a1459d19142a86106e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2409712 Reviewed-by: Keith Short <keithshort@chromium.org>
* volteer: Move USB PID to board filesAbe Levkoy2020-09-181-7/+0
| | | | | | | | | | | | | Add TODOs to update variants boards. BUG=none TEST=make buildall BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: If0d8d0dd544c06114f355dcf281b2841a8397aee Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2417348 Reviewed-by: Keith Short <keithshort@chromium.org>
* Volteer: Add support for RT1715Eric Herrmann2020-09-091-0/+1
| | | | | | | | | | | | | | | | | | | Add support for replacing the TUSB422 with the RT1715. Since they are pin-to-pin compatible and currently only used with a rework, make the decision of which to use at runtime. The logic is to check if the RT1715 is both on the I2C bus and the vendor ID matches. If either fail, default to the TUSB422 address and driver. BUG=b:162617664 TEST=make buildall TEST=check both TUSB422 functionality and RT1715 functionality BRANCH=none Change-Id: I8306f086bf030ddd7238532b1f12aa259cb72422 Signed-off-by: Eric Herrmann <eherrmann@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2343734 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* volteer: Add missing #includeAbe Levkoy2020-09-031-0/+1
| | | | | | | | | | | | | | uint32_t comes from stdint.h. BUG=none TEST=make buildall BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: I44ae7c9bf5011a67f34967554da67ad5f7e7c89b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2390995 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* volteer: Support board-specific keyboard_configSamsp_Liu2020-09-021-17/+0
| | | | | | | | | | | | | | | | | | | Separate keyboard_scan_config keyscan_config from volteer baseboard to each project board. To meet different configurations on each board. BUG=b:149536282 BRANCH=none TEST=make buildall Change-Id: I9070953c02ff7d3eb4950191db6505b635371792 Signed-off-by: Samsp_Liu <Samsp_Liu@compal.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2383359 Tested-by: SamSP Liu <samsp_liu@compal.corp-partner.google.com> Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: SamSP Liu <samsp_liu@compal.corp-partner.google.com>
* Volteer:enable runtime control over PD debug levelMadhu M2020-08-311-1/+0
| | | | | | | | | | | | | | | | | | | Enable runtime control of the PD debug level on Volteer boards. This change reduces Volteer flash space by 1472 bytes, leaving 3400 bytes free. BUG=none BRANCH=none TEST=make buildall TEST=Manually run pd dump 3 and ensure more pd protocol logs Signed-off-by: Madhu M <madhu.m@intel.corp-partner.google.com> Change-Id: I9b3094ed6e2e888037b137efd3387d836bac54da Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2381894 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* volteer: Support board-specific TCPC configSamsp_Liu2020-08-262-131/+0
| | | | | | | | | | | | | | | | | | Separate tcpc_config from volteer baseboard to each project board. To meet different configurations on each board. BUG=b:153705222 BRANCH=none TEST=make buildall Change-Id: Iea59518123a542ebe38be195eaf71b4a8f796550 Signed-off-by: Samsp_Liu <Samsp_Liu@compal.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2342183 Tested-by: SamSP Liu <samsp_liu@compal.corp-partner.google.com> Commit-Queue: Keith Short <keithshort@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* volteer: Support board-specific currentSamsp_Liu2020-08-261-2/+0
| | | | | | | | | | | | | | | | | | | Separate CONFIG_CHARGER_SENSE_RESISTOR and CONFIG_CHARGER_SENSE_RESISTOR_AC from volteer baseboard to each project board. To meet different configurations on each board. BUG=b:158257062 BRANCH=none TEST=make buildall Change-Id: Ib8290bd54d45054b82d7849e84119d419cbc8586 Signed-off-by: Samsp_Liu <Samsp_Liu@compal.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2346088 Tested-by: SamSP Liu <samsp_liu@compal.corp-partner.google.com> Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Commit-Queue: SamSP Liu <samsp_liu@compal.corp-partner.google.com>
* bb retimer: Use mutex to lock the access to shared NVMVijay Hiremath2020-08-251-1/+0
| | | | | | | | | | | | | | | | | | | If the BB retimer has a shared NVM we need 40ms delay after releasing the RESET line to synchronize, load and initialize both the retimers. On a non-shared NVM we need 20ms delay to load and initialize. In order to synchronize, instead of 40ms delay this CL uses a MUTEX to lock the access of another retimer by not releasing the RESET line until the first retimer completes initialization. BUG=b:165895649 BRANCH=none TEST=Tested on volteer(non shared NVM), tglrvpu_ite (shared NVM) Retimer is able to initialize (DP, USB, TBT, USB4 are detected) Change-Id: I709377c2e6401faa26871289143d71665ee516d1 Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2368223 Reviewed-by: Keith Short <keithshort@chromium.org>
* bmi260: move BMI260 init file into .init.rom sectionKeith Short2020-08-201-0/+3
| | | | | | | | | | | | | | | | | | | | | Increases Volteer RO and RW flash spaces by 7088 bytes each. This is the net gain after including the init_rom layer. BUG=b:160330682 BRANCH=none TEST=make buildall TEST=On volteer run "ectool motionsense" and "ectool motionsense lid_angle". Verify both RO and RW images. TEST=Program RO image with predecessor CL:2311268. Program this CL into AP firmware image and verify EC software sync updates to RW image. TEST=Verify BMI260 operation with CONFIG_CHIP_INIT_ROM_REGION disabled using volteer_tcpmv1 board. Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I6849b6c9e96756266528b39ab5e53268dce2a13c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2311756 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: caveh jalali <caveh@chromium.org>