aboutsummaryrefslogtreecommitdiff
path: root/src/ec/google/wilco/chip.c
AgeCommit message (Collapse)Author
2019-12-19src/{drivers,device,ec}: Remove unused <stdlib.h>Elyes HAOUAS
Change-Id: I05422ee4b0aa5c02525ef0b4eccb4dc3ecf871e8 Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/32822 Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-06-07ec/google/wilco: Add UCSI supportDuncan Laurie
This change adds support for the UCSI specification in order to provide information about the Type-C port and an interface to perform power and data role swap. This change is split across the DSDT and SSDT, with the shared memory and operation region declared in the SSDT after being allocated in CBMEM. The OS will fill in the registers in the system memory region and then call the _DSM method wtih a read or write argument. The DSM method will copy the required registers to/from the system memory and the EC and perform the write or read action. Responses from the EC will generate a new SCI with event code 0x79 which will notify this UCSI ACPI device and the OS driver will take action to read status from the EC. BUG=b:131083691 Change-Id: I438a2bdfaf6720acd8354e0339dcef2844b63a4e Signed-off-by: Duncan Laurie <dlaurie@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/32357 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Furquan Shaikh <furquan@google.com>
2019-04-18ec/google/wilco: Send "logo displayed" progress codeDuncan Laurie
This progress code enables keyboard backlight control that otherwise would only work 30 seconds after boot. This code is already defined but it was not being sent by coreboot. It is run in the "post device" step between the other defined progress codes. BUG=b:130754032 Change-Id: Ica6c622e568cb236c17bf3edb6639d0177510846 Signed-off-by: Duncan Laurie <dlaurie@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/32348 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Lijian Zhao <lijian.zhao@intel.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2019-03-15ec/google/wilco: Clear S0ix support bit at bootDuncan Laurie
To ensure the power button functions as expected in firmware ensure that the EC is not in "S0ix supported OS" mode and expecting the power button to be handled by the virtual button interface. BUG=b:128409889 TEST=Verify that the power button works at the developer screen when the system is rebooted from within Chrome OS. Also ensure that it works when external warm reset signal is asserted by H1. Change-Id: Ic323515e3b8be08bac4f0f82e25f2f78c2f22833 Signed-off-by: Duncan Laurie <dlaurie@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/31903 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Furquan Shaikh <furquan@google.com>
2018-12-04ec/google/wilco: Turn camera power onDuncan Laurie
Send the EC command required to turn the camera power on and verify that it shows up on the USB bus. Change-Id: I9e9ba712a11cef85cde91ac21a4b6b5090ef58dc Signed-off-by: Duncan Laurie <dlaurie@google.com> Reviewed-on: https://review.coreboot.org/c/29987 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Furquan Shaikh <furquan@google.com>
2018-12-04ec/google/wilco: Enable WiFi radioDuncan Laurie
Add EC command to enable WiFi radio and send that command at startup. Tested to ensure WiFi is functional on a sarien board. Change-Id: Iac46895c7118567e1eb55ea33051a1662103b563 Signed-off-by: Duncan Laurie <dlaurie@google.com> Reviewed-on: https://review.coreboot.org/c/29673 Reviewed-by: Furquan Shaikh <furquan@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-10-31ec/google/wilco: Unmute audio on initDuncan Laurie
The speakers start up muted, and the EC must be told by the BIOS to unmute it. This helps prevent popping noises on boot/resume. Change-Id: I693f1d01e46e19362ef8fd0d5b3f4930967b5a12 Signed-off-by: Duncan Laurie <dlaurie@google.com> Reviewed-on: https://review.coreboot.org/29203 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-10-31ec/google/wilco: Save and restore PS/2 data for S3Duncan Laurie
Send a command to the EC on the way into S3 suspend state telling it to save the PS/2 data, and on resume send it a command for restoring the PS/2 data that was previously saved. Change-Id: Ic4b5d6d2656dbb1c476b9211b0d60c71b0cd7b32 Signed-off-by: Duncan Laurie <dlaurie@google.com> Reviewed-on: https://review.coreboot.org/29120 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-10-31ec/google/wilco: Report BIOS progress to the ECDuncan Laurie
The EC expects to receive updates about the BIOS boot progress. This is used for the EC logging to track system boot completeness. If the EC is not informed about BIOS progress it will turn the system off 30 seconds after the boot starts. Change-Id: I693c3930117db2b69a119aee0380d6f303c4881c Signed-off-by: Duncan Laurie <dlaurie@google.com> Reviewed-on: https://review.coreboot.org/29118 Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-10-31ec/google/wilco: Add devicetree chip infrastructureDuncan Laurie
Add a chip_operations structure for Wilco EC and hook it into the device tree so it can be initialized at boot. Reserve the device resources specified in Kconfig, which will also create the device IO windows if they have not been created in bootblock. If the IO windows already exist (becauase they were specified in the mainboard devicetree.cb) then this will find the existing entry instead. During device init stage prepare the keyboard for use, which is required for it to be functional in firmware and OS with this EC. Also send a command to the EC telling it to pass the power button through to the host for processing. Change-Id: I0adb01cf394f939f4a28aeb47fe4d0bcda5957d9 Signed-off-by: Duncan Laurie <dlaurie@google.com> Reviewed-on: https://review.coreboot.org/29117 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>