Repository navigation
rtc: s5m: disarm the S2MPG12's WTSR and SMPL restarts at power off - #233
Conversation
|
Thank you, and welcome! Tracking power off's restart down to the PMIC's Two things before merging:
Small ones: the branch's |
|
The run on my Pixel 7 Pro is done, 2026-11-10: published
Each was a Two limits of my run. On the first row I didn't read Without #554 the charger start brings up the whole phone, modem included, which is what #554 is for. Still open from my last comment: the Volume Down + Power sentence in the commit message. I'll try those keys on this kernel myself and report here; if they do reach fastboot, the sentence needs to come out or be reworded before I merge, since this change can't affect that path. |
|
The keys, tried on this kernel ( That leaves one thing before I merge: please take the Volume Down + Power sentence out of the commit message, so the commit claims only what it changes (power off and halt). Everything else is done, and the three power-off runs above stand. |
|
Thanks for the review! I'll fix all of these. |
|
Thank you! Nothing else is open here: I ran the gate again on today's The one thing left is the commit message. The first paragraph still says that holding Volume Down and Power "also ends in a normal boot". We merge kernel commits by rebase, so the message lands exactly as written, and this change can't affect that path (on my phone the keys force a reset, and fastboot comes up when Volume Down is still held while the bootloader starts). Could you drop that clause, so the paragraph reads:
and force-push? If it's easier, say so and I'll make that one edit on your branch myself, keeping your authorship and sign-off and noting the change in brackets above mine. If you touch the message anyway, two small things: a line naming the boards whose power off changes (cheetah, lynx and panther), and the trailer in the form our tree documents, |
On the Pixel 7 Pro (gs201, S2MPG12), power off restarts the phone. The RTC block read on a running phone shows the PMIC's warm-reset restart armed: 0x02 (SMPL) = 0x0e: SMPL_EN 0 0x03 (WTSR) = 0x0f: WTSR_EN 1, WTSRT 7, COLDRST_EN 0 With WTSR enabled, the PMIC answers the AP dropping power by powering it up again. Google's S2MPG12 RTC driver clears SMPL_EN, WTSR_EN and COLDRST_EN in its shutdown callback before every power off, and arms them again only for a restart (rtc-s2mpg12.c, s2m_rtc_shutdown()). Do the same for power off and halt. Restarts are left as they are. This changes power off on the S2MPG12 boards: cheetah, lynx and panther. Assisted-by: LLM Signed-off-by: Hiroyuki Ikegami <ikegam@mixallow.net>
e635297 to
f361fe5
Compare
|
Thanks! Force-pushed f361fe5: the Volume Down + Power clause is gone, so the first paragraph now reads exactly as you suggested. I also added the line naming cheetah, lynx and panther, and changed the trailer to For 0x02 and 0x03 I read the RTC regmap through debugfs as root. Each line of |
|
Thank you, that's everything. The first paragraph now reads as I suggested, the message names cheetah, lynx and panther, the trailer is in our tree's form, and the code is the same as before: the patch id of The CI run on this head was waiting for my approval; I've started it and will merge when it's green. Thanks for the read command too. I read it against the regmap code before using it: a 7-byte read is exactly one register on this map, and each line carries its register number, so it checks itself. I'll read Thank you for the fix, and for your patience with the wording. |
On the Pixel 7 Pro (gs201, S2MPG12), power off restarted the phone, and holding Volume Down + Power for fastboot also ended in a normal boot. The PMIC's RTC block, read on a running phone through the ACPM regmap (one register per read), had the warm-reset restart armed:
0x02(SMPL)0x0e, SMPL_EN 0;0x03(WTSR)0x0f, WTSR_EN 1. Google'srtc-s2mpg12.cclears SMPL_EN, WTSR_EN and COLDRST_EN in its shutdown callback before every power off;rtc-s5mdidn't. This does the same for power off and halt on the S2MPG12; restarts are left alone.Tested on a Pixel 7 Pro, this commit on the release kernel (
7.3.0-rc6-omamobile-g2219cc6cda77→-push1-g0e3da55c9e9f), 2026-11-09. The power-off behaviour follows the kernel that shuts down:androidboot.mode = "charger")Rebased here onto
omamobileat1a9d1d4e9289, a clean pick;tools/kernel-pr-checkpasses (sign-off, prefixes, checkpatch --strict 0/0, identifiers). Not done: aW=1build of the touched object (the full build was clean at the default warning level). The userspace side of the charger boot is omarchy-mobile's device-cheetah 0.1.48.🤖 Generated with Claude Code