summaryrefslogtreecommitdiff
path: root/baseboard/brya
Commit message (Collapse)AuthorAgeFilesLines
* brya: Update with new bq257x0 definitionsCaveh Jalali2021-11-101-4/+6
| | | | | | | | | | | | | | | | This updates brya's use of bq25720 registers to use the new bq257x0 definitions. BRANCH=none BUG=b:185190976 TEST=with rest of patch series, util/compare_build.sh -b all reports MATCH Change-Id: I8096a54575ac7027937e726e55377c4fc6e68550 Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3263232 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Boris Mittelberg <bmbm@google.com>
* brya: add PROCHOT assertion/de-assertion ratioWill Tsai2021-10-291-1/+2
| | | | | | | | | | | | | | | | | This adds a de-assertion ratio for the total power consumption to compare when adapter wattage greater or equal to 60W and the battery is not present(or the battery energy is less than 10%). BUG=b:198689488 b:198722634 BRANCH=none TEST=make -j BOARD=gimble Signed-off-by: Will Tsai <will_tsai@wistron.corp-partner.google.com> Change-Id: Ie7d6ffa8f30a1f0b0aec24055e8d823d1d3395b0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3251823 Reviewed-by: caveh jalali <caveh@chromium.org> Commit-Queue: caveh jalali <caveh@chromium.org>
* brya: move prochot assertion/de-assertion ratio to variantWill Tsai2021-10-291-10/+0
| | | | | | | | | | | | | | | | Since each variant may have different prochot assertion/de-assertion configuration, the prochot assertion/de-assertion ratio setting will be moved from baseboard to variant. BUG=b:198689488 b:198722634 BRANCH=none TEST=make -j BOARD=gimble Signed-off-by: Will Tsai <will_tsai@wistron.corp-partner.google.com> Change-Id: I140e74e85fbec24e0e1759526d9c3b24152b68c6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3247740 Reviewed-by: caveh jalali <caveh@chromium.org> Commit-Queue: caveh jalali <caveh@chromium.org>
* brya: Update stack sizes based on stack analyzerCaveh Jalali2021-10-291-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adjusts the task stack sizes on brya and variants. Many task stacks had to be increased, only CONSOLE could be reduced. Task stack size constants are added at the baseboard level for several tasks that tend to behave very similarly among variants. before: Task: CHARGER, Max size: 932, Allocated size: 928 Task: CHG_RAMP, Max size: 900, Allocated size: 672 Task: CHIPSET, Max size: 988, Allocated size: 928 Task: CONSOLE, Max size: 612, Allocated size: 928 Task: HOOKS, Max size: 580, Allocated size: 800 Task: HOSTCMD, Max size: 612, Allocated size: 800 Task: KEYPROTO, Max size: 660, Allocated size: 672 Task: KEYSCAN, Max size: 708, Allocated size: 672 Task: MOTIONSENSE, Max size: 796, Allocated size: 928 Task: PD_C0, Max size: 1052, Allocated size: 1056 Task: PD_C1, Max size: 1052, Allocated size: 1056 Task: PD_C2, Max size: 1052, Allocated size: 1056 Task: PD_INT_C0, Max size: 644, Allocated size: 672 Task: PD_INT_C1, Max size: 644, Allocated size: 672 Task: POWERBTN, Max size: 964, Allocated size: 800 Task: USB_CHG_P0, Max size: 508, Allocated size: 672 Task: USB_CHG_P1, Max size: 508, Allocated size: 672 Task: USB_CHG_P2, Max size: 508, Allocated size: 672 after: Task: CHARGER, Max size: 932, Allocated size: 1088 Task: CHG_RAMP, Max size: 900, Allocated size: 1088 Task: CHIPSET, Max size: 988, Allocated size: 1152 Task: CONSOLE, Max size: 612, Allocated size: 800 Task: HOOKS, Max size: 580, Allocated size: 800 Task: HOSTCMD, Max size: 612, Allocated size: 800 Task: KEYPROTO, Max size: 660, Allocated size: 800 Task: KEYSCAN, Max size: 708, Allocated size: 928 Task: MOTIONSENSE, Max size: 796, Allocated size: 928 Task: PD_C0, Max size: 1052, Allocated size: 1216 Task: PD_C1, Max size: 1052, Allocated size: 1216 Task: PD_C2, Max size: 1052, Allocated size: 1216 Task: PD_INT_C0, Max size: 644, Allocated size: 800 Task: PD_INT_C1, Max size: 644, Allocated size: 800 Task: POWERBTN, Max size: 964, Allocated size: 1088 Task: USB_CHG_P0, Max size: 508, Allocated size: 672 Task: USB_CHG_P1, Max size: 508, Allocated size: 672 Task: USB_CHG_P2, Max size: 508, Allocated size: 672 BRANCH=none BUG=b:204362187,b:204102039,b:204280744 TEST=brya EC no longer reboots due to stack overflow in PD task TEST=task command now reports 200 bytes of stack headroom for chipset TEST=boots on brya Change-Id: I081228da6d850bf69b431475b81025045c1c521d Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3248976 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* cleanup: charger: Add BQ25710 sense resistor configsDeepti Deshatty2021-10-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Defined different sense register configs for BQ25710. All the charger chip driver implementation uses common sense register configs i.e CONFIG_CHARGER_SENSE_RESISTOR and CONFIG_CHARGER_SENSE_RESISTOR_AC. When we enable a charger driver for a platform, it is expected that the platform define these sense register configs. But ADLRVP requires two different charger drivers i.e ISL9241 and BQ25720 to be enabled to support all the variant builds. Hence BQ25710 driver is changed to use different sense register configs so that the configs defined for ISL9241 are not affected. BRANCH=none TEST=make -j buildall has no issues Signed-off-by: Deepti Deshatty <deepti.deshatty@intel.corp-partner.google.com> Change-Id: If1e1422246e2e3a5cb628d9a37c23790502b5ca4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3211773 Reviewed-by: Poornima Tom <poornima.tom@intel.com> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: caveh jalali <caveh@chromium.org> Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org>
* brya: fix prochot feature in AC onlyScott Chao2021-10-271-3/+2
| | | | | | | | | | | | | | | | In old version, we will return early in assert_prochot if no battery. Since we need to test under AC only as well, so add one judgment to let AC only work. BUG=b:198689488, b:198722634 BRANCH=none TEST=make -j BOARD=gimble Signed-off-by: Scott Chao <scott_chao@wistron.corp-partner.google.com> Change-Id: I999bd9f8d4d55a8c0c2f43017c4235df2565e45d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3243848 Reviewed-by: caveh jalali <caveh@chromium.org> Commit-Queue: caveh jalali <caveh@chromium.org>
* brya: fix prochot mis-triggeredScott Chao2021-10-201-3/+3
| | | | | | | | | | | | | | | The adapter voltage unit should be V, if we used mV will let PROCHOT# mis-triggered. BUG=b:198689488, b:198722634 BRANCH=none TEST=make -j BOARD=gimble TEST=AC only/ AC+DC/ DC only Signed-off-by: Scott Chao <scott_chao@wistron.corp-partner.google.com> Change-Id: I1a4cad8f83e4adf2e7b1b086a244d8ce286166fb Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3229050 Reviewed-by: Boris Mittelberg <bmbm@google.com>
* brya: add control prochot featureWill Tsai2021-10-153-0/+264
| | | | | | | | | | | | | BUG=b:198689488 BRANCH=none TEST=make -j BOARD=gimble Signed-off-by: Will Tsai <will_tsai@wistron.corp-partner.google.com> Change-Id: I4be2dc8505baffaa8b7d0c9b6949711aca370778 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3201831 Tested-by: Scott Chao <scott_chao@wistron.corp-partner.google.com> Commit-Queue: Boris Mittelberg <bmbm@google.com> Reviewed-by: Boris Mittelberg <bmbm@google.com>
* brya family: fix keyboard wake in tablet modeBoris Mittelberg2021-09-291-1/+27
| | | | | | | | | | | | | Block keyscan in S0ix, when the device is in tablet mode BUG=b:199114579 BRANCH=none TEST=manual, as described in b:199114579 Signed-off-by: Boris Mittelberg <bmbm@google.com> Change-Id: I17c5fc55e5e07ae180275aba492ef491b2d116cc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3180270 Reviewed-by: caveh jalali <caveh@chromium.org>
* byra: Disable ACPI messages on EC console by defaultGwendal Grignou2021-09-221-2/+5
| | | | | | | | | | | | | | | | | | When using sensors a lot of messages are sent, overwhelming the EC console port. BUG=none BRANCH=master TEST=When running "tast run <ip hardware.SensorIioserviceHard", check the EC console is not overflown with message like: 21-09-17 23:01:41.981 [444.007624 ACPI query = 27] 21-09-17 23:01:42.053 [444.086884 event set 0x0000000004000000] 21-09-17 23:01:42.057 [444.087864 event clear 0x0000000004000000] Change-Id: I825831d83ce468d719b4303abadec4e2e0a0d1af Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3170173 Reviewed-by: Keith Short <keithshort@chromium.org>
* brya: support EC_CMD_BATTERY_GET_STATIC version 1Deepti Deshatty2021-09-091-0/+7
| | | | | | | | | | | | | | | | | ectool battery command returns the battery information correctly but returns an ioctl error as EC_CMD_BATTERY_GET_STATIC do not support version 1. Changes enable the command version 1. BRANCH=none BUG=b:197836974 TEST=Verified ectool battery command on brya. Change-Id: I2b2c4068bce1b5150d089ba08596c1191c189c2b Signed-off-by: Deepti Deshatty <deepti.deshatty@intel.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3120611 Reviewed-by: Boris Mittelberg <bmbm@google.com> Reviewed-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Commit-Queue: Boris Mittelberg <bmbm@google.com>
* brya: Move charger config from baseboard to boardDavid Huang2021-09-022-1/+0
| | | | | | | | | | | | | | | Move charger config from baseboard to board. Change Kano charger to isl9241. BUG=none BRANCH=brya TEST=make buildall -j succeeded. Signed-off-by: David Huang <david.huang@quanta.corp-partner.google.com> Change-Id: Ia97424bbcf0654127e21c47d6834ad6c2c6163ee Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3132556 Reviewed-by: Boris Mittelberg <bmbm@google.com> Commit-Queue: Boris Mittelberg <bmbm@google.com>
* 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>
* brya: moving buttons and switches to use MKBPBoris Mittelberg2021-08-241-0/+1
| | | | | | | | | | | | | | | | Switching config option to route buttons and switches over MKBP instead of 8042 driver BRANCH=main BUG=b:170966461 TEST=manual tested on Brya: volume keys and tablet mode Cq-Depend: chromium:3097939 Signed-off-by: Boris Mittelberg <bmbm@google.com> Change-Id: Ifc45a040565dcd248de0d1cabe853550cc10bf38 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3098574 Reviewed-by: caveh jalali <caveh@chromium.org> Reviewed-by: Rob Barnes <robbarnes@google.com>
* 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>
* brya: Remove pd_snk_is_vbus_providedCaveh Jalali2021-07-221-5/+0
| | | | | | | | | | | | | | | | The pd_snk_is_vbus_provided() function is only used when CONFIG_USB_PD_VBUS_DETECT_PPC is enabled. brya uses CONFIG_USB_PD_VBUS_DETECT_TCPC instead. BRANCH=none BUG=none TEST=buildall passses Signed-off-by: Caveh Jalali <caveh@chromium.org> Change-Id: If5a93025d6e870deb46717863c61c3d34be0283a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3044413 Reviewed-by: Boris Mittelberg <bmbm@google.com> Commit-Queue: Boris Mittelberg <bmbm@google.com>
* brya: Enable DPTF supportSumeet Pawnikar2021-07-141-0/+1
| | | | | | | | | | | | | | | This enables the handling of DPTF messages from the AP. BUG=b:191442254 BRANCH=None TEST=None Change-Id: Iff7dbb0b713f9b255db71ae9d3d83ca2be24f2ac Signed-off-by: Sumeet Pawnikar <sumeet.r.pawnikar@intel.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3015907 Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Commit-Queue: Tim Wawrzynczak <twawrzynczak@chromium.org> Tested-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
* brya: Include-what-you-use scrubCaveh Jalali2021-06-256-6/+21
| | | | | | | | | | | | | | | This updates the list of header files included by brya board files to match what is actually used. BRANCH=none BUG=b:192010784 TEST=buildall passes Change-Id: I18d143882babfd17935fbf0cf92f235842df17c3 Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2987159 Reviewed-by: Boris Mittelberg <bmbm@google.com> Commit-Queue: Boris Mittelberg <bmbm@google.com>
* brya:[WA] Deselect CONFIG_BOARD_HAS_RTC_RESET for bryaSridhar Siricilla2021-06-251-1/+8
| | | | | | | | | | | | | | | | | | | | | | The patch deselects CONFIG_BOARD_HAS_RTC_RESET flag for brya. This is required as SOC takes more than 4 seconds to exit from S5 state when DAM-enabled-coreboot image is flashed on top of DAM-disabled-coreboot image. By not updating the WA, system fails to exit from S5 state and then, EC forces system to G3 state. The WA should be removed once proper solution is landed. BUG=b:191742284 TEST: Verify boot on Brya and check DAM enabled coreboot image will boot the system after flash. Signed-off-by: Sridhar Siricilla <sridhar.siricilla@intel.com> Change-Id: I4dc5b98d0f5a1ddc77782e497afb00e27bdfc57e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2972529 Reviewed-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Sooraj Govindan <sooraj.govindan@intel.com> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Commit-Queue: caveh jalali <caveh@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>
* brya: Enable CONFIG_LOW_POWER_IDLESooraj Govindan2021-05-211-0/+1
| | | | | | | | | | | | | | BUG=b:181619297 BRANCH=none TEST=verify "sleepmask" and "idle" console commands in S0ix Signed-off-by: Sooraj Govindan <sooraj.govindan@intel.com> Change-Id: Iae6f1ed18cb0494d7870fa23b056c8d79baea6a6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2891275 Tested-by: Boris Mittelberg <bmbm@google.com> Reviewed-by: caveh jalali <caveh@chromium.org> Reviewed-by: Boris Mittelberg <bmbm@google.com> Commit-Queue: Boris Mittelberg <bmbm@google.com>
* brya: Move battery_hw_present to boardCaveh Jalali2021-05-211-6/+0
| | | | | | | | | | | | | | | | This moves the battery_hw_present() function from the baseboard to the board file. We have a GPIO shuffle in the works for brya that requires board specific knowledge to support multiple revisions of the board. BRANCH=none BUG=b:183452273 TEST=battery works fine on brya ID 1 Change-Id: Ida698911539486cc68f509efd8533325b59e031e Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2912055 Reviewed-by: Boris Mittelberg <bmbm@google.com> Commit-Queue: Boris Mittelberg <bmbm@google.com>
* brya: signal MKBP via host events instead of GPIOBoris Mittelberg2021-05-201-1/+1
| | | | | | | | | | | | | | | | | | Sensor MKBP events are preventing Brya from entering S0ix. The main change from other platforms is that on Brya MKBP events and EC interrupts are using the same pin EC_PCH_INT_ODL (which wakes up the system). BRANCH=none BUG=b:186098519 TEST=`suspend_stress_test -c 10`, also checked that lid_open still wakes the system Signed-off-by: Boris Mittelberg <bmbm@google.com> Change-Id: I5f2ec060429c1fe5d6794e87e349707a47207ccf Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2907912 Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-by: caveh jalali <caveh@chromium.org> Commit-Queue: Tim Wawrzynczak <twawrzynczak@chromium.org>
* brya: Define fw_config at board levelCaveh Jalali2021-04-215-119/+11
| | | | | | | | | | | | | | | | This updates the brya FW config fields based on the brya/config.star definitions. FW config fields and values are now defined at the project level rather than the program level. In other words each board (variant) defines its own FW config and no longer relies on baseboard definitions. BRANCH=none BUG=b:180434685 TEST=USB C1 port still works on brya for PD charging and SS data Change-Id: I055b0e2b051b7d41bbe116455274fe8b4a785741 Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2837417 Reviewed-by: Keith Short <keithshort@chromium.org>
* brya: Enable EC hibernate using PSLCaveh Jalali2021-04-133-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | This adds the wake source pin definitions needed by the NPCX9 chip support code for brya board ID 1. Note that board ID 1 needs a rework on VCC1_RST to prevent it from falsely waking the board. BRANCH=none BUG=b:183246197 TEST=booted same image on old and new rev. of board Used "hibernate" on EC console hibernate the system. It woke up immediately (b/183412004) with cause "hibernate" indicating this was a PSL wake: --- UART initialized after reboot --- [Image: RO, brya_v2.0.8357-19a8f337db 2021-04-08 01:09:30 caveh@caveh] [Reset cause: power-on hibernate wake-pin] LID_OPEN was tested as a PSL wake source by artificially disabling CONFIG_HIBERNATE_PSL_VCC1_RST_WAKEUP to eliminate VCC1 as a false wake source. Change-Id: If4cca6d1e20ddc3c422697e6838c9df0ddd8cb15 Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2728679 Reviewed-by: Furquan Shaikh <furquan@chromium.org>
* brya: Reset SLP VW signals on EC-AP eSPI resetCaveh Jalali2021-03-251-0/+2
| | | | | | | | | | | | | | | | | | | | This enables an option for the NPCX eSPI support code to reset SLP signals when eSPI# is asserted because of a global reset. This is needed exclusively on platforms that do not use deep Sx. The EC console apshutdown command forces the AP into G3 but the SLP_S4 signal is not reset in this case as virtual wire signals are not reset on ungraceful AP shutdown (global reset). BRANCH=none BUG=b:179977907 TEST=With the config defined, used EC "powerinfo" command to observe the SLP_S4 virtual wire is now reset after "apshutdown" command. Change-Id: I828f8c69657c4884629d0ca07f0ac1662aff57f0 Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2771141 Reviewed-by: Furquan Shaikh <furquan@chromium.org>
* brya: enable EFS2Caveh Jalali2021-03-231-0/+1
| | | | | | | | | | | | | | | This enables EFS2 on brya. BRANCH=none BUG=b:183165732 TEST=the GSC returns a hash mismatch (expected). Change-Id: I9af09c7d03255e448aadc5462ced261ae4cd6dc2 Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2774717 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Furquan Shaikh <furquan@chromium.org>
* brya: Enable battery manuf access commandCaveh Jalali2021-03-181-0/+1
| | | | | | | | | | | | | | | | This enables the smart battery manufacturer access command. BRANCH=none BUG=b:180784200 TEST=able to dump OperationStatus register: > battmfgacc 0x54 0x44 data[MSB->LSB]=0x00 00 01 87 > Signed-off-by: Caveh Jalali <caveh@chromium.org> Change-Id: I8a3375dbf86f4f3a0cda70d98789117684bc086e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2766486 Reviewed-by: Keith Short <keithshort@chromium.org>
* brya: Fix battery wake-up logicCaveh Jalali2021-03-181-25/+11
| | | | | | | | | | | | | | | | | | | | | | This fixes a circular dependency in waking up a battery after cut-off (ship mode). Previously, we would report the battery as not present when we failed to talk to the battery. This would prevent the charger task from attempting to wake up the battery (i.e. enable pre-charge current). Without pre-charge current, we can not talk to a cut-off battery and would never be able to satisfy the conditions required to turn on the battery. The solution is to report BP_NOT_SURE back to the charger state machine so that it enters the pre-charge state when we can not talk to the battery. BRANCH=none BUG=b:180784200,b:181842699 TEST=cutoff battery from EC and reboot, observe battery wakes up. Change-Id: Ib63167626dd7def685379fe718b3fadd043a341b Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2766484
* brya: enable CONFIG_FPUCaveh Jalali2021-03-171-0/+1
| | | | | | | | | | | | | | This enables FPU support on the EC. BRANCH=none BUG=b:173575131 TEST=booted on brya Change-Id: I2604866d31f865541f6177979018cb50170cfdc3 Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2762299 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* brya: Enable tablet modeBoris Mittelberg2021-03-121-0/+7
| | | | | | | | | | | | | Enable GMR sensor and tablet mode for Brya. BRANCH=none BUG=b:181368071 TEST=buildall passes, manually tested with a magnet Signed-off-by: Boris Mittelberg <bmbm@google.com> Change-Id: I3d408e6b6bdd2bc5da81203c0c4e80c2ff367c05 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2737240 Reviewed-by: Furquan Shaikh <furquan@chromium.org>
* brya: Enable LEDsBoris Mittelberg2021-03-121-0/+3
| | | | | | | | | | | | | Enable control of right and left LEDs, display charging status. BRANCH=none BUG=b:182329831 TEST=buildall passes, manual test with ectool Signed-off-by: Boris Mittelberg <bmbm@google.com> Change-Id: I1463102924a6300843f3381e1b66d88ae0096157 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2752345 Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
* brya: Enable MKBP supportFurquan Shaikh2021-03-101-0/+3
| | | | | | | | | | | | | | | | | | | | | | | This change enables MKBP support by selecting the following configs: * CONFIG_MKBP_EVENT * CONFIG_MKBP_USE_GPIO - This is selected instead of CONFIG_MKBP_USE_GPIO_AND_HOST_EVENT because GPIO_EC_INT_L is also the wake pin for brya. Additionally, GPIO_EC_INT_L is defined to allow mkbp driver to trigger interrupt to AP for tight timestamps. BUG=b:173575131 BRANCH=None TEST=make -j buildall Signed-off-by: Caveh Jalali <caveh@chromium.org> Signed-off-by: Furquan Shaikh <furquan@google.com> Change-Id: Ia755671d943576ecd8da3a76260c8b87d2ab35ef Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2747460 Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Commit-Queue: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org>
* brya: Add some AP related configsFurquan Shaikh2021-03-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | | This change enables the following AP related configs: 1. CONFIG_CMD_AP_RESET_LOG: Enables support for reporting reset logs to AP. 2. CONFIG_HOSTCMD_AP_RESET: Enables host command that AP can use to request EC to trigger chipset reset. This was used on boards like Dedede and Volteer to address a cr50 strap change issue. This issue might not really apply to brya, but having this host command available shouldn't hurt. BUG=b:173575131 BRANCH=None TEST=make -j buildall Signed-off-by: Caveh Jalali <caveh@chromium.org> Signed-off-by: Furquan Shaikh <furquan@google.com> Change-Id: I44fda98999a93a3bb4a5414adc18c5d734dd6a4d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2747711 Commit-Queue: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
* brya: add chargen to the set of CLI commandsFurquan Shaikh2021-03-101-0/+3
| | | | | | | | | | | | | | | | This is needed to support CCD testing of UART to USB bridging. BUG=b:173575131 BRANCH=None TEST=make -j buildall Signed-off-by: Caveh Jalali <caveh@chromium.org> Signed-off-by: Furquan Shaikh <furquan@google.com> Change-Id: Id183b96dd1f2689f03ed0c09b70d91ca5efccb94 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2747708 Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Commit-Queue: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org>
* brya: Control display backlight based on state of lid switchFurquan Shaikh2021-03-101-0/+3
| | | | | | | | | | | | | | | | | | This change enables CONFIG_BACKLIGHT_LID so that the EC disables the panel backlight when lid is closed. GPIO_ENABLE_BACKLIGHT is defined to allow common code to control the required GPIO. BUG=b:173575131 BRANCH=None TEST=make -j buildall Signed-off-by: Caveh Jalali <caveh@chromium.org> Signed-off-by: Furquan Shaikh <furquan@google.com> Change-Id: I3c54287d716b66696cb41ba4433a9d704f01f674 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2747707 Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Commit-Queue: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org>
* brya: Add workaround for CR50 double resetFurquan Shaikh2021-03-101-0/+3
| | | | | | | | | | | | | | | | | | | | | This change enables workaround required for cr50 double reset. Copying commit message from dedede: Hold the EC on the initial power on until the CR50 resets it; this preserves the power on flag for the first boot, which is important when we are deciding if we want to reset the USB-C PD contract. BUG=b:173575131 BRANCH=None TEST=make -j buildall Signed-off-by: Caveh Jalali <caveh@chromium.org> Signed-off-by: Furquan Shaikh <furquan@google.com> Change-Id: I2b3411fc540e54ecc185b46f7f9d7e3bb1075847 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2747706 Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Commit-Queue: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org>
* brya: Enable link time optimizationFurquan Shaikh2021-03-101-0/+1
| | | | | | | | | | | | | | | | | | This change enables link time optimization for brya by selecting CONFIG_LTO. This option saves ~10KiB of flash space in RO and RW each. BUG=b:173575131 BRANCH=None TEST=make -j buildall Signed-off-by: Caveh Jalali <caveh@chromium.org> Signed-off-by: Furquan Shaikh <furquan@google.com> Change-Id: I9891851e34af50b486f06ea48872513d9f39b75e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2747419 Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Commit-Queue: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org>
* brya: Enable verified boot related configsFurquan Shaikh2021-03-101-0/+5
| | | | | | | | | | | | | | | | | | | | | | This change enables the following verified boot related configs for brya: * CONFIG_VBOOT_HASH * CONFIG_VSTORE * CONFIG_VSTORE_SLOT_COUNT Since brya hasn't yet enabled EFS2, config for VBOOT_EFS2 is skipped. BUG=b:173575131 BRANCH=None TEST=make -j buildall Signed-off-by: Caveh Jalali <caveh@chromium.org> Signed-off-by: Furquan Shaikh <furquan@google.com> Change-Id: I32c0986a48b427e2843a980a5fa534e029c8a709 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2747418 Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Commit-Queue: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org>
* brya: Enable switch supportFurquan Shaikh2021-03-101-1/+2
| | | | | | | | | | | | | | | | | This change enables switch support for baseboard brya by defining CONFIG_SWITCH. BUG=b:173575131 BRANCH=None TEST=make -j buildall Signed-off-by: Caveh Jalali <caveh@chromium.org> Signed-off-by: Furquan Shaikh <furquan@google.com> Change-Id: Ie8400bbe174fc3662282534f4027513e8c44b220 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2747417 Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Commit-Queue: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org>
* Brya: Add usb_pd_policyCaveh Jalali2021-03-103-0/+266
| | | | | | | | | | | | | | | This adds the USB PD policy support code. BRANCH=none BUG=b:173575131 TEST=with reset of CQ-Depend patches, brya can charge using PD Change-Id: I55b2b0a9a68adf0eaa7ac95be0c6d9136adb6366 Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2700317 Commit-Queue: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* Brya: Enable charger chipCaveh Jalali2021-03-103-0/+109
| | | | | | | | | | | | | | This adds the charger chip support code. BRANCH=none BUG=b:173575131,b:180784200 TEST=with reset of CQ-Depend patches, brya boots to AP Change-Id: I1b220376cb03197e13aad65f1e79692eaf8fb1e1 Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2700316 Commit-Queue: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org>
* Revert "brya: Enable AP throttling"Furquan Shaikh2021-03-051-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit e4eb9d80a7ea176df7d4fa423b47ee5da9d41200. Reason for revert: Redefinition of same configs. Original change's description: > brya: Enable AP throttling > > This enables the AP throttling feature. > > BRANCH=none > BUG=b:173575131 > TEST=buildall passes > > Signed-off-by: Caveh Jalali <caveh@chromium.org> > Change-Id: I5907b1fd3b3638212985c2e89ef99979c02d8c05 > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2738396 > Reviewed-by: Furquan Shaikh <furquan@chromium.org> Bug=b:173575131 BRANCH=None TEST=None Change-Id: I19fc7a6f63c55553c853c91225b275c2b315fd95 Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2739856 Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Commit-Queue: Tim Wawrzynczak <twawrzynczak@chromium.org> Tested-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Auto-Submit: Furquan Shaikh <furquan@chromium.org>
* brya: Enable physical volume buttonsCaveh Jalali2021-03-051-0/+3
| | | | | | | | | | | | | | | This enables the config option for using physical volume up/down buttons. BRANCH=none BUG=b:173575131 TEST=buildall passes Signed-off-by: Caveh Jalali <caveh@chromium.org> Change-Id: Ib3bb088a88073bd80742e35d0b8a819100163351 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2738398 Reviewed-by: Furquan Shaikh <furquan@chromium.org> Commit-Queue: Furquan Shaikh <furquan@chromium.org>
* brya: Enable RTC resetCaveh Jalali2021-03-051-0/+2
| | | | | | | | | | | | | This enables the RTC reset feature of the SoC. BRANCH=none BUG=b:173575131 TEST=buildall passes Change-Id: I29f7599fea831dd5751c5609b4e974059a8be2e7 Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2738918 Reviewed-by: Furquan Shaikh <furquan@chromium.org>
* brya: Enable power buttonCaveh Jalali2021-03-051-0/+2
| | | | | | | | | | | | | This enables the power button feature form the EC to the SoC. BRANCH=none BUG=b:173575131 TEST=buildall passes Change-Id: Ife5eaa37d269ab4fa5a72be4fec1dec7c4536749 Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2738917 Reviewed-by: Furquan Shaikh <furquan@chromium.org>
* brya: Enable AP throttlingCaveh Jalali2021-03-051-0/+5
| | | | | | | | | | | | | This enables the AP throttling feature. BRANCH=none BUG=b:173575131 TEST=buildall passes Signed-off-by: Caveh Jalali <caveh@chromium.org> Change-Id: I5907b1fd3b3638212985c2e89ef99979c02d8c05 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2738396 Reviewed-by: Furquan Shaikh <furquan@chromium.org>
* brya: Configure chipset supportCaveh Jalali2021-03-051-2/+7
| | | | | | | | | | | | | This enables additional chipset configurations for brya. BRANCH=none BUG=b:173575131 TEST=buildall passes Change-Id: Ie8c090ceea14e20d005ddd9a5451d7bcbddc9947 Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2738916 Reviewed-by: Furquan Shaikh <furquan@chromium.org>
* brya: Remove duplicate keyboard support definesCaveh Jalali2021-03-051-12/+0
| | | | | | | | | | | | | | This removes some duplicate keyboard defines that crept in from splitting larger patches and merging. sorry. BRANCH=none BUG=b:173575131 TEST=buildall passes Signed-off-by: Caveh Jalali <caveh@chromium.org> Change-Id: I541da5ea29477fbaaacb7467fdb98156670e1ec3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2738915 Reviewed-by: Furquan Shaikh <furquan@chromium.org>