Repository navigation
Pixel 8a (akita): the battery's fuel gauge and PMIC, the pack's EEPROM, and the PMIC's interrupt - #246
Conversation
|
Thank you, this is a tidy piece of work, and the way you ran it is how I'd want every charger bring-up done: the bus first with the clients unbound, each driver held back and loaded by hand, the charger only under the dead-man tool with someone at the phone, and the open points (the charge current, the driver's units) said plainly instead of smoothed over. I checked the values against Google's Two small things before it goes in, and one about the order:
The order: the 8a's device package on main has no MAX77759 blacklist today, so I'll merge omarchy-mobile#718 first and this one after it, so that no 8a boots this device tree without it. On the charge current you flagged: 65 % to 72 % in 25 minutes is about 0.75 A on average for this pack, so the gauge's current looks real and it's the 500 mA that needs explaining. I'll ask about that on #718, where the charger results live; it doesn't hold this up. The |
…and PMIC The Pixel 8a's battery chips are the Pixel 8 Pro's: a MAX77759 fuel gauge at 0x36 and PMIC at 0x66 (its charger at 0x69) on hsi2c_11, with the gauge's interrupt on gpa7-7, the PMIC's on gpa8-0 and a 5 mOhm sense resistor (Google's zuma-akita-battery.dtsi). Enable CMU_PERIC1, its sysreg, USI11 and hsi2c_11, and describe the gauge and the PMIC as zuma-husky does. Google's file leaves the bus pins without a pull, but the stock phone's live device tree has them pulled up, as zuma-pinctrl.dtsi does, so akita needs no override. The battery node carries the 8a's pack: 4486 mAh, the design capacity the stock gauge reports, and 4.48 V design maximum (google,fv-max-uv). The charge limits are 4.2 V and about 0.3 C (1.32 A), below stock's, as on the 8 Pro. The Type-C controller (0x25) isn't described yet. Assisted-by: Claude Opus 5.5 Signed-off-by: DarekM <149845949+aninmucek@users.noreply.github.com>
…EPROM The Pixel 8a's pack carries an at,24c08 EEPROM at 0x50 on hsi2c_9 (Google's zuma-akita-battery.dtsi, pack_bee), as the Pixel 8 Pro's does; its byte 0x17 is the battery ID that picks the fuel gauge's model. Describe it read-only, as zuma-husky does. The bus stays disabled in the board file; a bring-up overlay switches USI9 and hsi2c_9 on for the read. Assisted-by: Claude Opus 5.5 Signed-off-by: DarekM <149845949+aninmucek@users.noreply.github.com>
Without an interrupt the S2MPG14 driver supplies its rails but none of the PMIC's events reach the host, so rtc0 has no wake alarm on the Pixel 8a. The stock phone's s2mpg14mfd node has the same interrupt as the Pixel 8 Pro's (interrupts = <0 0x4a 4 0>, GIC SPI 74, with s2mpg14,wakeup enabled), and its /proc/interrupts shows rtc-alarm0 on it. So this takes zuma-husky's three lines as they are: the interrupt, latched by the VGPIO2AP sysreg, and wakeup-source. Assisted-by: Claude Opus 5.5 Signed-off-by: DarekM <149845949+aninmucek@users.noreply.github.com>
903f72c to
468cc1e
Compare
|
Thank you for checking the values against Google's file. 1. The board-file comment. I folded it into the first commit and rebased: the head is now 2. The tested tree. In the tree that ran the last step ( After the comment above, this head's file is Since then, omarchy-mobile#718's package has also had its own boot on this tree:
The order: #718 first is right. I'll open an issue for the 🤖 Generated with Claude Code |
|
Thank you. Both points are done. The new As agreed, I'll merge omarchy-mobile#718 first and this one right after it, so that no 8a gets this device tree without the blacklist. Thanks for opening the issue for the charger's units. |
The Pixel 8a's battery chips, the battery pack's EEPROM, and the main PMIC's interrupt. These are the board-file parts of akita's M4 (battery and charging) in omarchy-mobile. The 8a's battery hardware is the 8 Pro's: the same chips, at the same addresses, on the same bus, with the same interrupt lines. So all three commits follow zuma-husky.
hsi2c_11at 400 kHz, with the MAX77759 fuel gauge at 0x36 (interruptgpa7-7) and the PMIC at 0x66 (gpa8-0), as Google'szuma-akita-battery.dtsihas them.maxim,rsense-default = <500>, in Google's 10 µΩ units.zuma-pinctrl.dtsidoes. So there's no override.google,fv-max-uv). The charge limits are 4.2 V and 1.32 A (about 0.3 C), below stock's, as on the 8 Pro.atmel,24c08at 0x50 onhsi2c_9. The bus stays disabled in the board file, as on husky. omarchy-mobile enables it with an overlay when it needs the pack's ID.wakeup-source. The stock phone'ss2mpg14mfdnode has the same interrupt (<0 0x4a 4 0>,s2mpg14,wakeupenabled), and its/proc/interruptsshowsrtc-alarm0on it. arm64: dts: exynos: google: zuma-husky: the main PMIC's interrupt, so the Pixel 8 Pro has an RTC alarm #243's author suggested akita take the same lines.Tested on a Pixel 8a from slot B (7.3.0-rc6, these three commits on
2db2bc35b), one change per boot, with every battery driver held back by a modprobe blacklist until its step:The bus:
exynos5-hsi2cbinds10cb0000.i2c, and clients 0x36 and 0x66 appear, unbound, with no I2C errors.The gauge, loaded by hand:
max170xx_batteryreads level, voltage, current and temperature, and UPower shows it.atl-a1-1k).zuma-akita-battery-data.dtsi(an omarchy-mobile overlay), the driver logs "battery model loaded (DesignCap 0x8c3)", and the temperature reads a real, moving 34–36 C instead of the stuck 22.0 C you get without a model.The PMIC, loaded by hand:
The charger driver, under omarchy-mobile's dead-man tool, with a person at the phone:
float 4200 mV, charge 1320000 uA, a 20–42 C band);The PMIC interrupt:
wakealarm;s2mpg14-pmic(GIC 106) andrtc-alarm0stay at 0 at rest;rtcwake -m no -s 60fires on time (rtc-alarm00 to 1).No failed units, and the boot log has only the two error lines we already know about.
Not covered here, and tracked in omarchy-mobile:
constant_charge_voltage_maxreads4200, which looks like millivolts where sysfs uses microvolts. That's inmax77759_charger, not this board file.tools/kernel-pr-check --build OUT --merge origin/omamobile, with the dtschema validator, passes everything:2db2bc35b;checkpatch --strictwith no errors and no warnings;W=1and passdtbs_check, with no new warnings.🤖 Generated with Claude Code