Skip to content

husky-deadman: b5-host stage (a) with baseline, boot undo and bypass registers, and the host-mode runbook (draft) - #282

Draft
Somnius wants to merge 15 commits into
derekross:mainfrom
Somnius:husky-b5-host-draft
Draft

Somnius wants to merge 15 commits into
derekross:mainfrom
Somnius:husky-b5-host-draft

Conversation

@Somnius

@Somnius Somnius commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

@derekross this is the draft PR you asked for on #272: the b5-host tool and the runbook, so you can read the guard, the undo and the latch yourself. It's a draft, not meant to merge. Nothing in it has run on the phone in this form, and nothing will until you say go.

The runbook is device/husky/HOST-MODE-RUNBOOK.md, linked from BATTERY-NOTES.md. Your six points, where each one is:

  1. The tool is in the PR (tools/husky-deadman and tools/husky-deadman-phone), and the runbook cites Google's gs101_standby_to_otg(), gs101_otg_enable(), gs101_otg_bypass_enable()/_disable(), gs101_ls_mode(), gs101_ext_mode() and gs101_ext_bst_mode() in max77759_usecase.c, with line numbers.
  2. The meter is required: the phone refuses to start without --meter, and the runbook says the meter, not the TCPC's 0x70, is the measurement. It also answers the charging-current question on Pixel 8a (akita / zuma, Tensor G3) port: offering hardware and help #1. The tool can't read the meter, so that part stays a person looking at it.
  3. The hot-port rule (nothing that can source plugged in during a stage, and on trouble the load comes out first) is in the runbook. A partner showing a source's Rp in CC_STATUS refuses the run or undoes it at once. There is a oneshot undo unit installed for that boot only, with a marker, that sets 0x92, GPIO5 and the bypass registers back early in the next boot and removes itself. The runbook has the manual fallback and what to do if the phone freezes (unplug, force a restart, run the undo first thing).
  4. New read-only step baseline (cable out, nothing written): it logs CHG_DETAILS_00/01/02 five times, and b5-host refuses without one from this boot. The guard trips on a change from that baseline, not on the absolute 0xb1. With MODE 0x00 those fields will probably move, so the first run is expected to stop right there before VBUS comes on, and the runbook says that.
  5. Bypass registers: CHG_CNFG_11 = 0x00 (5000 mV, husky's stock node has no usb-otg-mv) and OTG_V_PGM, bit 3 of CHG_CNFG_18, saved before and restored at undo. The bit comes from Google's register headers. I haven't checked it against a datasheet.
  6. Stage (a) only: --device is refused. The runbook has the regulator-fixed on GPIO5 as vbus-supply (never boot-on or always-on) as the later kernel path, with its own runbook. It also says writing 0x92 with i2cset -f while tcpci_maxim is bound is research only, with the "0x92 changed" guard.

Also in the PR: the two overlays the tool refers to (typec-test.dtso, usb-role-test.dtso) and tests/husky-deadman, which uses stubs (fake i2cget/i2cset/gpioset in a throwaway namespace), 18 checks: the undo unit and marker, the refusal without a baseline, the apply-failure undo, the unit not firing without its marker, and the others.

What ran: bash -n on both tools, the new test, tests/device-overlays (55 overlays compiled with the kernel's dtc), tools/pr-check origin/main. What didn't: shellcheck (not installed), and anything on the phone. What I don't know is in section 8 of the runbook: the unit's ordering against the I2C and GPIO drivers at boot, whether libgpiod is on the phone, whether 0xcb needs the CHGPROT unlock, and what MODE 0x00 does to the charger details. The 5 ms between GPIO5 and 0x92 can't be exactly kept with gpioset, so the tool logs the real time instead.

@derekross

Copy link
Copy Markdown
Owner

@Somnius thank you, this is a careful piece of work, and opening it as a draft is exactly what I asked for. The tool, the runbook and the tags make it easy to see what's verified and what isn't. I read all of husky-deadman-phone, not just the new hunks, and checked the citations myself.

What I checked and agree with

  • Your line numbers in max77759_usecase.c (android-gs-shusky-6.1-android16) all match: gs101_ls_mode 144, gs101_ext_mode 220, gs101_otg_bypass_enable/_disable 370-389, gs101_otg_mode 729, the default branch at 833, gs101_ext_bst_mode 920, the 5-1 comment at 945-955, gs101_standby_to_otg 985, the off path at 1199-1204, and max77759_otg_vbyp_mv_to_code at 1281. The on order, the off order and MODE 0 are Google's.
  • OTG_V_PGM is bit 3 of CHG_CNFG_18 (0xCB) in max77759_A1_regs.h, lines 2383-2386.
  • 0xc4 = 0x00 is right. The use-case properties are in Google's GPL dts/zuma-shusky-usecases.dtsi (kernel/devices/google/shusky, same branch): bst-on is max777x9_gpio 4, extbst-ctl is TCPC GPIO 0, ext-otg-only and bst-lsw-sequence are set, and there's no usb-otg-mv. Please cite that file in sections 1 and 5 instead of the decompiled ov8.dts. It says the same thing, and anyone can read it.
  • The rules I care most about are met. Nothing gets a vbus-supply, regulator-boot-on or regulator-always-on. The connector stays sink-only. The unit at boot only switches things off, and only while the marker exists. Runs are started by hand with you watching, under the watchdog with confirmation over a fresh login. The soak ends in the undo. Each step has a stop condition and a rollback. --meter, the baseline, the CC check and the hot-port rule are all in.

Before I can say go on a4

  1. Plans that aren't in the repository. HOST-MODE-PLAN.md and TYPEC-FAST-CHARGE-PLAN.md are cited in both overlays, in the tool's header and in runbook section 7 (as "[verified]"), but neither exists. Please add them or point at sections that exist.
  2. The earlier b4-tcpm and usb-role-test boots. This PR brings in b4-tcpm and both overlays, and a0 and a3 depend on them. But BATTERY-NOTES.md still says the Type-C controller has no driver loaded (the table in section 2). From Pixel 8a (akita / zuma, Tensor G3) port: offering hardware and help #1 and Runbook for review: host mode with VBUS on the 8 Pro (nothing runs before you say go) #272 I understand they've already run on your phone. Please record those boots (date, uname -r, what USB and Wi-Fi did, any tcpm hard resets), and give a3 its own Expect and Stop instead of "as b4". With that record, a3 and a4 in the same boot is fine with me.
  3. An undo that resets a cold port. In the same boot, revert b5-host returns 1 when only the register restore fails (0xcb, 0xc4 or 0xb9), even with 0x92 and GPIO5 read back at 0. run then goes to final_reset, which costs a slot B try for nothing. Please split it as boot-undo already does: reset only when the port isn't proven cold, and otherwise leave the saved values in registers-not-restored and refuse the next run.
  4. What boot-undo writes back. After a reset, boot-undo writes the previous boot's 0xb9, 0xc4 and 0xcb back unconditionally, from a unit at boot. MODE 0x05 is "buck and charger on", so that can turn charging on over whatever this boot's bootloader chose. Please make it undo only what still reads as b5-host's own write: MODE only if it reads 0x00, bit 3 of 0xcb only if it was clear before and is set now, and 0xc4 only if it was different before and reads 0x00 now. Anything else stays as the bootloader left it, and gets logged.
  5. A reset with the boost on. The tool has no signal trap, and the runbook counts on that for a6. But it also means that an ordinary systemctl stop, or a reboot during a run, leaves the port hot until the next boot. Please trap TERM, INT and HUP and run the b5 undo there. For a6, the case the boot undo exists for is a reset that skips shutdown, so please drill it that way: the tool's own watchdog path (stop feeding), or echo b > /proc/sysrq-trigger, not reboot-to. Also, a6 needs a4's answer to section 8 item 4 first. If the charger's CHGIN sees the phone's own 5 V, then after a reset the bootloader may start charging from the phone's own boost until boot-undo runs. Please say in a6 what you'd watch for and when you'd stop. a6 will also be a separate go from me, after a4's results.
  6. A small one: the charger_loaded refusal in preflight (line 526) still says b5-host sources "with MODE 0xb9 untouched". It now writes MODE 0.

Questions, not blockers

  • boot-undo loads gpio_max77759 but not max77759. If the MFD isn't up by basic.target, the GPIO cell won't appear either, and the marker stays for every boot. Loading max77759 explicitly first would make that predictable.
  • Please run shellcheck on both tools before the next push, if you can install it.

Fine to do now: the read-only baseline and the read-only Baseus run at the 500 mA step, as you planned on #272. Neither writes anything. Nothing that sources until the points above are in, the meter is in hand, and I've said go.

Thanks again. The baseline-relative guard and the cold-port-first logic in boot-undo are just what I hoped for.

@Somnius
Somnius force-pushed the husky-b5-host-draft branch from d63de5c to 41d042d Compare November 2, 2026 08:52
Somnius added a commit to Somnius/omarchy-mobile that referenced this pull request Nov 2, 2026
…k only its own, signals undo first

Changes from the maintainer's review of the draft (derekross#282):

- revert b5-host returns the port cold (0x92 and GPIO5 read back 0),
  nothing else. A failed restore of 0xcb/0xc4/0xb9 with the port cold
  leaves the saved values in /var/lib/husky-deadman/registers-not-restored,
  which the next b5-host refuses on, and never makes run() reset the
  phone (a reset costs a slot B try). Only a port not proven cold keeps
  the marker and returns failure.
- boot-undo (and the same-boot undo) put back only what still reads as
  b5-host's own write: MODE 0xb9 only if it reads 0x00, bit 3 of 0xcb
  only if it was clear before and reads set now, 0xc4 only if it was
  different before and reads 0x00 now. Anything else stays as the
  bootloader left it and is logged, so a unit at boot never turns
  charging on over this boot's bootloader.
- TERM, INT and HUP during b5-host run the undo first (systemctl stop
  or a reboot during a run must not leave the port hot); the watchdog
  feeder ignores the signal until that undo has asked it to close.
- boot-undo loads max77759 (the MFD) before gpio_max77759, waits a
  bounded time for each, and keeps the marker if either never shows up.
- The charger_loaded refusal says what b5-host writes (MODE 0x00 and
  the bypass registers), not "MODE untouched".
- shellcheck: no new warnings against main's two tools (the remaining
  ones are main's); the a && b || c patterns the new code added are
  braced.

tests/husky-deadman covers each: a 0xcb that refuses the set (undo, no
reset), a 0xcb that refuses the clear after a clean soak (port cold,
registers-not-restored, no reset), boot-undo leaving a new boot's MODE
0x05 and 0xc4 alone and clearing only the OTG_V_PGM bit, boot-undo with
the MFD missing (modprobe tried, nothing written, marker kept) and once
it loads, TERM mid-soak (undo, watchdog closed). 24 ok. Nothing has run
on the phone.
Somnius added a commit to Somnius/omarchy-mobile that referenced this pull request Nov 2, 2026
…o ignores a second signal, the result says it

From the second review round of derekross#282:

- restore_own_writes: an unreadable 0xc4 or 0xb9 (empty read) is a
  failed restore, as 0xcb already was: registers-not-restored is
  written and "registers restored" is not reported.
- revert b5-host: in the "no saved registers anywhere" branch a failed
  bit-3 clear now also writes registers-not-restored (a note instead of
  the saved values), so the next run is refused as in the other case.
- A failed register restore after a clean soak shows in the result
  ("soaked: VBUS off, but 0xcb/0xc4/0xb9 were not all restored, see
  ..."), and after a trip in the tripped result; the desktop tool
  prints it as a warning. The port is off in both cases.
- revert ignores TERM, INT and HUP from its first line, so a signal
  during the watchdog close cannot start a second undo and overwrite
  the result with "interrupted".

tests/husky-deadman: INT and HUP cases next to TERM (started with job
control on, since a non-interactive shell's background job has SIGINT
ignored, which systemd-run does not do); boot-undo with MODE reading
0x00 asserts the saved 0x05 is written back; the stuck-set case asserts
MODE restored; an unreadable 0xb9 at the restore (file written, result
says so); the quoting slip fixed. 27 ok, three runs in a row.
shellcheck -S warning: the three remaining warnings are on main's own
lines (one SC1007, two SC2046); none new.
@Somnius

Somnius commented Nov 2, 2026

Copy link
Copy Markdown
Contributor Author

@derekross thanks for reading all of it. I rebased #282 onto main (with #279 in) and added four commits on top, head 41d042d. Point by point, in your order:

  1. The plans are in the repo now: device/husky/HOST-MODE-PLAN.md and TYPEC-FAST-CHARGE-PLAN.md, written for the repo and with the citations pointing at them. I also cite dts/zuma-shusky-usecases.dtsi instead of the decompiled dtbo, in sections 1 and 5: bst-on is max777x9_gpio 4, extbst-ctl is TCPC GPIO 0, ext-otg-only and bst-lsw-sequence are set, and there's no usb-otg-mv. OTG_V_PGM is bit 3 of CHG_CNFG_18 in max77759_A1_regs.h, lines 2383-2386, as you said.
  2. The three boots from yesterday are recorded in BATTERY-NOTES.md 7.2 (the b4-tcpm boot, the charger plus Type-C soak, and the usb-role-test boot), all on 7.3.0-rc6-omamobile-push1-g5899fec2bd28, with what USB and Wi-Fi did and no hard resets are recorded in any of them. It comes from my own notes, so where a detail isn't in them it says unknown. The section 1 table no longer says there's no driver. a3 has its own Expect and Stop, and a3 and a4 can share a boot.
  3. revert b5-host now decides on the port: if 0x92 and GPIO5 read back 0 it's cold, and a failed restore of 0xcb, 0xc4 or 0xb9 leaves the saved values in registers-not-restored and refuses the next run. No final_reset for that case any more.
  4. boot-undo writes back only what still reads as b5-host's own write, with your rules: MODE only if it reads 0x00, bit 3 of 0xcb only if it was clear and is set now, 0xc4 only if it was different before and reads 0x00 now, anything else stays and is logged. An unreadable register counts as not restored. One thing the runbook says plainly: after a reset, MODE reading 0x00 could also be the bootloader's own choice, I can't tell the two apart, so in that case boot-undo could switch charging on. That's what your rule accepts, but I'd rather it was written down.
  5. TERM, INT and HUP are trapped during b5-host and run the undo. a6 is now a reset that skips shutdown, the tool's own watchdog path or sysrq b, not reboot-to, with what to watch on the meter and after boot, when to stop, and that it's a separate go from you after a4.
  6. The charger_loaded message is fixed.

Your questions: boot-undo now loads max77759 before gpio_max77759, waits up to 10 s for each, and keeps the marker if either never appears. I ran shellcheck on both tools: nothing new compared to main, what's left is on main's own lines. The test file is clean too. tools/pr-check is all ok and the 55 overlays compile with dtc -@.

Tests: tests/husky-deadman uses stubs, 27 checks now, covering the cold-port split, the conditional write-back, an unreadable register, TERM/INT/HUP and the boot-undo case. None of the new code has run on the phone. The phone is off until this evening, so the read-only baseline (cable out) and the read-only Baseus run at the 500 mA step will come after that, and I'll post both here and on #272. Nothing that sources until you say go.

@derekross

Copy link
Copy Markdown
Owner

@Somnius thank you, I've gone through the new head against the one I reviewed, point by point, and every one is in the code, not just the reply: the plans are in the repository with the zuma-shusky-usecases.dtsi citations; the three boots are recorded and a3 has its own Expect and Stop; a cold port no longer costs a reset and registers-not-restored blocks the next run; restore_own_writes follows the three rules exactly (thanks for writing down the MODE 0x00 ambiguity, which I accept); the signal trap is in, the feeder keeps its deadline, and the a6 drill uses a reset that skips shutdown; and the message is fixed. The boot-undo module order answers my question too.

Two small things:

  • The branch now conflicts with main in tests/all only: please keep main's list and add tests/husky-deadman to it.
  • One edge: if a TERM arrives after the trap is set but before b5-host has saved the registers, the undo finds no saved values and clears 0xcb bit 3 if it's set, which may be the bootloader's. Could that path skip the bit when neither the saved file nor the marker exists, in the spirit of rule 4?

Once the read-only baseline and the Baseus run at 500 mA are posted, I'll look at them and give you a decision on a4.

…registers, and the host-mode runbook

Draft: nothing here has been run on the phone beyond what the runbook
lists (one sourcing run on 2026-11-01 with an earlier version of the
tool). It answers the maintainer's review of the host-mode plan, point
by point, and opens the tool and the runbook for review.

The tool (tools/husky-deadman-phone, tools/husky-deadman):

- b5-host is stage (a) only: nothing on the port but a passive USB-C
  meter. --device is gone (dwc3 stays in device role, nothing can
  enumerate, the 1 s voltage poll is the only overcurrent detection);
  attached devices go through the kernel path later. The soak ends in
  the tool's own undo, so VBUS is never left on without the guard, and
  --no-watchdog is refused for this step.
- --meter is required: the operator's statement that an independent
  meter is on the port and reads 0 V. The TCPC's own 0x70 reading is
  logged, not trusted as the check; a word with the TCPCI scale bits
  set counts as unreadable instead of being scaled.
- A new read-only 'baseline' step reads CHG_DETAILS_00/01/02 five times
  with the cable out and keeps them for the boot. b5-host refuses
  without one and its charger guard trips on a change from the baseline
  in the fields mainline names, not on an absolute value (0xb1 was in
  every dump). The MODE 0x00 write is followed by a comparison: a change
  stops the run before any VBUS, so that reading can be reviewed.
- CC_STATUS 0x1d is decoded as tcpci.h does: a partner Rp refuses the
  step and trips the undo while sourcing.
- Google's bypass registers are programmed as gs101_otg_bypass_enable()
  does: CHG_CNFG_11 0xc4 = 0x00 (5000 mV, stock husky has no
  usb-otg-mv) and CHG_CNFG_18 0xcb bit 3 OTG_V_PGM (the bit is in
  Google's max77759_A1_regs.h and v0p65 headers), read-modify-write of
  that bit, CHGPROT unlocked only on a failed readback, both saved and
  restored by the undo.
- GPIO5 and 0x92 are PMIC registers, so a SoC reset is expected to leave
  the port hot. Before its first write the step enables
  husky-deadman-undo.service (oneshot, ConditionPathExists= a marker in
  /var/lib that carries the saved registers, TimeoutStartSec,
  RequiresMountsFor) and writes the marker last. 'boot-undo' runs early
  in the next boot: the port cold (0x92 and GPIO5 read back) removes the
  marker and the unit; registers it could not restore (charger driver
  loaded) go to registers-not-restored, which the next b5-host refuses
  on. A port not proven cold keeps the marker for the following boot. It
  cannot run on a normal boot: no marker, no run.
- The Pixel 8 Pro compatible check and main's recovery text, which the
  local branch had lost, are back.

device/husky/HOST-MODE-RUNBOOK.md is the gated runbook: Google's
functions cited by line, the meter rule, the hot-port rules (nothing
that can source during a stage, the load out first, the boot undo, a
fail-safe manual script after a freeze that deletes the marker only
after every readback), the baseline and guard definition, the bypass
values and their source, stage (a) with its three expected outcomes
(the first run most likely stops at MODE 0x00, no 5 V without
ext_bst_mode is allowed, 5 V and back to 0 V), pass, stop and rollback,
and the unknowns in one place. Every claim is tagged verified, inferred
or unknown. BATTERY-NOTES links it. The typec-test and usb-role-test
overlays it depends on are added.

tests/husky-deadman runs the phone tool against stubs in a user and
mount namespace, with a file bound over /dev/watchdog0: the refusals
(--meter, baseline, partner Rp, --no-watchdog, scale bits, leftover
marker or registers file), the unit written before the first register
write and armed through the soak, the soak ending in the undo with the
registers restored, the undo after a VBUS miss and after MODE 0x00
moving the details, the CHGPROT unlock path, boot-undo without and with
the marker and with the charger loaded, and a mid-soak Rp trip.
Ran: bash -n on both tools and the test, tests/device-overlays with the
kernel's dtc (55 overlays compile), tests/husky-deadman (18 ok),
tools/pr-check origin/main. Not run: anything on the phone; shellcheck
is not installed here.
…k only its own, signals undo first

Changes from the maintainer's review of the draft (derekross#282):

- revert b5-host returns the port cold (0x92 and GPIO5 read back 0),
  nothing else. A failed restore of 0xcb/0xc4/0xb9 with the port cold
  leaves the saved values in /var/lib/husky-deadman/registers-not-restored,
  which the next b5-host refuses on, and never makes run() reset the
  phone (a reset costs a slot B try). Only a port not proven cold keeps
  the marker and returns failure.
- boot-undo (and the same-boot undo) put back only what still reads as
  b5-host's own write: MODE 0xb9 only if it reads 0x00, bit 3 of 0xcb
  only if it was clear before and reads set now, 0xc4 only if it was
  different before and reads 0x00 now. Anything else stays as the
  bootloader left it and is logged, so a unit at boot never turns
  charging on over this boot's bootloader.
- TERM, INT and HUP during b5-host run the undo first (systemctl stop
  or a reboot during a run must not leave the port hot); the watchdog
  feeder ignores the signal until that undo has asked it to close.
- boot-undo loads max77759 (the MFD) before gpio_max77759, waits a
  bounded time for each, and keeps the marker if either never shows up.
- The charger_loaded refusal says what b5-host writes (MODE 0x00 and
  the bypass registers), not "MODE untouched".
- shellcheck: no new warnings against main's two tools (the remaining
  ones are main's); the a && b || c patterns the new code added are
  braced.

tests/husky-deadman covers each: a 0xcb that refuses the set (undo, no
reset), a 0xcb that refuses the clear after a clean soak (port cold,
registers-not-restored, no reset), boot-undo leaving a new boot's MODE
0x05 and 0xc4 alone and clearing only the OTG_V_PGM bit, boot-undo with
the MFD missing (modprobe tried, nothing written, marker kept) and once
it loads, TERM mid-soak (undo, watchdog closed). 24 ok. Nothing has run
on the phone.
… runbook revision 2

The two plans the overlays, the tool header and the runbook cite are
now in the repository: device/husky/HOST-MODE-PLAN.md (what is missing
for host mode, the external boost, the kernel patch outline, the staged
plan, stage 1's result) and TYPEC-FAST-CHARGE-PLAN.md (the limiter
chain, the stages, what has run). Both cite Google's GPL sources by
file and line and tag each claim.

BATTERY-NOTES gets section 7.2: the three Type-C boots of 2026-11-01 on
7.3.0-rc6-omamobile-push1-g5899fec2bd28: b4-tcpm charger-less (sink,
3.0 A, 0 hard resets, USB and Wi-Fi up, the driver closing the data
switch on a replug), charger plus Type-C in one boot (TCPM's 3 A drove
the input limit 0x13 to 0x77), and the USB role switch with no VBUS
(xHCI root hubs at 480 Mbit/s and 10 Gbit/s, back to device cleanly).
The section 1 table no longer says the Type-C controller has no driver.

HOST-MODE-RUNBOOK revision 2: Google's use-case properties cited from
kernel/devices/google/shusky dts/zuma-shusky-usecases.dtsi (lines 12,
13, 14, 31, 34) instead of a decompiled stock tree; OTG_V_PGM cited at
max77759_A1_regs.h:2383 and 2386; the undo's cold-port split and the
own-writes-only restore; the TERM/INT/HUP undo; a3 with its own Expect
and Stop (a3 and a4 in one boot); a6 as a reset that skips shutdown (the
watchdog path or sysrq b, not reboot-to), a separate go after a4 and
after a4 has answered whether CHGIN sees the phone's own 5 V, with what
to watch for the bootloader charging from the boost until boot-undo.
…o ignores a second signal, the result says it

From the second review round of derekross#282:

- restore_own_writes: an unreadable 0xc4 or 0xb9 (empty read) is a
  failed restore, as 0xcb already was: registers-not-restored is
  written and "registers restored" is not reported.
- revert b5-host: in the "no saved registers anywhere" branch a failed
  bit-3 clear now also writes registers-not-restored (a note instead of
  the saved values), so the next run is refused as in the other case.
- A failed register restore after a clean soak shows in the result
  ("soaked: VBUS off, but 0xcb/0xc4/0xb9 were not all restored, see
  ..."), and after a trip in the tripped result; the desktop tool
  prints it as a warning. The port is off in both cases.
- revert ignores TERM, INT and HUP from its first line, so a signal
  during the watchdog close cannot start a second undo and overwrite
  the result with "interrupted".

tests/husky-deadman: INT and HUP cases next to TERM (started with job
control on, since a non-interactive shell's background job has SIGINT
ignored, which systemd-run does not do); boot-undo with MODE reading
0x00 asserts the saved 0x05 is written back; the stuck-set case asserts
MODE restored; an unreadable 0xb9 at the restore (file written, result
says so); the quoting slip fixed. 27 ok, three runs in a row.
shellcheck -S warning: the three remaining warnings are on main's own
lines (one SC1007, two SC2046); none new.
…the signal path, a3 wording

The runbook now says the undo and the boot undo put 0xc4 and 0xcb's
bit 3 back only where they still read as the step's own write (the
function is restore_own_writes), that a register that cannot be read
or written back counts as not restored and goes to
registers-not-restored, and that the result shows it. A MODE reading
0x00 after a reset cannot be told apart from a bootloader that left it
at 0x00: the rule accepts that, and boot-undo may then switch charging
on over such a bootloader (unknown whether husky's ever does; every
dump read 0x05). The boot-undo paragraph names the max77759 modprobe
and its 10 s bound. The signal path notes the undo's ~5 s plus the
12 s watchdog close fit the transient unit's default 90 s
TimeoutStopSec. a3 says register 0x93 reads 0x09, as BATTERY-NOTES
7.2 records.
If TERM, INT or HUP arrives after the trap is set but before b5-host has
saved the registers, the undo found neither host.saved nor the marker and
cleared 0xcb bit 3 if it was set, which may be the bootloader's. It now
writes none of 0xb9, 0xc4 and 0xcb in that case and only switches the port
off. Test 9e2 covers it; the runbook says so in the undo paragraph.

tests/all: keep main's list and add tests/husky-deadman.
@Somnius
Somnius force-pushed the husky-b5-host-draft branch from 41d042d to 7538524 Compare November 3, 2026 17:39
@Somnius

Somnius commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

@derekross thanks for going through it point by point. Both small things are done, pushed to the same branch (head 7538524):

  • tests/all: the branch is rebased onto current main, I kept main's list and added tests/husky-deadman after tests/flame-probe. The diff against main in that file is that one word.
  • The edge you found: if TERM/INT/HUP arrives after the trap is set but before b5-host has saved the registers, the undo now finds neither host.saved nor the marker. It still turns the port off (0x92, GPIO5) but writes none of 0xb9, 0xc4 and 0xcb, so a set bit 3 in 0xcb is left alone. Test 9e2 covers it (bit set to 0xc8, no saved file, no marker, undo b5-host: no charger register written, nothing in registers-not-restored), and the undo paragraph in the runbook says it.

What ran: tests/husky-deadman on the stub, 28 ok, and shellcheck shows no new warnings against main. What didn't: nothing of the new code has run on the phone.

The read-only baseline and the Baseus run at 500 mA are next. The phone is charging on the Baseus brick right now, at about 20 %, so I'll do the cable-out baseline once it is above 25 %, then the Baseus run, and post both here and on #272 for your a4 decision. I'll note which commit of the tool ran, and read 0xc2 and TCPC 0x87 at plug-in so it's clear which step the Baseus actually got. I won't run anything that sources VBUS until you've decided on a4.

@Somnius

Somnius commented Nov 3, 2026

Copy link
Copy Markdown
Contributor Author

@derekross here are the two read-only things you said were fine to do now. Nothing was written to the phone and nothing sourced: the loaded modules were only max17042_battery and max77759 (no charger or Type-C driver), Wi-Fi as the way in, kernel 7.3.0-rc6-omamobile-push1-g5899fec2bd28, the tool is husky-deadman-phone from the #282 branch at 7538524 (only baseline, dump and register reads were used, plus a plain 30 s loop of i2cget).

Baseline, cable out (husky-deadman baseline, 5 reads, taken during a short unplug in the middle of the Baseus run below: the tool refused 11 times while the cable was still in, then passed. At that moment the loop had the battery at 25 %, discharging about 0.63 A, Wi-Fi up):

CHG_DETAILS_00 0xb5 = 0x00
CHG_DETAILS_01 0xb6 = 0xf8
CHG_DETAILS_02 0xb7 = 0x00
CHG_CNFG_00 mode 0xb9 = 0x05

The tool only passes when its 5 reads agree. With the Baseus brick plugged in the same registers read 0x60 / 0xb1 / 0x20.

Baseus brick (the 30 W GaN one from my earlier test, no data connection to a computer), logged every 30 s for 30 min, starting at 21 % and ending at 44 %:

  • 23 points in 29 min, 1 % about every 76 s on average, slowing a bit (about 68 s per percent from 21 to 31 %, about 85 s from 40 to 44 %; 21 % at 07:37, 31 % at 07:48, 40 % at 08:01, 44 % at 08:06, phone clock, it has no RTC). The unplug is one sample in the middle; by my count it was about 10 s.
  • While the brick was in: current_now 1.21 to 1.87 A, mean 1.57 A; battery 34.5 to 38.8 C.
  • CHG_CNFG_09 input limit 0xc2 stayed 0x13 the whole time, and also at the unplug sample. I did not change it.
  • TCPC CC_STATUS 0x1d = 0x1c (cc2 sees Rp 3 A), POWER_STATUS 0x1e = 0x0d before the unplug and 0x0c after the replug. TCPC reg 0x87 (the read @nesmeck suggested) = 0x03 until the unplug and 0x00 from then on; I don't know what the bits mean. EXTBST_CTRL 0x92 = 0, 0xb9 = 0x05 and 0xcb = 0x00 were read at the start (dump), not in the loop.

So at this step, which the plan calls the 500 mA limit (0xc2 = 0x13), the battery gets 1.2 to 1.9 A. I don't have an explanation for that: the gauge's current_now might not be what I think it is, or 0xc2 = 0x13 isn't 500 mA, or the charger isn't limited by it here. I'm not claiming a cause. There is no inline meter in this, so I can't tell the wall power from the phone's side.

The raw log is below. For a4 I'm waiting for your decision, and I won't run anything that sources VBUS until you've said go.

the 60 log lines (phone clock, time soc status voltage uV, current uA, temp 0.1 C, then registers)
07:37:30 soc=21 status=Charging v=3885468 i=1812812 t=345 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0d tcpc87=0x03 vbus70=0xb9
07:38:01 soc=22 status=Charging v=3870937 i=1519687 t=346 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0d tcpc87=0x03 vbus70=0xb9
07:38:32 soc=22 status=Charging v=3873906 i=1477187 t=347 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0d tcpc87=0x03 vbus70=0xb9
07:39:03 soc=23 status=Charging v=3876093 i=1447812 t=349 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0d tcpc87=0x03 vbus70=0xb9
07:39:33 soc=23 status=Charging v=3878437 i=1474375 t=349 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0d tcpc87=0x03 vbus70=0xb9
07:40:04 soc=24 status=Charging v=3884687 i=1359062 t=350 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0d tcpc87=0x03 vbus70=0xb9
07:40:35 soc=24 status=Charging v=3878906 i=1393437 t=351 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0d tcpc87=0x03 vbus70=0xb9
07:41:06 soc=24 status=Charging v=3885000 i=1553750 t=352 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0d tcpc87=0x03 vbus70=0xb9
07:41:36 soc=25 status=Charging v=3898593 i=1748750 t=353 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0d tcpc87=0x03 vbus70=0xb9
07:42:07 soc=25 status=Discharging v=3769843 i=-630625 t=360 c2=0x13 b5=0x00 b6=0xf8 b7=0x00 cc=0x10 pwr=0x08 tcpc87=0x00 vbus70=0x00
07:42:38 soc=25 status=Charging v=3895937 i=1756250 t=356 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0c tcpc87=0x00 vbus70=0xb9
07:43:08 soc=26 status=Charging v=3887500 i=1458750 t=357 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0c tcpc87=0x00 vbus70=0xb9
07:43:39 soc=26 status=Charging v=3890312 i=1476875 t=358 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0c tcpc87=0x00 vbus70=0xb9
07:44:10 soc=27 status=Charging v=3902968 i=1695937 t=358 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0c tcpc87=0x00 vbus70=0xb9
07:44:41 soc=27 status=Charging v=3907031 i=1726562 t=358 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0c tcpc87=0x00 vbus70=0xb9
07:45:12 soc=28 status=Charging v=3907343 i=1705625 t=359 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0c tcpc87=0x00 vbus70=0xb9
07:45:43 soc=28 status=Charging v=3915781 i=1823437 t=360 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0c tcpc87=0x00 vbus70=0xb9
07:46:14 soc=28 status=Charging v=3916406 i=1867500 t=361 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0c tcpc87=0x00 vbus70=0xb9
07:46:45 soc=29 status=Charging v=3901406 i=1420312 t=360 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0c tcpc87=0x00 vbus70=0xb9
07:47:15 soc=29 status=Charging v=3905156 i=1549062 t=363 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0c tcpc87=0x00 vbus70=0xb9
07:47:46 soc=30 status=Charging v=3905781 i=1366562 t=363 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0c tcpc87=0x00 vbus70=0xb9
07:48:17 soc=30 status=Charging v=3906875 i=1460937 t=364 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0c tcpc87=0x00 vbus70=0xb9
07:48:48 soc=31 status=Charging v=3917656 i=1610625 t=366 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0c tcpc87=0x00 vbus70=0xb9
07:49:19 soc=31 status=Charging v=3920468 i=1668750 t=366 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0c tcpc87=0x00 vbus70=0xb9
07:49:50 soc=31 status=Charging v=3917812 i=1616875 t=367 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0c tcpc87=0x00 vbus70=0xb9
07:50:21 soc=32 status=Charging v=3923593 i=1692187 t=367 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0c tcpc87=0x00 vbus70=0xb9
07:50:52 soc=32 status=Charging v=3923281 i=1734062 t=367 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0c tcpc87=0x00 vbus70=0xb9
07:51:23 soc=33 status=Charging v=3915468 i=1453437 t=368 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0c tcpc87=0x00 vbus70=0xb9
07:51:53 soc=33 status=Charging v=3916250 i=1486562 t=369 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0c tcpc87=0x00 vbus70=0xb9
07:52:24 soc=33 status=Charging v=3918593 i=1464687 t=369 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0c tcpc87=0x00 vbus70=0xb9
07:52:55 soc=34 status=Charging v=3921718 i=1534687 t=370 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0c tcpc87=0x00 vbus70=0xb9
07:53:26 soc=34 status=Charging v=3932968 i=1859687 t=371 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0c tcpc87=0x00 vbus70=0xb9
07:53:57 soc=34 status=Charging v=3927812 i=1655937 t=371 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0c tcpc87=0x00 vbus70=0xb9
07:54:28 soc=35 status=Charging v=3931562 i=1724375 t=373 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0c tcpc87=0x00 vbus70=0xb9
07:54:59 soc=35 status=Charging v=3937656 i=1763437 t=373 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0c tcpc87=0x00 vbus70=0xb9
07:55:29 soc=36 status=Charging v=3933281 i=1696875 t=374 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0c tcpc87=0x00 vbus70=0xb9
07:56:00 soc=36 status=Charging v=3932656 i=1700625 t=374 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0c tcpc87=0x00 vbus70=0xb9
07:56:31 soc=36 status=Charging v=3936093 i=1713750 t=376 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0c tcpc87=0x00 vbus70=0xb9
07:57:02 soc=37 status=Charging v=3926562 i=1475000 t=376 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0c tcpc87=0x00 vbus70=0xb9
07:57:33 soc=37 status=Charging v=3926093 i=1448437 t=377 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0c tcpc87=0x00 vbus70=0xb9
07:58:04 soc=37 status=Charging v=3927187 i=1475937 t=377 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0c tcpc87=0x00 vbus70=0xb9
07:58:35 soc=38 status=Charging v=3933750 i=1605625 t=378 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0c tcpc87=0x00 vbus70=0xb9
07:59:05 soc=38 status=Charging v=3936406 i=1610000 t=379 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0c tcpc87=0x00 vbus70=0xb9
07:59:36 soc=39 status=Charging v=3938125 i=1667500 t=380 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0c tcpc87=0x00 vbus70=0xb9
08:00:07 soc=39 status=Charging v=3920781 i=1211250 t=381 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0c tcpc87=0x00 vbus70=0xb9
08:00:38 soc=39 status=Charging v=3932343 i=1463750 t=381 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0c tcpc87=0x00 vbus70=0xb9
08:01:09 soc=40 status=Charging v=3935000 i=1538750 t=382 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0c tcpc87=0x00 vbus70=0xb9
08:01:40 soc=40 status=Charging v=3941562 i=1822500 t=383 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0c tcpc87=0x00 vbus70=0xb9
08:02:11 soc=40 status=Charging v=3947656 i=1826875 t=383 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0c tcpc87=0x00 vbus70=0xb9
08:02:42 soc=41 status=Charging v=3934531 i=1460000 t=384 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0c tcpc87=0x00 vbus70=0xb9
08:03:13 soc=41 status=Charging v=3936562 i=1453750 t=384 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0c tcpc87=0x00 vbus70=0xb9
08:03:43 soc=41 status=Charging v=3935312 i=1455625 t=385 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0c tcpc87=0x00 vbus70=0xb9
08:04:14 soc=42 status=Charging v=3937812 i=1422500 t=386 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0c tcpc87=0x00 vbus70=0xb9
08:04:45 soc=42 status=Charging v=3938593 i=1404687 t=386 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0c tcpc87=0x00 vbus70=0xb9
08:05:16 soc=43 status=Charging v=3939843 i=1423125 t=386 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0c tcpc87=0x00 vbus70=0xb9
08:05:47 soc=43 status=Charging v=3942656 i=1389062 t=387 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0c tcpc87=0x00 vbus70=0xb9
08:06:18 soc=43 status=Charging v=3942812 i=1512500 t=387 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0c tcpc87=0x00 vbus70=0xb9
08:06:49 soc=44 status=Charging v=3942968 i=1517500 t=388 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0c tcpc87=0x00 vbus70=0xb9
08:07:19 soc=44 status=Charging v=3946093 i=1513750 t=388 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0c tcpc87=0x00 vbus70=0xb9
08:07:50 soc=44 status=Charging v=3952812 i=1625625 t=388 c2=0x13 b5=0x60 b6=0xb1 b7=0x20 cc=0x1c pwr=0x0c tcpc87=0x00 vbus70=0xb9

derekross added a commit that referenced this pull request Nov 3, 2026
Round 39 (2026-11-03) reviewed 40 pull requests and issues, and the
maintainer's merges of the modem bring-up night. The confirmed lessons:
version collisions that merge silently across open PRs, boot-file
staleness from a device package's src/, shipped defaults checked on a
fresh install rather than the reference phone (the card = none that #416
fixed), shutdown events that the next boot's dmesg can't see, guards
added through the root image alone, conflict resolutions whose kept
tests depend on order, and squash merges without a body.

Corrections: C-26 (provisional) on L-190's reasoning about a longer
BT_REG_ON hold; C-27 corrects L-326 in place (gs101's ACPM clocks are
cached); C-28 on our first #282 review's premise. L-102, L-158 and L-183
gain one sentence each.

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

Copy link
Copy Markdown
Owner

@Somnius thank you for both the round-2 changes and the two read-only runs. I checked the new head against the one I reviewed: the tests/all line is main's list plus tests/husky-deadman, and the undo now leaves 0xb9, 0xc4 and 0xcb alone when nothing was saved, with test 9e2 for it. CI was green on that head.

One housekeeping point first: main has changed the same tests/all line twice since (tests/modules-push and tests/lineage-ref were added), so the branch conflicts now, and GitHub runs no CI on a conflicting PR. When you next push, please take main's line and add tests/husky-deadman after tests/flame-probe, as before.

Your baseline turns out to answer more than I expected, and it corrects something I said. Decoded with the enums in include/linux/mfd/max77759.h, cable out reads CHGIN under-voltage, battery-only, charger off (0x00 / 0xf8 / 0x00). The Baseus brick reads VBUS valid, battery okay, fast charge in constant current (0x60 / 0xb1 / 0x20). So 0xb1 isn't the charger's idle state. It's what it reads with a valid source on CHGIN. On 11-01 the only source was the phone's own boost, so that first run tripped because the charger was charging the pack from our own 5 V. My round-1 point began "if 0xb1 is in every dump of the day", and that turned out not to be the case. The baseline guard is still the right design, so nothing to undo, but a few things follow:

  1. The runbook text. §4 (the "0xb1 in every dump … cable out" sentence) and §5 ("whether CHGIN sees the self-sourced 5 V: unknown") need updating. With MODE 0x05 it does, so §8 item 4 is answered for 0x05 and stays open only for MODE 0x00.
  2. What a4 will most likely do. With the cable out the charger already reads "off", so I don't expect MODE 0x00 alone to move the details. I think the run will go past that check and switch VBUS on. Then CHGIN will see the 5 V and CHGIN_DTLS/CHGIN_STS will leave the baseline, so the post-VBUS check trips within the first second and the undo runs. That's safe, but please list it as an expected outcome in a4, and be ready for real VBUS on the meter from the very first run. I'd run it like that once. Its log line is the MODE-0-plus-VBUS reading of the three registers, which is exactly what the sourcing guard should then be re-derived from, as its own push, before a soak.
  3. a6. A reset with the port hot and the bootloader's MODE 0x05 should now be expected to charge from the boost until boot-undo runs. Please say so in a6. a6 stays a separate go, and I'll probably want it after the kernel path rather than before.

On the Baseus numbers: you found the answer yourself with 0x87. That's the TCPC's BC_STATUS1, and CHGTYP 3 is a dedicated charging port. Bit 7 of 0xc2 (NO_AUTOIBUS) is clear, so the chip's own detection sets the input current, not the 0x13 selector. The Pixel 7 Pro shows the same thing (its NOTES, 2026-10-30, and USB-C-PLAN's register table). Two things stay open, and the meter answers both: 0x87 read 0 after the replug while the current stayed high, and 23 % in 30 minutes at about 49 mAh per percent is nearer 2.2 A than the 1.57 A mean current_now. Please drop "the 500 mA step" for 0x13 on a charger, or add that caveat.

On a4: go, under these conditions. The meter is in hand and passes a1's CC check, the runbook has the corrections in 1 and 2, and it's one run in one boot, a3 first as planned. Please post the a4 log (the MODE-0 line, the VBUS lines and whichever check ended it), the meter readings before, during (if you caught one) and after, uname -r and slot B's tries left. If anything doesn't match the outcomes listed, stop there and post it.

Thanks again. A read-only baseline that ends up explaining the first run is just the sort of result this careful approach is meant to produce.

Section 4 (0xb1 was a charging reading, not a cable-out one), section 5 and 8 item 4 (CHGIN does see the boost with MODE 0x05), the a4 and a6 expectations, and the 500 mA input-limit claim caveated.

Signed-off-by: Lef <me@lefteros.com>
@Somnius

Somnius commented Nov 6, 2026

Copy link
Copy Markdown
Contributor Author

I merged main into the branch (no rebase, so no force-push) and fixed the conflict in tests/all the way you said: main's line, tests/husky-deadman right after tests/flame-probe. tests/husky-deadman passes.

Runbook text, as you asked: section 4 no longer says 0xb1 appeared with the cable out (it means a source was charging; with the pack done it reads 0xb4). Section 5 and 8 item 4: with MODE 0x05 CHGIN does see the boost, it's only open for MODE 0x00. The a4 expectation now says the likely outcome is VBUS on and a trip on CHGIN within 1 s, so the meter has to be reading real VBUS from the first run. a6 says to expect the charger to charge from the boost until boot-undo runs, and it stays a separate go. I took out the "500 mA step" wording and put the caveat in the Type-C plan: 0xc2 reads 0x13 but bit 7 NO_AUTOIBUS is clear, so the chip's own detection sets the input current, and 23 % in 30 min at about 49 mAh per % is nearer 2.2 A than 1.57 A, like you said.

Nothing from the runbook has been run, a4 waits for the meter and your go. The charger baseline you asked for on #272 is #452.

One conflict, in the list of test suites in tests/all: main added
tests/pinned-packages and this branch added tests/husky-deadman, so both
are in the list now.
@derekross

Copy link
Copy Markdown
Owner

@Somnius thank you, and thanks for merging rather than force-pushing. It made checking easy: the tool and its tests are exactly what I reviewed last time, and only the two docs changed. tests/all is resolved as asked, and CI is green on the new head. §4, §5, §8 item 4, a6 and the 500 mA caveat all read right to me now.

Two small text things on a4, and then it's a go as I described (meter in hand and passing the a1 CC check, a3 first, one run in one boot):

  1. The a4 cell now says the most likely result is VBUS on and a trip on CHGIN within a second, but it isn't one of the three labelled outcomes. Please add it as its own outcome with what you expect to see: the log line with the three registers after VBUS on, the check that ended it, MODE put back, the meter showing 5 V briefly and then 0 V after the undo, and no marker left behind.
  2. §8 item 3 still calls a4' "the expected first outcome". Please make it agree with the a4 cell.

After the run, please post the a4 log, the meter before, during and after, uname -r and slot B's tries left, as before. The sourcing guard then gets re-derived from that log in its own push.

derekross pushed a commit that referenced this pull request Nov 7, 2026
A dated NOTES record of the 8 Pro's MAX77759 charger registers at the 92 % stop, plugged in and charge done, for the host-mode work in #272 and #282.

Signed-off-by: Lef <me@lefteros.com>
@Somnius

Somnius commented Nov 7, 2026

Copy link
Copy Markdown
Contributor Author

@derekross fixed both. The a4 cell now has the most likely result as its own outcome, (a4c): VBUS on, then the CHGIN trip within a second. It says what I expect to see: the log line with the three registers right after VBUS on, the guard line that names the check that ended the run (exit 7), MODE 0xb9 put back, the meter at 5 V briefly and then 0 V after the undo, and no undo marker left behind. It's marked as inferred because I haven't seen it yet. §8 item 3 no longer calls a4' the expected first outcome: it now says a4c is the most likely and a4' is the other one that reads the MODE-0 details. tools/pr-check passes. The run itself is unchanged: meter in hand and passing the a1 CC check, a3 first, one run in one boot. I'll post the a4 log, the meter before, during and after, uname -r and slot B's tries left after it. CI hasn't started on this draft push yet; tests/all and tools/pr-check pass here on the new head.

@Somnius

Somnius commented Nov 7, 2026

Copy link
Copy Markdown
Contributor Author

@derekross a correction to my last comment: CI hadn't started on the draft because the PR had become conflicting with main. I merged origin/main into the branch (a normal merge and push, no force-push). There was one conflict, in tests/all: both sides had added a test name to the same for line, so I kept both (tests/husky-deadman and your tests/repo-publish). Tests and Policy are green on the new head.

@derekross

Copy link
Copy Markdown
Owner

@Somnius thank you, both text fixes read right, and thanks for resolving tests/all by merging rather than force-pushing. The tool and its tests are byte for byte what I reviewed, so the a4 go stands as before: meter in hand and passing the a1 CC check, a3 first, one run in one boot. Afterwards, please post the a4 log, the meter readings before, during and after, uname -r and slot B's tries left, and the guard gets re-derived from that log in its own push.

@Somnius

Somnius commented Nov 8, 2026

Copy link
Copy Markdown
Contributor Author

Merged main into this branch again (the only conflict was the test list in tests/all, I kept both new entries). tests/husky-deadman passes here after the merge; I didn't run the whole tests/all.

@derekross

Copy link
Copy Markdown
Owner

@Somnius thanks for keeping the branch merged with main. I checked the merge: only the test list in tests/all changed, the tool and its tests are exactly what I reviewed, and CI is green. The a4 go stands as before (meter in hand and passing the a1 CC check, a3 first, one run in one boot), and a6 is still a separate go after a4's results. I'm looking forward to the a4 log.

One conflict, the test list in tests/all: this branch adds tests/husky-deadman
and main adds tests/extract-vendor-firmware, so both are in the list.

Signed-off-by: Lef <me@lefteros.com>
@Somnius

Somnius commented Nov 8, 2026

Copy link
Copy Markdown
Contributor Author

@derekross #282 went dirty again when main moved, so I merged main into it, a normal merge, no force-push. One conflict, in the test list of tests/all: this branch adds tests/husky-deadman and main added tests/extract-vendor-firmware, so both are in the list now (I checked that no conflict marker is left). I compared the PR's own diff before and after the merge: the same ten files, and only tests/all differs. tests/all passes here, and the PR is mergeable and clean again.

Merge commit: 09bc0c6

Nothing else changed, so what you wrote about a4 and a6 stands as it was.

@derekross

Copy link
Copy Markdown
Owner

Thanks, @Somnius. I checked the merge: only tests/all changed, and it's main's list plus
tests/husky-deadman. Since this is a draft waiting on a4, you don't need to re-merge every
time main moves; doing it once with the a4 push is enough. The a4 go stands as before, and a6
is still a separate go.

robertzas pushed a commit to robertzas/omarchy-mobile that referenced this pull request Nov 14, 2026
…rekross#417)

Round 39 (2026-11-03) reviewed 40 pull requests and issues, and the
maintainer's merges of the modem bring-up night. The confirmed lessons:
version collisions that merge silently across open PRs, boot-file
staleness from a device package's src/, shipped defaults checked on a
fresh install rather than the reference phone (the card = none that derekross#416
fixed), shutdown events that the next boot's dmesg can't see, guards
added through the root image alone, conflict resolutions whose kept
tests depend on order, and squash merges without a body.

Corrections: C-26 (provisional) on L-190's reasoning about a longer
BT_REG_ON hold; C-27 corrects L-326 in place (gs101's ACPM clocks are
cached); C-28 on our first derekross#282 review's premise. L-102, L-158 and L-183
gain one sentence each.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
robertzas pushed a commit to robertzas/omarchy-mobile that referenced this pull request Nov 14, 2026
…ekross#452)

A dated NOTES record of the 8 Pro's MAX77759 charger registers at the 92 % stop, plugged in and charge done, for the host-mode work in derekross#272 and derekross#282.

Signed-off-by: Lef <me@lefteros.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