Repository navigation
Conversation
|
Thank you, Lef. This is the right fix, and a careful port. I diffed The blocklist also matches what the MFD creates. In our tree Two things before it lands:
A small one, not blocking: the header comment's second line runs well past 80 columns. Thanks also for spelling out the I2C register access in the checklist instead of just ticking the box. |
…blocklist
Unplugging the cable and plugging it back in leaves a Pixel 8 Pro off the
USB link until it is rebooted: the MAX77759's Type-C side opens its USB2
data switch (TCPC 0x25, vendor register 0x93) on unplug, and with no Type-C
driver nothing closes it again, only the bootloader does at the next boot.
The README said so ("a replug may need a reboot"); on a Pixel 8 Pro the
kernel log shows nothing at all at the unplug, and the switch reads 0x00
after it and 0x09 once the rescue has written it back.
Add omamobile-usb-rescue, the Pixel 7 Pro's service on husky's bus
(10cb0000.i2c, hsi2c_11): while VBUS is valid (CHG_DETAILS_00.CHGIN_DTLS
== 3) it writes 0x09 to 0x25:0x93 when the switch is not 0x09, and it
stands aside once a Type-C driver owns the chip. It writes that one
register only, and logs every change of the switch, VBUS and the UDC
state to the journal. Without the bus (the base DT disables it) it says
so and exits, so the unit is inert until the bring-up overlay enables
hsi2c_11 (kernel derekross#163). Depends on i2c-tools.
Also add the MAX77759 blocklist the Pixel 7 Pro has, plus max77759_charger:
binding the PMIC creates its charger, GPIO and NVMEM cells, and the
charger driver programs the charge limits from the battery node, so
those and tcpci_maxim must not load before their bring-up steps.
Blacklist only, so a manual modprobe still works; the fuel gauge and the
MFD core still autoload. The test's "modprobe.d only sets options" rule
now has this one file as its exception, checked for what it contains.
Tested on a Pixel 8 Pro (7.3.0-rc6, slot B): unplug at 11:37:08 (switch
0x00, VBUS 0), replug at 11:37:26 (VBUS 1), the service wrote 0x09 and
the desktop had the link back at 11:37:28, no reboot; the same on a wall
charger. test/all passes.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
6c68a34 to
3a77f9e
Compare
|
Thanks @derekross. Rebased onto main with #228 in, version is 0.1.4 now. install and test/all conflicted as you said. The one real clash was test/all's "modprobe.d only sets options" rule and the display start's "only gs_decon is guarded" line, so both now name their own file (the display file guards gs_decon, the max77759 file guards the four drivers). test/all and test/display-start pass. The install of the built package on the phone and the phone-smoke output are still to do, I'll post them here when I've done it. |
|
Here's the boot from the package, as you asked. omamobile-device-husky 0.1.4-1 is built on the phone with tools/phone-install-package from this branch. I removed my hand-copied files first (the old rescue unit and script, the display script, both files in /etc/modprobe.d), so /etc/modprobe.d only has hid_apple.conf and /usr/local/bin only has husky-deadman-phone. Then I re-flashed the same images to slot B and did a normal boot. uname -r: 7.3.0-rc6-omamobile-push1-g5899fec2bd28 systemctl status omamobile-usb-rescue: active (running) since 18:30:00, which is the boot. systemd says 'disabled; preset: disabled' but it started on its own at boot through the vendor wants link. The journal across a real unplug and replug. I moved the cable from the desktop to a wall charger, so it's not a desktop-to-desktop replug, but the switch did what it should: 18:30:00 watching the USB data switch on I2C bus 1 modprobe -c shows the four blacklists from /usr/lib/modprobe.d (max77759_charger, tcpci_maxim, gpio_max77759, nvmem_max77759), and none of those modules is loaded unless I load them by hand under the dead-man tool. I also ran tools/phone-smoke on this kernel, all required checks ok. It only differs from @greenbrettmichael's by showing a battery (54% at the time). I haven't done a desktop-to-desktop replug on the package build, I can do that too if you want that exact case. |
|
Thank you, Lef, that's exactly the evidence I asked for. 0.1.4 was built from this branch and installed with your hand-copied files and both I re-ran the checks on the rebased head: it sits on It's ready to merge, and #249 right after it. (The long second line of the header comment can be wrapped another time.) |
…sults (#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 (#250), the summary table points at the slot B marking hold (#252), and the dead-man's recovery text no longer assumes the block is in /etc/modprobe.d. Closes #249 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Landed on main as 05cf35e (squashed, authored by you). Thanks, Lef. |
|
@derekross thanks. If you'd rather not wrap the long second header line at merge, I'll do it in a small follow-up. |
|
@Somnius thanks. No need for a PR of its own: fold the wrap into your next change to the husky package. |
…blocklist (derekross#250) The MAX77759 opens the USB2 data switch on unplug, and on the Pixel 8 Pro nothing closed it again, so the phone stayed off the bus after a replug. The package now starts omamobile-usb-rescue at boot, which closes the switch while VBUS is valid, and ships the MAX77759 blocklist in /usr/lib/modprobe.d. Tested on the 8 Pro from the built package with the hand-copied files removed: the switch closed on a real replug (0x00 to 0x09 within two seconds of VBUS), and the blacklists come from the package. Closes derekross#250 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…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>
L-776: a fallback helper is checked against every exception its transport raises (#754). L-777: a DMA master running vendor firmware with its IOMMU in bypass stays disabled behind an overlay until the IOMMU is described (kernel #250, the maintainer's decision of 2026-11-15). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
What and why
Unplug the cable and plug it back in and the 8 Pro never comes back on the USB link until it is rebooted. The package README already says "a replug may need a reboot". I looked at why: the kernel log shows nothing at the unplug, and the MAX77759's Type-C side opens its USB2 data switch (TCPC 0x25, vendor register 0x93, 0x09 closed and 0x00 open) with nothing to close it again until the bootloader runs at the next boot. Cheetah and raven already ship omamobile-usb-rescue for this and husky has none, so this adds it on husky's bus (10cb0000.i2c, hsi2c_11). While VBUS is valid (CHG_DETAILS_00.CHGIN_DTLS == 3) it writes 0x09 to 0x25:0x93 when the switch isn't 0x09, it writes that one register only, it logs every change of the switch, VBUS and the UDC state to the journal, and it stands aside once a Type-C driver owns 0x25. It needs i2c-tools. Without the bus (the base DT keeps it disabled) it says so and exits, so the unit does nothing until the bring-up overlay of kernel #163 enables hsi2c_11.
It also adds the MAX77759 blocklist @derekross asked for on kernel #163: binding the PMIC creates its charger, GPIO and NVMEM cells, and the charger driver programs charge limits from the battery node, so max77759_charger, gpio_max77759, nvmem_max77759 and tcpci_maxim must not autoload before their steps. Blacklist only (a manual modprobe still works), plus max77759_charger on top of the Pixel 7 Pro's list; the fuel gauge and the MFD core still autoload. The package test's rule "modprobe.d only sets options" now has this one file as an exception, and the test checks what the file contains.
Related: kernel #163 (the bus), and the bring-up PR (#249) with the runbook and results.
Device and build
uname -r): 7.3.0-rc6-omamobile-push1-gc7a0b2ef2f66-dirty (@greenbrettmichael's c6 plus the commits of kernel omamobile-modem 0.1.10: the modem profile starts once per boot #163), booted with the bring-up overlaysChecks (no phone needed)
tools/pr-check origin/mainpassestests/allpassestests/packages: omamobile-device-husky's test/all passes. The run over every package fails in omamobile-mmd, omamobile-sensors and omamobile-shell on my desktop only because pythondbusandgiare not installed here, none of them touched by this changeversionbumped, and the new version is in the commit subjectCo-Authored-By:orAssisted-by:trailer, never aSigned-off-by:On the phone
usbsw=0x00 vbus=0), replug at 11:37:26 (vbus=1), the service wrote 0x09 and the desktop had the link back at 11:37:28 with no reboot (uptime 587 s); the same with the cable moved to a wall charger and back; it also came up by itself after a rebootuserdataor weakens the storage guard. It does read two registers and write one on the external MAX77759 over I2C with i2cget/i2cset (not the SoC's PMU, no devmem), the same as cheetah's and raven's rescue, so the last box is ticked with that said out loud (AGENTS.md §1)tools/phone-smokereportphone-smoke: husky
Kernel
7.3.0-rc6-omamobile-push1-gc7a0b2ef2f66-dirty, tools atbb11919, 2026-11-01T11:15Z.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