Skip to content

iPhone 5s (N51): touchscreen and Wi-Fi - #544

Merged
henrikklee merged 7 commits into
OrchardLinux:mainfrom
ashtonamory:n51-touch-wifi
Dec 4, 2026
Merged

henrikklee merged 7 commits into
OrchardLinux:mainfrom
ashtonamory:n51-touch-wifi

Conversation

@ashtonamory

@ashtonamory ashtonamory commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

iPhone 5s (N51): touchscreen and Wi-Fi

Device data, firmware recipes and docs for the iPhone 5s touchscreen and Wi-Fi. Needs OrchardLinux/linux#151 - Event subscriptions are in preview and may not be enabled for your account., merged first. After it lands, this PR takes the new kernel with tools/kernel-tree/take.

  • Touch firmware: lib/firmware/apple/n51-fwstart.z2fw is built from the IPSW's N51.mtprops with z2fw-from-mtprops@3 (profile C1F57,3). N53 gets the same recipe from N53.mtprops and stays marked untested.
  • Wi-Fi firmware: brcmfmac43342-n51-usb.bin (plus the .murata and .tdk module variants) is built from iOS 12.5.8's chardonnay.trx and module NVRAM with trx-add-nvram@1, using the placeholder MAC. N53's module is cabernet, a different firmware, so it is left out.
  • a7-wifi-start also accepts the 5s boot ROM, 0a5c:bd21.
  • Status: n51 touch, Wi-Fi and storage write are marked working, with the verification notes. Docs regenerated, CHANGELOG entry added.

Testing

  • N51, iOS erased, ibss route. Ran orchard install omarchy-a --kernel <linux PR branch> --data <this branch>: touch works on the desktop, and Wi-Fi connects.
  • bin/orchard python -m unittest discover -s tests passes.

Notes for other 5s owners

On the reporter's laptop the gaster step only caught the phone after the patch when the host was busy. --busy-cpu made it work on the first try, after about ten idle attempts had failed. The ibss start also needs OrchardLinux/tools#166 - Event subscriptions are in preview and may not be enabled for your account..

ashtonamory and others added 5 commits December 4, 2026 07:25
Convert the iPhone 5s touch firmware with z2fw-from-mtprops@3: N51.mtprops
and N53.mtprops are identical (C1F57,3) and the iOS 12.5.8 personality
"C1,N51" uses the N61's calibration addresses, fll-mval 6099,
ref-clk-div 2 and clk32 enable, which the step writes.

N51: touch works in a RAM boot (multi-touch across the panel, right
orientation); storage reads and writes, Omarchy A installed and booted.
N53: touch untested.

Needs the OrchardLinux/linux iPhone 5s touchscreen series (amber touch
core regulator, apple,n51-touchscreen, s5l8960x-5s touch node).

Assisted-by: LLM
Build brcmfmac43342-n51-usb.bin (and the .murata and .tdk variants) from
iOS 12.5.8's chardonnay.trx and module NVRAM with trx-add-nvram@1, and let
the A7 Wi-Fi start accept the 5s boot ROM 0a5c:bd21. N51 Wi-Fi scans in a
RAM boot. N53's module is cabernet, another firmware, and is left out.

Needs the OrchardLinux/linux iPhone 5s Wi-Fi series.

Assisted-by: LLM
The N53 ADT puts the same BCM43342 on EHCI1 as the N51, with the same
HOST_READY (GPIO 166), DEVICE_READY (GPIO 167) and D2045 GPIO 10 reset;
only its module-instance differs: cabernet instead of chardonnay. Build
brcmfmac43342-n53-usb.bin and its .murata and .tdk variants from iOS
12.5.8's cabernet.trx and module NVRAM, the way the N51's are made.
Wi-Fi is untested on the N53.

Assisted-by: LLM
# Conflicts:
#	CHANGELOG.md
#	devices/n51/device.toml
#	devices/n53/device.toml
#	docs/compatibility.md
#	docs/devices/n51.md
#	docs/devices/n53.md
The kernel orchard takes now has linux#151, which turns the touchscreen
on in the shared s5l8960x-5s.dtsi, so the driver binds on the N51 and the
N53; the device pages say so.

Assisted-by: LLM
@henrikklee
henrikklee merged commit b51836d into OrchardLinux:main Dec 4, 2026
11 checks passed
@henrikklee

Copy link
Copy Markdown
Contributor

Merged, thank you @ashtonamory! The iPhone 5s now has working touch and Wi-Fi in Orchard, and it runs from its own storage.

What changed on your branch before the merge:

Nothing was left out.

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