Commit Graph

853 Commits

Author SHA1 Message Date
ba5438a79a Update power state prior to using PECI 2023-04-03 13:06:16 -06:00
55df52a013 Remove unnecessary code from espi_event 2023-04-03 13:06:16 -06:00
cb8e0971c6 PECI ESPI timeout of 10ms 2023-04-03 13:06:16 -06:00
34ef03b19a Fix ESPI vw_get and vw_set 2023-04-03 13:06:16 -06:00
33eaef2dd0 Reorder power plane detection 2023-04-03 13:06:16 -06:00
0d438a3314 Make sure power_state is S0 before attempting PECI 2023-04-03 13:06:16 -06:00
962d55309a Gate peci_available on ESPI availability 2023-04-03 13:06:16 -06:00
fc1fda0725 Use EC_RSMRST# for S5 detection on eSPI systems as well 2023-04-03 13:06:16 -06:00
35d3c4f161 Fix style 2023-04-03 13:06:16 -06:00
6b80721138 oryp11: set prochot the right way 2023-04-03 13:06:16 -06:00
a0c81f6304 Improvements for determining CPU state using virtual wires 2023-04-03 13:06:16 -06:00
4e11f6220b Fix comparisons of vw_get values 2023-04-03 13:06:16 -06:00
cea89a78d8 Use ESPI VW signals wherever possible 2023-04-03 13:06:16 -06:00
a5a677ee63 oryp11: fix some GPIO configuration 2023-04-03 13:06:16 -06:00
8c52a51af1 addw3: fix some GPIO configuration 2023-04-03 13:06:16 -06:00
cda67e6d1e Fix stalls in getting PECI information over eSPI 2023-04-03 13:06:16 -06:00
9abd9d853a common: peci: WIP peci_get_temp over espi 2023-04-03 13:06:16 -06:00
83f40c643f ite: Add more eSPI registers 2023-04-03 13:06:16 -06:00
95a654aaff common: peci: Remove extra shift in peci_get_temp 2023-04-03 13:06:16 -06:00
53f22a6658 common: Break out PECI GetTemp logic, prepare for PECI over ESPI 2023-04-03 13:06:16 -06:00
c8df652723 Rename gaze18-3050 to gaze18 2023-04-03 13:06:16 -06:00
9c59871986 Rename gaze18-40x0 to addw3 2023-04-03 13:06:16 -06:00
cd3e5ac329 Rename addp3 to oryp11 2023-04-03 13:06:16 -06:00
d68a42180b Rename oryp11 to serw13 2023-04-03 13:06:16 -06:00
55f961406c addp3: Use virtual wire for calculating power state 2023-04-03 13:06:16 -06:00
db10c198b3 addp3: Add new board 2023-04-03 13:06:16 -06:00
c7bc078cbd gaze18-3050: Fix GPIOs for power sequence
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-04-03 13:06:16 -06:00
60f9cfc8d6 gaze18-3050: Add new board
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-04-03 13:06:16 -06:00
e4542d2aa5 oryp11: Adjust fan points
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-04-03 13:06:16 -06:00
e4d7196b5c oryp11: Increase AC power limit to 280W
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-04-03 13:06:16 -06:00
d723e2e13d gaze18-40x0: Fix prochot polarity 2023-04-03 13:06:16 -06:00
ff7d7138b0 Support power limits above 256W 2023-04-03 13:06:16 -06:00
8bd3b49273 gaze18-40x0: gpio fixes 2023-04-03 13:06:16 -06:00
213f79e2b6 oryp11: Add new board
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-04-03 13:06:16 -06:00
bc111b7a4b gaze18-40x0: Let PCH handle panel 2023-04-03 13:06:16 -06:00
ef6ea32c37 Add gaze18-40x0 2023-04-03 13:06:16 -06:00
1046dd7aec Update Rust toolchain to 2023-01-21
Update the toolchain and deps, and use the sparse registry access.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-02-18 06:28:21 -07:00
96b2d78c2e Remove PMC hack for S0ix
Whatever the issue was appears to be fixed after rebasing coreboot on
the 4.19 release. lemp11 has successfully reached S0ix with SLP_S0#
asserted when booted on battery power for 100 cycles.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-02-18 06:27:17 -07:00
ddb19e8738 ec/ite: Add Wake-Up Control registers
Groups 1, 3, and 4 require explicitly enabling the wake-up function
before unmasking them in INTC.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-02-07 10:47:24 -07:00
084aefd506 ec/ite: Add Interrupt Controller registers
- IT8587E has groups 0-18
- IT5570E has groups 0-21
- IT81202E has groups 0-23

Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-02-07 10:47:24 -07:00
59c386ec12 Move gpio_debug from board to EC code
The gpio_debug() functionality depends on the ITE registers and not
anything board-specific.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-01-23 14:26:30 -07:00
f687000a4f ci: Install deps before running lints
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-01-18 13:52:14 -07:00
7205f1a49e Add shellcheck lint
Run shellcheck [1] on the bash files.

[1]: https://www.shellcheck.net/

Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-01-18 13:52:14 -07:00
623d3ce8ab make: Add new targets
- fmt: Apply clang-format
- list-boards: list of available build targets
- help: Short description of make targets

Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-01-18 13:52:14 -07:00
58f9ed4051 Run lints at pre-commit
Install a hook to run lints at pre-commit to force issues to be fixed
during development.

This introduces a 5-10 second delay when committing due to how slow
clang-format is.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-01-18 13:52:14 -07:00
1aadc68257 scripts: Rewrite lint scripts
Rewrite lint scripts to report what they do and if they pass. In the
case they fail list the files that caused the failure, except for
clang-format, which will be slow to run of every file individually
(should just run `make fmt` anyway). Also add a script to run all the
lints in order with a single command.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-01-18 13:52:14 -07:00
b03c960b4f make: Reduce build output
Default to silent builds, only outputting the file being generated. This
gives output similar to Linux/coreboot output when building. `VERBOSE=1`
can be passed to show the actual commands.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-01-18 12:18:31 -07:00
2056d4d5e0 make: Disable built-in rules and variables
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-01-18 12:18:31 -07:00
9a52042f95 Generate and use compiler dep rules
SDCC supports the `-MMD` option. Use it instead of having every file
depend on *all* the headers. Reduces incremental build time after
modifying headers as it will now only rebuild the actual dependents and
not the entire project.

Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-01-18 12:18:31 -07:00
84fe76cad4 avr: Fix compiling with GCC 12
Compiling the Arduino targets with GCC 12 fails with the following:

    error: array subscript 0 is outside array bounds of 'volatile uint8_t[0]' {aka 'volatile unsigned char[]'} [-Werror=array-bounds]

Apply the workaround from the bug discussion to fix it.

Ref: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105523
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2023-01-13 12:10:49 -07:00