Skip to content

arm64: dts: exynos: google: gs101-raven: describe the battery for the charger - #112

Merged
derekross merged 2 commits into
derekross:omamobilefrom
robotosaith:omamobile-gs101-charging-pr
Oct 28, 2026
Merged

derekross merged 2 commits into
derekross:omamobilefrom
robotosaith:omamobile-gs101-charging-pr

Conversation

@robotosaith

Copy link
Copy Markdown
Contributor

The MAX77759 charger cell takes its float voltage and fast charge current from the PMIC's monitored-battery. Raven has none, so the charger falls back to 4.3 V and 2.27 A: below the 4.45 V the stock phone charges to, and above the 0.3 C (1.47 A) stock's step-charging table allows at 10–20 °C. Meanwhile the bootloader leaves 4.35 V and 1.93 A, so the battery stopped short of full.

  • label the MAX77759: gives pmic@66 in the shared Pixel file a label, so raven can add to it. No functional change for oriole.
  • describe the battery: a simple-battery with stock raven's values (dtbo_idx 6): 4905 mAh from google,chg-battery-capacity, 4.45 V from google,fv-max-uv, and 0.3 C rounded down to a charger selector (1466730 µA), as gs201-cheetah does.

Tested on raven (7.3.0-rc6) with max77759_charger loaded with default_ilim_ua=500000 temp_guard=1, as cheetah does. The charger probed at 4450 mV and 1466730 µA from this node. A wall charger still charged at 1.2–1.4 A into the battery, because the chip keeps choosing its own input current. The guard read the gauge, and stopped charging within its 30 s check when the gauge's reading went away. The phone has loaded it this way at every boot since 2026-10-28. tools/kernel-pr-check passes with --build; dt-validate reports nothing new for raven or oriole; the 4 checkpatch warnings are the Co-Authored-By: trailer, as in #8.

🤖 Generated with Claude Code

@derekross

Copy link
Copy Markdown
Owner

Thanks, this checks out against Google's tree: 4905 mAh from gs101-raven-battery.dtsi, 4.45 V from the charging and battery files, and 0.3 C rounded down to the charger's selector, 200000 + 19 × 66670 = 1466730 µA (0x16). I also compared raven's stock chg-temp-limits, chg-cv-limits and chg-cc-limits with the table in the charger's temperature guard. They're identical, so temp_guard=1 follows raven's own step-charging policy, not just cheetah's. That would be worth a sentence in USB-PLAN.

The label only adds a __symbols__ entry to oriole's DTB, so "no functional change" holds. The gate and CI are clean.

I'll merge this after #111. It will need a rebase then, since both add at the end of gs101-raven.dts. This one lands before the device-raven charger PR (#112 there).

robotosaith and others added 2 commits October 28, 2026 14:33
Give pmic@66 a label, so a board can add properties to it (raven's
monitored-battery for the charger cell) without repeating the bus path.

No functional change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: saiththerobo <the.tom.sharp@gmail.com>
… charger

The MAX77759 charger cell takes its float voltage and fast charge
current from the PMIC's monitored-battery. Without one it uses its
defaults, 4.3 V and 2.27 A: below the 4.45 V the battery is charged to
on the stock phone, and above the 0.3 C (1.47 A) the stock step-charging
table allows at 10-20 degC.

Add a simple-battery with the stock values: the capacity from
google,chg-battery-capacity (4905 mAh), the float voltage from
google,fv-max-uv (4.45 V, the top of google,chg-cv-limits), and as the
fast charge current the lowest google,chg-cc-limits entry from 10 to
46 degC, 0.3 C, rounded down to a charger selector (1466730 uA). This
is what gs201-cheetah does.

The bootloader leaves the charger at 4.35 V and 1.93 A (read on raven,
CHG_CNFG_04 0x23, CHG_CNFG_02 0x1d), so the battery stopped charging
short of full.

Tested on raven (7.3.0-rc6) with max77759_charger loaded with
default_ilim_ua=500000 temp_guard=1: the charger probed at 4450 mV and
1466730 uA from this node, and a wall charger still charged at 1.2-1.4 A
into the battery (the chip keeps choosing its own input current). The
guard read the gauge (band 20-42 C) and stopped charging within its 30 s
check when the gauge's reading went away. The phone loads it this way
at every boot since 2026-10-28.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: saiththerobo <the.tom.sharp@gmail.com>
@robotosaith
robotosaith force-pushed the omamobile-gs101-charging-pr branch from 0ea031d to 2caec03 Compare October 28, 2026 14:34
@robotosaith

Copy link
Copy Markdown
Contributor Author

Smoke report from the build raven runs. It has this PR, #113 (torch) and #114 (haptics) as posted, the merged #110 and #111, and topics that aren't in any PR yet: the modem, AoC audio, Wi-Fi, GNSS, and fixes for suspend with the modem up and for rtc-s5m's time reads. The display code in it is the older version, not #116 as rebased; #116 was booted on its own (see there). The package side is device-raven 0.1.23.5, a local build with the charger and haptics changes from derekross/omarchy-mobile#112 and #113.

Since then: C5, a full charge to 100 % instead of the old 93 % stop, passed (USB-PLAN section 4). This PR is also rebased onto #111.

tools/phone-smoke report

phone-smoke: unknown

Kernel 7.3.0-rc6-omamobile-push1-g244c690c1fd1, tools at 80e18e3, 2026-10-28T14:39Z.

