Skip to content

arm64: dts: exynos: google: gs201-panther: add the MAX77759 PMIC for its charger - #259

Open
nesmeck wants to merge 1 commit into
derekross:omamobilefrom
nesmeck:omamobile-gs201-panther-charger
Open

nesmeck wants to merge 1 commit into
derekross:omamobilefrom
nesmeck:omamobile-gs201-panther-charger

Conversation

@nesmeck

@nesmeck nesmeck commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

The MAX77759's PMIC on the Pixel 7, so that its charger binds, as on the Pixel 7 Pro. Today panther describes only the fuel gauge on that bus, so charging stays as ABL left it: a 4.35 V float voltage, which stops at about 92 %. There is also no max77759-charger supply, which omarchy-mobile#788's off-mode charging needs to power off once the cable is out.

The change, in gs201-panther.dts only:

  • pmic@66 with its interrupt on gpa9-4 (low, pulled up, as in the Pixel 7's live device tree), its GPIO cell, and the battery as its monitored-battery.
  • The battery's charger limits:
    • 4.45 V, the top of stock's float voltage tiers (google,chg-cv-limits 4.2/4.3/4.45 V);
    • 1266720 uA, the charger step 0x13: 0.3 C, the lowest charge current stock allows from 10 to 46 degC at any tier, is 1283100 uA of 4277 mAh, rounded down to that step.
  • The Type-C port controller stays undescribed, as before: it would take over VBUS and the data role, and the USB link is our way into the phone.
  • The bus comment now also notes the PCA9468 direct charger at 0x57, which is on this bus in stock's tree.

The device package goes first. Without a Type-C source, the upstream driver turns charging off at probe unless it gets default_ilim_ua. omarchy-mobile#827 ships the Pixel 7 Pro's two files for that:

  • options max77759_charger default_ilim_ua=500000 temp_guard=1, after the gauge;
  • a blacklist for tcpci_maxim, gpio_max77759 and nvmem_max77759.

Without this node those files change nothing. This should merge after omarchy-mobile#827 is published.

Tested on a Pixel 7 from slot B. Every test kernel since 2026-11-01 has carried this node, and the phone has charged with it every day since. The steps, from device/panther/BATTERY-PLAN.md in omarchy-mobile#827:

  • B3.1: the node with every MAX77759 module held back. 1-0066 was unbound, and the charger read as ABL left it.
  • B3.2: the MFD core and GPIO cell. The PMIC's interrupt stayed quiet, and USB stayed up.
  • B3.3: the charger at a 500 mA input limit.
    • The driver logged "probed: mode 0x5, float voltage 4450 mV, fast charge 1266720 uA, input limit 500000 uA".
    • Over ten minutes on a laptop port, it went from constant current into constant voltage, from 92 to 95 % and 4.417 V, at about 730 mA. BC1.2 had detected a CDP port, which may supply 1.5 A.
    • No faults; USB and the rescue stayed up.
  • B3g:
    • the temperature guard applied stock's 20-42 degC band;
    • with the gauge unloaded it stopped charging, "charging inhibited", mode 4;
    • with the gauge back it resumed, at mode 5.
  • D1: with the package's two files, the charger loaded at boot. tcpci_maxim and the GPIO and NVMEM cells stayed out, and the battery reached 100 %.
  • Off-mode charging (omarchy-mobile#788): on a kernel with this node, a charger boot powered off once the cable was out.

The commit in my test kernels was the same, except for a change to the file's header comment, which I left out here so it doesn't conflict with #181.

Checks: tools/kernel-pr-check --build OUT --merge origin/omamobile passes:

  • a clean merge onto omamobile 317d87d;
  • the sign-off;
  • checkpatch --strict with no warnings;
  • the policy checks;
  • 10 device trees built with W=1 and dtbs_check, no new warnings.

🤖 Generated with Claude Code

@derekross

Copy link
Copy Markdown
Owner

Thank you, Alejandro. This is a careful node: it's the Pixel 7 Pro's pmic@66 with stock's interrupt pin, without the NVMEM cell your package keeps out, and it leaves every other board alone. I built it on today's omamobile: checkpatch is clean, the device trees build with W=1 and no new warnings, every other gs201 DTB is byte-identical, and in the Pixel 7's DTB only the PMIC node, its pin group and the battery's two charger limits change. CI's dtbs_check passed too.

Two things decide when it can go in, and both are on the omarchy-mobile side:

  1. Your body is right that the device package has to go first: with this node and today's device-panther, the charger loads without default_ilim_ua and keeps charging off. Since #788 waits for this node, I've asked you there to move the policy commit (the two modprobe files) into its own small pull request, which I can merge first because it changes nothing on today's kernel. This one merges after that is published.
  2. On #788 I've also taken back my request to blacklist the charger: with it blacklisted there's no max77759-charger supply, and the off-mode boot would still have nothing to watch. The charger loads with the Pixel 7 Pro's two options, as you have it.

One small suggestion while you wait: constant-charge-current-max-microamp = <1266720>, the step itself (as the 7 Pro's 1466730 is), says what the chip actually runs; the driver rounds 1266670 up to that step anyway, so "rounded down to a charger step" reads a little oddly next to it. And since Ángel has a Pixel 7 too, with a different battery pack, a word from him on whether his unit has run this node would be welcome.

…its charger

Describe the MAX77759's PMIC at 0x66 on USI13, as on the Pixel 7 Pro:
its interrupt on gpa9-4, low, with a pull-up, as in the Pixel 7's live
device tree, its GPIO cell, and the battery as its monitored-battery, so
that the charger cell can bind. Give the battery the charger limits:
4.45 V, the top of stock's float voltage tiers, and 0.3 C, the lowest
charge current stock allows from 10 to 46 degC at any tier (1283100 uA
of 4277 mAh), rounded down to the charger step 0x13, 1266720 uA.

The Type-C port controller stays undescribed. The charger driver keeps
charging off at probe unless it is given a default input limit, which
the device package sets.

Note the PCA9468 direct charger at 0x57 on this bus in the comment, as
stock's charging tree has it.

Tested on a Pixel 7 since 2026-11-01, with the device package's
default_ilim_ua=500000 and temp_guard=1: the charger probed at mode 5
with a 4450 mV float voltage, 1266720 uA fast charge and a 500 mA input
limit, went from constant current into constant voltage and reached
100 %. The guard applied stock's band at room temperature, stopped
charging while the gauge gave no reading and resumed after it.

Assisted-by: LLM
Signed-off-by: Alejandro Garcia <skipper.pelygro@gmail.com>
@nesmeck
nesmeck force-pushed the omamobile-gs201-panther-charger branch from edb90ff to eb0f5e0 Compare November 15, 2026 21:12
@nesmeck

nesmeck commented Nov 15, 2026

Copy link
Copy Markdown
Contributor Author

Thank you. You're right about the current: it's now <1266720>, step 0x13 itself, as the 7 Pro's 1466730 is. The DTB is the same, since the driver already rounded 1266670 to that step. The commit message now gives 0.3 C as 1283100 uA of 4277 mAh, rounded down to the charger step 0x13, 1266720 uA. tools/kernel-pr-check passes again on today's omamobile.

The device package's two files are now omarchy-mobile#827, split out of #788, so this waits for that one to be published.

🤖 Generated with Claude Code

@derekross

Copy link
Copy Markdown
Owner

Thank you, Alejandro. The current is now the step itself, and the message says where the number comes from. I ran our gate again on today's omamobile (it moved under you, with the MFC's memory pool in the same board file): it merges cleanly, checkpatch is clean, the device trees build with W=1 and no new warnings, and CI's dtbs_check passed on this head. Every other board's DTB is byte-identical, the Pixel 7 Pro's included, and in the Pixel 7's only the PMIC, its pin group and the battery's two charger limits change.

So this is ready on its own side. I'll merge it once #827 has its version and is in a published device-panther, so no Pixel 7 meets this node without the charger's options.

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.

2 participants