Repository navigation
WIP: T8142 MacBook Airs (J813, J815): external displays over USB-C (on #1532) - #1806
m0d16l14n1 wants to merge 28 commits into
Conversation
J704 and J815 describe their boards on top of the T8142 inventory in t8142.dtsi, but J813 still defines its own root, CPUs, timer, AIC and UARTs, and its fragments define the pmgr and DART nodes that the inventory also has. A board that includes t8142.dtsi therefore cannot use the J813 fragments: the labels are defined twice. That blocks the J815, which shares most of them. Include t8142.dtsi in J813 and enable what it uses, as J815 does. Turn the fragments' pmgr, AOP, AVD, DCP, display, PCIe, PMP and MTP DART definitions into references that keep J813's values. Enable the two USB DARTs, which the inventory disables at the same paths. The flattened J813 tree is unchanged apart from explicit status = "okay", interrupt-parent now inherited from the root, and the inventory's extra USB DART labels: compared with dtc -I dts -O dts -s before and after, with phandle numbers removed. Not tested on J813 hardware. Assisted-by: Claude Opus 5.5 Signed-off-by: Nick <nekreshen@yandex.ru>
J815 has J813's PMGR power domains, PMP, QSPI and FPWM. Include t8142-j813-peripherals.dtsi, which J813 now builds on t8142.dtsi, in place of the board's own PMGR and MTP DART enables. The PMP takes the J815 board-id from the ADT (0x26). Tested on J815 (MacBook Air 15-inch, M5) with the equivalent node set in a J815 tree that included the whole J813 board. Assisted-by: Claude Opus 5.5 Signed-off-by: Nick <nekreshen@yandex.ru>
The J815 ADT describes both Type-C ports like J813's: ATC PHYs, DWC3 controllers, DARTs and the CD3218B controllers on the same buses. Include t8142-j813-usb.dtsi. Tested on J815 (MacBook Air 15-inch, M5) with the equivalent node set in a J815 tree that included the whole J813 board. A SuperSpeed Plus hub and the USB 2/3 devices behind it enumerate, and USB-C headphones play audio. Assisted-by: Claude Opus 5.5 Signed-off-by: Nick <nekreshen@yandex.ru>
Include t8142-j813-display.dtsi and describe the J815 panel: 15.3-inch, 2880x1864 (2880x1800 below the notch), 326 x 211 mm. Tested on J815 (MacBook Air 15-inch, M5) with the equivalent node set in a J815 tree that included the whole J813 board. With the macOS 27.0 DCP firmware this needs the FW27 display support in Linux aurora-silicon#1413; the console and a KWin session run on the panel. Assisted-by: Claude Opus 5.5 Signed-off-by: Nick <nekreshen@yandex.ru>
The J815 GPU is J813's. Include t8142-j813-gpu.dtsi. Tested on J815 (MacBook Air 15-inch, M5) with the equivalent node set in a J815 tree that included the whole J813 board. With the macOS 27.0 firmware this needs Linux aurora-silicon#1413; the GPU driver initializes and KWin renders through Mesa. Assisted-by: Claude Opus 5.5 Signed-off-by: Nick <nekreshen@yandex.ru>
Include t8142-j813-avd.dtsi: J815 has J813's AVD, DART and power domain. Tested on J815 (MacBook Air 15-inch, M5) with the equivalent node set in a J815 tree that included the whole J813 board. With avd-fw-v5-t2 the decoder probes and decodes through v4l2-request/VA-API: H.264 High 1080p and HEVC Main 720p in mpv (vaapi-copy, one AVD interrupt per frame, no kernel errors). Assisted-by: Claude Opus 5.5 Signed-off-by: Nick <nekreshen@yandex.ru>
Include t8142-j813-isp.dtsi. The J815 ADT gives the ISP sensor-type 0x72 (J813: 0x71). Tested on J815 (MacBook Air 15-inch, M5) with the equivalent node set in a J815 tree that included the whole J813 board. The ISP firmware boots and the camera streams. Assisted-by: Claude Opus 5.5 Signed-off-by: Nick <nekreshen@yandex.ru>
Include t8142-j813-n1.dtsi for the N1 on apcie port 0. Describe the N1's three PCI functions and alias wifi0 and bluetooth0 to them, so the loader can fill in the factory MAC and BD addresses, as on T6050. Tested on J815 (MacBook Air 15-inch, M5) with the equivalent node set in a J815 tree that included the whole J813 board. Wi-Fi connects to WPA2 networks, and Bluetooth LE devices pair and reconnect. Both use the factory addresses. Assisted-by: Claude Opus 5.5 Signed-off-by: Nick <nekreshen@yandex.ru>
Include t8142-j813-audio.dtsi for the AOP, the AP and NUB pin controllers, the ADMACs and the I2C buses with the headphone jack codec and speaker amplifiers. J815 has six speaker amplifiers where J813 has four, so keep J813's sound card and the AOP audio service disabled. The J815 speaker layout is a separate change. Tested on J815 (MacBook Air 15-inch, M5) with the equivalent node set in a J815 tree that included the whole J813 board, with audio enabled. The AOP boots and its services come up. This exact variant, with audio disabled, has been compile-tested only. Assisted-by: Claude Opus 5.5 Signed-off-by: Nick <nekreshen@yandex.ru>
The J815's AOP "als" service is an ST VD6286, as on the M4 Pro, not T8140's CT817. Give the service device its compatible so aop_als binds and sends the per-device calibration. Tested on J815 (MacBook Air 15-inch, M5) with the equivalent node set in a J815 tree that included the whole J813 board. The sensor reports lux and colour temperature. Assisted-by: Claude Opus 5.5 Signed-off-by: Nick <nekreshen@yandex.ru>
The discovered SMC temperatures carry no power rails and no SoC die zone. Add the total system, AC input and 3.8 V rail power, the AC and battery voltages and the AC current, and J704's T8142 die key list for the SoC die thermal zone. Tested on J815 (MacBook Air 15-inch, M5) with the equivalent node set in a J815 tree that included the whole J813 board. Assisted-by: Claude Opus 5.5 Signed-off-by: Nick <nekreshen@yandex.ru>
From the J815 ADT (macOS 27.0): the SEP is a pre-booted iop-sep,ascwrap-v6 at 0x30a600000 with its ASC mailbox at +0x8000. Its t8110 DART uses the BIT(40) input aperture, as on T8132. The Touch ID sensor is on spi2 (0x3a5108000, 8 MHz, CS0, power domain SPI2 under SPI_P), with power on NUB GPIO 36 and data-ready on AP GPIO 200. Alias the SEP so the loader can reserve its firmware and copy the boot manifests onto the node, and expose the two sensor pins. The SEP and its DART stay disabled: the SEP driver enables them. Tested on J815 with the J815 SEP profile: the SEP attaches, the sensor binds on spi2 and comes up in about 40 ms, and fingerprints enrol and match (sudo with the finger). Assisted-by: Claude Opus 5.5 Signed-off-by: Nick <nekreshen@yandex.ru>
Match the existing DT and public driver interfaces: keep the specific fallback chains, T8142-only ALS, eight ISP power domains versus fourteen on T8140, and the two-mailbox/six-region T8142 GPU profile. Preserve the constraints on other SoCs. No DT resource values change. Validated with dtschema 2026.9 strict document/reference checks and targeted processed-schema positive and negative cases. Full DTB validation and the draft J813 hardware gate remain separate. Signed-off-by: Diljit Singh <hey@djdev.me>
Carry byte-exact schema files from reviewed aurora-silicon#1423 at 18fa06f so the shared J813/J815 DT can be checked without inventing a second binding implementation. Original binding updates by Thomas Glanzmann, signed off in commits 9afc945 and bb9ad0e. This is binding metadata only; no driver or speaker-protection adoption or parent edge is added. The M5 merge lane retains ownership of aurora-silicon#1423. Later identical binding changes coalesce in an ordinary merge. Signed-off-by: Diljit Singh <hey@djdev.me>
Identify the J815 native profile with a T8142-specific compatible while retaining the PCI1900 fallback. The generic driver continues to match the host/PCI ID and obtain firmware data from its root board table; no firmware/platform/protocol values are invented. Keep all three wire27 properties required for the older PCI-only T6050 profile and forbid mixing those properties into the native profile. Only the J815 endpoint compatible changes. Shared SoC/J813 DT inputs and runtime resources remain unchanged. The J815 board firmware-table prerequisite is aurora-silicon#1530. Signed-off-by: Diljit Singh <hey@djdev.me>
Preserve the current shared T8142 CPU topology, OPP power data and trackpad actuator, along with the J813 firmware clock providers. Reconcile T8142 binding profiles with the current T6050 sensor services and preserve the T8140 ISP firmware memory and sensor power domains.
Match the existing J813/J815 fw-data crash-log region and its ordered seven-region tuple. Preserve the six-region maximum for other GPUs.
Keep main's complete ISP binding, preserving the T8140/Neo sensor-domain order and T8142 eight-domain case. All added and removed feature lines in the remaining 15 DT and binding files match the preceding parent. The complete bindings directory matches the validated aurora-silicon#1534 integration: eight binding documents and 32 candidate/32 main GPU schema controls. No repeated schema test or new compiled-DTB/hardware result is claimed. J815 audio stays disabled here. Keep the underscore loader alias until compatible-loader qualification/adoption; no warning filtering. Preserve published ancestry and require fresh current-head Host/DT CI. The required J813 shared-DT boot and existing loader/rollout gates remain. No boot, audio playback, image build or protection-policy change. Assisted-by: LLM
Add the N1 control/Wi-Fi/Bluetooth PCI functions and wifi0/bluetooth0 aliases already used by J815, so the loader can populate the factory addresses on J813. Keep the change board-local and omit the untested SEP alias. Do not change Bluetooth experimental module options. Based on the patch and owner report by @gig3m in linux#1532 comment 6828183980. The supplied block is carried exactly; its PCI topology matches J815. Symbolic source checks preserve all307 original nodes and properties and add only the four PCI nodes/two aliases. This is not a new compiled-DTB or whole integrated hardware qualification. The owner reports five boots/daily use of the 97f1472 feature on a 2b05915 composition with this block/local display patch, firmware26.6.2. GPU and SEP remain untested; Bluetooth pairing required opt-in flags. The independent Aura165 alias qualification/adoption gate remains. Assisted-by: LLM
Retain the parent's PMGR node layout and aurora-silicon#1527's newly merged ps_pmp always-on property, including the SRAM supplier. Keep current main's cpuidle source and its WFI/PSCI handling. All14 other feature line sets are unchanged; the owner-provided J813 N1 targets stay byte-exact. Symbolic checks cover PMP address/supplier/always-on and factory aliases on J813 and J815 in parent and child. This is not a compiled DTB or new physical boot result. Require fresh CI; keep the Aura165 loader alias qualification/adoption gate and J815 physical rollout limits. Assisted-by: LLM
Carry gig3m's node from linux#1532 comment6837248959 exactly. The J813 27.0 ADT supplies the same VD6286 ALS service as J815. The owner reports illuminance and color-temperature readings using installer-supplied per-device calibration on the previously stated composed tree. Keep calibration loading in aop_als; firmware-name would select the different CT817 setup-port calibration path. Existing nodes/properties are preserved and the added ALS node equals J815's. This source check is not a new DTB build or physical boot. Require fresh CI and retain the independent Aura165 alias qualification/adoption gate. Based-on: @gig3m's patch and owner report6837248959 Assisted-by: LLM (Codex)
Preserve the complete prior J815 board description and append main's complete MCC enablement, including its shared cache definition. Keep main RTC and binding updates alongside the existing bring-up features. The shared MCC node is inherited disabled on J813; J815 is enabled as on main. The old J815 audio graph and SEP two-file feature are preserved. Metaschema checks caught a pre-existing duplicate agx-g17s enum in main. Remove its redundant trailing occurrence, preserving the allowed set and every other condition; retain current main's entry and ordering. Keep published ancestry and require fresh CI. Existing loader-alias, review and physical qualification limits remain; no hardware claim. Assisted-by: LLM (Codex) Carry intervening main673f6184 J700-only update; every reviewed/tested input is byte-identical, so validation is reused without repeated tests.
Run the T8122 AUX, AUSPLL and lane sequences for T8142. Apply loader-supplied LIOA and common-configuration calibration before AUX, using separately claimed resources. Refuse DP without the complete calibration bundle. Serialize lane validation with Type-C mux setup so DCP sees lanes only after AUX is ready. No board identity or out-of-resource MMIO mapping is needed. Signed-off-by: Dmitriy <noc@pimk.in> Assisted-by: LLM (cherry picked from commit df6cd4a in dmitzsaz/linux) Signed-off-by: Nick <nekreshen@yandex.ru>
A port left at reset by the loader retains bit 16 of the nonselected PIPE override. The dummy backend cannot acknowledge its lock while this hold is asserted. Clear it before enabling that backend on T8142, including ports which the loader did not initialize. Signed-off-by: Dmitriy <noc@pimk.in> Assisted-by: LLM (cherry picked from commit def4169 in dmitzsaz/linux) Signed-off-by: Nick <nekreshen@yandex.ru>
A device tree written before DisplayPort was described has no "lioa" window. Probe as before then and leave DisplayPort off, instead of failing the probe and taking USB down with it. Assisted-by: Claude Opus 5.5 Signed-off-by: Nick <nekreshen@yandex.ru>
Run a T8142 external processor's route admission in the fallible Type-C finish phase, after every supplier has applied its hardware state. DCP then observes completed AUX and lane setup without polling for PHY readiness. Release an unasserted DP-alt owner and leave a pin assignment with no sink unallocated, so the pipe can serve a display on another port. T8142's Type-C PHYs are of the T8122 generation and report no link configuration: give the crossbar their fixed pixel clock (PCLK1, 8b/10b) when DCP brings a link up. Based on dmitzsaz's J704 commit 3829b86 ("drm/apple: Order T8142 DPTX after Type-C PHY configuration") and the crossbar clock of his dcp_direct_crossbar_link(), limited here to apple,t8142-dcpext so that the T6050 firmware 27 routes keep their order. Signed-off-by: Dmitriy <noc@pimk.in> Assisted-by: Claude Opus 5.5 Signed-off-by: Nick <nekreshen@yandex.ru>
dcpext0 and dcpext1 of the T8142 (MacBook Air M5: one per USB-C display, J704: HDMI) run the internal DCP's firmware 27 image; iBoot leaves them running idle and the boot loader hands them over. Give them the T6050 external profile's shape: adopt the live session, one DPTX port, EDID from the sink metadata. A processor that fails to probe or bind joins as an unusable pipe and the internal panel goes on. Not booted. Assisted-by: Claude Opus 5.5 Signed-off-by: Nick <nekreshen@yandex.ru>
Describe the two external display processors of the T8142 Airs, their mailboxes and bandwidth scratch slots, the per-ATC display crossbars, the PHYs' LIOA windows and the Type-C graph links: dcpext0 serves the front port, dcpext1 the rear one. iBoot leaves both processors running idle; the boot loader checks each, reserves its firmware and enables it with its mailbox, DARTs and route. Until then every node here stays disabled and the ports are plain USB. Addresses, interrupts and bandwidth agent indexes are from the J815AP ADT. The J813AP 27.0 ADT differs from it only in speakers, AOP firmware name, trackpad personality, CLPC limits and product strings, so both boards include the file. Not booted on either. Assisted-by: Claude Opus 5.5 Signed-off-by: Nick <nekreshen@yandex.ru>
|
J813 run (MacBook Air 13-inch M5, Mac17,3, 27.0 stub). No display yet. Three stops before any cable matters, two of them in the device tree. Built as asked: kernel 143c4c4 (plus one local primary-plane format patch), aura 91e2ffbe as ESP Stage 2. Nothing plugged in at each boot. Boot 1, branch as it is. Boots, desktop fine. Both Boot 2, loader creating the phandle. Both hand-overs The nodes have no Boot 3, unpatched loader, device tree fixed (diff below). Both hand-overs Plug tests on boot 3:
The device-tree change for boot 3. The clock rates are my reading of diff --git i/arch/arm64/boot/dts/apple/t8142-j813-dcpext.dtsi w/arch/arm64/boot/dts/apple/t8142-j813-dcpext.dtsi
index 983793a03769..7e3c7f138611 100644
--- i/arch/arm64/boot/dts/apple/t8142-j813-dcpext.dtsi
+++ w/arch/arm64/boot/dts/apple/t8142-j813-dcpext.dtsi
@@ -67,7 +67,12 @@ dcpext0: dcp@506e00000 {
mboxes = <&dcpext0_mbox>;
mbox-names = "mbox";
iommus = <&dcpext0_dart 23>;
- clocks = <&clkref>;
+ /* J813 test: firmware clocks, /arm-io/dispext0 clock-ids, as the internal DCP lists its own. */
+ apple,clock-ids = <369 432>;
+ clocks = <&clkref>, <&dcp_fw_clk369>, <&dcp_fw_clk432>;
+ clock-names = "clock-154", "firmware-0", "firmware-1";
+ /* The loader finds its power domains through this phandle. */
+ phandle = <&dcpext0>;
apple,bw-scratch = <&pmgr_dcpext0 0 5 0>;
apple,bw-doorbell = <&pmgr_dcpext0 1 6>;
apple,iomfb-surfaces = <0 0 1 0>;
@@ -133,7 +138,12 @@ dcpext1: dcp@3aae00000 {
mboxes = <&dcpext1_mbox>;
mbox-names = "mbox";
iommus = <&dcpext1_dart 23>;
- clocks = <&clkref>;
+ /* J813 test: firmware clocks, /arm-io/dispext1 clock-ids, as the internal DCP lists its own. */
+ apple,clock-ids = <372 433>;
+ clocks = <&clkref>, <&dcp_fw_clk372>, <&dcp_fw_clk433>;
+ clock-names = "clock-154", "firmware-0", "firmware-1";
+ /* The loader finds its power domains through this phandle. */
+ phandle = <&dcpext1>;
apple,bw-scratch = <&pmgr_dcpext1 0 5 0>;
apple,bw-doorbell = <&pmgr_dcpext1 1 6>;
apple,iomfb-surfaces = <0 0 1 0>;
@@ -254,3 +264,34 @@ &dispext1_dart {
&dcpext1_dart {
apple,dma-range = <0x100 0x0 0x10 0x0>;
};
+
+/*
+ * J813 test: rates from /arm-io clock-frequencies (ids 0x100..0x1ad): 369 is
+ * 300 MHz, 372 is 468.75 MHz; 432 and 433 have no entry.
+ */
+/ {
+ dcp_fw_clk369: clock-dcp-firmware-369 {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <300000000>;
+ clock-output-names = "dcp_firmware_369";
+ };
+ dcp_fw_clk432: clock-dcp-firmware-432 {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <0>;
+ clock-output-names = "dcp_firmware_432";
+ };
+ dcp_fw_clk372: clock-dcp-firmware-372 {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <468750000>;
+ clock-output-names = "dcp_firmware_372";
+ };
+ dcp_fw_clk433: clock-dcp-firmware-433 {
+ compatible = "fixed-clock";
+ #clock-cells = <0>;
+ clock-frequency = <0>;
+ clock-output-names = "dcp_firmware_433";
+ };
+};Not tested: two displays at once, sleep, a USB-C to DP/HDMI adapter. I have the full dmesg of each step if you want one. Assisted-by: Claude Fable 5.2 |
WIP, not booted on any machine. Stacked on #1532 (the J815 device tree); the net change is the last six commits: 0434a61...m0d16l14n1:linux:j815/t8142-dp-altmode-wip
External displays over USB-C (DisplayPort alt mode) on the T8142 MacBook Airs, J813 and J815. Opened as a draft so a J813 owner can try it as well. @gig3m, if you have time to test it on your J813, that would help a lot. It needs the aura side too (below).
What's here
lioawindow probes as before, DP off, USB intactapple,t8142-dcpextso T6050's routes keep their orderapple,t8142-dcpexton the upstream firmware 27 external profile (adopt the live session, one DPTX port, EDID from sink metadata); a failing processor joins as an unusable pipe, the panel goes ont8142-j813-dcpext.dtsi: dcpext0/1, mailboxes, DARTs, bandwidth slots, crossbars, PHY LIOA windows, Type-C graph; included by both J813 and J815, all disabled until the loader enables itdmitzsaz's J704 tree is the T8142 reference for this. His PHY commits are taken as they are, with authorship and sign-off kept.
The board facts
bwr-agentDISP_EXT0 (3) / DISP_EXT1 (4); mailbox IRQs 853-856 / 925-928.Boot loader side (aura)
Branch: m0d16l14n1/aura@main...j815/t8142-dp-altmode-wip (not a PR yet)
kboot: T8142: export DisplayPort LIOA and common configuration banks(cherry-pick)kboot: T8142: Hand over the external display processors iBoot left running: for each disabledapple,t8142-dcpext, checks that iBoot started it (nub, DISPEXTn power words, locked translating firmware stream), keeps its page tables, reserves carveouts and firmware, publishes the version, then enables the node with its mailbox, DARTs, power domains and Type-C routes in one FDT transaction. A failed check leaves the port as plain USB; the outcome is in/chosen/aurora,dcpextN-handoff. ESP Stage 2 only (the plain image has no room).It builds on current aura main, but it was written before
kboot_display_handoff.c. It should probably move into that framework before it becomes a PR. I'd like a boot result first.Status
park_dummy_phy,restore_after_pd_off,clear_boot_hold). So a test should check plain USB on both ports, with and without a display.How to test (J813 or J815)
dmesg | grep -iE 'dcpext|atcphy|typec'and/chosen/aurora,dcpext{0,1}-handoff(cat under/proc/device-tree/chosen/).cat /sys/class/drm/card*-DP-*/status,modetest -c.Logs from step 2 are useful even if nothing lights up.
Part of the J815 (MacBook Air 15-inch, M5, T8142) bring-up; board results in discussion #135.
Assisted-by: Claude Opus 5.5