Skip to content

device-panther 0.1.3: USB comes back after a replug, and the battery plan - #247

Merged
derekross merged 2 commits into
derekross:mainfrom
nesmeck:panther-usb-rescue
Nov 1, 2026
Merged

derekross merged 2 commits into
derekross:mainfrom
nesmeck:panther-usb-rescue

Conversation

@nesmeck

@nesmeck nesmeck commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

What and why

Two commits: device-panther 0.1.3 with the USB rescue, as you asked on derekross/linux-omarchy-mobile#167, and the battery plan.

  1. device-panther 0.1.3: USB comes back after a replug.
  2. BATTERY-PLAN (panther).

Device and build

Checks (no phone needed)

  • tools/pr-check upstream/main passes
  • tests/all passes (260 ok)
  • tests/packages passes (all 23 package suites)
  • Each changed package has its version bumped, and the new version is in the commit subject
  • Commits have area prefixes and bodies that say why; any AI help is a Co-Authored-By: trailer, never a Signed-off-by:

On the phone

  • I ran this on my own phone, booted into this build. 0.1.3 was built and installed on the phone with tools/phone-install-package. Its database step needs a workaround on a contributor build, issue Contributor phones: pacman -U fails when [omamobile] is signed with a local key #168.
  • Runbook steps passed:
    • U1, with the script running as a transient unit: after the unplug the switch read 0x00, the script logged VBUS valid, USBSW_CTRL 0x00: closing the data switch, and SSH came back in about 9 s.
    • 0.1.3 installed: the script matches the repository's by sha256, and the service is active through the vendor wants link (WantedBy=multi-user.target).
    • It then brought USB back after five more unplugs, one on that boot and four across the next three kernels, and started at boot on each.
    • There were no I2C errors.
    • BATTERY-PLAN B0, B1, B1b and the kernel F burst test: pass, results in the plan.
  • What I did not test:
    • a replug with the screen off or in suspend;
    • a reboot with the cable out.
  • Nothing in this change writes outside slot B and userdata, weakens the storage guard, or reads registers from userspace. The rescue reads two MAX77759 registers and writes one (USBSW_CTRL) over I2C, as on the Pixel 7 Pro.
tools/phone-smoke report

phone-smoke: panther

Kernel 7.3.0-rc6-omamobile-push1-g51074200c999, tools at 84d3edf, 2026-11-01T03:29Z.

Check Result Detail
boot (required) ok kernel 7.3.0-rc6-omamobile-push1-g51074200c999, slot b, up 1847s
storage guard (required) ok 55 partitions; only userdata and slot B's boot images writable
root (required) ok ext4 on userdata, 98G free
kernel health (required) ok no oops or BUG; 0 WARN, 6 error lines in dmesg
systemd units ok none failed
USB gadget (required) ok bound to 11210000.usb
display ok card0-Unknown-1 connected, 1080x2400
GPU ok render node on panthor
session (required) ok Hyprland and the Omarchy shell running
lock ok PAM file present, the shell can lock (passwordPam true, locked false)
touch ok FocalTech FT3658
buttons ok gpio-keys
Wi-Fi skip no wireless interface
Bluetooth skip no controller
battery ok 86% Discharging, 34 °C
sound cards skip none
sensors skip no sensor proxy
cameras skip no libcamera tools
thermal ok hottest zone 34 °C

Packages: hyprland 0.56.2-5.1, libcamera 0.7.2-4.21, mesa 1:26.2.4-1.4, omacam 0.3.3-1, omamobile-apps 0.2.0-1, omamobile-device-panther 0.1.3-1, omamobile-firstboot 0.1.2-1, omamobile-keyring 20261026-1, omamobile-mirror 0.1.1-1, omamobile-omarchy 0.1.12-1, omamobile-owl-widgets 0.1.1-1, omamobile-shell 0.2.28-1, omarchy 4.0.6-1, quickshell 0.3.2.r7.g2b4501a-1

🤖 Generated with Claude Code

nesmeck and others added 2 commits October 31, 2026 20:56
Ship the Pixel 7 Pro's omamobile-usb-rescue and its unit, byte for byte
(the test compares them), enabled for multi-user.target, with i2c-tools.
The MAX77759 opens its USB2 data switch on unplug and nothing closes it
until a Type-C driver owns the chip; the script puts it back to 0x09
while VBUS is valid. It needs the chip's I2C bus, USI13, which the board
file enables since linux-omarchy-mobile#167.

