881 Commits

Author SHA1 Message Date
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>
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>
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>
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>
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
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>
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ć
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
Filip Lewiński
7873807c90 board/system76/common/dgpu.c: drive GPU_MUX_CTRL
Signed-off-by: Filip Lewiński <filip.lewinski@3mdeb.com>
2025-03-31 09:26:52 +02:00
Filip Lewiński
d5832a13a7 board/novacustom/v5*0tnx/gpio.c: define MUX_CTRL_BIOS
Signed-off-by: Filip Lewiński <filip.lewinski@3mdeb.com>
2025-03-24 11:12:46 +01:00
Filip Lewiński
45946f9fe6 board/system76/common: pprototype for driving the MUX_CTRL_BIOS pin
Signed-off-by: Filip Lewiński <filip.lewinski@3mdeb.com>
2025-03-21 21:48:29 +01:00
Michał Kopeć
50f8ede7fb board/system76/cmn/power.c: always power off in S5
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
2025-03-06 17:07:40 +01:00
Michał Kopeć
a61eef6f84 board/system76/common/options.c: disable AOU by default
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
2025-03-06 17:07:40 +01:00
Michał Kopeć
2d41d989e4 src/board: Set CC_EN to output high
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
2025-03-06 17:07:40 +01:00
Michał Kopeć
a06b8d0a65 src/board: remove pullups on USB_PWR_EN
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
2025-03-06 17:07:40 +01:00