As a follow up to c461e20df3 ("make: Remove version from build output
path"), only support building a single version of a single board by
default. The build directory can still be specified by passing `BUILD`.
Fixes running the `clean` target when `BUILD` is a custom value or
`BOARD` isn't set.
Fixes: b03c960b4f ("make: Reduce build output")
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Add timeouts to the legacy PECI implementation to prevent the EC locking
up when PECI stops working, such as during S0ix opportunistic suspend.
This is not the optimal solution, as PECI should not be available at all
to cause the lock up in the first place, but it at least prevents the
issue.
Signed-off-by: Tim Crawford <tcrawford@system76.com>
- Update toolchain to nightly-2023-09-07
- Update edition to 2021
- Update deps
`OpenHidDeviceError` is deprecated, and is removed in newer versions.
Replace it with `HidApiErrorEmpty`, because there are no descriptions
for what anything means so I just picked one that didn't require fields.
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Support building only a single version for a model. This removes the
need to determine the git commit hash and date in order to access build
artifacts.
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Some users are reporting that a debounce time of 5ms is not enough to
prevent keys from registering twice. Split the difference between the
old and the new debounce times and set it to 10ms.
Ref: https://github.com/system76/firmware-open/issues/471
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Implement a FnLock toggle that behaves as follows:
- Disabled: F1-F12 are normal
- Enabled: F1-F12 are the alternate function
Signed-off-by: Tim Crawford <tcrawford@system76.com>
If eSPI is used, use Virtual Wires to determine if PECI is available.
Fixes incorrectly reporting PECI as available on systems using S0ix, as
the CPU would be in C10 but `PLTRST#` would not be asserted.
Requires enabling `HOST_C10` reporting in FSP-S.
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Replace symlinks with directories with `board.mk`, using relative paths
to include the files rather than duplicate them.
This allows making board-specific changes without affecting other
boards, such as when firmware security had to be enabled on galp6 when
it was enabled on galp7 (2d5cbadf71).
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Remove checking against the real keys declared in the keymap. It appears
to have no effect on behavior.
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Use the default mode for reading the keyboard scan matrix when being
used as a keyboard. There should be no perceived change in behavior, but
should make the code easier to understand.
Note: `KSO[17:16]` are configured by `GPCRC` on boards that use them.
They are now set to alternate function to use in KBS mode rather than
GPIO mode, with the pull-up enabled to prevent them from floating when
configured as open-drain.
As part of this change, we now only read the hardware matrix state once
upfront, instead of on every iteration through the loop applying the
logic.
Tested by verifying that typing still works on darp9.
Signed-off-by: Tim Crawford <tcrawford@system76.com>
A single timer is used for debouncing all keys, so there is no reason to
perform any operations if the matrix is being debounced. Just return
early and remove some of the convoluted logic.
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Enable PWRSW WDT 2 and use the default timeout of 10 seconds.
Allows forcing an EC reset in case it gets into an invalid state.
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Set D6 and D7 to ALT to use as tachometers inputs from the fans.
Matches config for all other boards.
Ref: IT5570E V0.3.2 datasheet; 7.5.4 Alternate Function Selection
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Allows increased typing speed while avoiding repeating keys due to
contact bounce and keys being rejected by ghost key detection.
This is the default value for QMK.
Signed-off-by: Tim Crawford <tcrawford@system76.com>
From the man page:
%cs
committer date, short format (YYYY-MM-DD)
This is identical to what we use, without having to specify a custom
date format for it.
Signed-off-by: Tim Crawford <tcrawford@system76.com>
PRS3 is 0.005 Ohms.
However, I am unsure about this change because PRS1 and PRS2 are also
both 0.005 Ohms, but are in *parallel*.
Ref: bonw15 schematics, Charger (Sheet 70)
Signed-off-by: Tim Crawford <tcrawford@system76.com>
PRS1 is 5, but it is in series with PRS3, which is also 5. PRS1 by
itself is only connected to ACP/ACN.
Ref: oryp11 schematics, AC In Charger (Sheet 59)
Ref: serw13 schematics, AC_In, Charger (Sheet 70)
Signed-off-by: Tim Crawford <tcrawford@system76.com>
The PECI-over-eSPI implementation, like the legacy implementation, must
acknowledge when the transaction is done by clearing the bit in the
register.
Fixes a hang during shutdown on oryp11 after unplugging a TBT display.
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Despite the darp9 supporting an RGB backlit keyboard, the keyboard
option was removed and it ships with a white-only LED backlit keyboard
instead. The keypad `/` still has the cycle symbol printed on it, so
replace the color cycling function with the keyboard brightness
function used by other white-only LED keyboards (the 14" TKL ones).
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Replace the get+set logic with a step function to change the backlight
level for `K_KBD_BKL`.
Keyboards using a DAC have a different set of levels due to the
brightness difference between the keyboards.
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Make `white_dac` functions work based on the DAC power level like the
other I2C and PWM mechanisms, instead of preset values from an array.
Signed-off-by: Tim Crawford <tcrawford@system76.com>