NOTES records U1: with that bus, the switch read 0x00 after an unplug,
the script closed it, and SSH came back in about 9 s; installed, the
service did the same after five more unplugs. The README, the
older NOTES entry and the Pixel 7 row's USB cell say so. A new NOTES
entry records the three boots on the new omamobile base: derekross#133's
alignment and derekross#166's touch details, one change each.

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

The plan behind the Pixel 7's battery: what is known about the MAX77759's
gauge on this phone, the gates (B0 read-only, B1 the gauge with no model,
B1b stock's Coslight 1 kOhm model) and their results, with every value
traced to the live device tree or Google's GPL battery data. It also
records why each 1 % step fired the gauge's interrupt about 430 times and
the driver change that makes it fire once, and what the charger does
while it keeps ABL's settings.

The kernel side is linux-omarchy-mobile#171 and derekross#170, both in review.
NOTES gets a short entry pointing here, and the Pixel 7 row's battery
cell goes from no to WIP.

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

Copy link
Copy Markdown
Owner

Thank you, this is a tidy one, and the battery plan is a pleasure to read.

What I checked:

  • The rescue. omamobile-usb-rescue and its unit are byte for byte the Pixel 7 Pro's (same sha256 as main's cheetah copies). The bus it looks for, 10d60000.i2c, is hsi2c_13, which kernel device/tegu MODEM-PLAN: the SIM test runbook for 2026-11-03 #167 enables on the Pixel 7, merged this morning with no devices described on it. So the script's two reads and its one write (USBSW_CTRL at 0x25) go to the same chip and registers as on the 7 Pro. Your U1 record, the five later replugs and the boot-time starts on three kernels cover it well.
  • The package. 0.1.3 is the next free version (main has 0.1.2, and no other open PR touches the package). The new cmp checks sit inside the cheetah guard, and the package's test/all passes when I copy the package directory out on its own, so it still builds on a phone. tools/pr-check is clean, and CI is green.
  • The battery plan. I fetched Google's gs201-panther-battery-data.dtsi at the commit you cite (f72c062f05ee, "Update kernel to ab/13436313"). cos-a1-1k has TempCo 0x1a02, lsn-a1-3k 0x1802, and both have RelaxCFG 0x0839, as the plan says. Tracing the bursts to the 351 ms comment in Google's handler was a good find.
  • The matrix. The battery cell says WIP, on a test kernel, with both kernel PRs in review. The USB cell's notes link resolves.

One thing to keep in mind for the charger step, not for this PR: give each gate a Rollback line (the image set you go back to and how), next to Pass and Stop. B1 and B1b were safe without one, because the model only lives in the gauge's RAM, but the charger writes settings that outlast the driver.

Kernel #170 changes the Pixel 7 Pro's gauge too, since it's the same driver and the same MAX77759, so it will get a run on my phone before it merges. That's for its own thread.

Ready to merge. Thanks again for the careful one-change-per-boot runs.

