Commit Graph

14 Commits

Author SHA1 Message Date
Tim Crawford
de546fa761 kbc: Add reset function
This function can be called after EC init to put the KBC into a known
working state.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-07-22 06:32:07 -06:00
Tim Crawford
373dc36676 kbc: Enable Transaction Done interrupt
Step 2 for data transmission (both RX and TX) is to enable the
Transaction Done interrupt.

Ref: IT5570 V0.3.2, 7.9.3.1 Hardware Mode Selected
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-04-03 13:06:16 -06:00
Tim Crawford
e032c5f0f2 Update .clang-format and apply
Update .clang-format for LLVM 14.0, available on Ubuntu 22.04.

There is still plenty that clang-format sucks at or does wrong, so
either add some more blocks to disable it, or just put up with it.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-01-10 12:02:21 -07:00
Tim Crawford
d687df482a Conditionally compile eSPI support
A board may use either the LPC bus or the eSPI bus. Only include eSPI
support for boards that use it.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-01-06 12:47:54 -07:00
Jeremy Soller
146f2d2b4a Implement scancode buffer 2021-07-19 14:52:07 -06:00
Jeremy Soller
1b539e1206 Make touchpad access non-blocking 2021-05-24 19:02:47 -06:00
Tim Crawford
285d622fbc kbc: Reduce timeout from 10ms to 1ms
Fix ACPI timeout and delay on S3 resume when holding a key.

A timeout greater than 1ms results in the excessive delay (~10s) still
occurring on an oryp5 (IT8587).
2021-05-14 15:06:50 -06:00
Jeremy Soller
fb6355f907 system76/common: Move touchpad handling to kbc_event 2021-01-05 12:17:16 -07:00
Jeremy Soller
31a908556b system76/common/kbc: Refactor to remove delays and improve readability 2021-01-05 12:17:16 -07:00
Jeremy Soller
80412e7a10 Rename K_E0 to KF_E0 (key flag E0) to aid in automatic layout generation 2020-09-29 19:42:05 -06:00
Jeremy Soller
c752097753 Add KBC 0xF6 command 2020-09-17 11:23:45 -06:00
Tim Crawford
5fd9df0ed0 Add SPDX license identifiers
Add license information to files. Mostly automated with:

    find src/ -name '*.[c,h]' | xargs sed -i '1s,^,// SPDX-License-Identifier: GPL-3.0-only\n\n,'
    find src/ -name '*.mk' | xargs sed -i '1s,^,# SPDX-License-Identifier: GPL-3.0-only\n\n,'
2020-09-17 09:17:08 -06:00
Jeremy Soller
39cd014f7b Addw2 support (#67)
* Add addw2 board

* Set charge params and update gpio.h

* Set VGA fan to 100% when entering scratch rom

* Implement keyboard LEDs

* Turn off keyboard LEDs in gpio defaults

* Default airplane mode LED to off

* Enable GPU power and fan control

* Add NVIDIA GPU power and temp to power.csv

* Add NVIDIA GPU fan value to power.sh

* Move GPU init back to coreboot

* Do not turn on GPU fan if GPU is off

* Show POST codes

* Add timestamps to console_external

* Accept port 81 cycles

* Move setting RSTS into ec_init

* Move post code debugging to system76/common

* Move some GPIO init from system76/common to boards

* Make some power signals optional

* Remove POST code support - it only works on IT5570
2020-06-04 13:22:59 -06:00
Jeremy Soller
357fae86fc System76 common board directory (#53)
* Move configuration for battery into board.mk

* lemp9: remove tcpm code

* Move touchpad to its own module

* Add kbled_reset to all platforms, move items to run on CPU reset to a function

* Add defines for battery and charger address

* Add I2C_0 export to it5570e

* Move common system76 board functions into src/board/system76/common
2020-04-14 17:23:29 -06:00