Skip to content

Add integrated hardware support for the J120 iPad Pro - #205

Merged
henrikklee merged 1 commit into
OrchardLinux:mainfrom
tompta1:pr/j120-integrated-main
Nov 24, 2026
Merged

henrikklee merged 1 commit into
OrchardLinux:mainfrom
tompta1:pr/j120-integrated-main

Conversation

@tompta1

@tompta1 tompta1 commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

Bring up the 2017 12.9-inch Wi-Fi iPad Pro (A1670, iPad7,1) on the shared apple-16k kernel. The board gains tethered internal ext4 boot, touch and resume, Wi-Fi and Bluetooth, four speaker channels and microphone input, light and motion sensors, hardware video decoding and guarded Lightning charging up to 1.5 A. Charger calibration comes from the selected iPad during installation. Internal boot requires the separate J120-capable m1n1 described in the device README.

Merge Orchard first. OrchardLinux/omarchy-a#100 consumes the ALSA cards, cover events and battery properties exposed here. The kernel changes also touch shared RTKit, touch, audio and power paths used by other boards, including J71b, J72 and J81.

The rebased source cross-builds the ARM64 kernel, J120 DTB and 119 modules. The full 801-patch series replays against the pinned Linux tree and reproduces the compiled sources. Module dependency and symbol checks passed. Both ARM64 configs reproduce with olddefconfig. The Orchard suite ran 830 tests with 29 skips and no failures.

On the v0.3.2 integration, two tethered boots reached the installed desktop with the same ext4 persistence marker. An intervening cold boot stopped on a black screen. The rebased kernel still needs a physical J120 boot. Higher-voltage USB PD, GPU acceleration and cover-open wake remain open.

Build IIO and the Orion VBUS ADC into apple-16k for guarded charging. Enable the J120 cover, speaker and CT709 modules, and provide the Broadcom OTP layout on both Apple platforms. Extract firmware and per-unit charger calibration during installation.

Assisted-by: LLM
@tompta1
tompta1 force-pushed the pr/j120-integrated-main branch from e2839c0 to 09038ad Compare November 22, 2026 20:13
@tompta1
tompta1 marked this pull request as ready for review November 22, 2026 20:25
@henrikklee

Copy link
Copy Markdown
Contributor

Thanks for the integration work on the iPad Pro 12.9-inch (2017)! Before #205 and OrchardLinux/omarchy-a#100 can land, they need:

  1. A boot from this exact branch on the device. The J120 needs a boot loader stage Orchard doesn't have yet, so please send that part first, as its own PR.
  2. Shared-driver changes as their own small PRs. Each should work for every device with that hardware, not only the J120 (see "Everything benefits every device" in AGENTS.md / CONTRIBUTING.md), with a note on what you checked on other devices.
  3. Your Signed-off-by (name and email) on each kernel patch.

Then we can land them topic by topic, with you as the author.

@tompta1

tompta1 commented Nov 23, 2026 via email

Copy link
Copy Markdown
Contributor Author

@henrikklee

Copy link
Copy Markdown
Contributor

Thanks a lot, that's very helpful — and thanks for the offer. We've taken it over and are landing it topic by topic, with you as the author of your patches (rework commits from us on top). Work in progress is on branch j120 in orchard and omarchy-a:

  • The shared-driver changes are now keyed on the hardware (A10X / the K1 touch controller) so the iPad Pro 10.5 and the Cellular models get them too, and the A10 iPads behave as before.
  • Speakers, charging, light sensors and 120 Hz are held back for now (they need driver rework or m1n1 calibration data); the README on the branch lists why.
  • The ~50/50 early boot is noted as a known issue.
  • Booting from internal storage still needs your m1n1 changes — if you can share them (a branch or the patches), we'll bring them into Orchard's m1n1.

One small ask: a Signed-off-by: Full Name <email> for your kernel patches (four only say "tom").

