Skip to content

Pixel 8a (akita) M4: battery and charging, the USB rescue, and the dead-man tool on the 8a - #718

Merged
derekross merged 6 commits into
derekross:mainfrom
aninmucek:device-akita-m4
Nov 15, 2026
Merged

derekross merged 6 commits into
derekross:mainfrom
aninmucek:device-akita-m4

Conversation

@aninmucek

Copy link
Copy Markdown
Contributor

akita's M4, battery and charging: the runbook and its results, the two overlays it used, the USB rescue and the MAX77759 blacklist in akita's package, and the dead-man tool running on the 8a. The kernel side is linux-omarchy-mobile#246.

What's in it:

  • device/akita/BRINGUP-M4.md: the plan (M4.0 to M4.7) and the results, tests 36 to 47. In short:

    • the gauge reads this phone's ATL pack with Google's atl-a1-1k model (real temperature, 4486 mAh);
    • the bootloader charges the phone on the cable, with the same charger settings as husky's;
    • the USB link now survives an unplug;
    • Linux charged the battery under the dead-man tool at 4.2 V / 1.32 A, on a laptop port and a wall charger, and the guard never tripped (gate h);
    • the PMIC's interrupt gives rtc0 an alarm.
  • device/akita/overlays/:

    • pack-eeprom-test.dtso: husky's, enabling hsi2c_9 to read the pack's ID;
    • gauge-model-atl.dtso: generated by tools/gen-gauge-overlay.py from Google's zuma-akita-battery-data.dtsi (android-16.0.0_r0.10). The tool's header text names husky, so this one's header was written by hand.

    Both are bring-up overlays and aren't in device.conf, as on husky.

  • omamobile-device-akita 0.1.4:

    • omamobile-usb-rescue and its unit, enabled by a wants link. They're husky's files byte for byte, and the test checks they stay that way.
    • omamobile-max77759.conf, with husky's settings (the comment names the 8a; the test checks the settings).
    • i2c-tools as a dependency.

    Without docs/review: lessons L-362 to L-389 from the 2026-11-01 round #246 the rescue finds no 10cb0000.i2c and exits 0, so it's harmless on today's kernel.

  • tools/husky-deadman and -phone: they read the board from the device tree's first compatible. The Pixel 8 Pro keeps its 1.7 A current guard. The Pixel 8a gets 1.5 A, for its 1.32 A charge limit. Any other board is refused. The log names the board.

  • NOTES: an M4 section, and a line in BRINGUP-M2 that M2.7's lost link was the charger's data switch, now confirmed on akita.

A question for you: the dead-man tool's name. It keeps the name husky-deadman and its log paths, so husky's runbooks still work. Would you rather it were renamed (zuma-deadman?) with husky's docs updated, or akita got its own copy? I'm happy to do either in this PR.

Open, from the results:

  • The charge current reads higher than the input limit allows: about +1.0 A into the battery with a 500 mA input limit. The sense resistor matches stock's, and the level rose about as fast as that current says. So either the input limit isn't what 0xc2 reads back as, or the port gives more. It needs settling before any higher limits.
  • max77759_charger's constant_charge_voltage_max reads 4200, which looks like millivolts where sysfs uses microvolts.
  • The guard keeps only its latest reading. A line a minute in its log would record a whole run. That's a small follow-up to the tool, not done here.

Checks: tests/all, tests/packages and tools/pr-check pass. akita's package test has 3 new checks, 19 in all:

  • the rescue, its unit and the blacklist's settings match husky's;
  • the blacklist keeps the cell drivers and the Type-C driver from autoloading, but not the gauge or the MFD core;
  • the rescue is installed, enabled, and writes one register.

The install also stages 14 files now.

Slot B ended with 2 tries.

🤖 Generated with Claude Code