Check Result Detail
boot (required) skip kernel 7.3.0-rc6-omamobile-push1-g244c690c1fd1, no slot on the command line
storage guard (required) ok 49 partitions; only userdata and slot B's boot images writable
root (required) ok ext4 on userdata, 97G free
kernel health (required) ok no oops or BUG; 0 WARN, 88 error lines in dmesg
systemd units ok none failed
USB gadget (required) ok bound to 11110000.usb
display ok card1-DSI-1 connected, 1440x3120
GPU ok render node on panfrost
session (required) ok Hyprland and the Omarchy shell running
touch ok s6sy761
buttons ok gpio-keys
Wi-Fi ok wlp1s0 on brcmfmac, link up
Bluetooth ok hci0, powered true
battery ok 94% Discharging, 22 °C
sound cards ok googleaocsndcar
sensors ok Accelerometer AmbientLight Proximity
cameras skip no libcamera tools
thermal ok hottest zone 64 °C

Packages: hyprland 0.56.2-7, libcamera 0.7.2-4, mesa 1:26.2.4-1.2, omacam 0.1.9-1, omamessages 0.2.0-1, omamobile-apps 0.2.0-1, omamobile-audio 0.4.4-1, omamobile-device-raven 0.1.23.5-1, omamobile-firstboot 0.1.0-1, omamobile-gnss 0.2.1-1, omamobile-keyring 20261013-1, omamobile-mirror 0.1.1-1, omamobile-mmd 0.1.2-1, omamobile-modem 0.1.9-1, omamobile-modem-sit 0.3.57-1, omamobile-omarchy 0.1.1-1, omamobile-owl-widgets 0.1.1-1, omamobile-sensors 0.2.0-1, omamobile-shell 0.2.21-1, omaphone 0.2.0-1, omarchy 4.0.4-2, omatel-agent 0.2.0-1, quickshell 0.3.2.r7.g2b4501a-1

@derekross

Copy link
Copy Markdown
Owner

Thanks for the rebase onto #111 and for the smoke report. I re-ran the checks on today's omamobile: the branch merges cleanly, the device trees build with no new warnings, raven's DTB validates with nothing new, and the Pixel 7 Pro's DTB is byte-identical. Oriole's changes only by the new pmic label.

This is ready. I'll merge it first of the three raven DT PRs, then the torch (#113) and then the haptics (#114).

@derekross
derekross merged commit 8d9976f into derekross:omamobile Oct 28, 2026
1 check passed
derekross pushed a commit to derekross/omarchy-mobile that referenced this pull request Oct 28, 2026
…uard (#112)

* device-raven: load the charger at boot, with its temperature guard

Raven's MAX77759 charger ran on the bootloader's settings: a wall
charger charged, but at a 4.35 V float voltage (stock 4.45 V, so the
battery stopped short of full), a 1.93 A fast charge (above stock's
table at 10-20 degC) and with no temperature guard.

With raven's battery node (derekross/linux-omarchy-mobile#112), the
charger now loads at boot with cheetah's options: default_ilim_ua=500000
keeps charging on without a Type-C driver, and temp_guard applies
stock's temperature bands, stopping charging when the gauge has no
reading or the battery is out of range. The gauge loads first. The
Type-C driver and the PMIC's GPIO stay blacklisted.

omamobile-charge-guard is cheetah's status tool; the sysfs names are the
same on raven. USB-PLAN section 4 has the read-only register dump and
the four gated steps: the stock limits applied, a wall charger still at
1.2-1.4 A into the battery (the chip keeps choosing its own input), the
guard stopping charging within one 30 s check without a reading, and the
charger loading at boot.

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

* USB-PLAN (raven): C5, a full charge to 100 %

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

* USB-PLAN (raven): the guard's bands are raven's own stock tables

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
@robotosaith
robotosaith deleted the omamobile-gs101-charging-pr branch October 29, 2026 07:26
derekross added a commit to derekross/omarchy-mobile that referenced this pull request Oct 29, 2026
The matrix after the merges since #118, with each cell going by the
merged notes:

- Pixel 7 (panther): the board file (derekross/linux-omarchy-mobile#108) and the
  FT3658 touch driver (derekross/linux-omarchy-mobile#109) have merged
  into the published kernel, so Boot, Storage, Buttons and USB net say
  "in the published kernel" instead of "in review". Touch stays "no":
  the driver and the touch rails are published, but the board file has
  no touch node, and panther's notes end at boot 8 with the controller
  not answering. BRINGUP-M1's status and NOTES' header say the same.
- Pixel 6 Pro (raven), Charging: no -> works. device-raven 0.1.26 (#112,
  #126) loads the MAX77759 charger at boot with its temperature guard;
  USB-PLAN section 4 records C0-C5 passed on 2026-10-28, a full charge to
  100 % included. The battery node is derekross/linux-omarchy-mobile#112;
  the runs were on an unpublished integration kernel, and the cell says so.
- raven, Torch: still works; the LED's node is now in the published
  kernel (derekross/linux-omarchy-mobile#113), tested on
  omamobile-gs101-torch and not yet run from the published kernel.
- Pixel 9a (tegu), Fingerprint: no -> WIP. FINGERPRINT-PLAN records F0
  and F2-F6b passed on an unpublished kernel: Trusty's TA runs and the HAL
  sees the sensor; enrollment waits for the factory calibration (F6c).
  omamobile-fingerprint 0.1.10 (#101) maps Trusty's stores for it.

Left as they were: tegu's Charging (the MAX77779 charger driver,
derekross/linux-omarchy-mobile#92, is published, but tegu's notes record
no run of it), the gs201 HSI2 pin controller
(derekross/linux-omarchy-mobile#123, no cell), felix (#35 is a plan) and
cheetah (nothing merged for it).

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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