1106 Commits

Author SHA1 Message Date
Michał Iwanicki
6d9d6cf632 scripts/deps.sh: Add hidapi-devel required by hidapi crate
Signed-off-by: Michał Iwanicki <michal.iwanicki@3mdeb.com>
2026-01-12 14:37:01 +01:00
iwanicki92
362d0d4f60 tool: firmware.rs: return slice directly instead of Option
Signed-off-by: iwanicki92 <iwanicki92@gmail.com>
2026-01-12 14:37:01 +01:00
Michał Iwanicki
a30c39b2db tool: main.rs: allow flashing firmware bigger than 128 kB with --force
Signed-off-by: Michał Iwanicki <michal.iwanicki@3mdeb.com>
2026-01-12 14:37:01 +01:00
iwanicki92
4fb0488044 tool: firmware.rs: return empty slice instead of None
That way Firmware can be unwrapped and still used in the rest of code
without any modifications.
Board and version will contain empty slices:

```
file board: Ok("")
file version: Ok("")
```

Signed-off-by: iwanicki92 <iwanicki92@gmail.com>
2026-01-12 14:37:01 +01:00
iwanicki92
386f77b854 tool: firmware.rs: deal with edge key detection case
Before, key detection would fail if the byte preceding searched for
key had the same value as the first byte of the searched key.

Signed-off-by: iwanicki92 <iwanicki92@gmail.com>
2026-01-12 14:37:01 +01:00
Michał Kopeć
af6bd04d68 common/power.c: Reset USB-PD on host reset
This improves device detection after a reboot with the Wavlink UMD05 Pro
USB-C docking station (Rev. E).

Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
novacustom_v54x_mtl_igpu_v1.0.1-rc3 novacustom_v56x_mtl_dgpu_v1.0.0-rc10 novacustom_v54x_mtl_dgpu_v1.0.0-rc10 novacustom_v56x_mtl_igpu_v1.0.1-rc3 novacustom_ns5x_adl_v1.8.0-rc4 novacustom_nv4x_adl_v1.8.0-rc4 novacustom_v56x_mtl_dgpu_v1.0.0-rc9 novacustom_v54x_mtl_dgpu_v1.0.0-rc9 novacustom_v56x_mtl_igpu_v1.0.1-rc2 novacustom_v54x_mtl_igpu_v1.0.1-rc2 novacustom_v54x_mtl_dgpu_v1.0.0 novacustom_v54x_mtl_igpu_v1.0.1 novacustom_v56x_mtl_dgpu_v1.0.0 novacustom_v56x_mtl_igpu_v1.0.1
2025-10-31 12:48:19 +01:00
Michał Kopeć
48858004a5 usbpd/tps65987.c: fall back to default charger current
Fall back to the default CHARGER_INPUT_CURRENT in case usbpd
communication failed and we could not determine the actual charger
power.

Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
2025-10-28 13:45:49 +01:00
Michał Kopeć
7986b037f9 common/usbpd/tps65987.c: downgrade USB-PD power efficiency coefficient
V540TU is hitting overcurrent protection with Wavlink UMD05 Pro 60W
dock / power supply while booted into Windows. Reduce the input power
again to make sure we don't cross over the OCP threshold.

Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
2025-10-20 13:14:21 +02:00
Michał Kopeć
7e1b941d35 common/{dgpu,peci}.c: increase board heatup size
This restores results in similar behabior to v0.9.0 where it takes a
much longer time for the fans to spin up, resulting in a quieter laptop
during bursty CPU loads.

Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
novacustom_v54x_mtl_dgpu_v1.0.0-rc8 novacustom_v54x_mtl_igpu_v1.0.1-rc1 novacustom_v56x_mtl_dgpu_v1.0.0-rc8 novacustom_v56x_mtl_igpu_v1.0.1-rc1
2025-10-03 15:48:03 +02:00
Michał Kopeć
b2e45e936e common/usbpd/tps65987.c: fix typo - Occured -> Occurred
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
novacustom_v56x_mtl_igpu_v1.0.0 novacustom_v54x_mtl_igpu_v1.0.0 novacustom_v56x_mtl_dgpu_v1.0.0-rc7 novacustom_v54x_mtl_dgpu_v1.0.0-rc6 novacustom_v54x_mtl_dgpu_v1.0.0-rc7 novacustom_v54x_mtl_igpu_v1.0.0-rc6 novacustom_v56x_mtl_igpu_v1.0.0-rc7 novacustom_v56x_mtl_igpu_v1.0.0-rc6 novacustom_v54x_mtl_igpu_v1.0.0-rc7 novacustom_v56x_mtl_dgpu_v1.0.0-rc6
2025-08-29 11:55:58 +02:00
Michał Kopeć
95b756dff2 common/power.c: Keep USB power on while system is shut off and on AC
This prevents suddenly removing power from the PD controller, which does
not like such events if a USB-C device is connected. When that happens,
the PD controller may glitch, causing
https://github.com/Dasharo/dasharo-issues/issues/1505

