Skip to content

device/husky: battery bring-up overlays, the dead-man tool and the results - #249

Closed
Somnius wants to merge 7 commits into
derekross:mainfrom
Somnius:husky-battery-bringup
Closed

Somnius wants to merge 7 commits into
derekross:mainfrom
Somnius:husky-battery-bringup

Conversation

@Somnius

@Somnius Somnius commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

What and why

The battery bring-up of the 8 Pro as the runbook @derekross asked for on kernel #163 ("the overlay and your results belong in device/husky/ with a runbook"): the three bring-up overlays, the dead-man tool I used for the first charger runs, a script that writes the gauge-model overlay from Google's stock tree, and device/husky/BATTERY-NOTES.md with every step and result, three charger runs, the USB replug problem, the slot B retry problem and the open questions, each claim marked verified or not. It also moves the husky Battery and Charging rows of device/husky/ROADMAP.md and docs/DEVICES.md from "no" to "testing" and says what that means (the gauge and its temperature work with the model overlay; the charger driver only ran in guarded runs and charges slowly on a plain charger).

The short version of what the notes say: with Google's battery model loaded through gauge-model.dtso the gauge's temperature goes from stuck at 22.0 C to 34.4 C and moving (@nesmeck's kernel #171 sees the same on the Pixel 7); max77759_charger ran three times under the dead-man tool (500 mA and 900 mA on a desktop port, and a wall charger), nothing tripped, and on the wall charger the net current turned positive; I don't know which pack the phone has, so the model is Google's fallback for an unknown pack and the percentage may be a few points off.

Needs: kernel #163 (the bus nodes the overlays switch on) and, for the blocklist and the replug rescue the notes talk about, the device package PR (#250). No package changes here, only device/husky, tools and docs, so no version bumps.

Device and build

Checks (no phone needed)

  • tools/pr-check origin/main passes
  • tests/all passes
  • tests/packages: no package changed; the run over every package fails in three suites on my desktop only because python dbus and gi are not installed here
  • Each changed package has its version bumped: n/a, no package changed
  • Commits have area prefixes and bodies that say why; any AI help is a Co-Authored-By: or Assisted-by: trailer, never a Signed-off-by:

On the phone

  • I ran this on my own phone, booted into this build
  • Runbook steps passed (plan, step, result): M1 read-only baseline, M2 clocks, M2b, M3 the bus, M4a gauge, M4b MFD, M4c gauge model, M5 dead-man drills (noop, noop unconfirmed, wd-drill) and three b3-charger runs: all passed, the numbers are in BATTERY-NOTES.md
  • What I did not test: which pack the phone has (ATL, COS or LSN) and what a wrong model does to the percentage; any pack other than the fallback model; whether a reset puts the charger registers back to the bootloader's values (the watchdog drill never changes them, and its undo-failure path was never exercised); the charger above 900 mA or with any USB-PD; Type-C (no Type-C driver was loaded); a second phone
  • Nothing in this change writes outside slot B and userdata, weakens the storage guard, or reads registers from userspace (AGENTS.md §1): the first two hold. The tools do read and write registers of the external MAX77759 chips (gauge, charger, Type-C) over I2C with i2cget and i2cset, as cheetah's usbc-deadman does; no devmem, nothing on the SoC's PMU. BATTERY-NOTES.md section 3 lists it.
tools/phone-smoke report

phone-smoke: husky

Kernel 7.3.0-rc6-omamobile-push1-gc7a0b2ef2f66-dirty, tools at bb11919, 2026-11-01T11:15Z.

Check Result Detail
boot (required) ok kernel 7.3.0-rc6-omamobile-push1-gc7a0b2ef2f66-dirty, slot b, up 3292s
storage guard (required) ok 62 partitions; only userdata and slot B's boot images writable
root (required) ok ext4 on userdata, 215G free
kernel health (required) ok no oops or BUG; 0 WARN, 0 error lines in dmesg
systemd units ok none failed
USB gadget (required) ok bound to 11210000.usb
display ok card0-Unknown-1 connected, 1344x2992
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 true)
touch ok SALIXP Touchscreen
buttons ok gpio-keys
Wi-Fi skip no wireless interface
Bluetooth skip no controller
battery ok 75% Discharging, 33 °C
sound cards skip none
sensors skip no sensor proxy
cameras skip no libcamera tools
thermal ok hottest zone 33 °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-device-husky 0.1.1-1, omamobile-firstboot 0.1.2-1, omamobile-keyring 20261026-1, omamobile-mirror 0.1.1-1, omamobile-omarchy 0.1.20-1, omamobile-owl-widgets 0.1.1-1, omamobile-shell 0.2.45-1, omarchy 4.0.6-1, quickshell 0.3.2.r7.g2b4501a-1

