Repository navigation
iPhone XS family: the touchscreen (apple_hidspi_ts XS variant) - #111
Merged
Merged
Conversation
… Max
The iPhone XS (D321) and XS Max (D331, D331p) carry the iPhone X's
touch controller ("hid-transport,k1", hbpp-version 0x105, the same SPI
configuration and Acorn power_ana in their ADTs). Give each board its
compatible with the iPhone X's as the fallback.
Assisted-by: LLM
Signed-off-by: Henrik Klee <henrik@goat-code.com>
Their ADTs describe the iPhone X's controller: "hid-transport,k1", hbpp-version 0x105, the same SPI configuration, the analog supply from the Acorn display PMU and the PMGR touch clock. Drive them as the iPhone X, in SPI mode 3 with its 200 us CS delay, and require the firmware's surface descriptor instead of the iPhone X's measured fallback; the device tree gives the panel's size. Their firmware is loaded as apple/<board>-touch-<personality>.bin (C1R1FC0,2 and C1R1FC0,3 on the XS, C1R1FC1,1 on both XS Max). kieroid's badapple drives the XS Max with the same pins, supply and 4 MHz clock. Assisted-by: LLM Signed-off-by: Henrik Klee <henrik@goat-code.com>
Describe the XS family's touch controller from their ADTs (d321ap, d331ap, d331pap: /arm-io/spi1/multi-touch, alike on all three): SPI1 with chip select AP GPIO 67, reset AP GPIO 5, interrupt AOP GPIO 19 (level low), the PMGR touch clock, and the analog supply from the Acorn display PMU at I2C3 0x2a, as on the iPhone X. Each board names its firmware and its panel's size; touchscreen0 lets m1n1 pass the unit's calibration and personality. Assisted-by: LLM Signed-off-by: Henrik Klee <henrik@goat-code.com>
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.
What it gives: touch on the iPhone XS (d321), XS Max China (d331) and XS Max (d331p). Nothing has run on an XS yet.
Their touch controller is the iPhone X's (ADT hid-transport,k1, hbpp 0x105, same SPI config, Acorn PMU supply, PMGR touch clock at 24 MHz), wired like the XR's SPI1. So an
ahts_xsvariant of the iPhone X's in apple_hidspi_ts (requires the firmware's surface descriptor instead of the X's measured fallback), the Acorn PMU at i2c3 0x2a with its touch regulator and the touchscreen in t8020-xs.dtsi (4 MHz, IRQ AOP 19, reset AP 5, alias touchscreen0 for m1n1's calibration), per-board compatible, firmware name and size. badapple's XS Max description agrees on pins, supply and speed; none of its apple-mt-spi code is used, so all commits are Henrik's.Checked: full apple-16k kernel build for d331p, no warnings; all A12 DTBs compile; orchard test_source_* pass. First XS test should check orientation (badapple flips y in its own touch units).