To avoid this, simply keep the USB power plane on while the system is on
AC power. This has the side effect of enabling Always On USB always
enabled when on AC power, but does not affect the function while on
battery power only.

Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
2025-08-29 11:55:58 +02:00
Michał Kopeć
b523742f7d usbpd: add PDC mode watchdog
As noted in issue https://github.com/Dasharo/dasharo-issues/issues/1505,
the PDC may sometimes get into a weird mode from which it can only
recover by issuing a cold reset. Add a watchdog that monitors the PDC
operational mode and kicks it if it has been in an unknown mode for more
than 1 second.

Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
novacustom_v56x_mtl_dgpu_v1.0.0-rc5 novacustom_v54x_mtl_dgpu_v1.0.0-rc5 novacustom_v54x_mtl_igpu_v1.0.0-rc5 novacustom_v56x_mtl_igpu_v1.0.0-rc5
2025-08-07 17:53:01 +02:00
Michał Kopeć
16f19dfe68 keyboard/system76/14in_83/keymap: fix up scancodes for Pause and ScrLk
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
2025-08-07 17:30:56 +02:00
Filip Lewiński
85864cbad6 Merge pull request #72 from Dasharo/hibernation
board/system76/common: Support the S4 power state
novacustom_v54x_mtl_igpu_v1.0.0-rc4 novacustom_v54x_mtl_dgpu_v1.0.0-rc4 novacustom_v56x_mtl_dgpu_v1.0.0-rc4 novacustom_v56x_mtl_igpu_v1.0.0-rc4
2025-07-29 09:08:42 +02:00
Michał Kopeć
a3b02b255a board/system76/common: Support the S4 power state
Add support for the S4 power state, and handle it properly, which in
contrast to S5, does not power off the platform. In this state, more
wake sources are available, like rtcwake.

Make sure the power LED is off while in S4, same as in S5.

Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
2025-07-28 15:47:42 +02:00
Michał Kopeć
c54624422f board/s76/cmn/acpi.c: make CPU_FAN2 and HAVE_DGPU mutually exclusive
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
2025-04-25 13:07:51 +02:00
Michał Kopeć
d3c253dae1 Revert "common/main.c: increase fan polling interval"
This reverts commit 7cb1739ce2.

It was not polling that was causing the GPU to throttle, there was
correlation, but not causation

Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
2025-04-25 13:07:51 +02:00
Michał Kopeć
a8e2619680 Dual CPU fan fixes
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
2025-04-25 13:07:51 +02:00
Michał Kopeć
55a4db9d22 board/s76/cmn/usbpd: bump efficiency factor to 93%
85% was overly aggressive, 93% is closer to what is observed on the
usb-c power meter.

Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
novacustom_v54x_mtl_igpu_v0.9.3-rc2 novacustom_v56x_mtl_dgpu_v0.9.3-rc2 novacustom_v56x_mtl_igpu_v0.9.3-rc2 novacustom_v54x_mtl_dgpu_v0.9.3-rc2
2025-04-08 16:20:30 +02:00
Michał Kopeć
9d88f7c89d novacustom mtl-h igpu: set correct Psys gain
Psys gain determines microamps per watt on the analog Psys signal. It
needs to be programmed correctly depending on Rpsys resistor impedance
and the desired PsysPmax. Therefore program it correctly as per
schematics, page B-40.

Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
2025-04-08 16:18:16 +02:00
Michał Kopeć
38baf30c82 tool/src/access/lpc/linux.rs: add new Dasharo device ID
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
2025-04-04 10:23:59 +02:00
Michał Kopeć
48dad9b3ac board/s76/common: read Tjunction via PECI
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
2025-04-02 18:11:49 +02:00
Filip Lewiński
4ba3e4c17d Revert "board/system76/common/common.mk: enable debug build"
This reverts commit ecf1b19366.
2025-04-01 10:19:34 +02:00
Filip Lewiński
fc08946bdd board/system76/common/: remove additional debug prints
Signed-off-by: Filip Lewiński <filip.lewinski@3mdeb.com>
2025-03-31 09:32:22 +02:00
Filip Lewiński
ecf1b19366 board/system76/common/common.mk: enable debug build
Signed-off-by: Filip Lewiński <filip.lewinski@3mdeb.com>
2025-03-31 09:31:28 +02:00