@derekross

Copy link
Copy Markdown
Owner

Thank you, Lef. This is a remarkable day's work, and the notes are some of the most honest I've had: every claim tagged, the reviews of your own tool listed with what they found, and the one-change-per-boot exceptions admitted instead of hidden. Reading the pack ID from the EEPROM, finding that the fallback model overstated the charge by ten points, and correcting it the same day is exactly the kind of result I hoped this work would produce.

What I checked: the five overlays compile with -@ and apply cleanly to zuma-husky.dtb built from kernel #175's head, which sits on #163. The applied DT carries the ATL model's 48 table words and 27 parameters on fuel-gauge@36, with DesignCap 0x09cf, Config 0x4217, TGain/TOff 0xed51/0x1eba and TaskPeriod 0x2d00, matching your dmesg line. The binding on omamobile accepts maxim,fg-model (48) and maxim,fg-params (27 or 28) on maxim,max77759-fg. The guard and undo logic in husky-deadman-phone follow the same order as the Pixel 7 Pro's: arm, apply, confirm over a fresh login, soak, then disarm. Policy and tests pass, with no identifiers in the diff or the thread.

A few things before it lands:

  1. The recovery text in tools/husky-deadman has the Pixel 7 Pro's buttons. recovery() says "Hold Power ~30 s until the phone is off" (steps 2 and 4). On the 8 Pro, Power alone does nothing under our kernel. The forced restart is Power + Volume Up held 15-30 s, then Power + Volume Down for fastboot (BRINGUP-M1 test 23, CONTRIBUTING §3.4). This is the text someone reads when the phone has stopped answering, so it has to be right. Step 4 also points at build/out-battery/images-m2-known-good, a path that only exists on your machine. Please name it as "your known-good image set".

  2. Every on-purpose reset spends one of slot B's tries. Section 9 explains that the install was lost after "a set of drills and reboots in one session". The runbook and the tool don't count boots, though. wd-drill and final_reset each reset the phone, and so does every reboot between steps. On your phone, the step after the last try is a fallback to slot A, whose first boot wiped userdata. Please put this in section 3 (safety) and in the tool:

    • count the boots since the last bin/omamobile flash (which gives B three tries again);
    • before any step that can reset the phone, make sure that reset won't be the one that leaves B with none;
    • print that warning in wd-drill's start message and in recovery().

    Until I've decided how slot B gets marked on the 8 Pro (I'll answer that on Marking slot B successful: the plan after #125's hold, and for the Pixel 8 Pro #252), refilling the tries with a flash of a known-good set is the safe routine.

  3. Which kernel ran, compared with omamobile-modem 0.1.10: the modem profile starts once per boot #163 as it stands. The notes say the booted commits are husky-battery-i2c in the published branch. On your fork, the branch is husky-battery-i2c-booted, and omamobile-modem 0.1.10: the modem profile starts once per boot #163 has moved since. A range-diff shows two new binding commits, the comment rewrites, and one functional change: the hsi2c_11 pins went from PULL_NONE (booted) to PULL_UP (omamobile-modem 0.1.10: the modem profile starts once per boot #163's head). Section 3 mentions a "pull-up test overlay", but it isn't in this PR. Please add a clause like the one Brett added for Wi-Fi: what the booted tree had, what changed, and whether the pull-up was booted (with which overlay or tree). The same goes for the EEPROM: pack-eeprom-test.dtso and section 5.6 need kernel omamobile-shell 0.2.40: hide and show the keyboard from the home pill #175. Please name it in both, so the overlay can be traced to a tree.

  4. The matrix cells. The Touch cell next door says "on a test kernel". Battery and Charging need the same qualifier, and they also need to say that the gauge's model comes from a bring-up overlay that isn't in DTB_OVERLAYS. A user flashing today's images gets neither. For example: "testing (gauge with Google's ATL model through a bring-up overlay, temperature, MFD, on a test kernel, kernel omamobile-modem 0.1.10: the modem profile starts once per boot #163; notes)", and for Charging, "testing (the charger driver by hand under a dead-man tool, slow on plain 5 V, on a test kernel, kernel omamobile-modem 0.1.10: the modem profile starts once per boot #163; notes)".

  5. Merge order. omamobile-modem 0.1.10: the modem profile starts once per boot #163's own comment says the device package must block the charger before an overlay that enables this bus ships. So this one goes after omamobile-device-husky 0.1.4: the USB replug rescue and the MAX77759 blocklist #250. It also conflicts with Brett's Wi-Fi notes (device/husky: Wi-Fi on a test kernel #216) on the husky row of docs/DEVICES.md. The two PRs change different cells (Wi-Fi there; Battery and Charging here), so the resolution is mechanical, and I can do it when I merge if you like.

