Skip to content

n66: Wi-Fi works; Bluetooth comes up - #216

Merged
henrikklee merged 3 commits into
OrchardLinux:mainfrom
ricktav:n66/wifi
Nov 23, 2026
Merged

henrikklee merged 3 commits into
OrchardLinux:mainfrom
ricktav:n66/wifi

Conversation

@ricktav

@ricktav ricktav commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

The iPhone 6s Plus (n66, Samsung S8000): Wi-Fi works, and Bluetooth comes up and scans.

Tested on a RAM boot, 2026-11-23:

  • Wi-Fi. The BCM4350 enumerates on PCIe port 1 (14e4:43a3). brcmfmac reports BCM4350/8 and loads firmware 7.64.133.15 from the n66's own iOS 15.7.3 (19H422). wlan0 takes its MAC from the ADT, and a scan finds 31 networks. Connecting to a network is not tested yet.
  • Bluetooth. hci_uart_bcm runs at 3 Mbit/s on uart1 and loads the USI patchram from BlueTool. Inquiry and an LE scan work (22 LE devices). Nothing has been paired yet, so bluetooth_input stays untested.
  • Power. Wi-Fi and Bluetooth power come from D2255 GPIO 10 (WL_REG_ON) and GPIO 8 (BT). Both read 0x81 after power-on.

Kernel

  • gpio-apple-d2365 gains the D2255 (Antigua) layout:
    • config bytes at 0x900 + 2n and 0x8c0 + 6n;
    • mode in bits 7:6, with output = 0x80;
    • value in bit 0, inputs at 0x186.
    • It comes with its binding.
  • hci_bcm gets apple,n66-bcm4350c5-bt, with its binding.
  • btbcm treats the BCM4350C5 default address (43:50:C5:00:1F:AC) as invalid, so the DT local-bd-address is used. This fix has not been booted yet; on the RAM boot, hci0 still had the default address.
  • DT, following AGENTS.md:
    • serial1 is okay in s800-0-3.dtsi;
    • pmu_gpio, with reserved ranges so only lines 8 and 10 are usable, moves to s800x-iphone.dtsi, because all six A9 iPhone device trees use those two lines;
    • s8000-n66.dts keeps the module, its pins and its supplies.
    • Apart from that move, the tested n66 DTB is unchanged (compared with resolved phandles).

Firmware. devices/n66/firmware.json pins:

  • the BCM4350 C2 and C5 trx firmware;
  • every NVRAM variant;
  • the BlueTool .hcd patchrams (USI and Murata).

The output was checked against Apple's server. n66m gets the same recipe.

Catalog. n66 wifi is working. n66 Bluetooth, and n66m Wi-Fi and Bluetooth, are untested. drivers.json and the matrix are regenerated.

Still missing: host wake (iOS uses PMU events), Wi-Fi/Bluetooth across suspend, and Bluetooth audio.

Tests: 917 OK (2 skipped).

🤖 Generated with Claude Code

From the same iOS 15.8.8 IPSW: both BCM4350 steppings' pinotnoir
firmware, CLM and TxCap blobs and every NVRAM variant (C2 under
brcmfmac4350c2-pcie, C5 under brcmfmac4350-pcie), and BlueTool's
BCM4350C5 Pinotnoir Patchrams for the USI and Murata modules, selected
by the module vendor brcmfmac reads from the OTP. The C2 firmware is the
iPad Air 2's, the C5 firmware the iPad mini 4's.

Assisted-by: LLM
The iPhone 6s Plus's BCM4350 "pinotnoir" module: Wi-Fi on PCIe port 1
with its REG_ON on D2255 GPIO 10, and the BCM4350C5 Bluetooth on UART1
with its power enable on D2255 GPIO 8. The D2255 joins the Apple PMIC
GPIO driver as a GPIO controller (the D2333 scheme at the D2255's
addresses), and btbcm learns the BCM4350C5's default address, so the
unit's address from the boot loader is used.

What every board shares is on for every board: UART1 for all A9 boards
(the iPhones' Bluetooth, the iPads' debug port) and the D2255 GPIO
controller for every A9 iPhone, whose IPSW device trees all use lines 8
and 10 for this. The UART4 WLAN platform control stays disabled in the
SoC file, as UART2's does, because the iPads have none there. The n66
file holds the module, its pins and its supplies; the Samsung and TSMC
models share it. Exported from a branch on the n66 series; applied in
series order the patches reproduce it.

On a Samsung N66 RAM boot the BCM4350/8 enumerated on port 1, brcmfmac
scanned 31 networks, and Bluetooth loaded the USI Patchram and found LE
devices (with the default address; the btbcm change is not booted yet).
Moving the shared nodes leaves the n66 DTB functionally as booted.

Assisted-by: LLM
On a Samsung N66 RAM boot the BCM4350/8 on PCIe port 1 loaded its C5
firmware and NVRAM and a scan found 31 networks; association is not
tested yet. Bluetooth loaded the USI Patchram and its inquiry and LE
scan work, but nothing has been paired, so it stays untested.

The TSMC N66m's IPSW device tree wires the module the same way (same
D2255 GPIOs, PCIe port 1 and UARTs) and shares the description, so it
gets the same firmware outputs, with its own Patchram names, and its
Wi-Fi and Bluetooth bind (untested).

Assisted-by: LLM
@henrikklee
henrikklee merged commit 3277325 into OrchardLinux:main Nov 23, 2026
12 checks passed
@henrikklee

Copy link
Copy Markdown
Contributor

Thanks! This is on main now.

Extended to siblings: the IPSW device trees of the iPhone 6s (N71, N71m) wire the BCM4350 exactly like the 6s Plus. The only difference is the module, "albarossa" instead of "pinotnoir". So Wi-Fi and Bluetooth moved into s800x-6s.dtsi, and each model names its module (the 6s Plus DTBs are unchanged). The 6s recipes now pin the albarossa firmware, NVRAM and BlueTool Patchrams, hashed from 19H422. The iPhone SE has a BCM4345 ("hans") and is recorded as missing for that reason.

One request: your kernel patches here carry Signed-off-by: ricktav <…@users.noreply.github.com>. Could you reply with your Signed-off-by in the form Signed-off-by: Your Name <your@email>? We will put it on the patches.

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