aninmucek and others added 4 commits November 13, 2026 01:22
The Pixel 8a has the Pixel 8 Pro's MAX77759 on the same bus
(10cb0000.i2c), the same fuel gauge power supply and the same SoC
watchdog (10060000.watchdog), so the dead-man tool works on it as it is,
except for two things: the phone half refused any board but
google,zuma-husky, and its current guard (1.7 A) was sized for the
8 Pro's DT charge current of 1.485 A.

The phone half now names the board from the device tree's first
compatible: google,zuma-husky keeps 1.7 A, google,zuma-akita gets 1.5 A
above its DT's 1.32 A, and any other board is still refused before
anything is applied. Every other limit, the undo and the watchdog path
are unchanged. The desktop half's text no longer says the 8 Pro only.

Read-only check on a Pixel 8a: the board function reads "Pixel 8a" and
1500000, and "tools/husky-deadman dump" reads the battery and the
charger's registers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…blacklist

The Pixel 8a's battery chips are the Pixel 8 Pro's, on the same bus, so
husky's omamobile-usb-rescue and its unit come over byte for byte, enabled
by a wants link, and the test checks they stay husky's. On the 8a an unplug
opened the MAX77759's USB2 data switch (0x25:0x93 read 0x00), and the
rescue brought the link back on the replug with no reboot
(device/akita/BRINGUP-M4.md, M4.4). Without hsi2c_11 in the board file
(linux-omarchy-mobile#246) it finds no bus and exits 0.

omamobile-max77759.conf has husky's settings: the charger, GPIO, NVMEM
and Type-C drivers don't autoload, so the charger runs only under
tools/husky-deadman; the gauge and the MFD core do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Two bring-up overlays from M4, never default. pack-eeprom-test.dtso is
husky's: it enables hsi2c_9 so the pack's ID (EEPROM byte 0x17) can be
read; this phone's reads 1, the ATL pack. gauge-model-atl.dtso loads
Google's atl-a1-1k model into the fuel gauge, generated by
tools/gen-gauge-overlay.py from zuma-akita-battery-data.dtsi
(android-16.0.0_r0.10), with the header written for akita.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The M4 runbook and its results (tests 36 to 47): the gauge with the ATL
model, the bootloader's charger state, the USB rescue, charging under
tools/husky-deadman on a laptop port and a wall charger (gate h), and the
PMIC's interrupt for the RTC alarm. NOTES gets an M4 section, and
BRINGUP-M2 notes that M2.7's lost USB link is now confirmed to be the
charger's data switch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@derekross

Copy link
Copy Markdown
Owner

Thank you, this is a careful M4. The plan reads well next to husky's notes, every step ends with slot B's tries, the fresh NV backup came first, and the open points are written down as open instead of smoothed over. I checked a few things myself: the rescue and its unit are husky's blobs exactly; the ATL model's 48 table words and 28 parameters match Google's zuma-akita-battery-data.dtsi at android-16.0.0_r0.10 word for word, with batt-id-kohm = <1>; the dead-man tool still gives the 8 Pro 1.7 A and refuses a board it doesn't know before it arms the watchdog or touches the charger; and it refuses a charger run when the gauge reads the stuck 22.0 C, so a run without the model can't start. CI is green.

Two things before I merge:

  1. One boot of the package itself, with the smoke report. The results say the test boots had the PMIC driver blacklisted by hand and ran the rescue as a test unit, so three things 0.1.4 ships haven't happened on an 8a yet: max77759 and the gauge autoloading at boot under the package's own blacklist, the rescue started by its wants link, and i2c-tools coming in as a dependency. Could you install 0.1.4 built from this branch on the docs/review: lessons L-362 to L-389 from the 2026-11-01 round #246 test kernel, remove the hand-made modprobe file and the test unit (a file in /etc/modprobe.d replaces the package's file of the same name), reboot once, and post:

    • pacman -Q omamobile-device-akita i2c-tools;
    • lsmod | grep -E 'max77759|max17042|tcpci' (the MFD core and the gauge loaded, the charger and Type-C drivers not);
    • systemctl status omamobile-usb-rescue, and one unplug and replug with the journal's usbsw= lines;
    • the tools/phone-smoke report.

    A row for it in the results would be good too.

  2. The tool's recovery text. It now speaks for both phones, with the 8 Pro's buttons. "Power + Volume Up for 15 to 30 s" is husky's measured combination, and the line you changed ("Power alone does nothing on the 8 Pro under our kernel") is husky's test 23, which I'd like to keep as it was. For the 8a your own README still says the forced-reset combination is untested, and your finding in this PR is that Volume Down + Power held for over a minute came back into slot B, not fastboot, which is the text's step 4. Step 3 ("whether a reset puts the charger registers back is NOT known") is answered for the 8a by your tests 43 and 46 and is still open for the 8 Pro. Could the text be per phone: husky's lines unchanged, and for the 8a what you measured, with "not tested" where it isn't?

On your question about the name: please keep husky-deadman and its log paths for now. #282 (the 8 Pro's host-mode draft) rewrites the same two files and already conflicts with this one in three places; a rename on top would make that much harder. We can rename it in its own pull request once #282 is in. One thing that follows from sharing the tool: #282 adds steps that are husky's hardware only, and they must refuse an 8a. If board() also set the list of steps each phone may run (for the 8a: noop, wd-drill, b3-charger), that would be the default from now on. I'll say the same on #282.

On the order: I'll merge this before linux-omarchy-mobile#246. With #246's board file and the 0.1.3 package, nothing would keep max77759_charger from loading at boot and programming the battery node's limits outside the tool, so the blacklist has to be published first. This PR is harmless on today's kernel, as you say.

Smaller points, none of them blocking:

  • The charge current. The 8 Pro, with the same chips and the same bootloader values, read about -55 mA net on a desktop port at a 500 mA limit; yours reads +1.0 A, already in test 44 before the charger driver loaded. The level rising at that rate doesn't confirm it independently, because the level and the current come from the same gauge. An inline USB meter on the cable would settle it from outside the phone. I agree no limit goes up until it is settled.
  • The default boot has no gauge model, since neither overlay is in device.conf. So with docs/review: lessons L-362 to L-389 from the 2026-11-01 round #246 and this package the bar shows 22.0 C and a level about 4 points high. A line in the package README would save the next owner a puzzle.
  • M4.6 would be easier to repeat with a stop condition and a rollback written into the step (the tool's trips and exit codes).
  • The squash subject will name the areas; the title has no prefix.

Thanks again. This is the kind of record that lets a second 8a owner repeat the work.

aninmucek and others added 2 commits November 14, 2026 19:47
…ADME and M4.6 stop and rollback

From derekross#718's review. The desktop half's recovery text now speaks for each
phone: the Pixel 8 Pro's lines as they were (Power + Volume Up for 15 to
30 s; whether a reset restores the charger is not known for husky), and
for the Pixel 8a what BRINGUP-M4 measured, with "not tested" where it
wasn't. board() also sets the steps each phone may run (both: noop,
wd-drill, b3-charger), and preflight refuses any other step before
anything is applied, so a step for one phone's hardware can't run on the
other.

