Repository navigation
D21: touch starts reliably (32 kHz touch clock, IRQ masked through boot, d9 retry) - #234
Closed
ryzensnyper wants to merge 4 commits into
Closed
ryzensnyper wants to merge 4 commits into
ryzensnyper wants to merge 4 commits into
Conversation
The D21 ADT asks for a 32768 Hz touch reference (KLCT 0x8000); the t8015 dtsi gives the iPhone X's 24 MHz. D21 is the only iPhone 8-class board with a touchscreen node yet, so the override sits in its .dts; it moves to a shared dtsi when D20/D201/D211 touch is described. Assisted-by: LLM Signed-off-by: Dugs <dugahol@protonmail.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…pletes Assisted-by: LLM Signed-off-by: Dugs <dugahol@protonmail.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A streaming frame colliding with the 0xd9 read (1 in 76 starts) left the descriptor unset and dropped every touch for the session. Assisted-by: LLM Signed-off-by: Dugs <dugahol@protonmail.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Measured on payload built from this branch's patches plus the Apple GPIO masked-IRQ fix: 5 of 5 fresh boots and 10 of 10 module reloads delivered touch on the iPhone 8 Plus. Assisted-by: LLM Signed-off-by: Dugs <dugahol@protonmail.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
|
Retest on the exact submitted revisions: #234 head
This matches the earlier runs on |
Contributor
|
Thanks @ryzensnyper! This is on main unchanged, with you as author, in 06e093e (tag |
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.
Problem
On the iPhone 8 Plus (D21), touch with the shared
apple_z2D21 backend was a lottery:/dev/input/event1.Changes, one commit each
arm64: dts: apple: t8015-d21: Run the touch clock at 32768 Hz(devices/t8015/0020)function-clock_enable = KLCT(0x08, 0x64, 0x8000), a 32768 Hz reference, and the C1F5E firmware sets up the controller FLL for it.t8015-pmgr.dtsicarries the iPhone X's 24 MHz, so on D21 the divider was 1 (PMGR0x78000 = 0x00080001). Now it reads back 32786 Hz (divider 732)..dts. It should move to a shared iPhone 8 dtsi when D20/D201/D211 touch is described, as the iPhone 7 boards do in t8010.Input: apple_z2: D21: Keep ATN masked until boot completes(drivers/input/0046)Input: apple_z2: D21: Retry the surface descriptor query(drivers/input/0047)e1 56 00 …). Descriptor validation failed (-EPROTO), init only logged it, and every touch packet was then dropped for the session ("touch packet without surface descriptor").devices: d21: touch works; changelogtouch = "working", a CHANGELOG entry, and the regenerateddocs/compatibility.md.Both driver changes sit behind
apple_z2_d21_is_d21(), the existing D21 backend check, so no other board's behaviour changes.Tested on device
orchard build <project> --device d21fromeab974c+ these patches + pinctrl: apple: do not arm a masked interrupt in set_type #233, with no debug patches. Payload sha256c39e6e0e43ca8e52…, booted over checkm8 → PongoOS →bootm, default IRQ affinities./dev/input/event1while tapping).rmmod apple_z2; modprobe apple_z2): 10 of 10 delivered touch, with no hangs, RCU stalls or recovery restarts.Without #233, reloads still hang (5 of 8 in my runs). First boots don't depend on it.
Tests
python -m unittest discover -s tests: 930 tests. The only failures are the 4test_ramCLI errors, which also fail on unmodifiedmainon my host (free-disk check). The device runs were on a build fromeab974c.mainhas moved since, but not indrivers/input,devices/t8015or the apple-16k series.🤖 Generated with Claude Code