Smaller things, not blocking:

  • Hand writes to the gauge. Section 5.3's TEMP/Config/TGain/TOff writes and section 5.6's 0x000F to register 0x60 were done carefully, with read-backs and a reason for each. The gauge has no non-volatile memory, so nothing permanent was at stake. Still, the ROADMAP row keeps "Do not poke the PMIC from userspace" next to them. Please mark both in the notes as one-off research that isn't a runbook step, and say that repeating them waits for a go. Please also word the ROADMAP line to match ("no hand writes to the PMIC or gauge outside a reviewed tool; the notes list the ones made").
  • The source of the stock tables. Section 2 takes the stock DT from "a copy of the GrapheneOS husky images". For data we ship (the model tables), please cite Google's own source, either the factory image's dtbo or Google's husky device tree in their GPL kernel tree, so anyone can regenerate the overlays from it.
  • tools/gen-gauge-overlay.py has no SPDX header.
  • Line 39 says 0x09cf is reported as 5,022,000 uAh at "0.5 mAh per unit". It's 2 mAh per unit: 1 mAh from the 5 mΩ shunt, doubled because the driver scales by TaskPeriod 0x2d00 over the default 0x1680. Section 5.6 has it right.
  • Section 11's items 1 and 2 say the same thing. Section 12's file list misses three of the overlays and mentions the package changes, which are in omamobile-device-husky 0.1.4: the USB replug rescue and the MAX77759 blocklist #250. The ROADMAP's "Next: the pack ID" is done now (5.6).
  • tools/husky-deadman-phone finds the bus by address only. A check of the board's compatible (google,zuma-husky) at the top would make it refuse other phones by name rather than by luck.
  • work/logs-gauge-irq-170-test.txt is a local path. "kept locally" is enough.

Thanks again. With items 1 to 4 in, I'm glad to merge this right after #250.

Somnius and others added 7 commits November 1, 2026 17:55
…ator

Three overlays for the MAX77759 steps of the battery plan, none default,
listed through DTB_OVERLAYS like the other devices':

- battery-clk-test: CMU_PERIC1 and its sysreg, USI11 and the bus still off
  (step M2b);
- battery-i2c-test: also USI11 and hsi2c_11, the bus of the gauge, PMIC,
  charger registers and Type-C controller (M3). They need kernel derekross#163;
- gauge-model: Google's ModelGauge m5 model for the pack, as
  maxim,fg-model and maxim,fg-params on the fuel gauge (M4c).

Without a model the gauge stays in its power-on state (Status 0x0002,
Config 0x2354) and reports a battery temperature stuck at exactly 22.0 C:
the same gauge on a Pixel 7 does the same without its model and reads
33.1 C with it (kernel derekross#171). With default-a1-0k (what Google's driver
falls back to for an unknown pack) loaded through this overlay the driver
logs "battery model loaded (DesignCap 0x994, TaskPeriod 0x2d00)", the
power-on bit clears, and the temperature reads 34.4 C and moves. The pack
(ATL, COS or LSN) is not known yet, so the percentage may be a few points
off; the charge voltage comes from the device tree, not the model.

tools/gen-gauge-overlay.py writes the overlay from Google's stock husky
node, so no number is typed by hand: each stock u32 table cell becomes
two u16 words, the stock parameter bytes become big-endian u16 words in
the order of struct max77759_fg_params. The shipped gauge-model.dtso is
its output for default-a1-0k.

tests/device-overlays compiles all three with dtc -@ (48 overlays ok).
Booted on a Pixel 8 Pro (7.3.0-rc6, slot B): all three, in order.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…r runs

Ported from tools/usbc-deadman for the Pixel 8 Pro. A step runs detached
on the phone and undoes itself unless the desktop gets back in over a new
SSH login and confirms, a guard watches the battery, and if even the undo
fails the SoC watchdog resets the phone, which boots with the charger
driver blocked.