akita's package README says the default boot has no gauge model (22.0 C
and a level about 4 points high), and BRINGUP-M4's M4.6 gets its stop
conditions (the guard's trips, the exit codes) and its rollback.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
From derekross#718's review: omamobile-device-akita 0.1.4 built and installed on
the phone, the hand-made modprobe file and test unit gone, one reboot.
The MFD core and the gauge autoload, the charger and Type-C drivers
don't, the rescue starts from the package's wants link and closed the
data switch after an unplug, and phone-smoke is clean.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@aninmucek

Copy link
Copy Markdown
Contributor Author

Thank you for checking all of that. Both are done, in 59e10b0 and the commit after it.

1. One boot of the package itself. The kernel is the #246 test tree (…g8136602c700c; its DTB also carries the two bring-up overlays, so the gauge has the ATL model). The steps:

  • moved the hand-made modprobe file and the test rescue unit off the phone;
  • built 0.1.4 on the phone from this branch with tools/phone-install-package, and installed it;
  • one reboot through fastboot.
$ pacman -Q omamobile-device-akita i2c-tools
omamobile-device-akita 0.1.4-1
i2c-tools 4.4-4
$ pacman -Qi i2c-tools | grep -E 'Required By|Install Reason'
Required By     : ddcutil  omamobile-device-akita
Install Reason  : Installed as a dependency for another package
$ ls /etc/modprobe.d/
hid_apple.conf  omarchy-usb-autosuspend.conf
$ lsmod | grep -E 'max77759|max17042|tcpci'
max77759               20480  0
max17042_battery       32768  0

The dependency didn't really get tested: i2c-tools was already on the phone, as a dependency of the Omarchy image's ddcutil, so pacman had nothing to pull in. It now lists the package under "Required By".

lsmod shows the MFD core and the gauge, and no charger, GPIO, NVMEM or Type-C driver. There's no max77759-charger power supply.

$ systemctl status omamobile-usb-rescue
● omamobile-usb-rescue.service - Reconnect USB after a replug (MAX77759 data switch)
     Loaded: loaded (/usr/lib/systemd/system/omamobile-usb-rescue.service; disabled; preset: disabled)
     Active: active (running) since Sat 2026-11-14 19:50:58 GMT; 4s ago
    Process: 737 ExecStartPre=/usr/bin/modprobe i2c-dev (code=exited, status=0/SUCCESS)
   Main PID: 743 (omamobile-usb-r)

WantedBy=multi-user.target, through the package's wants link. systemd calls it "disabled", as on husky.

One unplug and replug:

19:50:58 omamobile-usb-rescue: watching the USB data switch on I2C bus 1
19:50:58 omamobile-usb-rescue: usbsw=0x09 vbus=1 udc=configured
19:51:50 omamobile-usb-rescue: usbsw=0x00 vbus=0 udc=configured
19:52:03 omamobile-usb-rescue: usbsw=0x00 vbus=1 udc=configured
19:52:03 omamobile-usb-rescue: VBUS valid, USBSW_CTRL 0x00: closing the data switch
19:52:05 omamobile-usb-rescue: usbsw=0x09 vbus=1 udc=configured

The switch opened on the unplug, and the rescue closed it two seconds after the replug, with no reboot.

tools/phone-smoke report

phone-smoke: akita

Kernel 7.3.0-rc6-omamobile-push1-g8136602c700c, tools at 59e10b0, 2026-11-14T19:51Z.

Check Result Detail
boot (required) ok kernel 7.3.0-rc6-omamobile-push1-g8136602c700c, slot b, up 14s
storage guard (required) ok 62 partitions; only userdata and slot B's boot images writable
root (required) ok ext4 on userdata, 97G free
kernel health (required) ok no oops or BUG; 0 WARN, 2 error lines in dmesg (2 known, 0 new)
systemd units ok none failed
USB gadget (required) ok bound to 11210000.usb
display ok card0-Unknown-1 connected, 1080x2400
GPU not ok no render node
session (required) ok Hyprland and the Omarchy shell running
lock ok PAM file present, the shell can lock (passwordPam true, locked false)
touch ok Goodix Berlin Capacitive 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 skip no libcamera tools
thermal ok hottest zone 36 °C

Packages: hyprland 0.57.0-3.3, libcamera 0.7.2-4.23, mesa 1:26.2.4-1.4, omacam 0.3.3-1, omamessages 0.2.2-1, omamobile-apps 0.2.3-1, omamobile-device-akita 0.1.4-1, omamobile-firstboot 0.1.5-1, omamobile-keyring 20261026-1, omamobile-mirror 0.1.1-1, omamobile-omarchy 0.1.44-1, omamobile-owl-widgets 0.1.2-1, omamobile-settings 0.1.2-1, omamobile-shell 0.2.127-1, omamobile-voice 0.1.0-1, omaphone 0.2.3-1, omarchy 4.5.0-3, omatel-agent 0.2.4-2, quickshell 0.3.2.r7.g2b4501a-1

That's test 48 in BRINGUP-M4's results.

2. The recovery text is now per phone:

  • The 8 Pro's lines are as they were: Power + Volume Up for 15 to 30 s, "Power alone does nothing on the 8 Pro under our kernel", and "NOT known for husky". Some lines wrap differently.
  • The 8a gets what was measured:
    • the forced restart: not tested; Volume Down + Power held for over a minute came back into slot B once;
    • the charger registers: a reboot through the bootloader restored them (test 46); a forced restart isn't tested;
    • fastboot by hand: reached once in M2, once not; "how long to hold which key is not known".

The name and the steps: husky-deadman and its log paths stay. board() now also sets STEPS for each phone (both: noop wd-drill b3-charger), and preflight refuses any other step before the watchdog is armed or the charger touched. So #282's husky-only steps need only be added to husky's list.

The smaller points:

  • The README now says the default boot has no gauge model: 22.0 C and a level about 4 points high.
  • M4.6 now has its stop conditions (the guard's trips, exit codes 3 to 7) and its rollback (undo b3-charger at once after a clean soak, then dump).
  • The charge current: agreed, the level and the current come from the same gauge, so one doesn't confirm the other. I don't have an inline USB meter yet, so I'll measure it once I have one and report back here. No limit goes up until it's settled.
  • The squash subject: fine by me.

🤖 Generated with Claude Code

@derekross

Copy link
Copy Markdown
Owner

Thank you, both points are done, and the record is better for how you did them. Test 48 is exactly the boot I asked for: the hand files gone, the package built from the branch, the MFD core and the gauge loading under the package's own blacklist with no charger or Type-C driver, the rescue started by its wants link and closing the switch two seconds after a replug, and the smoke report. Thank you for saying plainly that the i2c-tools dependency wasn't really exercised because ddcutil had already brought it in. The recovery text now gives the 8 Pro its lines as they were and the 8a only what you measured, and STEPS in board() means a step for one phone's hardware can't run on the other, which is the safer default for #282 too.

I ran your package's test and husky's on today's main with this merged (both pass), and the head's CI is green. I'll merge it now, before linux-omarchy-mobile#246 as I said, so the blacklist is published before the board file that needs it.

Two small notes for later: undo still reverts a step by name without checking the phone's STEPS list. Harmless with today's three steps, but when #282 adds husky-only steps its undo for them should check the list too; I'll mention it there. And thank you for holding the charge limits until an inline meter can settle the current reading.

@derekross
derekross merged commit f6d00ac into derekross:main Nov 15, 2026
2 checks passed
@aninmucek
aninmucek deleted the device-akita-m4 branch November 15, 2026 17:44
@aninmucek

Copy link
Copy Markdown
Contributor Author

The charge current, measured with an inline USB meter. The Pixel 8a was at 44 %, screen off, with the charger as the bootloader leaves it: mode 0x05, CHGIN_ILIM 0xc2 = 0x13, which the driver reads as 500 mA.

Source Meter Gauge (60 readings, 1 s apart)
Laptop port 4.87 V, 1.31 A, 6.37 W 3.91 V, +0.92 A average (0.84–0.96), 3.59 W into the battery
Wall charger 1.45 A not logged (no link)

So the gauge's current is right. The roughly 2.8 W that doesn't reach the battery fits the phone's own idle load with the screen off, plus charger losses.

What doesn't hold is the 500 mA input limit: the phone draws well above it on both a laptop port and a wall charger. Either 0xc2 = 0x13 isn't 500 mA, or something else sets the bootloader's input limit. I haven't looked further yet, and no limit changes until it's understood.

🤖 Generated with Claude Code

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