@derekross
derekross merged commit 958644f into derekross:main Nov 1, 2026
2 checks passed
robertzas pushed a commit to robertzas/omarchy-mobile that referenced this pull request Nov 14, 2026
…plan (derekross#247)

Reviewed in round 32: see the pull request for the tests.
nesmeck added a commit to nesmeck/omarchy-mobile that referenced this pull request Nov 15, 2026
The charger step after the Pixel 7 Pro's USB-C-PLAN B3 and B3g: what it
gains (charging to 4.45 V instead of ABL's 4350 mV, a 0.3 C fast-charge
cap and stock's temperature bands) and what it doesn't (the input stays
at 500 mA until Type-C), the facts it rests on (ABL's charger settings
read in B3.0, stock's bands matching the guard's tables, the PMIC's
interrupt pin), and gates B3.1 to D1, each with its Pass, Stop and
Rollback, as asked on derekross#247. B3.1 to B3.3, B3g and D1 passed on
2026-11-01; the results are recorded below them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
W4HO-ham added a commit to W4HO-ham/omarchy-mobile that referenced this pull request Nov 15, 2026
…but a 9a and needs usi=; status words that hold after derekross#247

The stress module now refuses to load unless the machine is google,zumapro-tegu, and usi= has no default, so a bare insmod never switches the touchscreen's USI and no other board runs it by luck of a node path. The status line and item 1's next step no longer depend on derekross#247 being under review.
W4HO-ham added a commit to W4HO-ham/omarchy-mobile that referenced this pull request Nov 15, 2026
The previous commit kept the merge's conflict markers in the 9a sleep entry by mistake. This keeps main's derekross#809 note at the head of the entry and this branch's sentence on the no-wake's cause and derekross#247.
nesmeck added a commit to nesmeck/omarchy-mobile that referenced this pull request Nov 15, 2026
The charger step after the Pixel 7 Pro's USB-C-PLAN B3 and B3g: what it
gains (charging to 4.45 V instead of ABL's 4350 mV, a 0.3 C fast-charge
cap and stock's temperature bands) and what it doesn't (the input stays
at 500 mA until Type-C), the facts it rests on (ABL's charger settings
read in B3.0, stock's bands matching the guard's tables, the PMIC's
interrupt pin), and gates B3.1 to D1, each with its Pass, Stop and
Rollback, as asked on derekross#247. B3.1 to B3.3, B3g and D1 passed on
2026-11-01; the results are recorded below them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
nesmeck added a commit to nesmeck/omarchy-mobile that referenced this pull request Nov 16, 2026
The charger step after the Pixel 7 Pro's USB-C-PLAN B3 and B3g: what it
gains (charging to 4.45 V instead of ABL's 4350 mV, a 0.3 C fast-charge
cap and stock's temperature bands) and what it doesn't (the input stays
at 500 mA until Type-C), the facts it rests on (ABL's charger settings
read in B3.0, stock's bands matching the guard's tables, the PMIC's
interrupt pin), and gates B3.1 to D1, each with its Pass, Stop and
Rollback, as asked on derekross#247. B3.1 to B3.3, B3g and D1 passed on
2026-11-01; the results are recorded below them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
W4HO-ham added a commit to W4HO-ham/omarchy-mobile that referenced this pull request Nov 18, 2026
…ell to works (opt-in), with the runs on the published branch

The cell's old condition was a fix for the third no-wake and a series from the published kernel as it is. Kernel derekross#247 is merged, and on derek/omamobile at 26867fc4e (derekross#224, derekross#232, derekross#247, derekross#258) 300 of 300 sleeps with a 60 s alarm woke with the modem off on the night of 2026-11-17: 296 on the alarm and 4 within seconds on the touchscreen's interrupt with nobody at the palmtop. On 2026-11-16, 86 of 86 sleeps entered with the modem up woke, each ended by the modem within 29 s, so none of those reached its alarm.

From the review of derekross#846: the word is "works (opt-in)", since auto-sleep ships off on the 9a (omamobile-device-tegu doesn't install /usr/share/omamobile/auto-sleep-default); the cell says again that a new sleep test runs attended first and that the modem's inhibitor stays, the owner's palmtop under derekross#809 excepted; and it cites merged notes, not derekross#758's comments.

MODEM-PLAN gains the 2026-11-16 section: the runs on the test kernel and on the published branch under derekross#809's terms, the route finding that became derekross#837, and the palmtop hanging awake twice at a power-up of the modem's link (once between the sleeps of a series, once in everyday use with Wi-Fi connected), with the NV check after each. The Modem cell names those hangs. SLEEP-PLAN's S1 table gains a row for the 86 modem-up sleeps and one for the night's 300, and its status line is brought up to date.
derekross pushed a commit that referenced this pull request Nov 18, 2026
…ell to works (opt-in), with the runs on the published branch

The cell's condition was a fix for the third no-wake and a series from the published kernel as it is. Kernel #247 is merged (it comes with the next kernel release), and on omamobile at 26867fc4e 300 of 300 sleeps with a 60 s alarm woke with the modem off on the night of 2026-11-17 (296 on the alarm, 4 within seconds on the touchscreen's interrupt), and 86 of 86 sleeps entered with the modem up woke on 2026-11-16, each ended by the modem within 29 s. Auto-sleep stays off by default on the 9a, a new sleep test still runs attended first, and the two awake hangs at a power-up of the modem's link are recorded in MODEM-PLAN and named in the Modem cell, cause open.
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