@henrikklee
henrikklee merged commit c0aba5a into OrchardLinux:main Nov 24, 2026
henrikklee pushed a commit that referenced this pull request Nov 24, 2026
tompta1's kernel work for the iPad Pro 12.9-inch (2017) that the first
integration held back, as he built it (#205, 09038ad): the MAX98723
speaker amplifiers and the T8011 MCA2 speaker link, the D2355 Lightning
charger with its per-unit calibration, pack window and VBUS guard, the
Orion Bellatrix VBUS ADC, the two CT709 light sensors, the simpledrm
60/120 Hz cadence of the H9G boot scanout, the polled Smart Cover
driver, the NVMe namespace write limits, the bounded HDQ transport and
the PMGR reset read-back, with their config symbols.

Applied onto main: where main had changed the same code since, the
patches say so in a note. Not taken because main already has the same
function: the D2355/August PMU event controller (apple,d2355-pmic-gpio
and apple,d2400-pmic-gpio read the same registers), the speaker SmartIO
endpoint, the IRQ-storm fallback check, and the Wi-Fi OTP module-vendor
layout (brcmfmac reads the same OTP record and key for Bluetooth).

Assisted-by: LLM
henrikklee pushed a commit that referenced this pull request Nov 24, 2026
Flush the FAT directory entries and metadata written during unmount with
an fsync of the boot partition's block device before the next loader
reads the partition directly (#205, 09038ad).

The boot partition is always the vfat ESP when one is mounted, so the
added check cannot fail an install on any board; every board gets the
extra flush.

Assisted-by: LLM
henrikklee added a commit that referenced this pull request Nov 24, 2026
…ardware

- The D2355 charger's per-unit calibration is the ADT's /charger
  usb-input-limit-calibration-hv. m1n1 now copies those 84 bytes into the
  charger's node and the driver reads them there, so nothing has to
  extract them at install and a RAM boot charges too. The driver parses
  and checks the same table as before. #205's host-side extraction
  (installer, initrd add-on, udev re-probe) is therefore not taken.
- The CT709 driver finds each sensor's calibration record through
  apple,als-orientation instead of the J120's board compatible and I2C
  addresses; the iPad Pro 2 device tree names the records the driver
  chose before (6 for 0x29, 5 for 0x39).

What still needs the J120 is in #225.

Assisted-by: LLM
henrikklee added a commit that referenced this pull request Nov 24, 2026
…untested

Feature states as tompta1 tested them on his J120 (#205); J121, J207 and
J208 have the same hardware and code and are untested. The README drops
the held-back list and points to the cleanup issue (#225); catalog,
compatibility matrix and changelog follow.

Assisted-by: LLM
@henrikklee

Copy link
Copy Markdown
Contributor

@tompta1 everything from this PR that worked on your J120 is now on main of orchard (eab974c) and omarchy-a (995eefa): the four speakers with stereo that follows the screen, D2355 charging with your calibration handling, pack window and VBUS guard, both CT709 light sensors, the 120 Hz simpledrm mode, your polled Smart Cover driver, your NVMe write limits, your HDQ transport, the PMGR reset read-back and the FAT flush after install. Your patches carry your authorship. The original commit is tagged contrib/tompta1-j120.

Some things changed on the way in, and these are worth a retest:

  • Charger calibration: m1n1 now copies the unit's ADT /charger usb-input-limit-calibration-hv into the charger node. The installer no longer extracts a file, so charging also works on a RAM boot.
  • CT709: each sensor picks its calibration record through apple,als-orientation (6 for 0x29, 5 for 0x39) instead of the board name.
  • 120 Hz: keyed on the H9G display node and panel instead of apple,j120.
  • PMGR read-back: enabled on T8011 only.
  • Shared device tree: speakers, charger, sensors and cover now live in t8011-pro2.dtsi.
  • Taken from main instead: the PMU event controller (apple,d2355-pmic-gpio / apple,d2400-pmic-gpio, same registers) and the Bluetooth module vendor (brcmfmac reads the same OTP record) are main's existing versions.

To try it: git pull both repositories, then rebuild (bin/orchard build --device j120 …) and boot. A serial log helps with anything that differs from your build.

The remaining rework and open values are in #225.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants