Skip to content

Drop the Pocket EVO fan tachometer interrupt - #25

Open
jesherman wants to merge 1 commit into
armada-os:mainfrom
jesherman:fix/pocket-evo-fan-tacho-irq
Open

Drop the Pocket EVO fan tachometer interrupt#25
jesherman wants to merge 1 commit into
armada-os:mainfrom
jesherman:fix/pocket-evo-fan-tacho-irq

Conversation

@jesherman

Copy link
Copy Markdown
Contributor

Split out of #23 per review — this stands on its own, doesn't depend on the ROCKNIX suspend series, and is inert on a device that only fake-suspends.

Problem

qcs8550-ayaneo-pocket-common.dtsi gives pwm-fan an edge-falling TLMM interrupt on GPIO 64 for the tachometer. On a Pocket EVO it fires ~80×/sec whenever the fan spins — /proc/interrupts showed IRQ 202 past 234,000 counts:

202:  234420  0  0  0  0  0  0  0  msmgpio 64 Edge  pwm-fan

Nothing consumes the resulting fan1_input. armada-powerd only ever writes pwm1/pwm1_enable; no reader of fan RPM exists anywhere in armada or armada-packages. So it's a continuous stream of CPU0 interrupts for a value nobody uses.

The AYN Odin 3 declares no tacho interrupt at all in cq8725s-ayn-common.dtsi, and its fan1_input is simply empty.

Effect on suspend

Secondary, and the reason it turned up: it also stops the SoC staying in suspend-to-RAM. With the fan spinning a deep suspend held 2–8s; with the fan stopped the same suspend held 13–92s.

Being straight about that evidence — the suspend-duration measurements were noisy (run-to-run variance was comparable to the effect), so treat it as supporting rather than decisive. The interrupt rate itself is directly measured and not in doubt.

Scope

Overridden in the EVO .dts, not the shared DTSI — that file is included by six other boards (Pocket ACE/DMG/DS/S2K and two Retroid) whose fan wiring I haven't checked.

Cost

fan1_input stops reporting RPM, matching the Odin 3. No functional impact given nothing reads it.

Testing

Verified on a Pocket EVO: pwm-fan gone from /proc/interrupts, pwm-fan node in the live DT has no interrupts property, fan control unchanged (armada-powerd still drives pwm1 normally, fan spins up and down under load as before).

🤖 Generated with Claude Code

pocket-common.dtsi gives pwm-fan an edge-falling TLMM interrupt on GPIO 64
for the tacho. On a Pocket EVO it fires about 80 times a second whenever the
fan spins; /proc/interrupts showed IRQ 202 past 234,000 counts. Nothing reads
the resulting fan1_input -- armada-powerd only writes pwm1 and pwm1_enable --
so the interrupt buys nothing and costs a steady stream of CPU0 wakeups.

It also keeps the SoC from staying in suspend-to-RAM: with the fan spinning a
deep suspend held 2-8s, and with it stopped the same suspend held 13-92s. The
AYN Odin 3, which suspends for hours, declares no tacho interrupt at all in
cq8725s-ayn-common.dtsi.

Overridden in the EVO .dts rather than the shared DTSI, which is included by
six other boards whose fan wiring has not been checked.

Split out of the SM8550 deep suspend work: this stands alone, does not depend
on those patches, and is inert on a device that only fake-suspends.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@jesherman

Copy link
Copy Markdown
Contributor Author

Correction to the suspend-duration evidence in this PR, having since found a confounder.

I claimed deep suspend held 2–8s with the fan spinning versus 13–92s stopped. Those runs were all taken with IRQF_NO_SUSPEND still set on the SM8550 IPCC mailbox irq — 0504 gates on qcom,sm8750-ipcc, so the EVO never got that fix (#27 addresses it). Upstream calls that irq the single biggest blocker to SM8550 staying asleep, so it was active throughout my measurements and plausibly accounts for much of the variance I saw, and possibly some of the improvement I attributed to the fan.

This does not change the case for this PR, which never rested on the suspend numbers:

  • IRQ 202 fires ~80×/sec whenever the fan spins, directly measured, /proc/interrupts past 234,000
  • nothing reads the resulting fan1_inputarmada-powerd only writes pwm1/pwm1_enable
  • the Odin 3 declares no tacho interrupt at all

Those stand on their own and are unaffected. I'd just discount the suspend-duration figures until they can be re-measured with #27 applied.

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.

1 participant