From b2a89795e1896032ba9940951f328bb610603908 Mon Sep 17 00:00:00 2001 From: Alejandro Garcia Date: Wed, 28 Oct 2026 22:09:05 -0700 Subject: [PATCH 1/2] device-panther 0.1.1: the GPU, the haptics and suspend-to-idle The Pixel 7 Pro's GPU always-on and feedbackd udev rules, and its sleep.conf.d drop-in, byte-identical (the package test compares them). mem_sleep reads "s2idle [deep]" on these kernels, and gs201 never wakes from deep, so Suspend has to be s2idle before anyone taps it. tools/extract-vendor-firmware takes -d panther: the same gs201 vendor files under the same names as cheetah, with panther's board and codename, so the CS40L26 gets this phone's own cs40l26.wmfw and cs40l26.bin. NOTES records the GPU and haptics boots (kernel #129 and #130), that power off restarts the phone within the kernel's first tenth of a second (PSCI SYSTEM_OFF, measured with a shutdown hook that logged to userdata), and that USB stays off the bus after a replug until USI13 is enabled for omamobile-usb-rescue. The Pixel 7 row and BRINGUP-M1 say #108 and #109 are merged, and link the new kernel PRs from the GPU and Haptics cells. Co-Authored-By: Claude Opus 5.5 --- device/panther/BRINGUP-M1.md | 12 +++++------ device/panther/NOTES.md | 12 ++++++++++- docs/DEVICES.md | 2 +- packages/omamobile-device-panther/PKGBUILD | 2 +- packages/omamobile-device-panther/README.md | 3 +++ packages/omamobile-device-panther/install | 5 +++++ packages/omamobile-device-panther/test/all | 15 +++++++++++++- .../systemd/sleep.conf.d/10-omamobile.conf | 11 ++++++++++ .../rules.d/20-omamobile-gpu-always-on.rules | 6 ++++++ .../udev/rules.d/72-omamobile-feedbackd.rules | 7 +++++++ packages/omamobile-device-panther/version | 2 +- tools/extract-vendor-firmware | 20 +++++++++++++------ 12 files changed, 79 insertions(+), 18 deletions(-) create mode 100644 packages/omamobile-device-panther/vendor/systemd/sleep.conf.d/10-omamobile.conf create mode 100644 packages/omamobile-device-panther/vendor/udev/rules.d/20-omamobile-gpu-always-on.rules create mode 100644 packages/omamobile-device-panther/vendor/udev/rules.d/72-omamobile-feedbackd.rules diff --git a/device/panther/BRINGUP-M1.md b/device/panther/BRINGUP-M1.md index f5d677eeb..e07640c2c 100644 --- a/device/panther/BRINGUP-M1.md +++ b/device/panther/BRINGUP-M1.md @@ -5,14 +5,12 @@ Status (2026-10-27): slot B boots the Arch root on `userdata` into Hyprland and the Omarchy lock screen, on simpledrm over the bootloader's framebuffer. SSH answers at `172.16.42.1`, and `bin/omamobile push` rewrites slot B and reboots into it with no fastboot. The power and -volume keys work (the power key wakes the screen); there is no touch yet: -the FocalTech FT3658 on SPI0 never answered in boots 7 and 8 (supplies -suspected). Kernel 7.3.0-rc6, -local branch `panther-first-light` on `omamobile-int`; the board file is +volume keys work (the power key wakes the screen); there was no touch yet: +the FocalTech FT3658 on SPI0 had no mainline driver. Kernel 7.3.0-rc6, +local branch `panther-first-light` on `omamobile-int`; the board file was merged into `omamobile` as -[linux-omarchy-mobile#108](https://github.com/derekross/linux-omarchy-mobile/pull/108) (2026-10-28), and the FT3658 driver as -[linux-omarchy-mobile#109](https://github.com/derekross/linux-omarchy-mobile/pull/109); the touches that #109's commit message -reports aren't recorded in these notes yet. Stock Android is on slot A, with its +[linux-omarchy-mobile#108](https://github.com/derekross/linux-omarchy-mobile/pull/108), and the FT3658 driver as +[#109](https://github.com/derekross/linux-omarchy-mobile/pull/109) (later boots are in [NOTES.md](NOTES.md)). Stock Android is on slot A, with its `userdata` erased. ## What booted diff --git a/device/panther/NOTES.md b/device/panther/NOTES.md index 2735a82dd..344409d77 100644 --- a/device/panther/NOTES.md +++ b/device/panther/NOTES.md @@ -3,7 +3,17 @@ Findings from real hardware, newest first. [BRINGUP-M1.md](BRINGUP-M1.md) is the first-light record. -The board file (`gs201-panther.dts`) is merged into the published kernel as [linux-omarchy-mobile#108](https://github.com/derekross/linux-omarchy-mobile/pull/108) (2026-10-28); this repository's images were built from the local branch it came from. +The board file (`gs201-panther.dts`) was merged as [linux-omarchy-mobile#108](https://github.com/derekross/linux-omarchy-mobile/pull/108), and the FT3658 driver as [#109](https://github.com/derekross/linux-omarchy-mobile/pull/109); the test kernels below add one local commit each on top. + +## 2026-10-28: the GPU and the haptics, power off, and USB after a replug + +Test kernels from local branches on slot B, each one change on top of the touch test kernel; one boot each. + +- **GPU (G1).** With `&gpu` enabled as on the Pixel 7 Pro and the package's always-on rule installed before the boot, panthor probes the Mali-G710 (id 0xa862, `shader_present` 0x1110055), boots the CSF firmware (interface v1.5.0) and registers `renderD128`. Hyprland renders on it through the project's Mesa ("Mali-G710 MC7 (Panfrost)"), with no MMU faults or GPU resets. Probe prints `_opp_set_regulators: no regulator (mali)`, as on the Pixel 7 Pro (harmless, [GPU-PLAN](../cheetah/GPU-PLAN.md)). +- **Haptics (H1).** The CS40L26A is on USI8 I2C at 0x43 with the same pins and stock values as the Pixel 7 Pro (read from the live device tree). With `cs40l26.wmfw` and `cs40l26.bin` from this phone's own factory image (`tools/extract-vendor-firmware -d panther`) in `/usr/lib/firmware/updates`, `cs40l26-vibra` finds revision A1, runs firmware 7.2.91 with the wavetable, and registers `cs40l26_vibra`; `tools/ff-rumble` effects of 100-500 ms at 25-80 % were felt. +- **Suspend must be s2idle.** `/sys/power/mem_sleep` reads `s2idle [deep]` on these kernels, and gs201 never wakes from `deep`, so the package now carries the Pixel 7 Pro's `sleep.conf.d` drop-in. Suspend itself is untested here. +- **Power off reboots the phone.** Omarchy's "Power off" (or `systemctl poweroff`) restarts the phone within a second, which spends a slot B retry. With the reboot watchdog off, systemd-shutdown runs to the end. A shutdown hook that saved the kernel log to `userdata` ten times a second, then powered off itself (sysrq `o`, the same `kernel_power_off()`), saved nothing after the trigger: no `sysrq: Power Off`, no device `shutdown` lines, no `reboot: Power down`. So the reset comes in the first tenth of a second of the kernel's power off, or before UFS can write another frame. With `syscon-poweroff` disabled in the test DT that leaves PSCI SYSTEM_OFF, which the firmware seems to turn into a restart (the boot reason reads `watchdog/apc`). The Pixel 7 Pro has never powered off from Linux either ([SUSPEND-PLAN](../cheetah/SUSPEND-PLAN.md) P7). To get to fastboot, hold Power and Volume Down from a running phone instead; that costs no retry. +- **USB doesn't come back after a replug.** A replug while Linux runs leaves the phone off the bus, as on the other Tensor phones (`AGENTS.md`): the MAX77759 opens its USB2 data switch, and nothing closes it. The Pixel 7 Pro's `omamobile-usb-rescue` needs the MAX77759's I2C bus (USI13, `10d60000`), which this board file doesn't enable yet, so for now a replug means Power and Volume Down, then a flash. ## 2026-10-27: boot 6's fallback was a stock boot, and a new backup diff --git a/docs/DEVICES.md b/docs/DEVICES.md index 6195be3d0..8303835a9 100644 --- a/docs/DEVICES.md +++ b/docs/DEVICES.md @@ -27,7 +27,7 @@ The status of each device, as verified on real hardware. Rows in the matrix have | Pixel 4 XL ([notes](../device/coral/NOTES.md)) | coral | SM8150 (Snapdragon 855) | WIP (direct ABL v2 boot on the test handset's slot A; slot-B install and ยง3.1 entry pending; [notes](../device/coral/BRINGUP-M1.md)) | testing (read-only `blockdev` guard + RAM `overlayfs`) | testing (1440x3040@60Hz S6E3HC2 DSC 1.1 KMS, DPMS, brightness) | testing (Adreno 640 / FD640 Mesa Freedreno, Hyprland) | testing (FTS SPI multitouch + read-only flash guard) | testing (power via `qcom-pon` + volume via `gpio-keys`) | testing (CDC ECM + ACM + SSH; stays up with host USB switched off) | testing (`WCN3990` `ath10k_snoc` + `rmtfs -r`, WPA2/DHCP/HTTPS; radio sessions ran before the modem baseline) | WIP (`WCN3990` `hci_qca` `hci0` up + BLE scan; audio/pairing open) | WIP (PM8150B ADC `VBAT_SNS` voltage + FG temp; aftermarket pack on test unit: no reply from `1-0036`) | testing (PM8150B SMB5 charger with `4.20 V` / `500 mA` kernel clamp) | testing (`CS40L25A` I2C click waveform) | testing (PM8150L flash LEDs + quick-settings tile) | no | - | testing (QDSP6 + dual `CS35L36` amps capped at `-26 dB` + `IA8508` SPI mic DSP) | testing (`SLPI` + `fastrpc` + RAM-backed `hexagonrpcd` + QMI SSC: 7 sensors + Soli radar) | WIP (`MPSS` boots with `rmtfs -r` + patched `tqftpserv`, SIM detected; no IPA/voice yet; radio sessions ran before the modem baseline) | no | testing (`CAMSS` + `IMX363`, `IMX481`, `IMX520`, dual `OV7251` NIR; `libcamera` softISP) | no | - | | Pixel 9a ([notes](../device/tegu/NOTES.md)) | tegu | zumapro (Tensor G4) | WIP ([#28](https://github.com/derekross/omarchy-mobile/issues/28): the SoC's clocks and bindings are merged into linux-omarchy-mobile; the SoC and board device tree is in review, [kernel #80](https://github.com/derekross/linux-omarchy-mobile/pull/80)) | WIP | WIP (DSI panel, 1080x2424; unpublished kernel) | WIP (Panthor, the desktop renders; unpublished kernel) | WIP | WIP (gpio-keys; unpublished kernel) | WIP | WIP (brcmfmac joins WPA2; driver in review, [kernel #56](https://github.com/derekross/linux-omarchy-mobile/pull/56)) | WIP (powered; unpublished kernel) | WIP (the gauge reads; unpublished kernel) | no | no | no | no | WIP (audio and sensors; unpublished kernel) | WIP (speakers capped, mics, A2DP; unpublished kernel) | WIP (accelerometer, light, proximity; unpublished kernel) | no | no | no | no | WIP (Trusty's TA runs and the HAL sees the sensor, unpublished kernel; enrollment waits for the factory calibration; [plan](../device/tegu/FINGERPRINT-PLAN.md)) | | Pixel 8 Pro ([notes](../device/husky/NOTES.md)) | husky | zuma (Tensor G3) | WIP ([#1](https://github.com/derekross/omarchy-mobile/issues/1): our kernel boots from slot B; the zuma device tree is merged ([kernel #13](https://github.com/derekross/linux-omarchy-mobile/pull/13))) | testing (UFS at HS-G4 behind the read-only guard; Arch on `userdata`; [UFS-PLAN](../device/husky/UFS-PLAN.md)) | WIP (simple-framebuffer console) | no | no | no | testing (USB and SSH) | no | no | no | no | no | no | no | no | no | no | no | no | no | no | no | -| Pixel 7 ([notes](../device/panther/NOTES.md)) | panther | gs201 (Tensor G2) | WIP (slot B, not marked successful; Arch and Hyprland boot; [BRINGUP-M1](../device/panther/BRINGUP-M1.md); the board file is in the published kernel, [kernel #108](https://github.com/derekross/linux-omarchy-mobile/pull/108)) | testing (UFS behind the read-only guard; Arch on `userdata`; in the published kernel, [kernel #108](https://github.com/derekross/linux-omarchy-mobile/pull/108)) | WIP (simple-framebuffer: console and the Hyprland lock screen) | no | no (FocalTech FT3658: its driver, [kernel #109](https://github.com/derekross/linux-omarchy-mobile/pull/109), and its rails, [kernel #108](https://github.com/derekross/linux-omarchy-mobile/pull/108), are in the published kernel, the touch node isn't; the notes end with the chip not answering, [BRINGUP-M1](../device/panther/BRINGUP-M1.md#2026-10-27-boot-8-the-hsi1-pin-controller)) | testing (gpio-keys: power, volume; in the published kernel, [kernel #108](https://github.com/derekross/linux-omarchy-mobile/pull/108)) | testing (USB and SSH; in the published kernel, [kernel #108](https://github.com/derekross/linux-omarchy-mobile/pull/108)) | no | no | no | no | no | no | no | no | no | no | no | no | no | no | no | +| Pixel 7 ([notes](../device/panther/NOTES.md)) | panther | gs201 (Tensor G2) | WIP (slot B, not marked successful; Arch and Hyprland boot; [BRINGUP-M1](../device/panther/BRINGUP-M1.md); board file merged, [kernel #108](https://github.com/derekross/linux-omarchy-mobile/pull/108)) | testing (UFS behind the read-only guard; Arch on `userdata`; merged, [kernel #108](https://github.com/derekross/linux-omarchy-mobile/pull/108)) | WIP (simple-framebuffer: console and the Hyprland lock screen) | testing (Panthor on the Mali-G710; Hyprland renders on it; in review, [kernel #129](https://github.com/derekross/linux-omarchy-mobile/pull/129)) | WIP (FocalTech FT3658 driver merged, [kernel #109](https://github.com/derekross/linux-omarchy-mobile/pull/109); the touch node is next) | testing (gpio-keys: power, volume; merged, [kernel #108](https://github.com/derekross/linux-omarchy-mobile/pull/108)) | testing (USB and SSH; a replug needs a reboot; merged, [kernel #108](https://github.com/derekross/linux-omarchy-mobile/pull/108)) | no | no | no | no | testing (CS40L26 with the phone's own firmware, `tools/extract-vendor-firmware -d panther`; in review, [kernel #130](https://github.com/derekross/linux-omarchy-mobile/pull/130)) | no | no | no | no | no | no | no | no | no | no | | *Template* | *codename* | *SoC* | | | | | | | | | | | | | | | | | | | | | | | ## cheetah (Pixel 7 Pro) in detail diff --git a/packages/omamobile-device-panther/PKGBUILD b/packages/omamobile-device-panther/PKGBUILD index 832821fa8..4d59343b1 100644 --- a/packages/omamobile-device-panther/PKGBUILD +++ b/packages/omamobile-device-panther/PKGBUILD @@ -3,7 +3,7 @@ pkgname=omamobile-device-panther pkgver=$(cat "${startdir:-.}/version") pkgrel=1 -pkgdesc="Omarchy Mobile support for the Google Pixel 7 (panther): storage guard and USB networking" +pkgdesc="Omarchy Mobile support for the Google Pixel 7 (panther): storage guard, USB networking, GPU, haptics and suspend-to-idle" arch=(aarch64) url="https://github.com/derekross/omarchy-mobile" license=(MIT) diff --git a/packages/omamobile-device-panther/README.md b/packages/omamobile-device-panther/README.md index b4013c0de..2056f1ac0 100644 --- a/packages/omamobile-device-panther/README.md +++ b/packages/omamobile-device-panther/README.md @@ -5,8 +5,11 @@ Omarchy Mobile's first userspace package for the Google Pixel 7 (codename panthe | Path | Installs to | What it does | | --- | --- | --- | | `vendor/udev/rules.d/10-omamobile-storage.rules` | `/usr/lib/udev/rules.d` | Hides `sda` and every Android partition except `userdata` from desktop tools. Same rule as the Pixel 7 Pro. The initramfs stops its guard loop before `switch_root`; the kernel's read-only flags are what remain | +| `vendor/udev/rules.d/20-omamobile-gpu-always-on.rules` | `/usr/lib/udev/rules.d` | Keeps the Mali-G710 powered while Panthor drives it: powering its domain back up needs a secure call our kernel doesn't make yet. Same rule as the Pixel 7 Pro | +| `vendor/udev/rules.d/72-omamobile-feedbackd.rules` | `/usr/lib/udev/rules.d` | Lets feedbackd drive the CS40L26 haptics (`cs40l26_vibra`). Same rule as the Pixel 7 Pro; the driver needs the phone's own `cs40l26.wmfw` (`tools/extract-vendor-firmware -d panther`) | | `vendor/systemd/network/20-usb-gadget.network` | `/usr/lib/systemd/network` | Sets usb0 to 172.16.42.1/24 after handover. A replug may need a reboot: this package does not close the USB2 switch again | | `vendor/systemd/logind.conf.d/10-omamobile-power-key.conf` | `/usr/lib/systemd/logind.conf.d` | A short power press does not power the phone off. Same drop-in as the Pixel 7 Pro. The long press stays the PMIC reset | +| `vendor/systemd/sleep.conf.d/10-omamobile.conf` | `/usr/lib/systemd/sleep.conf.d` | Suspend means suspend-to-idle: the kernel offers `deep`, but Linux has no gs201 sleep sequence, and the phone doesn't wake from it. No hibernation. Same drop-in as the Pixel 7 Pro | | `vendor/NetworkManager/conf.d/10-omamobile-usb.conf` | `/usr/lib/NetworkManager/conf.d` | Keeps NetworkManager off that link | | `etc/omamobile-mirrorlist` | `/etc/pacman.d/omamobile-mirrorlist` | Where pacman finds the `[omamobile]` repository. Same file as the Pixel 7 Pro package | | `omamobile-device-panther.install` | pacman hook | Adds `[omamobile]` to `pacman.conf` before `[omarchy]`, once. Same script as the Pixel 7 Pro package | diff --git a/packages/omamobile-device-panther/install b/packages/omamobile-device-panther/install index d00d6c57f..d1ba50775 100755 --- a/packages/omamobile-device-panther/install +++ b/packages/omamobile-device-panther/install @@ -11,10 +11,15 @@ build=${2:-build} install -Dm755 "$build/reboot-to" "$destination/usr/bin/reboot-to" install -Dm644 vendor/udev/rules.d/10-omamobile-storage.rules \ "$destination/usr/lib/udev/rules.d/10-omamobile-storage.rules" +for rules in 20-omamobile-gpu-always-on.rules 72-omamobile-feedbackd.rules; do + install -Dm644 "vendor/udev/rules.d/$rules" "$destination/usr/lib/udev/rules.d/$rules" +done install -Dm644 vendor/systemd/network/20-usb-gadget.network \ "$destination/usr/lib/systemd/network/20-usb-gadget.network" install -Dm644 vendor/systemd/logind.conf.d/10-omamobile-power-key.conf \ "$destination/usr/lib/systemd/logind.conf.d/10-omamobile-power-key.conf" +install -Dm644 vendor/systemd/sleep.conf.d/10-omamobile.conf \ + "$destination/usr/lib/systemd/sleep.conf.d/10-omamobile.conf" install -Dm644 vendor/NetworkManager/conf.d/10-omamobile-usb.conf \ "$destination/usr/lib/NetworkManager/conf.d/10-omamobile-usb.conf" install -Dm644 device.conf \ diff --git a/packages/omamobile-device-panther/test/all b/packages/omamobile-device-panther/test/all index 1375af84c..845304635 100755 --- a/packages/omamobile-device-panther/test/all +++ b/packages/omamobile-device-panther/test/all @@ -31,6 +31,10 @@ if [[ -f ../omamobile-device-cheetah/src/reboot-to.c ]]; then ../omamobile-device-cheetah/vendor/systemd/logind.conf.d/10-omamobile-power-key.conf \ || fail "the power-key drop-in drifted from the cheetah package" pass "the power-key drop-in matches the cheetah package" + cmp -s vendor/systemd/sleep.conf.d/10-omamobile.conf \ + ../omamobile-device-cheetah/vendor/systemd/sleep.conf.d/10-omamobile.conf \ + || fail "the sleep drop-in drifted from the cheetah package" + pass "the sleep drop-in matches the cheetah package" cmp -s omamobile-device-panther.install \ ../omamobile-device-cheetah/omamobile-device-cheetah.install \ || fail "the pacman install script drifted from the cheetah package" @@ -55,8 +59,11 @@ pass "reboot-to compiles" ./install "$tmp/root" "$tmp/build" for f in usr/bin/reboot-to \ usr/lib/udev/rules.d/10-omamobile-storage.rules \ + usr/lib/udev/rules.d/20-omamobile-gpu-always-on.rules \ + usr/lib/udev/rules.d/72-omamobile-feedbackd.rules \ usr/lib/systemd/network/20-usb-gadget.network \ usr/lib/systemd/logind.conf.d/10-omamobile-power-key.conf \ + usr/lib/systemd/sleep.conf.d/10-omamobile.conf \ usr/lib/NetworkManager/conf.d/10-omamobile-usb.conf \ usr/share/omamobile/device.conf \ usr/share/omamobile/device-panther/version \ @@ -68,6 +75,10 @@ grep -q 'KERNEL=="sda", MODE="0000"' "$tmp/root/usr/lib/udev/rules.d/10-omamobil || fail "the whole-disk node is made inaccessible" grep -q 'ID_PART_ENTRY_NAME}!="userdata"' "$tmp/root/usr/lib/udev/rules.d/10-omamobile-storage.rules" \ || fail "userdata is the only partition desktop tools may see" +for rules in 20-omamobile-gpu-always-on.rules 72-omamobile-feedbackd.rules; do + cmp -s "vendor/udev/rules.d/$rules" "../omamobile-device-cheetah/vendor/udev/rules.d/$rules" \ + || fail "$rules matches the Pixel 7 Pro's (the same GPU and haptics)" +done grep -q 'Address=172.16.42.1/24' "$tmp/root/usr/lib/systemd/network/20-usb-gadget.network" \ || fail "usb0 keeps the initramfs address" power="$tmp/root/usr/lib/systemd/logind.conf.d/10-omamobile-power-key.conf" @@ -77,6 +88,8 @@ grep -q '^HandlePowerKey=ignore$' "$power" \ || fail "a short press must not power the phone off" grep -q '^HandlePowerKeyLongPress=ignore$' "$power" \ || fail "the long press stays the PMIC reset" +grep -q '^MemorySleepMode=s2idle$' "$tmp/root/usr/lib/systemd/sleep.conf.d/10-omamobile.conf" \ + || fail "suspend must be s2idle: gs201 never wakes from deep" grep -q '^PACKAGE=omamobile-device-panther$' "$tmp/root/usr/share/omamobile/device.conf" \ || fail "the installed descriptor is panther" for absent in usr/bin/omamobile-boot-success usr/bin/omamobile-bootctl \ @@ -86,4 +99,4 @@ for absent in usr/bin/omamobile-boot-success usr/bin/omamobile-bootctl \ usr/lib/systemd/logind.conf.d/10-omamobile-lid.conf; do [[ ! -e $tmp/root/$absent ]] || fail "install includes $absent" done -pass "install stages the udev rule, the USB link, and the mirrorlist, and nothing that marks a slot or starts hardware" +pass "install stages the udev rules, the USB link, and the mirrorlist, and nothing that marks a slot or starts hardware" diff --git a/packages/omamobile-device-panther/vendor/systemd/sleep.conf.d/10-omamobile.conf b/packages/omamobile-device-panther/vendor/systemd/sleep.conf.d/10-omamobile.conf new file mode 100644 index 000000000..d5f37e34c --- /dev/null +++ b/packages/omamobile-device-panther/vendor/systemd/sleep.conf.d/10-omamobile.conf @@ -0,0 +1,11 @@ +# SPDX-License-Identifier: MIT +# The firmware advertises PSCI SYSTEM_SUSPEND, so the kernel offers "deep" +# sleep, but Linux has no gs201 SoC sleep sequence yet: entering it without +# one doesn't wake. Suspend means suspend-to-idle until SYS_SLEEP exists +# (device/cheetah/SUSPEND-PLAN.md, sections 1 and 5). There is no swap to +# hibernate to. +[Sleep] +MemorySleepMode=s2idle +AllowHibernation=no +AllowHybridSleep=no +AllowSuspendThenHibernate=no diff --git a/packages/omamobile-device-panther/vendor/udev/rules.d/20-omamobile-gpu-always-on.rules b/packages/omamobile-device-panther/vendor/udev/rules.d/20-omamobile-gpu-always-on.rules new file mode 100644 index 000000000..212227d1b --- /dev/null +++ b/packages/omamobile-device-panther/vendor/udev/rules.d/20-omamobile-gpu-always-on.rules @@ -0,0 +1,6 @@ +# SPDX-License-Identifier: MIT +# Omarchy Mobile: keep the Mali-G710 powered while Panthor drives it. Powering the +# GPU domain back up needs a secure restore call (SMC) our kernel doesn't make +# yet (device/cheetah/GPU-PLAN.md), so runtime suspend must never happen. +# Remove once a gs201 power-domain driver handles G3D properly. +ACTION=="add|bind", SUBSYSTEM=="platform", KERNEL=="28000000.gpu", ATTR{power/control}="on" diff --git a/packages/omamobile-device-panther/vendor/udev/rules.d/72-omamobile-feedbackd.rules b/packages/omamobile-device-panther/vendor/udev/rules.d/72-omamobile-feedbackd.rules new file mode 100644 index 000000000..88ad325a3 --- /dev/null +++ b/packages/omamobile-device-panther/vendor/udev/rules.d/72-omamobile-feedbackd.rules @@ -0,0 +1,7 @@ +# SPDX-License-Identifier: MIT +# Omarchy Mobile: let feedbackd drive the Cirrus Logic CS40L26 haptics +# (cs40l26-vibra), in the same form as feedbackd's own 72-feedbackd.rules. +# Before 73-seat-late.rules, which turns the uaccess tag into an ACL. +ACTION=="remove", GOTO="omamobile_feedbackd_end" +SUBSYSTEM=="input", KERNEL=="event*", ENV{ID_INPUT}=="1", SUBSYSTEMS=="input", ATTRS{name}=="cs40l26_vibra", TAG+="uaccess", ENV{FEEDBACKD_TYPE}="vibra" +LABEL="omamobile_feedbackd_end" diff --git a/packages/omamobile-device-panther/version b/packages/omamobile-device-panther/version index 6e8bf73aa..17e51c385 100644 --- a/packages/omamobile-device-panther/version +++ b/packages/omamobile-device-panther/version @@ -1 +1 @@ -0.1.0 +0.1.1 diff --git a/tools/extract-vendor-firmware b/tools/extract-vendor-firmware index 0ab86770d..2a4fe5238 100755 --- a/tools/extract-vendor-firmware +++ b/tools/extract-vendor-firmware @@ -2,7 +2,8 @@ # SPDX-License-Identifier: MIT # extract-vendor-firmware: copy the Wi-Fi, Bluetooth, haptics and speaker # amplifier firmware the Pixel 7 Pro (cheetah) needs out of a Google factory -# image, on the user's own machine. +# image, on the user's own machine. The Pixel 7 (panther) and the Pixel 6 +# Pro (raven) are options (-d). # # Google's firmware is not ours to redistribute, so Omarchy Mobile never ships it. # Like LineageOS's extract-files, this pulls it from an image the user already @@ -77,7 +78,7 @@ Usage: extract-vendor-firmware [-o OUTDIR] [-w WORKDIR] [-f] SOURCE inside it, or a raw/sparse vendor.img -o DIR staging root to write into (default: ./out/vendor-firmware) -w DIR scratch directory for the ~1 GB vendor.img (default: a temp dir in \$TMPDIR) - -d DEV cheetah (default) or raven + -d DEV cheetah (default), panther or raven -f skip the android-info.txt board=$DEVICE check -c FILE also copy the camera HAL APEX (/vendor/apex/com.google.pixel.camera.hal.apex) to FILE, for tools/extract-camera-data --apex (tools/phone-provision uses it) @@ -107,6 +108,13 @@ shift $((OPTIND - 1)) [[ $# -eq 1 ]] || { usage >&2; exit 2; } case $DEVICE_OPT in cheetah) ;; + panther) + # Pixel 7: the same gs201 vendor files as cheetah, under the same names + # (device/panther/NOTES.md); only the board and codename differ. + BOARD="google,gs201-panther" + DEVICE="panther" + MAP=("${MAP[@]//google,gs201-cheetah/$BOARD}") + MAP=("${MAP[@]//cheetah/$DEVICE}") ;; raven) # Pixel 6 Pro: Wi-Fi, Bluetooth, the AoC, the speaker amplifiers' # protection firmware and the AoC's sensor registry (device/raven/WIFI-PLAN.md, @@ -130,7 +138,7 @@ case $DEVICE_OPT in "firmware/cs40l20.bin|cs40l20.bin" "firmware/cs40l25a_clab.bin|cs40l25a_clab.bin" ) ;; - *) die "unknown device $DEVICE_OPT (cheetah or raven)" ;; + *) die "unknown device $DEVICE_OPT (cheetah, panther or raven)" ;; esac # The camera data flow (tools/extract-camera-data) exists for cheetah only [[ $DEVICE == cheetah || -z $CAMERA_APEX ]] || die "-c is cheetah's (no camera support for $DEVICE yet)" @@ -277,8 +285,8 @@ for f in top bottom; do [[ "$(head -c4 "$dest/cirrus/cs35l41-dsp1-spk-prot-$DEVICE-$f.bin")" == WMDR ]] || die "the $f speaker tuning is not a WMDR coefficient file" done -# Cheetah's haptics and media deltas -if [[ $DEVICE == cheetah ]]; then +# The gs201 phones' haptics and media deltas +if [[ $DEVICE == cheetah || $DEVICE == panther ]]; then for f in cs40l26.wmfw cs40l26-calib.wmfw; do wmfw_halo "$f"; done grep -aq 'FIRMWARE_CS40L26' "$dest/cs40l26.wmfw" || die "cs40l26.wmfw is not a CS40L26 firmware" @@ -300,7 +308,7 @@ bt=$(grep -ao 'BCM4389C1 [^[]*' "$brcm/BCM.$BOARD.hcd" | head -1) (cd "$dest" && find . -type f -printf '%P\n' | sort | xargs sha256sum -- > "$OUT/vendor-firmware.sha256") say "Wi-Fi firmware: ${ver:-unknown version}" say "Bluetooth patch: ${bt:-unknown version}" -[[ $DEVICE == cheetah ]] && +[[ $DEVICE == cheetah || $DEVICE == panther ]] && say "Haptics firmware: cs40l26.wmfw ($(stat -c %s "$dest/cs40l26.wmfw") bytes) and its wavetable" say "Speaker protection: cs35l41-dsp1-spk-prot-$DEVICE.wmfw and the top and bottom tunings" say "Staged in $OUT (checksums in $OUT/vendor-firmware.sha256)" From 61779498b9dd44eba9935498c3d2c854b9bfc597 Mon Sep 17 00:00:00 2001 From: Alejandro Garcia Date: Thu, 29 Oct 2026 13:40:11 -0700 Subject: [PATCH 2/2] device-panther: test the rules in a lone package copy, and name the G1/H1 kernels The cmp of the GPU and feedbackd rules against cheetah's copies sat outside the guard that the other comparisons use, so test/all failed wherever the package directory travels alone (phone-install-package, build-packages --container-check). Move it inside the guard, with a pass line, and check the staged rules' content outside it, as the sleep drop-in already is. NOTES' 2026-10-28 GPU and haptics entries now name the kernel release each result came from. Co-Authored-By: Claude Opus 5.5 --- device/panther/NOTES.md | 4 ++-- packages/omamobile-device-panther/test/all | 14 ++++++++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/device/panther/NOTES.md b/device/panther/NOTES.md index 344409d77..a4dd6ce46 100644 --- a/device/panther/NOTES.md +++ b/device/panther/NOTES.md @@ -9,8 +9,8 @@ The board file (`gs201-panther.dts`) was merged as [linux-omarchy-mobile#108](ht Test kernels from local branches on slot B, each one change on top of the touch test kernel; one boot each. -- **GPU (G1).** With `&gpu` enabled as on the Pixel 7 Pro and the package's always-on rule installed before the boot, panthor probes the Mali-G710 (id 0xa862, `shader_present` 0x1110055), boots the CSF firmware (interface v1.5.0) and registers `renderD128`. Hyprland renders on it through the project's Mesa ("Mali-G710 MC7 (Panfrost)"), with no MMU faults or GPU resets. Probe prints `_opp_set_regulators: no regulator (mali)`, as on the Pixel 7 Pro (harmless, [GPU-PLAN](../cheetah/GPU-PLAN.md)). -- **Haptics (H1).** The CS40L26A is on USI8 I2C at 0x43 with the same pins and stock values as the Pixel 7 Pro (read from the live device tree). With `cs40l26.wmfw` and `cs40l26.bin` from this phone's own factory image (`tools/extract-vendor-firmware -d panther`) in `/usr/lib/firmware/updates`, `cs40l26-vibra` finds revision A1, runs firmware 7.2.91 with the wavetable, and registers `cs40l26_vibra`; `tools/ff-rumble` effects of 100-500 ms at 25-80 % were felt. +- **GPU (G1).** Kernel `7.3.0-rc6-omamobile-push1-ga92e2bd8546c`: the touch test kernel plus local commit `a92e2bd85`, the same change as [linux-omarchy-mobile#129](https://github.com/derekross/linux-omarchy-mobile/pull/129). With `&gpu` enabled as on the Pixel 7 Pro and the package's always-on rule installed before the boot, panthor probes the Mali-G710 (id 0xa862, `shader_present` 0x1110055), boots the CSF firmware (interface v1.5.0) and registers `renderD128`. Hyprland renders on it through the project's Mesa ("Mali-G710 MC7 (Panfrost)"), with no MMU faults or GPU resets. Probe prints `_opp_set_regulators: no regulator (mali)`, as on the Pixel 7 Pro (harmless, [GPU-PLAN](../cheetah/GPU-PLAN.md)). +- **Haptics (H1).** Kernel `7.3.0-rc6-omamobile-push1-g575bb567ca5f`: the G1 kernel plus local commit `575bb567c`, the same change as [linux-omarchy-mobile#130](https://github.com/derekross/linux-omarchy-mobile/pull/130). The CS40L26A is on USI8 I2C at 0x43 with the same pins and stock values as the Pixel 7 Pro (read from the live device tree). With `cs40l26.wmfw` and `cs40l26.bin` from this phone's own factory image (`tools/extract-vendor-firmware -d panther`) in `/usr/lib/firmware/updates`, `cs40l26-vibra` finds revision A1, runs firmware 7.2.91 with the wavetable, and registers `cs40l26_vibra`; `tools/ff-rumble` effects of 100-500 ms at 25-80 % were felt. - **Suspend must be s2idle.** `/sys/power/mem_sleep` reads `s2idle [deep]` on these kernels, and gs201 never wakes from `deep`, so the package now carries the Pixel 7 Pro's `sleep.conf.d` drop-in. Suspend itself is untested here. - **Power off reboots the phone.** Omarchy's "Power off" (or `systemctl poweroff`) restarts the phone within a second, which spends a slot B retry. With the reboot watchdog off, systemd-shutdown runs to the end. A shutdown hook that saved the kernel log to `userdata` ten times a second, then powered off itself (sysrq `o`, the same `kernel_power_off()`), saved nothing after the trigger: no `sysrq: Power Off`, no device `shutdown` lines, no `reboot: Power down`. So the reset comes in the first tenth of a second of the kernel's power off, or before UFS can write another frame. With `syscon-poweroff` disabled in the test DT that leaves PSCI SYSTEM_OFF, which the firmware seems to turn into a restart (the boot reason reads `watchdog/apc`). The Pixel 7 Pro has never powered off from Linux either ([SUSPEND-PLAN](../cheetah/SUSPEND-PLAN.md) P7). To get to fastboot, hold Power and Volume Down from a running phone instead; that costs no retry. - **USB doesn't come back after a replug.** A replug while Linux runs leaves the phone off the bus, as on the other Tensor phones (`AGENTS.md`): the MAX77759 opens its USB2 data switch, and nothing closes it. The Pixel 7 Pro's `omamobile-usb-rescue` needs the MAX77759's I2C bus (USI13, `10d60000`), which this board file doesn't enable yet, so for now a replug means Power and Volume Down, then a flash. diff --git a/packages/omamobile-device-panther/test/all b/packages/omamobile-device-panther/test/all index 845304635..6f5fccb27 100755 --- a/packages/omamobile-device-panther/test/all +++ b/packages/omamobile-device-panther/test/all @@ -35,6 +35,11 @@ if [[ -f ../omamobile-device-cheetah/src/reboot-to.c ]]; then ../omamobile-device-cheetah/vendor/systemd/sleep.conf.d/10-omamobile.conf \ || fail "the sleep drop-in drifted from the cheetah package" pass "the sleep drop-in matches the cheetah package" + for rules in 20-omamobile-gpu-always-on.rules 72-omamobile-feedbackd.rules; do + cmp -s "vendor/udev/rules.d/$rules" "../omamobile-device-cheetah/vendor/udev/rules.d/$rules" \ + || fail "$rules drifted from the cheetah package" + done + pass "the GPU and feedbackd rules match the cheetah package" cmp -s omamobile-device-panther.install \ ../omamobile-device-cheetah/omamobile-device-cheetah.install \ || fail "the pacman install script drifted from the cheetah package" @@ -75,10 +80,11 @@ grep -q 'KERNEL=="sda", MODE="0000"' "$tmp/root/usr/lib/udev/rules.d/10-omamobil || fail "the whole-disk node is made inaccessible" grep -q 'ID_PART_ENTRY_NAME}!="userdata"' "$tmp/root/usr/lib/udev/rules.d/10-omamobile-storage.rules" \ || fail "userdata is the only partition desktop tools may see" -for rules in 20-omamobile-gpu-always-on.rules 72-omamobile-feedbackd.rules; do - cmp -s "vendor/udev/rules.d/$rules" "../omamobile-device-cheetah/vendor/udev/rules.d/$rules" \ - || fail "$rules matches the Pixel 7 Pro's (the same GPU and haptics)" -done +grep -q 'KERNEL=="28000000.gpu", ATTR{power/control}="on"' \ + "$tmp/root/usr/lib/udev/rules.d/20-omamobile-gpu-always-on.rules" \ + || fail "the GPU stays powered while Panthor drives it" +grep -q 'ATTRS{name}=="cs40l26_vibra"' "$tmp/root/usr/lib/udev/rules.d/72-omamobile-feedbackd.rules" \ + || fail "feedbackd gets the CS40L26 haptics" grep -q 'Address=172.16.42.1/24' "$tmp/root/usr/lib/systemd/network/20-usb-gadget.network" \ || fail "usb0 keeps the initramfs address" power="$tmp/root/usr/lib/systemd/logind.conf.d/10-omamobile-power-key.conf"