Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add manual fan control #512

Merged
merged 2 commits into from
Jan 16, 2025
Merged

Add manual fan control #512

merged 2 commits into from
Jan 16, 2025

Conversation

crawfxrd
Copy link
Member

@crawfxrd crawfxrd commented Dec 31, 2024

Allow fan target duties to be set via ACPI or SMFI command. This will allow system firmware or OS to set fan duty, which can be used for testing or implementing user-defined fan tables.

Setting PWM via SMFI already existed, but would not work as the value would simply be overwritten by the EC.

RPM target is not supported.

Ref: system76/coreboot#245
Ref: system76/firmware-open#570
Ref: system76/firmware-open#571

crawfxrd added a commit to system76/coreboot that referenced this pull request Dec 31, 2024
system76/ec#512 added a manual fan control option.

In manual control mode, the system firmware or OS is responsible for
setting the fan target duty percent to manage thermals. Percent is used
rather than raw PWM value (as is returned in GFAN) as the EC may be
configured in such a way that the valid range is not 0-255.

Change-Id: Iba8cd5ac540f9fdc20473831787cafb6c1fd8129
Signed-off-by: Tim Crawford <[email protected]>
crawfxrd added a commit to system76/coreboot that referenced this pull request Dec 31, 2024
system76/ec#512 added a manual fan control option.

In manual control mode, the system firmware or OS is responsible for
setting the fan target duty percent to manage thermals. Percent is used
rather than raw PWM value (as is returned in GFAN) as the EC may be
configured in such a way that the valid range is not 0-255.

RPM target is not supported.

Change-Id: Iba8cd5ac540f9fdc20473831787cafb6c1fd8129
Signed-off-by: Tim Crawford <[email protected]>
@crawfxrd crawfxrd force-pushed the fan-manual branch 2 times, most recently from 4092704 to 420cd94 Compare January 2, 2025 18:26
crawfxrd added a commit to system76/coreboot that referenced this pull request Jan 2, 2025
system76/ec#512 added a manual fan control option.

In manual control mode, the system firmware or OS is responsible for
setting the fan target duty to manage thermals. CTR0 in the EC code
determines the maximum valid PWM duty, which is hard-coded to 255.

RPM target is not supported.

Change-Id: Iba8cd5ac540f9fdc20473831787cafb6c1fd8129
Signed-off-by: Tim Crawford <[email protected]>
crawfxrd added a commit to system76/coreboot that referenced this pull request Jan 2, 2025
system76/ec#512 added a manual fan control option.

In manual control mode, the system firmware or OS is responsible for
setting the fan target duty to manage thermals. CTR0 in the EC code
determines the maximum valid PWM duty, which is hard-coded to 255.

RPM target is not supported.

Change-Id: Iba8cd5ac540f9fdc20473831787cafb6c1fd8129
Signed-off-by: Tim Crawford <[email protected]>
crawfxrd added a commit to system76/coreboot that referenced this pull request Jan 2, 2025
system76/ec#512 added a manual fan control option.

In PWM control mode, the system firmware or OS is responsible for
setting the fan target duty to manage thermals. CTR0 in the EC code
determines the maximum valid PWM duty, which is hard-coded to 255.

RPM target is not supported.

Change-Id: Iba8cd5ac540f9fdc20473831787cafb6c1fd8129
Signed-off-by: Tim Crawford <[email protected]>
Base automatically changed from fan-split-event to master January 7, 2025 20:41
Make the command and function names explicit that they are for
controlling fan PWM duty.

Signed-off-by: Tim Crawford <[email protected]>
Allow fan target duties to be set via ACPI or SMFI command. This will
allow system firmware or OS to set fan duty, which can be used for
testing or implementing user-defined fan tables.

Setting PWM via SMFI already existed, but would not work as the value
would simply be overwritten by the EC.

RPM target is not supported.

Signed-off-by: Tim Crawford <[email protected]>
@crawfxrd crawfxrd marked this pull request as ready for review January 14, 2025 16:46
@crawfxrd crawfxrd requested review from a team January 14, 2025 22:09
@jackpot51 jackpot51 merged commit 8ba926f into master Jan 16, 2025
48 checks passed
@jackpot51 jackpot51 deleted the fan-manual branch January 16, 2025 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants