Repository navigation
iio: apple-oscar: switch on the PMIC 32 kHz clock on the iPad mini 3 - #108
Merged
Merged
Conversation
The M7 firmware checks its 32 kHz clock at start and halts with "PMU 32kclk is not working" when it is off, so the M7 never answers and every accelerometer, gyroscope and compass read times out. Apple's device tree gives the iPad mini 3 (J85M) an oscar1_clock function, <pmu 'GPIc' 0 0x79fb 0x49fb>, and not the iPad mini 2. iOS 12.5.8's 'GPIc' applies mask 0xfb, value 0x49 (on) or 0x79 (off) to a PMIC register chosen by index 0. That mapping was not found in iOS; register 0x400 was inferred from a register dump (0x400 = 0x79, 0x401 = 0x49) and confirmed on hardware. Add a D2089 clock-output switch as a regulator, like the other M7 switches, and an optional clk32-supply on the M7 that the driver enables before the core supply and disables after it. Describe it in the mini 3 device tree. A clock provider would be the usual form for a PMIC clock output. Tested on one iPad mini 3 (J85M) in a RAM boot: oscar-clk32 registered and enabled, the M7 reported its firmware (AppleOscar1-41.200.1) and the accelerometer read about 1 g flat, with no module option. Not tested on the J86M or J87M, which share the device tree file, or the iPad mini 2. Assisted-by: LLM Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: en3r0 <en3r0.x@gmail.com>
en3r0
added a commit
to en3r0/orchard
that referenced
this pull request
Dec 2, 2026
Record the M7 on the iPad mini 3: with the 32 kHz clock output switched on the M7 boots and in_accel reads about 1 g flat (kernel RAM-booted by the ibss route with OrchardLinux/linux#108); the screen rotated to landscape on the installed system with the same register written by hand. Gyroscope stays untested: raw reads only. Assisted-by: LLM Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: en3r0 <en3r0.x@gmail.com>
en3r0
added a commit
to en3r0/orchard
that referenced
this pull request
Dec 2, 2026
Seen on the installed Omarchy A 0.4.6 after a cold boot with OrchardLinux/linux#108: resting readings varied by about 1e4 counts, and turning the iPad by hand swung the gyro by about 1e7 and the compass heading through 223 degrees. Units and calibration were not checked. Assisted-by: LLM Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: en3r0 <en3r0.x@gmail.com>
# Conflicts: # drivers/iio/imu/apple-oscar.c
en3r0
added a commit
to en3r0/orchard
that referenced
this pull request
Dec 2, 2026
After a 3 minute s2idle on the installed Omarchy A with OrchardLinux/linux#108, Wi-Fi reconnected by itself, the M7 sensors still read, and the paired earbuds reconnected on request and played a tone. Assisted-by: LLM Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: en3r0 <en3r0.x@gmail.com>
edulmartins
pushed a commit
to edulmartins/orchard
that referenced
this pull request
Dec 3, 2026
With the PMIC 32 kHz clock switched on (OrchardLinux/linux#108, en3r0), the M7 firmware boots and in_accel reads about 1 g lying flat. No gyroscope or compass readings were reported, so those stay untested. Assisted-by: LLM
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The M7 on the iPad mini 3 (J85M) never answered: its firmware halts with "PMU 32kclk is not working" because the D2089's 32 kHz clock output is off, so every
in_accel, gyro and compass read timed out (the symptom in the J85M notes in OrchardLinux/orchard).Apple's device tree gives the mini 3
function-oscar1_clock = <pmu 'GPIc' 0 0x79fb 0x49fb>; the mini 2 has none. iOS 12.5.8'sGPIcapplies mask 0xfb, value 0x49 (on) or 0x79 (off) to a PMIC register that its index 0 selects.What this does
clk32-supplyonapple,s5l8960x-oscar, enabled before the core supply and disabled after it. Boards without the property are unchanged.s5l8960x-mini3.dtsi, with bindings.Caveats
How it was tested
LLVM=1): the driver, the regulator and the j85m, j86m and j87m device trees; the j85 tree has no new node.oscar-clk32registered and readenabled, the M7 reportedAOFB-27~91224 AppleOscar1-41.200.1~942 OscarMotion-2245.16.14~21, andin_accelread z = 66588 (scale 0.000149637, about 1 g) flat.dt_binding_checkand checkpatch.🤖 Generated with Claude Code