Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion device/akita/BRINGUP-M2.md
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ Findings:
- **The two `exynos-clkout` lines stay "new" on purpose.** The driver had no `google,zuma-pmu` entry in this kernel. linux-omarchy-mobile#209 adds it (merged 2026-11-10, after this kernel was built), so akita's next kernel should stop printing them. `phone-smoke`'s known list is shared by every phone, and on the Pixel 7 Pro and the 9a the same lines mean NFC's clock is missing, so they aren't listed there (#584, closed).
- **The other error lines are known:** `unable to open an initial console`, `systemd-gpt-auto-generator` exiting with 1, and `gkr-pam: couldn't unlock the login keyring` (auto-login).
- **The lock screen blanks the display after 10 s without input,** whatever `omarchy-toggle-idle` says. That's the lock's own timer, by design. With no touch or key input yet, the screen can only be woken over SSH (`omarchy-shell lock wake`, run as the user). The power key isn't an input device yet: a short press does nothing, and a long press is the PMIC reset.
- **The USB link didn't come back after the host lost power.** The laptop crashed and restarted while the phone ran the M2.6 root. After that, the phone never appeared on USB again, even on a replug, while the display stayed up. Volume Down + Power reached fastboot, which enumerated at once on the same cable and port. This is probably the same as on the Pixel 7 Pro and the 9a, not checked on akita: there the charger IC opens the USB2 data switch when VBUS drops, and with no Type-C driver yet nothing closes it again. A laptop losing power looks like an unplug to the phone. Until that's fixed, the way back is the button combination.
- **The USB link didn't come back after the host lost power.** The laptop crashed and restarted while the phone ran the M2.6 root. After that, the phone never appeared on USB again, even on a replug, while the display stayed up. Volume Down + Power reached fastboot, which enumerated at once on the same cable and port. This is probably the same as on the Pixel 7 Pro and the 9a, not checked on akita: there the charger IC opens the USB2 data switch when VBUS drops, and with no Type-C driver yet nothing closes it again. A laptop losing power looks like an unplug to the phone. Until that's fixed, the way back is the button combination. **Since confirmed on akita** ([BRINGUP-M4](BRINGUP-M4.md), M4.4): after an unplug the switch read 0x00, and `omamobile-usb-rescue` brought the link back on the replug.
- **The clock:** first boot read Oct 26 (not today, but not before the release key's creation date, 2026-10-26), so the keyring imported the release key with full trust, and no gpg line says "created in the future". The clock was set from the laptop over SSH afterwards. From then on it survives a reboot: systemd stores the time at shutdown (`/var/lib/systemd/timesync/clock`), so the second boot came up at the last shutdown's time, behind only by the time the phone was off.
- **`/sys/power/mem_sleep` still reads `s2idle [deep]`** (the kernel's default). The package's drop-in (`MemorySleepMode=s2idle`) applies when systemd suspends. Suspend wasn't tried, and the auto-sleep toggle (`omamobile-sleep`) is off.
- The logs are private (`~/android/reference/akita-m2.7-omarchy-20261110/`). The images, modules and root image are kept as `~/omamobile-kernel/known-good/akita-m2.7-gabcd6aac51cf`.
Expand Down
225 changes: 225 additions & 0 deletions device/akita/BRINGUP-M4.md

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions device/akita/NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,18 @@ Sources:
- `S/`: Google's GPL zuma SoC device tree, [kernel/devices/google/zuma](https://android.googlesource.com/kernel/devices/google/zuma/+/refs/tags/android-16.0.0_r0.10/dts/) at the same tag.
- `H/`: [husky's notes](../husky/NOTES.md) and [descriptor](../husky/device.conf), for what the two zuma phones share.

## 2026-11-13: battery and charging (M4)

The battery: the fuel gauge, the charger's state, the USB link across an unplug, charging under Linux (gate h) and the PMIC's interrupt. The steps and results are in [BRINGUP-M4](BRINGUP-M4.md). The kernel side is linux-omarchy-mobile#246.

- **The battery hardware is husky's** [V]: the MAX77759 gauge (0x36) and PMIC (0x66, its charger at 0x69) on `hsi2c_11`, with the same interrupt lines, and the pack's 24c08 EEPROM on `hsi2c_9` (G/, R/). The bus is pulled up, as in `zuma-pinctrl.dtsi` (R/'s live tree overrides G/'s `PULL_NONE`).
- **This phone's pack is the ATL one** [V] (EEPROM byte 0x17 = 1). With Google's `atl-a1-1k` model the gauge reads a real temperature and 4486 mAh. Without a model it reads 22.0 C, stuck, and a level 4 points high.
- **The bootloader charges the phone on the cable** [V]: mode 0x05, a 4.35 V float, a 500 mA input limit, the same values as husky's. A reboot through the bootloader puts them back even after Linux has turned charging off.
- **M2.7's lost USB link is the charger's data switch** [V]: on an unplug the MAX77759 can open its USB2 switch (0x25:0x93), and nothing closes it until the bootloader runs. husky's `omamobile-usb-rescue` closes it again, and the package now ships it.
- **Linux charged the battery** [V] under `tools/husky-deadman`, at 4.2 V and 1.32 A, on a laptop port and a wall charger. The guard never tripped. The charge current reads higher than the 500 mA input limit allows, which isn't settled yet.
- **The PMIC's interrupt** [V] (GIC SPI 74, as stock's) gives `rtc0` its alarm: `rtcwake` fires on time.
- **Omarchy 4.5's kyber rule** fails on some UFS units with "Device or resource busy" (`60-omarchy-io-scheduler.rules`). udev ignores it.

## 2026-11-11: buttons and touch (M3)

The buttons (gate f) and touch (gate g), so the phone is usable by hand. The steps and results are in [BRINGUP-M3](BRINGUP-M3.md). The kernel side is linux-omarchy-mobile#238 (the buttons and `mem_sleep_default=s2idle`, merged), #240 (the S2MPG14 supply setter) and #241 (the touch supplies, the touchscreen and the panel size).
Expand Down
38 changes: 38 additions & 0 deletions device/akita/overlays/gauge-model-atl.dtso
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Bring-up overlay, never default (BRINGUP-M4, M4.2): load Google's ModelGauge
* m5 model "atl-a1-1k" into the Pixel 8a's fuel gauge. The node is picked by
* the pack's ID, byte 0x17 of its EEPROM: 0 default-a1-0k (Google's fallback
* for an unknown pack), 1 atl-a1-1k, 2 cos-a1-2k, 4 lwn-a1-4k. The 8a this was
* written on reads 1. Generated by tools/gen-gauge-overlay.py from Google's
* public, GPL-2.0-only dts/zuma-akita-battery-data.dtsi (kernel/devices/google/
* akita, tag android-16.0.0_r0.10,
* https://android.googlesource.com/kernel/devices/google/akita/+/refs/tags/android-16.0.0_r0.10/dts/zuma-akita-battery-data.dtsi):
* maxim,fg-model = that node's 48 u16 table words, maxim,fg-params = its
* parameter words in the order of struct max77759_fg_params (DesignCap 0x08c3,
* 4486 mAh at 2 mAh per unit, what the stock gauge reports). The driver loads
* it only while the gauge reports power-on reset (Status bit 1), then clears
* that bit. The table and the parameters are Copyright 2022 Google LLC, from
* that file.
*/
/dts-v1/;
/plugin/;

&hsi2c_11 {
fuel-gauge@36 {
maxim,fg-model = /bits/ 16 <
0xa4a0 0xb520 0xb8b0 0xbbf0 0xbd30 0xbdf0 0xbef0 0xc000
0xc1c0 0xc420 0xc820 0xcbb0 0xcef0 0xd270 0xd5a0 0xdd30
0x0090 0x0d30 0x0a00 0x0620 0x3c00 0x1c00 0x0960 0x0ce0
0x0bf0 0x05f0 0x07d0 0x07f0 0x05d0 0x05b0 0x06f0 0x06f0
0x0200 0x0200 0x0200 0x0200 0x0200 0x0200 0x0200 0x0200
0x0200 0x0200 0x0200 0x0200 0x0200 0x0200 0x0200 0x0200
>;
maxim,fg-params = /bits/ 16 <
0xf060 0x1438 0x260e 0x4217 0x0090 0x5f00 0x08c3 0x08c3
0x3200 0x0230 0x08c3 0xa561 0x2080 0x0e80 0x0580 0x0400
0x09a0 0x1002 0x0580 0xed51 0x1eba 0x0014 0x6070 0x1900
0x2241 0x0613 0x2d00 0x0400
>;
};
};
26 changes: 26 additions & 0 deletions device/akita/overlays/pack-eeprom-test.dtso
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// SPDX-License-Identifier: GPL-2.0-only
/*
* Bring-up probe, never default (BRINGUP-M4, M4.2b): switches on USI9 and
* hsi2c_9, the bus of the battery pack's EEPROM, whose byte 0x17 is the
* battery ID that picks the fuel gauge's model. The EEPROM node itself is in
* the board file (read-only). CMU_PERIC1 and its sysreg are on in the board
* file already; repeating them is harmless. As husky's pack-eeprom-test.dtso.
*/
/dts-v1/;
/plugin/;

&cmu_peric1 {
status = "okay";
};

&sysreg_peric1 {
status = "okay";
};

&usi9 {
status = "okay";
};

&hsi2c_9 {
status = "okay";
};
4 changes: 2 additions & 2 deletions packages/omamobile-device-akita/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
pkgname=omamobile-device-akita
pkgver=$(cat "${startdir:-.}/version")
pkgrel=1
pkgdesc="Omarchy Mobile support for the Google Pixel 8a (akita): storage guard and USB networking"
pkgdesc="Omarchy Mobile support for the Google Pixel 8a (akita): storage guard, USB networking and the USB replug rescue"
arch=(aarch64)
url="https://github.com/derekross/omarchy-mobile"
license=(MIT)
depends=(bash systemd omamobile-keyring)
depends=(bash systemd omamobile-keyring i2c-tools)
provides=(omamobile-device)
conflicts=(omamobile-device)
backup=(etc/pacman.d/omamobile-mirrorlist)
Expand Down
8 changes: 5 additions & 3 deletions packages/omamobile-device-akita/README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
# omamobile-device-akita

Omarchy Mobile's first userspace package for the Google Pixel 8a (codename akita, Tensor G3 / zuma). Like the Pixel 8 Pro's first package, it hides the Android partitions from desktop tools, holds the USB address, and gives pacman the same `[omamobile]` repository as the Pixel 7 Pro. It does not drive the radio, the charger, or a camera, and it does not mark a boot slot successful.
Omarchy Mobile's first userspace package for the Google Pixel 8a (codename akita, Tensor G3 / zuma). Like the Pixel 8 Pro's first package, it hides the Android partitions from desktop tools, holds the USB address, and gives pacman the same `[omamobile]` repository as the Pixel 7 Pro. It keeps the USB link across an unplug, as the Pixel 8 Pro's does. It does not drive the radio, the charger, or a camera, and it does not mark a boot slot successful.

| 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 ([BRINGUP-M2](../../device/akita/BRINGUP-M2.md) test 8) |
| `vendor/systemd/network/20-usb-gadget.network` | `/usr/lib/systemd/network` | Sets usb0 to 172.16.42.1/24 after handover, as the last gateway. A replug needs a reboot: this package does not close the MAX77759's USB2 switch again (the Pixel 8 Pro's rescue needs its `hsi2c_11` bus, which akita's board file doesn't have yet). Same file as the Pixel 8 Pro package |
| `vendor/systemd/network/20-usb-gadget.network` | `/usr/lib/systemd/network` | Sets usb0 to 172.16.42.1/24 after handover, as the last gateway. A replug needs the USB rescue below: without it the link can stay dead until a reboot. Same file as the Pixel 8 Pro package |
| `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. akita's forced-reset combination under our kernel is untested; on the Pixel 8 Pro it is Power + Volume Up held 15-30 s |
| `vendor/NetworkManager/conf.d/10-omamobile-usb.conf` | `/usr/lib/NetworkManager/conf.d` | Keeps NetworkManager off that link. Same file as the Pixel 8 Pro package |
| `vendor/systemd/sleep.conf.d/10-omamobile.conf` | `/usr/lib/systemd/sleep.conf.d` | Suspend means suspend-to-idle. The kernel's default on the 8a is `deep` (`/sys/power/mem_sleep` reads `s2idle [deep]`), which Linux can't wake from on zuma yet. No hibernation: there is no swap. The settings are the Pixel 7 Pro's; the test checks. Suspend itself is still untested on Tensor G3 (the Pixel 8 Pro's UFS-PLAN, U6) |
| `bin/omamobile-usb-rescue` + `vendor/systemd/system/omamobile-usb-rescue.service` | `/usr/bin`, `/usr/lib/systemd/system` (enabled by a vendor wants link) | Keeps the USB link across an unplug. The MAX77759's Type-C side can open its USB2 data switch (TCPC 0x25, register 0x93) when VBUS drops, and with no Type-C driver nothing closes it again until the bootloader runs, so the phone stays off the bus after a replug. While VBUS is valid the script writes 0x09 back (the only register it writes) and logs every change of the switch, VBUS and the UDC state to the journal. It stands aside once a Type-C driver owns 0x25. It needs `hsi2c_11` in the board file (kernel #246): without it the script says so and exits. Tested on a Pixel 8a ([BRINGUP-M4](../../device/akita/BRINGUP-M4.md), M4.4 and M4.6): after an unplug the switch read 0x00 and the link came back two seconds after the replug, with no reboot. The same bytes as the Pixel 8 Pro package; the test checks |
| `vendor/modprobe.d/omamobile-max77759.conf` | `/usr/lib/modprobe.d` | Keeps max77759_charger, gpio_max77759, nvmem_max77759 and tcpci_maxim from autoloading: binding the PMIC creates the charger cell, which programs charge limits from the battery node, so the charger runs only under `tools/husky-deadman`. Blacklist only, so a runbook can still load them by hand. The fuel gauge and the MFD core are not blacklisted. The Pixel 8 Pro's settings (the comment differs); the test checks |
| `etc/omamobile-mirrorlist` | `/etc/pacman.d/omamobile-mirrorlist` | Where pacman finds the `[omamobile]` repository. Same file as the Pixel 7 Pro package |
| `omamobile-device-akita.install` | pacman hook | Adds `[omamobile]` to `pacman.conf` before `[omarchy]`, once, and keeps the channel a phone follows. Same script as the Pixel 7 Pro package |
| `src/reboot-to.c` | `/usr/bin/reboot-to` | Reboot with a reason the bootloader understands (`reboot-to bootloader` reaches fastboot on akita, [BRINGUP-M1](../../device/akita/BRINGUP-M1.md) test 3). Same bytes as the Pixel 7 Pro package; the test checks |
| `device.conf` | `/usr/share/omamobile/device.conf` | The descriptor, the same bytes as `device/akita/device.conf` |

`./build [DIR]` compiles `reboot-to` from this directory, `./install DESTDIR [DIR]` stages the files, and `test/all` checks the copies when it is run from the repository.

Not in this package: the boot-success marker, Wi-Fi, the charger, cameras, the USB replug rescue, the display start and the slot-B image hook. Each one stays out until it has its own runbook. There is no lid drop-in: akita has no hinge. Whether Plymouth needs the Pixel 8 Pro's retain-splash drop-in on simpledrm is still open ([BRINGUP-M2](../../device/akita/BRINGUP-M2.md), open questions).
Not in this package: the boot-success marker, Wi-Fi, the charger, cameras, the display start and the slot-B image hook. Each one stays out until it has its own runbook. **The fuel gauge has no battery model by default.** Neither of BRINGUP-M4's overlays (`pack-eeprom-test`, `gauge-model-atl`) is in `device.conf`, so on a kernel with linux-omarchy-mobile#246 the gauge runs on the driver's default model: the bar shows 22.0 C, not moving, and a level about 4 points high ([BRINGUP-M4](../../device/akita/BRINGUP-M4.md), tests 37 and 39). There is no lid drop-in: akita has no hinge. Whether Plymouth needs the Pixel 8 Pro's retain-splash drop-in on simpledrm is still open ([BRINGUP-M2](../../device/akita/BRINGUP-M2.md), open questions).
46 changes: 46 additions & 0 deletions packages/omamobile-device-akita/bin/omamobile-usb-rescue
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/bin/bash
# SPDX-License-Identifier: MIT
# Keep the USB link working across unplugs on the Pixel 8 Pro. Ported from the
# Pixel 7 Pro's omamobile-usb-rescue; the bus here is 10cb0000.i2c (hsi2c_11).
# The MAX77759's Type-C side opens its USB2 data switch (TCPC vendor register
# USBSW_CTRL, 0x93) on unplug, and with no Type-C driver yet nothing closes it
# again, so the phone stays off the bus after a replug until the bootloader
# runs at the next boot. While VBUS is valid, put the switch back to 0x09
# (D+/D- connected), as the bootloader leaves it. Stands aside once a Type-C
# driver owns the chip. Only reads 0x25:0x93 and 0x69:0xb5 and writes
# 0x25:0x93. It also logs every change of the switch, VBUS and the UDC state
# to the journal (to explain the next loss).
set -uo pipefail

chg=0x69 tcpc=0x25
log() { echo "omamobile-usb-rescue: $*"; }

bus=
for d in /sys/bus/i2c/devices/i2c-*; do
readlink -f "$d" | grep -q 10cb0000.i2c && { bus=${d##*-}; break; }
done
[[ -n $bus ]] || { log "no I2C bus for 10cb0000.i2c"; exit 0; }

rd() { i2cget -f -y "$bus" "$1" "$2" 2>/dev/null; }
# VBUS as the charger sees it: CHG_DETAILS_00.CHGIN_DTLS (bits 6:5) == 3.
vbus_valid() { local v; v=$(rd $chg 0xb5) || return 1; (( ((v >> 5) & 3) == 3 )); }
tcpm_owns() { [[ -e /sys/bus/i2c/devices/$bus-0025/driver ]]; }
udc_state() { cat /sys/class/udc/*/state 2>/dev/null | head -1; }

log "watching the USB data switch on I2C bus $bus"
last=
while :; do
if tcpm_owns; then
log "a Type-C driver owns the chip; nothing to do"
exit 0
fi
sw=$(rd $tcpc 0x93)
if vbus_valid; then vb=1; else vb=0; fi
now="usbsw=${sw:-?} vbus=$vb udc=$(udc_state)"
[[ $now != "$last" ]] && { log "$now"; last=$now; }
if (( vb )) && [[ -n $sw && $sw != 0x09 ]]; then
log "VBUS valid, USBSW_CTRL $sw: closing the data switch"
i2cset -f -y "$bus" $tcpc 0x93 0x09
fi
sleep 2
done
8 changes: 8 additions & 0 deletions packages/omamobile-device-akita/install
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,14 @@ install -Dm644 vendor/NetworkManager/conf.d/10-omamobile-usb.conf \
"$destination/usr/lib/NetworkManager/conf.d/10-omamobile-usb.conf"
install -Dm644 vendor/systemd/sleep.conf.d/10-omamobile.conf \
"$destination/usr/lib/systemd/sleep.conf.d/10-omamobile.conf"
install -Dm644 vendor/modprobe.d/omamobile-max77759.conf \
"$destination/usr/lib/modprobe.d/omamobile-max77759.conf"
install -Dm755 bin/omamobile-usb-rescue "$destination/usr/bin/omamobile-usb-rescue"
install -Dm644 vendor/systemd/system/omamobile-usb-rescue.service \
"$destination/usr/lib/systemd/system/omamobile-usb-rescue.service"
install -d "$destination/usr/lib/systemd/system/multi-user.target.wants"
ln -sfn ../omamobile-usb-rescue.service \
"$destination/usr/lib/systemd/system/multi-user.target.wants/omamobile-usb-rescue.service"
install -Dm644 device.conf \
"$destination/usr/share/omamobile/device.conf"
install -Dm644 etc/omamobile-mirrorlist \
Expand Down
Loading