Skip to content

arm64: dts: exynos: google: zumapro-tegu: Add the MAX77779 charger - #161

Merged
derekross merged 2 commits into
derekross:omamobilefrom
W4HO-ham:tegu-dt-charger
Nov 1, 2026
Merged

derekross merged 2 commits into
derekross:omamobilefrom
W4HO-ham:tegu-dt-charger

Conversation

@W4HO-ham

Copy link
Copy Markdown
Contributor

One commit on top of #119 (which sits on #96). It describes the MAX77779's charger at 0x69 on hsi2c6, beside the fuel gauge and the USB-C port controller, and names it as the fuel gauge's power-supplies, as the binding from #92 shows. The binding takes no interrupt or supplies. With this node the merged max77779_charger binds from the device tree, so the 9a can charge with a charge limit on the published driver.

Tested on the palmtop today. The kernel was this branch at 7dbac6f, built with defconfig + omarchy-mobile's fragment + omarchy-mobile#227 (which turns on BATTERY_MAX77779 and CHARGER_MAX77779 and builds in the USB/PMIC path), and uname -r was 7.3.0-rc6-omamobile-push1-g7dbac6f4e65c.

  • /sys/class/power_supply: max77779-battery, max77779-charger, tcpm-source-psy-1-0025. The charger's device is 1-0069 on driver max77779-charger.
  • The charger reported online 1, status Full, charge_behaviour [auto] inhibit-charge, input current limit 500000, constant charge current 1933090. The battery was at capacity 89.
  • With a charge limit of 80 (omarchy-mobile's device-tegu 0.2.1 sets inhibit-charge above the limit), the charger and the battery went to Not charging. With the limit removed and auto written back, both went to Charging.

tools/kernel-pr-check against #119's head: signed off by the author, subject prefix, checkpatch --strict clean. The DTB built with no warnings.

@derekross

Copy link
Copy Markdown
Owner

Thank you, @W4HO-ham. The node is small and right: 0x69 matches Google's zuma-max777xx.dtsi, and naming the charger as the fuel gauge's power supply follows the binding's example. A test on a kernel built from exactly this head, with the charge limit going to Not charging and back to Charging, is the check that matters.

What I checked: it merges cleanly onto today's omamobile, the checks pass on all nine commits, dt-validate reports nothing on the 9a's DTB before or after, and every other phone's DTB is byte-identical. The driver's probe only reads the mode register, and its only write is putting charging back on unbind or shutdown when an inhibit is held, so binding it at every boot changes nothing until someone sets a limit.

Three small things:

  1. The message says the binding "takes no interrupt or supplies", but it does allow an optional interrupts (through the PMIC block). "This node has no interrupt yet" would be accurate; with a rebase merge the message lands as written.
  2. power-supplies is also a device link: the fuel gauge now waits for the charger to probe. Fine while omarchy-mobile#227 builds both modules, but if the charger ever fails to probe, the battery stays deferred with it. A sentence in the message would help anyone bisecting a missing battery.
  3. Could you paste a tools/phone-smoke report from the g7dbac6f4e65c boot?

On merging: this is the top of the stack from #85 through #119, whose own heads are older copies of the same patches. When #96 and #119 are ready I'll merge this one with "Rebase and merge" and close those as merged through it. omarchy-mobile#227 should land first or alongside. #105 will conflict with #119's &gpa8 block (keep both), and #164, #165 and #168 will need a rebase after this lands.

@W4HO-ham

W4HO-ham commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor Author

Thanks. I changed the message for points 1 and 2: it now says "This node has no interrupt yet", and it has a paragraph saying the gauge waits on the charger through the power-supplies link, so a charger that doesn't probe leaves the battery deferred. Only the message changed. The tree is identical to 7dbac6f4e65c, so the boot below is this head's code.

The charge limit on that boot, through device-tegu's omamobile-tegu-charge-limit:

== limit 80 at capacity 89
omamobile-tegu-charge-limit: charge limit 80 %: inhibit-charge
behaviour auto [inhibit-charge], charger status Not charging, battery Not charging
== no limit
omamobile-tegu-charge-limit: charge limit 100 %: auto
behaviour [auto] inhibit-charge, charger status Charging, battery Charging

The tools/phone-smoke report from that boot is below. Wi-Fi, Bluetooth, sound, sensors and cameras weren't in that DTB (the stack is only up to the charger), and none of the three failed units is about the charger: tegu-gpu-dvfs and tegu-nfc-clkpad are bring-up units on the palmtop that look for nodes later PRs add, and systemd-backlight fails the same way on every test boot of this stack.

phone-smoke: tegu

Kernel 7.3.0-rc6-omamobile-push1-g7dbac6f4e65c, tools at 0f57856, 2026-10-31T20:08Z.

Check Result Detail
boot (required) ok kernel 7.3.0-rc6-omamobile-push1-g7dbac6f4e65c, slot b, up 154s
storage guard (required) ok 62 partitions; only userdata and slot B's boot images writable
root (required) ok ext4 on userdata, 18G free
kernel health (required) ok no oops or BUG; 0 WARN, 21 error lines in dmesg
systemd units not ok failed: systemd-backlight@backlight:19440000.dsi.0.service tegu-gpu-dvfs.service tegu-nfc-clkpad.service
USB gadget (required) ok bound to 11210000.usb
display ok card1-DSI-1 connected, 1080x2424
GPU ok render node on panthor
session (required) ok Hyprland and the Omarchy shell running
lock ok PAM file present, the shell can lock (passwordPam true, locked true)
touch ok Synaptics TouchComm Touchscreen
buttons ok gpio-keys
Wi-Fi skip no wireless interface
Bluetooth skip no controller
battery ok 89% Charging, 36 °C
sound cards skip none
sensors skip no sensor proxy
cameras not ok libcamera lists none (or a camera app holds them)
thermal ok hottest zone 47 °C

Packages: hyprland 0.56.2-5.1, libcamera 0.7.2-4.22, mesa 1:26.2.4-1.4, omacam 0.3.3-1, omamobile-apps 0.2.0-1, omamobile-audio 0.4.1-1, omamobile-device-tegu 0.2.1-1, omamobile-fingerprint 0.1.8-1, omamobile-firstboot 0.1.0-1, omamobile-gnss 0.2.5-1, omamobile-keyring 20261013-1, omamobile-mirror 0.1.1-1, omamobile-modem 0.1.4-1, omamobile-modem-sit 0.3.3-1, omamobile-omarchy 0.1.12-1, omamobile-owl-widgets 0.1.1-1, omamobile-sensors 0.2.1-1, omamobile-shell 0.2.41-1, omarchy 4.0.6-1

…C port controller

The Pixel 9a's MAX77779 sits on hsi2c6 (USI6, pins gpp12-0/1, 950 kHz as
stock): its fuel gauge at 0x36 with the board's 2 mOhm shunt, and its
USB-C port controller at 0x25, interrupting on gpa8-3 (active low, as
stock's max77759tcpc@25). The port is described as a sink with a dual
data role and is not linked to the USB controller's role switch yet:
the USB controller stays a peripheral, as today.

gpa8 becomes an interrupt controller with its four EINT SPIs (44-47).

Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
The MAX77779's charger answers at 0x69 on the same bus as its fuel gauge
and USB-C port controller. Describe it, and name it as the fuel gauge's
power supply, so the max77779-charger driver binds from the device tree
and the battery reports charging through it.

This node has no interrupt yet; the chip charges on its own, and the
driver reports its state and offers charge inhibit.

power-supplies is also a device link: the fuel gauge now waits for the
charger to probe, so if the charger driver is missing or fails to probe,
the battery stays deferred with it.

Signed-off-by: W4HO <87742609+W4HO-ham@users.noreply.github.com>
@W4HO-ham

W4HO-ham commented Nov 1, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto today's omamobile too: now #119's commit plus the charger, 2 commits, clean, no content change.

@derekross
derekross merged commit 6050a42 into derekross:omamobile Nov 1, 2026
1 check passed
@derekross

Copy link
Copy Markdown
Owner

Thank you, @W4HO-ham. The rebase changed nothing but the base: both commits are the same patches as 644c02ec403f, messages included, so your boot and smoke report still describe this code. The gate passes merged onto today's omamobile (both commits signed off, checkpatch --strict with nothing to read, eight device trees with no new warnings), and CI is green on this head, dtbs_check included.

With #96 in, I've merged this with "Rebase and merge". That lands #119's commit too (it's the same patch, with the same tree), so I'm closing #119 as merged through this one. #136 carries its own copy of that commit, so it needs a git rebase omamobile afterwards; git drops the duplicate by itself.

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