Repository navigation
WIP: T8142 MacBook Airs (J813, J815): external displays over USB-C (on #1532) - #1806
m0d16l14n1 wants to merge 43 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 |
Retain the existing board extraction and owner follow-ups while taking integration/aurora at 5d112b1. Main provides the merged T8142 PMU and encoder definitions and preserves J815 enablement. All parent files merged cleanly. Keep the existing disp0_piodma alias; loader qualification and coordinated alias migration remain separate. No full kernel, DTB or hardware qualification is claimed here. Assisted-by: LLM Signed-off-by: Diljit Singh <hey@djdev.me>
… changes The host fixtures model struct apple_atcphy and the display routes themselves, and stopped compiling with this series: the PHY's configuration applies T8142's banked DisplayPort calibration (regs.lioa, tunables.dp_lioa/dp_common_config, apple_tunable_apply), and the route's finish and set phases go through dcp_t8142_ext() and dcp_typec_route_apply(). - The PHY fixtures (phy.py, quiesce.py, dwc3/mocks.c, atc-usb3-tests.py) carry the new fields; apple_tunable_apply is a no-op, as none of the modeled PHYs has dp_banked_tunables. - quiesce.py stubs dcp_t8142_ext() (the modeled processors are not T8142 externals) and dcp_typec_route_apply(); transaction.py replaces that stub with the real dcp_typec_route_apply(), which dcp_typec_route_set() now calls for every mode. apple-dcp 88/88 and atc-usb3-tests 37/37 (all mutations killed) on this branch. Assisted-by: Claude Opus 5.5 Signed-off-by: Nick <nekreshen@yandex.ru>
dt_set_t8142_dcpext() refused every dcpext node with "no device tree node": it needs the node's phandle for the power-domain walk, which finds the node again by phandle as the tree changes, but dtc only gives a node a phandle when something refers to it, and nothing refers to dcpext0/1. Give it one as other hand-offs here do (fdt_generate_phandle). Found by gig3m on a J813 (aurora-silicon/linux#1806): with a loader change that creates the phandle, both hand-offs read "okay". Also reformats the carveout call (clang-format 20.1.8). Assisted-by: Claude Opus 5.5 Signed-off-by: Nick <nekreshen@yandex.ru>
|
@gig3m Thank you for the J813 run. All three stops are addressed. Kernel head is 7346085; the loader is
Also fixed:
Still open, and not addressed here:
None of this is booted yet, on either Air. If you try it again, the most useful logs are the AFK lines for endpoints 24 and 2a at boot ( Assisted-by: Claude Opus 5.5 |
Merge ec396a4 without rewriting the existing series. Resolve the GPU-binding overlap by retaining T8142 in the non-legacy profile list while keeping main's duplicate removal and G17 dispatch fixes. Metaschema/reference checks, five T8142 memory-ABI cases and 378 finite non-target comparisons pass, including the G17c/G17s compatible pair. The incoming G17 dispatch blocks are identical to main. Both parent board property maps and all four dependent board/layer checks pass. DTS and SEP/audio feature files are unchanged by the merge. Keep the existing loader-alias and physical/policy qualification gates. No kernel/DTB or hardware qualification is claimed for this merge. Assisted-by: LLM Signed-off-by: Diljit Singh <hey@djdev.me>
…de-wip The selftest mocks gain aurora-silicon#1532's cio_sleep next to this branch's T8142 DisplayPort tunables. Signed-off-by: Nick <nekreshen@yandex.ru>
1b8cd02 to
ee86c16
Compare
|
Retest on J813 (Mac17,3, boot firmware 27.0): both ports light up a monitor. Kernel: integration/aurora d89d8c0 + this PR at ee86c16 (+ #1732, #1805). Loader: aura main 2175c483 + Boot, nothing plugged
Monitor, one port at a time (1920x1080@60, USB-C)
USB, after the monitor had been on each port (NuPhy Air75 V2 keyboard, full speed)
Still there
No Not tested: SuperSpeed devices, a monitor and a USB device at the same time, two monitors, an adapter, sleep with a monitor attached. AFK lines for 0x24 and 0x2a at bootFront port: plug, then unplugRear port: monitor plug, unplug, then keyboardI have the full dmesg of each step (with Assisted-by: Claude Fable 5.2 |
|
Great to hear that! Thanks a lot for testing and logs |
A firmware 27 external processor's DP/HDMI audio interface (dcpav-audio-interface-epic) is expected on AV_AUDIO_ENDPOINT_DESKTOP (0x2b), where T6050's desktop firmware announces it. T8142's image puts it elsewhere: its endpoint name table runs dcpav-controller-ep (0x24), dcpav-power-ep, dcpav-sac-ep (0x26), dcpav-device-ep (0x27), dcpav-service-ep (0x28), dcpav-interface-ep (0x29), dcpdptx-port-ep (0x2a), dcpdptx-hdcp-ep (0x2b), and macOS 27.2 binds dcpdptx-hdcp-interface on 0x2b on a J815. The dcpav-*-interface-epic services, audio among them, belong to dcpav-interface-ep. Make the audio endpoint a per-profile value, defaulting to 0x2b, used where the audio service is started, admitted and treated as compact EPIC, and set it to AV_ENDPOINT (0x29) for apple,t8142-dcpext. Assisted-by: Claude Opus 5.5 Signed-off-by: Nick <nekreshen@yandex.ru>
…P audio T8142's external display engines feed their DisplayPort audio from their own ADMAC with an LLT escalation detector, the T6050 design. Add apple,t8142-display-admac (with apple,t6050-display-admac as fallback), apple,t8142-admac-control and apple,t8142-dpaudio. Assisted-by: Claude Opus 5.5 Signed-off-by: Nick <nekreshen@yandex.ru>
… displays Each external display engine feeds its DisplayPort audio from its own ADMAC (one TX channel) behind its isochronous DART (stream 30), in DISPEXTn_ADMA, as on T6050 (J714s). From the J815AP ADT: dp-audio1 -> admac-dispext0 (0x5_0614_0000, IRQ 894) for dcpext0, dp-audio2 -> admac-dispext1 (0x3_aa14_0000, IRQ 969) for dcpext1, their control blocks (IRQs 896 and 971) and PMGR states 0x420 and 0x3b0, whose parent is DISPEXTn_SYS. The J813AP ADT has the same nodes. macOS 27.2 drives these the same way: DCPAVAudioDMADelegate on dp-audio1 and an AudioDMAController with one channel, DAX0TX, on admac-dispext0. The boot loader copies the control blocks' ADT tunables by their admac-dispextN-control aliases (aura main 6ddaaa30). Assisted-by: Claude Opus 5.5 Signed-off-by: Nick <nekreshen@yandex.ru>
|
Added possible audio support here, still not sure, couldn't test it |
|
DisplayPort audio on J813 (e4bdeb8, aura b97ef3a8 on main 2175c483): the cards come up, playback does not work yet. Two findings. 1. The loader drops the control tunables on J813. Kernel: In the J813 ADT both tables are 336 bytes (14 entries). + if (!tunable->size && !tunable->offset && !tunable->mask && !tunable->value) {
+ n_tunables = j;
+ break;
+ }
+
if (tunable->size != 4) {2. With the tunables in place, the stream still underruns at once. Monitor on the rear port ( The display processor does not complain: no One cycle (with tunables)Also new on this run: a boot with the monitor already attached (rear port, cold reboot). Not tested: the front port, a native USB-C monitor with speakers, other rates or formats. I have the full dmesg of both runs. Assisted-by: Claude Fable 5.2 |
|
Five more cases from the "not tested" list, J813, kernel at ee86c16:
Still not tested: two monitors, SuperSpeed devices, a real (not test) sleep with a monitor. Assisted-by: Claude Fable 5.2 |
On the J813 (and the J815, same ADT layout) both display ADMACs lost their
control tunables: admac-dispextN-ced-ssw's ssw-tunables is 336 bytes, one
real entry (offset 0, size 4, mask 1, value 1) then 13 all-zero entries,
and dt_append_acio_tunable() refused the size-0 entry, so neither
apple,tunable-ced nor apple,tunable-ssw reached the DT ("ACIO tunable has
invalid size 0", "no ADT tunables for admac-dispext0-control").
Found and tested by gig3m on a J813 (aurora-silicon/linux#1806): with the
table ended at its first all-zero entry both tables are copied
(apple,tunable-ced 168 bytes, apple,tunable-ssw 12 bytes). DP audio
playback still underruns on its own; that is a separate problem.
Suggested-by: gig3m (GitHub)
Assisted-by: Claude Opus 5.5
… endpoint "drm/apple: T8142 dcpext: take the audio interface on dcpav-interface-ep" makes afk_compact_capable() compare the endpoint with dcp_av_audio_endpoint(). The retained recovery control actual-queue-quiesce compiles that function without the helper, so it no longer built and service-rebind failed. When afk_compact_capable() uses it, give the fixture hw.av_audio_endpoint and the helper from dcp-internal.h, as it already does for the M4 check. Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
… DisplayPort calibration
On T8142 the mode switch refuses every mode with DP AUX while the boot
loader's LIOA and common configuration banks are missing ("DisplayPort
bank calibration missing; DP disabled"). A partner in DP Alt Mode then
loses its USB as well: on a J813 with a dock in pin assignment D, under
a loader without the bank export, the PHY init fails with -EOPNOTSUPP
and the port's dwc3 never probes, where the kernel before the T8142
DisplayPort sequence ran the dock's hub at 10 Gb/s.
Map the DP modes to the USB the partner keeps, as T8132 does: USB2 next
to four DP lanes (pin assignments C and E), USB3 next to two (D).
atc-usb3-tests covers the mapping with and without the banks.
Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
Every external display route of the T8142 Airs goes through the display
crossbars (apple,t8142-display-crossbar). Without their driver both
dcpext processors wait for the crossbars until the deferred probe
timeout and end as unusable pipes ("external display processor unusable
(probe failed: -110)"), so the j813.config kernel shows no external
display although the boot loader hands both processors over.
Signed-off-by: Thomas Glanzmann <thomas@glanzmann.de>
|
@m0d16l14n1 a J813 result on the macOS 27.2 (26B123) stub, with Linux at EL2: the external display works.
Three fixes that came out of it, as m0d16l14n1#2 against this branch:
|
T8142 DisplayPort: J813 fixes (crossbar config, USB without the DP banks, recovery fixture)
WIP. Displays work on J813 (both ports, gig3m); not yet tried with a display on J815. Stacked on #1532 (the J815 device tree); the net change is the commits after #1532's merges: 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 itapple,clock-ids369/432 and 372/433 (gig3m's J813 stop 2)apple,t8142-display-admac(fallbackapple,t6050-display-admac),apple,t8142-admac-control,apple,t8142-dpaudiot8142-j813-dpaudio.dtsi, included by both Airs: per display an ADMAC, its control block, its isochronous DART and power state, and the audio node linked to dcpextNdmitzsaz'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.DisplayPort audio
The T6050 (J714s) design, with T8142's values from the J815AP ADT:
DCPAVAudioDMADelegateon dp-audio1, anAudioDMAControllerwith one channel,DAX0TX, on admac-dispext0, andDCPAVAudioInterfaceProxyon the EPIC servicedcpav-audio-interface-epic.dcpdptx-hdcp-interfaceon 0x2b on a J815. So the T8142 profile takes it on 0x29.admac-dispextN-controlaliases; aura main has that (6ddaaa30), and so does the aura branch below.appledrm.hdmi_audio=0.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
W=1, no new warnings); not tried, as no display was at hand.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.aplay -lshould list a card for the display; play to it (speaker-test -D hw:<card> -c 2 -t sine) or pick it in the desktop. Useful logs:dmesg | grep -iE 'admac|dpaudio|ep:29|audio'(withdyndbg="file afk.c +p"for the AFK announcements).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