Commit Graph

248 Commits

Author SHA1 Message Date
Jeremy Soller
f36b38a7b2 Make KEYMAP's __xdata so they can be edited at runtime 2020-09-29 19:42:05 -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
Tim Crawford
297ae4885a board/system76: Set battery thresholds per board 2020-09-04 10:17:21 -06:00
Jeremy Soller
db6e85eb56 Add ACPI thermal interface 2020-09-03 12:06:09 -06:00
Tim Crawford
70e6476208 power: Enable Wake-on-LAN 2020-08-28 13:23:54 -06:00
Jeremy Soller
834aaf97e4 Hot-pluggable parallel port debugging 2020-07-02 12:53:36 -07:00
Jeremy Soller
42e88d03b3 Move most code in system76 boards into system76/common 2020-06-24 17:43:39 -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
Jeremy Soller
b4e1346edb Remove power on after flashing support - BRAM is not persisted through AC disconnects 2020-04-09 09:18:25 -06:00
Jeremy Soller
65ba339fb5 Sync fan changes to darp5/galp3-c 2020-04-08 12:15:55 -06:00
Tim Crawford
d05607475c Add missing header for BRAM 2020-04-08 08:58:59 -06:00
Jeremy Soller
1194472b8f Add power on after reset flag 2020-04-07 21:11:49 -06:00
Jeremy Soller
ff639a7836 Set fan to 100% when in scratch ROM 2020-04-06 14:19:11 -06:00
Jeremy Soller
dc246237c6 Add a watchdog timer of 10 seconds when using scratch ROM 2020-04-06 14:11:57 -06:00
Jeremy Soller
e8f8daae1b Set input current limits 2020-04-05 10:34:25 -06:00
Jeremy Soller
d901907942 Sync changed between system76 boards 2020-04-05 08:47:24 -06:00
Jeremy Soller
32055d825e Re-enable interpolation of duty cycle 2020-04-04 13:30:33 -06:00
Jeremy Soller
62a909ee81 Improve fan curve
- Implement fan cooldown and heatup periods
- Add fan get/set commands
- Fix compilation with logging level lower than debug
2020-04-04 07:30:05 -06:00
Jeremy Soller
4fdb9ecbdc Fix fan turning on when powering on or resuming from suspend 2020-04-01 20:03:09 -06:00
Tim Crawford
9bf09e211c kbscan: Ignore key presses with ghost keys 2020-03-31 13:40:56 -06:00
Tim Crawford
ebcd545746 kbscan: Add function to read row from matrix 2020-03-31 13:40:56 -06:00
Jeremy Soller
d96147688d Fix calculation of S3 power state, remove S4 power state 2020-03-17 12:49:11 -06:00
Jeremy Soller
7fbad82088 Improve power handling to eliminate lockups 2020-03-17 11:12:59 -06:00
Jeremy Soller
8a8ab165a7 Improve print command 2020-03-14 21:06:18 -06:00
Jeremy Soller
606421abd1 Add console_external target 2020-03-14 20:40:44 -06:00
Tim Crawford
e5afb927b8 system76/*: Add parport logging
Add a build-time option to configure the parallel port for logging
instead of using it as a keyboard.
2020-03-06 11:15:58 -07:00
Jeremy Soller
364b7c3af8 Rename flash targets 2020-03-02 14:11:57 -07:00
Jeremy Soller
a24f9ed3ae Cleanup use of scratch rom for SPI flashing, prepare to implement no-reset flashing process 2020-02-27 13:21:04 -07:00
Jeremy Soller
68b9acd249 Add ability to flash backup rom 2020-02-26 13:43:31 -07:00
Jeremy Soller
657437e1ce Faster flashing with SMFI (#32)
* WIP: support for new flashing API

* Add SPI flashing support to tool

* Add timeouts when flashing with ectool

* Test SPI reading

* Use chunks for SPI commands

* Sanity test of flash size

* Read rom in sectors

* Relocate memmap region, remove PMC3

* Use ectool to flash

* Remove debugging of spi command

* Fix flashing over smfi
2020-02-26 09:04:40 -07:00
Tim Crawford
a176da0ebe kbc: Handle setting typematic rate/delay
Per [1], use a default delay of 500ms and a rate of 10.9 CPS. When the
Linux kernel starts, this will be updated by atkbd to the fastest
settings possible [2]: 250ms delay and 30 CPS.

Modifying these values with kbdrate to test settings will cause two
spurious ACKs in the kernel. This behavior is also present in the
proprietary firmware.

[1]: https://web.archive.org/web/20180217074705/http://computer-engineering.org/ps2keyboard/
[2]: c5f8689118/drivers/input/keyboard/atkbd.c (L863-L868)
2020-02-25 14:21:10 -07:00
Tim Crawford
a8f921fcab kbscan: Implement key repeat 2020-02-25 13:28:09 -07:00
Jeremy Soller
316895bdea Use ectool for console 2020-02-24 14:10:52 -07:00
Jeremy Soller
f1cf00bdb8 Do not spin in scratch PMC handling 2020-02-24 14:08:16 -07:00
Jeremy Soller
83c224c229 Decrease pmc latency 2020-02-24 09:45:10 -07:00
Jeremy Soller
130ab9d61f Add power_on_s5 for DEEP_SX to darp5 and galp3-c 2020-02-24 09:07:35 -07:00
Jeremy Soller
aa065f0a05 Fix double setting of low keyboard outputs 2020-02-24 09:07:02 -07:00
Tim Crawford
3014fb3a41 Wake from S3 using any key 2020-02-24 07:04:19 -07:00
Tim Crawford
0379c6ed35 power: Add more state transitions 2020-02-24 06:51:27 -07:00
Tim Crawford
3f5c3ead01 power: Make power state global 2020-02-24 06:51:27 -07:00
Tim Crawford
d08bfc8fdd pmc: Reduce logs from DEBUG to TRACE 2020-02-24 06:51:27 -07:00
Jeremy Soller
277ad664a2 Make PMC handling slightly faster 2020-02-21 20:34:29 -07:00
Jeremy Soller
d16ecc6129 Fix test for when to update battery and fan state, hold SCI_N for longer 2020-02-21 20:30:10 -07:00
Carl Richell
ff9f3fe710 Carl layout 2020-02-18 14:54:00 -07:00
Jeremy Soller
db698ee6d9 Lower fan frequency, simplify fan curve 2020-02-17 20:50:34 -07:00
Jeremy Soller
fa8447cd4d Remove unnecessary PMC burst loop 2020-02-17 14:38:01 -07:00
Jeremy Soller
ebcb6af3f5 Merge branch 'master' of https://github.com/system76/ec 2020-02-17 14:19:12 -07:00
Jeremy Soller
ac4d15b395 Use state machine instead of timeout in PMC code 2020-02-17 14:19:05 -07:00
Jeremy Soller
1e20303851 Fix battery indicator when charged 2020-02-17 13:46:39 -07:00