Repository navigation
Conversation
With no Type-C port controller to report the source, the driver charges at default_ilim_ua and relies on the charger to raise the input current itself, following the Rp the source advertises. It can do that only while NO_AUTOIBUS (CHG_CNFG_09 bit 7) is clear, and nothing in the driver ever cleared it. Something before the kernel can leave the bit set, most likely the bootloader: the one case seen was a Pixel 7 Pro that booted from an empty battery, with CHG_CNFG_09 reading 0x93, the 500 mA limit with NO_AUTOIBUS set. The input stayed at 500 mA, which a phone in use draws in full, so the battery current sat between -145 and +26 mA on the cable. Clearing the bit by hand (0x13, also its power-on value) took it to +1.41 A within a second, and it stayed there. Google's driver sets NO_AUTOIBUS, but it also programs the input limit from the source its USB-PD stack negotiated. This driver doesn't know the source on the default path, so clear the bit there. A failure only warns: failing the probe would leave the charger running without the temperature guard. The found: and probed: lines show "(NO_AUTOIBUS set)" while it is set, so a log tells the two cases apart. psy_work_item() doesn't touch the bit; probe clears it on any phone with default_ilim_ua set, with or without TCPM (none has both today). On a boot with the bit already clear, the regmap cache, filled from the hardware at MFD probe, skips the write. Fixes: f9c0e84 ("power: supply: max77759: charge at a default input limit without a source report") Link: derekross/omarchy-mobile#169 Assisted-by: Claude Opus 5.5
7269926 to
16dd7a7
Compare
derekross
left a comment
There was a problem hiding this comment.
Review notes on my own PR, second pass. The head hasn't moved.
CI is red on one check, and it is this commit's own: tools/kernel-pr-check says "no human Signed-off-by" on 16dd7a780e64. Everything else in that run passes (the merge, the prefix, checkpatch --strict, the policy checks, the W=1 build). It isn't the gate fault fixed this week, which was about a test file that only builds through its driver. With today's gate on today's omamobile (26867fc4e826) the result is the same: one failing line, the sign-off.
The branch is 43 commits behind omamobile now, but the charger driver, its header and the MFD are unchanged from the 2026.11.15 release to today's tip, so the test kernel built from this head runs the driver exactly as it will land. It merges cleanly with the three other open charger PRs.
Since the first pass, @iamteedoh reported a third Pixel 7 Pro on derekross/omarchy-mobile#169: 0xc2 = 0x13 on two flat-battery boots this week, charging at +1.4 A. So it stands at two phones with 0x93, both after flat boots, and flat boots on two phones where the bit was clear (one read, one judged from the +1.41 A it took). Thank you, and thanks to @azazelpy and @gitpash for the register reads.
Before merge:
- USB-C-PLAN K1b on my Pixel 7 Pro (derekross/omarchy-mobile#815).
- My
Signed-off-by. In the same amend: "the one case seen" becomes two phones and "not after every flat boot", and the trailer becomesAssisted-by: LLM, the form our tree'scoding-assistants.rstgives.
Still to write down in USB-C-PLAN: with the bit clear, default_ilim_ua is where the charger starts, not a ceiling, so the reported input limit reads low; and we don't know what sets the bit, so a clear at probe may not be the whole fix.
|
@derekross one data point from the 8 Pro side. On my husky 0xc2 read Husky takes the same |
On a Pixel 7 Pro that booted from an empty battery,
CHG_CNFG_09(0xc2) read0x93: the 500 mA limit withNO_AUTOIBUS(bit 7) set. The phone gained nothing on the cable (battery current -145 to +26 mA) until the bit was cleared by hand, which brought +1.41 A within a second (reported on derekross/omarchy-mobile#169). A user in the community chat reports the same symptom, "sometimes won't take a charge", with no register read yet.Why. With no Type-C port controller to report the source, the driver charges at
default_ilim_uaand relies on the charger to raise its input current from what it detects.NO_AUTOIBUSturns that off, and nothing in the driver touched the bit, so whatever the bootloader left stayed. Google's driver sets the bit, but it also programs the limit from what its USB-PD stack negotiated, and this driver has neither.The change (one commit):
max77759_charger_start_default()clearsNO_AUTOIBUSafter it sets the default limit.found:andprobed:lines end in(NO_AUTOIBUS set)while the bit is set; a failed clear only warns, so a user's log tells the two cases apart.psy_work_item()does not touch the bit. Probe clears it on any phone withdefault_ilim_uaset (the 7 Pro, the Pixel 6 Pro, and the Pixel 7 with arm64: dts: exynos: google: gs201-panther: add the MAX77759 PMIC for its charger #259), with or without TCPM; no phone has both today.MAX77759_CHGR_REG_CHG_CNFG_09_NO_AUTOIBUSis added toinclude/linux/mfd/max77759.h.This keeps the charger's own choice of input current, which every boot of the reference phone has run on (0xc2 =
0x13). The 500 mA cap for computer ports discussed in USB-C-PLAN K1 is not part of this.Checks (after review round 1, which added
Fixes:andLink:):checkpatch --strict: clean.W=1(arm64, LLVM, the project container) ofmax77759_charger.canddrivers/mfd/max77759.c: no warnings.tools/kernel-pr-check: passes everything except the sign-off.7.3.0-rc6-omamobile-push1-g16dd7a780e64.Not tested on hardware yet. The runbook is USB-C-PLAN K1b (omarchy-mobile PR, linked below). It reproduces the symptom on the release kernel under
tools/usbc-deadman, then sets the bit across a warm reboot on this kernel. The charger regmap isREGCACHE_FLAT, filled from the hardware when the MFD probes, so a bit set withi2csetand then a rebind would not exercise the fix. It runs after the 2026.11.15 install and the M6-D sleep test.Before merge:
Signed-off-by(an AI agent doesn't add one;Assisted-bycredits it);Also relevant to #259 (Pixel 7 charger node), which takes the same
default_ilim_uapath.🤖 Generated with Claude Code