Steps: noop, wd-drill (stops feeding the watchdog on purpose) and
b3-charger (modprobe max77759_charger with default_ilim_ua, temp_guard
and the gauge as guard_psy). Preflight refuses unless the gadget is
configured, the MFD is loaded, the charger and Type-C drivers are not,
the charger is blocked in modprobe.d (blacklist or install), the battery
is 30 to 80 %, at most 4.15 V, 10 to 40 C and not exactly 22.0 C (a stuck
gauge), the input limit is at most 900 mA, and no b3-charger ran this boot
(the MFD register cache goes stale after any i2cset). The guard checks
every 2 s: more than 4.30 V or under 3.0 V, above 45 C or under 5 C, more
than 1.7 A either way, three bad reads. The undo unloads the module,
restores registers 0xbb, 0xbd and 0xc2, sets the mode to OFF and then
0x4, and reads it back; it leaves charging off. After the soak nothing
guards the charger: undo by hand, and reboot before another run.

Went through two review rounds before the first run (not by a maintainer) and a third on the final plan. The
first real runs found two more bugs, both fixed here: the blocklist's
"install ... /bin/false" line made the tool's own modprobe run /bin/false
(it uses modprobe --ignore-install now), and a probe failure could leave
charging on with no driver (it now requires the max77759-charger power
supply to exist after the load).

Run on a Pixel 8 Pro: noop, noop without confirming (the phone undid it
by itself), wd-drill (the phone reset and came back with the charger
unloaded), then b3-charger at 500 mA, at 900 mA and with a wall charger,
10 minute soaks. Nothing tripped; the numbers are in the notes.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The runbook and the results of the battery work on a Pixel 8 Pro, step by
step (M1 to M5): the bus, the gauge, the MFD, the gauge model, the
dead-man tool, three charger runs (500 mA and 900 mA on a desktop USB
port, and a wall charger), the USB replug problem, the slot B retry
problem and what the devinfo bytes show about it. Each claim says whether
it was verified or not. The open questions are listed in order: the pack
ID, a device-tree model, the charge limits, whether a reset restores the
charger registers, the Type-C step, and the boot-success marker.

Also move the husky Battery and Charging rows in device/husky/ROADMAP.md
and the matrix in docs/DEVICES.md from "no" to "testing", with what that
means: the gauge and temperature work with the model overlay, and the
charger driver only ran in guarded runs and charges slowly on plain 5 V.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…y run, stock charging decoded

Three additions to the notes, each from work done after the first version.

The gauge interrupt: on a Pixel 8 Pro the stock max17042_battery module
raises 400 to 470 interrupts per 1 % step of the battery level (466 and
402 measured, from /proc/interrupts every 30 s under a CPU load), the
burst kernel derekross#170 describes. With derekross#170's patch the next two steps each
add 1 interrupt. Only the module was rebuilt (release name pinned) and
swapped on the running phone; the model stayed loaded.

The boot-success marker: cheetah's omamobile-bootctl dump, run read-only
on the three backups of husky's devinfo partition, prints version 3.15
"verified layout" and the same slot bytes as the hand decode.

Stock's charging, decoded from the stock device tree and Google's GPL
sources: the temperature bands and voltage tiers with the current limits
as mA and C-rate, that all the bands are software (no JEITA registers in
the charger chip, the fast-charge timer disabled), what the PCA9468 does
and what is lost without it, how the input limit is voted, and a
proposal for a first safe step beyond 4.2 V and 1.485 A, for review. The
tables were recomputed independently and match; nothing is implemented.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ck ID results

The battery pack's ID is byte 0x17 of its EEPROM (an at24c08 at 0x50 on
hsi2c_9, USI9), and on a Pixel 8 Pro it reads 1: an ATL pack. Google's
driver matches that byte against the gauge models (0 default-a1-0k, 1
atl-a1-1k, 2 cos-a1-2k, 3 lsn-a1-3k, 170 Google's dummy), so the model
this directory has used so far, the fallback default-a1-0k, was the wrong
one: with the right model loaded the reported level fell from 70 % to
60 % at the same voltage (3.95 V), and charge_full_design is the 5,022,000
uAh the gauge showed before it fell back to its power-on state (the ATL
model's DesignCap 0x09cf, times 2 mAh).

Add gauge-model-atl.dtso, and regenerate gauge-model.dtso from the same
source: the husky MP overlay (ov8), where the ATL node has DesignCap 0x09cf
and model version 5; the Pixel 8's overlay (ov16) has other ATL, COS and
LSN nodes (a smaller pack), so the notes and the generator now say which
file to use. The generator's header no longer assumes the fallback model.
Add pack-eeprom-test.dtso, which switches USI9 and hsi2c_9 on (needs the
kernel change that adds them).

BATTERY-NOTES.md gets the new section 5.6: how the ID was read (only byte
0x17 was ever read; the rest of that EEPROM holds the pack's part number
and history), why the model has to be reset to be replaced (the driver
loads it only while Status bit 1 is set; writing that bit does not stick),
the hardware reset that worked (driver unloaded, 0x000F to register 0x60,
read back at every step: power-on defaults, then the ATL load), and what
is not verified. It also corrects the DesignCap figures of the first
version, which came from the Pixel 8 overlay.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A fourth charger run, after the gauge model was corrected to ATL, with a
30-minute guard on the phone and the cable moved from the desktop's USB
port to a wall charger: the net battery current averaged -55 mA on the
port and +38 mA on the charger (positive in 146 of 156 samples, at most
+95 mA), the voltage rose by 9 mV, the battery stayed at 33.5 to 34.6 C,
and the level went from 59 to 60 % in about 55 minutes. The charger's
registers were the same on both sources. The notes say so, and that why
is not verified: probably that neither source is allowed more than the
default current without a Type-C driver.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The tool's recovery text had the Pixel 7 Pro's buttons: on the 8 Pro the
forced restart is Power + Volume Up for 15 to 30 s, then Power + Volume
Down for fastboot, and the known-good set is "your known-good image set".
Both the recovery text and wd-drill's start message now warn that every
reset spends one of slot B's three boot tries. The phone half refuses a
board that is not google,zuma-husky.

The notes get a boot-count rule in the safety section, a clause on which
kernel was booted against derekross#163 and derekross#175 as they stand, the hand writes
marked as research, the stock tables' source, the 2 mAh per unit fix, the
overlay list, and the matrix cells qualified as a test kernel. gen-gauge-
overlay.py gets its SPDX header.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Signed-off-by: Lef <me@lefteros.com>
@Somnius
Somnius force-pushed the husky-battery-bringup branch from b892e24 to d540bc6 Compare November 1, 2026 15:56
@Somnius

Somnius commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor Author

Thanks @derekross. Rebased onto main (the DEVICES.md conflict with @greenbrettmichael's rows is resolved, I kept his Wi-Fi/touch cells and only changed Battery and Charging) and pushed a commit with your items:

  1. recovery() has the 8 Pro buttons now (Power + Volume Up for the forced restart, then Power + Volume Down for fastboot) and says "your known-good image set" instead of my path.
  2. The boot count is in the safety section and in wd-drill's start message and recovery(): every reset spends one of slot B's three tries, count the boots since the last flash, flash a known-good set when one is left.
  3. Section 3 says which kernel was booted (husky-battery-i2c-booted, pins at PULL_NONE), what omamobile-modem 0.1.10: the modem profile starts once per boot #163 changed since (the PULL_UP pins, which I booted separately with a one-line overlay), and that the EEPROM overlay and 5.6 need omamobile-shell 0.2.40: hide and show the keyboard from the home pill #175.
  4. Battery and Charging cells use your wording.
  5. Fine with merging after omamobile-device-husky 0.1.4: the USB replug rescue and the MAX77759 blocklist #250, and the DEVICES.md part is already done.

Also in: the hand writes are marked as one-off research (and the ROADMAP line reworded the way you suggested), the stock tables point at the factory image's dtbo and Google's GPL source, the 2 mAh per unit fix, SPDX on the generator, a google,zuma-husky check in husky-deadman-phone, the overlay list in section 12, and the local log path is gone.

@derekross

Copy link
Copy Markdown
Owner

Thank you, Lef. I've gone through the new commit point by point, and every item is in:

  1. recovery() now has the 8 Pro's buttons (Power + Volume Up to force a restart, then Power + Volume Down for fastboot) and says "your known-good image set".
  2. The boot count is in section 3, in wd-drill's start message and in the recovery text, including what to do with one try left.
  3. Section 3 says what was booted (husky-battery-i2c-booted, pins at PULL_NONE), what omamobile-modem 0.1.10: the modem profile starts once per boot #163 changed since, that the pull-up was booted separately, and that the EEPROM overlay and 5.6 need kernel omamobile-shell 0.2.40: hide and show the keyboard from the home pill #175.
  4. The Battery and Charging cells carry "on a test kernel" and the bring-up overlay.

The smaller ones are in too: the hand writes marked as one-off research, the ROADMAP line reworded, the 2 mAh per unit fix, the SPDX header, and the google,zuma-husky check in the phone half. The rebase onto main kept Brett's Wi-Fi and touch cells and changed only yours. It merges cleanly with #250, and the husky tests pass on the combination.

Since you've allowed edits, I'll make a few last touches myself when I merge, after #250:

Two notes for later, not for this PR:

  • The model. Section 11 now leans towards reading the pack ID at runtime, because a fixed ATL model would be wrong on a COS or LSN pack. That's a fair point. My preference from Pixel 8a (akita / zuma, Tensor G3) port: offering hardware and help #1 still stands for now: the ATL model in the board file, with a comment that stock picks the table by the ID at 0x50. A driver change to read the ID can follow once we know what the mainline gauge driver can take.
  • The stock tables. Section 2 now names the factory dtbo, which is what I asked for. Next time you regenerate the overlays, please decompile Google's own factory image rather than another distribution's copy, and drop that mention. Then anyone can reproduce the tables from the same file.

Thanks again for turning the review around so carefully.

@derekross derekross closed this in 196c7cf Nov 1, 2026
@derekross

Copy link
Copy Markdown
Owner

Landed on main as 196c7cf (squashed, authored by you), with the four small edits I listed. Thanks, Lef.

@Somnius

Somnius commented Nov 1, 2026

Copy link
Copy Markdown
Contributor Author

@derekross thanks, the four edits are fine by me. On the stock tables: I only have the GrapheneOS copy of the husky images here (that's where ov8.dts came from), not Google's own factory zip. Next time I regenerate the overlays I'll download the factory image, decompile its dtbo, check the tables match, and cite that file instead.

@Somnius

Somnius commented Nov 1, 2026

Copy link
Copy Markdown
Contributor Author

@derekross an update on the stock tables, and I'm dropping what I said about downloading the factory image: Google's download page says the factory images "may not be disassembled, decompiled, reverse engineered", so I won't decompile one.

Google's own published source has the tables, under GPL-2.0-only: dts/zuma-husky-battery-data.dtsi in kernel/devices/google/shusky, branch android-gs-shusky-6.1-android16 (https://android.googlesource.com/kernel/devices/google/shusky/+/refs/heads/android-gs-shusky-6.1-android16/dts/zuma-husky-battery-data.dtsi). I compared its maxim,atl-a1-1k node with our gauge-model-atl.dtso with a script: the 48 model words and the 27 parameters are identical (DesignCap 0x09cf). I haven't compared the other model nodes yet.

tools/gen-gauge-overlay.py reads the decompiled form, not this source file. If you're ok with it, I'll teach it to read the source file directly in a follow-up, so anyone can regenerate the overlays from the same public file, and change the notes' "decompiled dtbo" wording to point at it. I can send that edit now if you'd rather not make it at merge.

@derekross

Copy link
Copy Markdown
Owner

@Somnius thank you, that's a better source than the one I suggested. I fetched zuma-husky-battery-data.dtsi from that branch and compared it too: it's GPL-2.0-only, and its maxim,atl-a1-1k model and parameters match gauge-model-atl.dtso word for word. Yes, please send the follow-up: teach gen-gauge-overlay.py to read that file directly, and point the notes at it instead of a decompiled dtbo. Then anyone can regenerate the overlays from a public, licensed file. While you're there, a comparison of the other model nodes would be welcome in the same PR.

robertzas pushed a commit to robertzas/omarchy-mobile that referenced this pull request Nov 14, 2026
…sults (derekross#249)

The 8 Pro's battery bring-up: the overlays that enable the gauge's bus,
the gauge model and the pack EEPROM, the husky-deadman tool for charger
steps, and BATTERY-NOTES with the results and the recovery steps. The
battery and charging cells in DEVICES say "on a test kernel".

Maintainer edits at merge: the notes' file list names the overlays in
this change, the USB rescue's version is 0.1.4 (derekross#250), the summary table
points at the slot B marking hold (derekross#252), and the dead-man's recovery
text no longer assumes the block is in /etc/modprobe.d.

Closes derekross#249

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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