Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
f64c279
drm: apple: isolate an experimental external H17P transport
RyanTheTide Oct 12, 2026
b65e241
drm: apple: prepare optional external H17P before component matching
RyanTheTide Oct 12, 2026
c67346d
drm: apple: drain the work items present in the pinned base
RyanTheTide Oct 12, 2026
40a9c92
arm64: dts: apple: describe disabled J700 external resources
RyanTheTide Oct 12, 2026
9803849
drm: apple: recognize the T8140 external binding in the display master
RyanTheTide Oct 12, 2026
205a56d
arm64: dts: apple: retain the inherited external display supply
RyanTheTide Oct 12, 2026
24c20cf
drm: apple: validate external display clock and bandwidth resources
RyanTheTide Oct 12, 2026
2e6003f
arm64: dts: apple: add an explicit external display trial tree
RyanTheTide Oct 12, 2026
b5c2960
soc: apple: rtkit: identify failed boot handshake stages
RyanTheTide Oct 12, 2026
5da6455
drm/apple: announce AP readiness early for experimental external H17P
RyanTheTide Oct 12, 2026
e00ebb9
drm/apple: acknowledge firmware-owned external H17P buffers
RyanTheTide Oct 12, 2026
fa66e6f
drm/apple: pair external buffer acknowledgments with early AP readiness
RyanTheTide Oct 12, 2026
78fc110
arm64: dts: apple: give the external J700 trial its firmware DMA window
RyanTheTide Oct 12, 2026
60f7872
drm/apple: recognize the external H17P display service
RyanTheTide Oct 12, 2026
7739e55
drm/apple: report external AFK startup progress
RyanTheTide Oct 12, 2026
ca88622
drm/apple: start the external H17P allocator before service discovery
RyanTheTide Oct 12, 2026
f58c17c
drm/apple: isolate DPTX discovery diagnostics
RyanTheTide Oct 12, 2026
79f124c
drm/apple: initialize the external DPTX controller before port discovery
RyanTheTide Oct 12, 2026
892ceab
drm/apple: discover the version-two external DPTX service
RyanTheTide Oct 12, 2026
d063a2a
drm/apple: operate the external DPTX service over AFKV2
RyanTheTide Oct 12, 2026
b4926f7
dt-bindings: phy: apple,atcphy: describe T8140 DP setup lists
RyanTheTide Oct 12, 2026
7f67eba
phy: apple: apply the T8140 DisplayPort setup lists
RyanTheTide Oct 12, 2026
f019831
drm/apple: open the version-two DPTX controller interfaces
RyanTheTide Oct 12, 2026
2948911
usb: typec: expose mux callback results through dynamic debug
RyanTheTide Oct 12, 2026
0be54ab
tools: add bounded J700 ATC setup readback
RyanTheTide Oct 12, 2026
373e947
tools: map ATC readback words as read-only MMIO
RyanTheTide Oct 12, 2026
403a3db
tools: report the J700 AUX power control state
RyanTheTide Oct 12, 2026
e6fa39f
phy: apple: sequence J700 AUX power separately from calibration
RyanTheTide Oct 12, 2026
39af890
tools: report J700 lane protocol and power controls
RyanTheTide Oct 12, 2026
f199791
phy: apple: park the J700 DP lane before link training
RyanTheTide Oct 12, 2026
bc3b8aa
arm64: dts: apple: select the second external DCP source on J700
RyanTheTide Oct 12, 2026
ea3d81e
dt-bindings: phy: apple: describe T8140 DisplayPort drive presets
RyanTheTide Oct 12, 2026
85d81b7
phy: apple: implement bounded J700 DisplayPort main-link training
RyanTheTide Oct 12, 2026
a004aa3
drm: apple: honor separate AFK V2 callback reply capacity
RyanTheTide Oct 12, 2026
d863129
phy: apple: preserve J700 lane-routing state during DP setup
RyanTheTide Oct 12, 2026
7a294dd
mux: apple: retain the physical J700 crossbar gate sequence
RyanTheTide Oct 12, 2026
011471c
drm: apple: validate J700 active lanes against PHY capacity
RyanTheTide Oct 12, 2026
ea06f4a
drm: apple: avoid stale active-lane warnings after V2 validation
RyanTheTide Oct 12, 2026
09f9dd5
phy: apple: preserve J700 transmitter programming order
RyanTheTide Oct 12, 2026
b96ac1e
drm: apple: answer the V2 physical-device mode query
RyanTheTide Oct 12, 2026
29ebc07
phy: apple: apply J700 DP calibration before common power-up
RyanTheTide Oct 12, 2026
dc41df1
drm: apple: allow the qualified J700 provider fallback on DCPEXT
RyanTheTide Oct 12, 2026
e8fe156
drm/apple: add scoped J700 link-rate diagnostic ceiling
RyanTheTide Oct 12, 2026
f7ced60
drm/apple: report unknown callback bounds for diagnosis
RyanTheTide Oct 12, 2026
db547bf
drm/apple: answer the measured J700 external D134 record
RyanTheTide Oct 12, 2026
1a317d5
drm/apple: route native training readback during modeset
RyanTheTide Oct 12, 2026
4b0a450
drm/apple: keep opaque X property off experimental DCPEXT
RyanTheTide Oct 12, 2026
649b825
drm/apple: add output-targeted Wayland presentation check
RyanTheTide Oct 12, 2026
77c3d30
diagnostics: collect delayed Wayland frame feedback
RyanTheTide Oct 12, 2026
9190b4b
drm/apple: remove temporary external bring-up diagnostics
RyanTheTide Oct 12, 2026
18d69dc
drm/apple: close external admission and recovery races
RyanTheTide Oct 12, 2026
cf6198d
tests: publish standalone AFK admission regression harness
RyanTheTide Oct 12, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions Documentation/devicetree/bindings/phy/apple,atcphy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ allOf:
reg-names:
maxItems: 5
apple,tunable-usb2phy-reg-dflt: false
apple,tunable-dp-common-pre: false
apple,tunable-dp-lpdptx: false
apple,tunable-dp-common-post: false
patternProperties:
"^apple,dp-training-table(-rbr|-hbr|-hbr2|-hbr3)?$": false

$defs:
apple,tunable:
Expand Down Expand Up @@ -179,13 +184,44 @@ properties:
Note that lane here refers to a USB RX and TX pair re-used for DisplayPort
and not to an individual DisplayPort differential lane.

apple,tunable-dp-common-pre:
$ref: "#/$defs/apple,tunable"
maxItems: 5461
description: >
T8140 DisplayPort core setup applied before the LPDPTX list. The
bootloader supplies device-specific values for the core register region.

apple,tunable-dp-lpdptx:
$ref: "#/$defs/apple,tunable"
maxItems: 5461
description: >
T8140 DisplayPort setup for the lpdptx register region, applied between
the common-pre and common-post lists.

apple,tunable-dp-common-post:
$ref: "#/$defs/apple,tunable"
maxItems: 5461
description: >
T8140 DisplayPort core setup applied after the LPDPTX list. All three
DisplayPort lists are needed before selecting a DisplayPort PHY mode.

apple,tunable-usb2phy-reg-dflt:
$ref: "#/$defs/apple,tunable"
description: >
Per-device defaults for the secondary eUSB2 PHY register bank of the
T8140, copied from Apple's Device Tree by the bootloader. Unlike the
other tunables these are applied to the usb2phy-reg region.

patternProperties:
"^apple,dp-training-table(-rbr|-hbr|-hbr2|-hbr3)?$":
$ref: /schemas/types.yaml#/definitions/uint32-array
minItems: 16
maxItems: 16
description: >
Firmware-provided T8140 drive presets indexed by voltage swing times
four plus pre-emphasis. The unsuffixed table is the required fallback;
a link-rate suffix selects an optional rate-specific override.

required:
- compatible
- reg
Expand Down
16 changes: 16 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -1952,6 +1952,7 @@ L: dri-devel@lists.freedesktop.org
S: Maintained
T: git git://anongit.freedesktop.org/drm/drm-misc
F: drivers/gpu/drm/apple/
F: tools/testing/selftests/drivers/gpu/apple-afkv2/

APPLE PCIE CONTROLLER DRIVER
M: Marc Zyngier <maz@kernel.org>
Expand Down Expand Up @@ -2005,6 +2006,7 @@ F: arch/arm64/include/asm/apple-idle.h
F: arch/arm64/kernel/idle-apple.S
F: drivers/hid/dockchannel-hid/dockchannel-hid-protocol*
F: drivers/iio/common/aop_sensors/
F: drivers/phy/apple/atc-j700-dp.h
F: drivers/rtc/rtc-apple-pmu.c
F: drivers/soc/apple/aop.rs
F: drivers/soc/apple/mcc.c
Expand All @@ -2014,6 +2016,18 @@ F: include/linux/soc/apple/pci-apple-piodma.h
F: rust/kernel/iio/common/aop_sensors.rs
F: rust/kernel/soc/apple/aop.rs
F: sound/soc/apple/t8140_aop_audio.rs
F: tools/diagnostics/apple-dptx-training-test.c
F: tools/diagnostics/apple-j700-dp-test.c
F: tools/diagnostics/test-apple-afk-admission.py
F: tools/diagnostics/test-apple-atc-unwind.py
F: tools/diagnostics/test-apple-dcp-readiness.py
F: tools/diagnostics/test-apple-j700-crossbar.py
F: tools/diagnostics/test-apple-j700-d134.py
F: tools/diagnostics/test-apple-j700-dp.py
F: tools/diagnostics/test-apple-j700-opaque-scope.py
F: tools/diagnostics/test-apple-j700-provider.py
F: tools/diagnostics/test-apple-j700-tuning.py
F: tools/diagnostics/wayland-output-frame-test.py
F: tools/testing/apple/

APPLETALK NETWORK LAYER
Expand Down Expand Up @@ -2635,6 +2649,8 @@ F: drivers/nvme/host/apple.c
F: drivers/nvmem/apple-efuses.c
F: drivers/nvmem/apple-spmi-nvmem.c
F: drivers/phy/apple/
F: tools/diagnostics/apple-atc-readback.py
F: tools/diagnostics/test-apple-atc-aux.py
F: drivers/pinctrl/pinctrl-apple-gpio.c
F: drivers/pmdomain/apple/
F: drivers/power/reset/macsmc-reboot.c
Expand Down
1 change: 1 addition & 0 deletions arch/arm64/boot/dts/apple/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,5 @@ dtb-$(CONFIG_ARCH_APPLE) += t8122-j504.dtb
dtb-$(CONFIG_ARCH_APPLE) += t8122-j613.dtb
dtb-$(CONFIG_ARCH_APPLE) += t8122-j615.dtb
dtb-$(CONFIG_ARCH_APPLE) += t8140-j700.dtb
dtb-$(CONFIG_ARCH_APPLE) += t8140-j700-external-test.dtb
dtb-$(CONFIG_ARCH_APPLE) += t8142-j813.dtb
74 changes: 74 additions & 0 deletions arch/arm64/boot/dts/apple/t8140-j700-dcpext.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* T8140 external display resources measured through the public ADT API.
* Generated-by: LLM
* Assisted-by: LLM
*
* The controller and route remain disabled. Their live firmware
* profile, bandwidth request, routing selector and handoff must be qualified
* before enabling the controller. The existing T8140 refusal remains in force.
*/

&{/soc} {
dcpext: dcp@416e00000 {
compatible = "apple,t8140-dcpext", "apple,dcp";
reg = <0x4 0x16e00000 0x0 0x4000>,
<0x4 0x14000000 0x0 0xafc000>,
<0x4 0x16240000 0x0 0x10000>,
<0x4 0x163ac000 0x0 0x4000>,
<0x4 0x16800000 0x0 0x800000>,
<0x3 0x02800000 0x0 0xbc000>,
<0x4 0x16850000 0x0 0x4000>;
reg-names = "coproc", "disp-0", "disp-1", "disp-2",
"disp-3", "disp-4", "iop-vbar";
mboxes = <&dcpext_mbox>;
mbox-names = "mbox";
/* First mapper in the measured ADT iommu-parent list. */
iommus = <&dcpext0_dart 23>;
power-domains = <&ps_dispext0_cpu>;
apple,connector-type = "USB-C";
status = "disabled";

#address-cells = <2>;
#size-cells = <2>;
ranges;

dispext0_piodma: piodma {
iommus = <&dispext0_dart 16>;
};

typec-routes {
#address-cells = <1>;
#size-cells = <0>;

route@0 {
reg = <0>;
status = "disabled";
mode-switch;

port {
dcpext_typec0: endpoint {
remote-endpoint = <&typec0_dcp>;
};
};
};
};
};
};

&typec0 {
ports {
port@3 {
reg = <3>;

typec0_dcp: endpoint {
remote-endpoint = <&dcpext_typec0>;
};
};
};
};

/* Retain the inherited firmware supply once the loader publishes it. */
&ps_dispext0_cpu {
apple,always-on;
};
29 changes: 29 additions & 0 deletions arch/arm64/boot/dts/apple/t8140-j700-external-test.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/* Explicit external-display trial; the ordinary J700 tree is unchanged. */
#include "t8140-j700.dts"
#include <dt-bindings/phy/phy.h>

&display {
iommus = <&disp0_dart 0>, <&dispext0_dart 0>;
};

&dcpext {
clocks = <&clk_disp0_154>, <&clk_disp0_194>;
clock-names = "clock-154", "clock-194";
phys = <&atcphy0 PHY_TYPE_DP>;
phy-names = "typec0";
mux-controls = <&dpxbar0 0>;
mux-control-names = "typec0";
apple,typec-mux-indices = <2>;
apple,typec-dptx-phys = <0>;
apple,dcp-index = <1>;
};

&{/soc/dcp@416e00000/typec-routes/route@0} {
status = "okay";
};

/* Match the external firmware buffer window rather than allocating below it. */
&dcpext0_dart {
apple,dma-range = <0x100 0x0 0x10 0x0>;
};
3 changes: 3 additions & 0 deletions arch/arm64/boot/dts/apple/t8140-j700.dts
Original file line number Diff line number Diff line change
Expand Up @@ -1918,3 +1918,6 @@
local-mac-address = [00 00 00 00 00 00];
};
};

/* External resources stay disabled pending the separate firmware profile. */
#include "t8140-j700-dcpext.dtsi"
2 changes: 2 additions & 0 deletions drivers/gpu/drm/apple/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ appledrm-$(CONFIG_TRACING) += trace.o
obj-$(CONFIG_DRM_APPLE) += appledrm.o
obj-$(CONFIG_DRM_APPLE_KUNIT_TEST) += afk_test.o
obj-$(CONFIG_DRM_APPLE_KUNIT_TEST) += dcp_backlight_test.o

obj-$(CONFIG_DRM_APPLE_KUNIT_TEST) += afk-service-test.o
99 changes: 99 additions & 0 deletions drivers/gpu/drm/apple/afk-service-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <linux/module.h>

#include "afk.h"
#include "dptx-service.h"

static const struct apple_epic_service_ops reusable_ops = {
.name = "reusable",
Expand Down Expand Up @@ -122,7 +123,105 @@ static void afk_service_unconverted_owner_test(struct kunit *test)
KUNIT_EXPECT_FALSE(test, afk_service_reinit(service, NULL, &reusable_ops, 2));
}

static int afk_test_prepare(struct apple_epic_service *service,
const char *name, const char *class, s64 unit)
{
return 0;
}

static const struct apple_epic_service_ops prepared_ops = {
.name = "prepared",
.prepare = afk_test_prepare,
.teardown = dptx_service_unbind,
};

static void afk_service_admission_test(struct kunit *test)
{
struct apple_epic_service *service = test->priv;

KUNIT_ASSERT_TRUE(test, afk_service_reinit(service, NULL, &prepared_ops, 1));
/* Neither callback dispatch nor command callers can observe preparation. */
KUNIT_EXPECT_FALSE(test, afk_service_matches(service, 1));
KUNIT_EXPECT_PTR_EQ(test, afk_service_get(service), NULL);
/* A rejected announcement or failed OPEN consumes no service slot. */
afk_service_discard(service);
KUNIT_ASSERT_TRUE(test, afk_service_reinit(service, NULL, &prepared_ops, 2));
/* Cookie-less services are valid: admission does not test cookie != NULL. */
afk_service_publish(service);
KUNIT_EXPECT_TRUE(test, afk_service_matches(service, 2));
KUNIT_ASSERT_PTR_EQ(test, afk_service_get(service), service);
afk_service_put(service);
}

static void dptx_service_identity_test(struct kunit *test)
{
const char *name = "dcpdptx-port-epic";
const char *class = "AppleDCPDPTXRemotePort";

KUNIT_EXPECT_EQ(test, dptx_service_port(name, class, 3, true, 3, 1), 0);
KUNIT_EXPECT_EQ(test, dptx_service_port(name, class, 0, true, 3, 1), -EINVAL);
KUNIT_EXPECT_EQ(test, dptx_service_port(name, class, -1, true, 3, 1), -EINVAL);
KUNIT_EXPECT_EQ(test, dptx_service_port(name, class, 3, true, 3, 2), -EINVAL);
KUNIT_EXPECT_EQ(test, dptx_service_port(NULL, class, 3, true, 3, 1), -EINVAL);
KUNIT_EXPECT_EQ(test, dptx_service_port(name, NULL, 3, true, 3, 1), -EINVAL);
KUNIT_EXPECT_EQ(test, dptx_service_port("wrong", class, 3, true, 3, 1), -EINVAL);
KUNIT_EXPECT_EQ(test, dptx_service_port(name, "wrong", 3, true, 3, 1), -EINVAL);
KUNIT_EXPECT_EQ(test, dptx_service_port(name, class, 1, false, 3, 2), 1);
KUNIT_EXPECT_EQ(test, dptx_service_port(name, class, 2, false, 3, 2), -EINVAL);
}

static void dptx_service_duplicate_close_test(struct kunit *test)
{
struct apple_epic_service *first = test->priv;
struct apple_epic_service *next;
struct dptx_port port = {};

next = kunit_kzalloc(test, sizeof(*next), GFP_KERNEL);
KUNIT_ASSERT_NOT_NULL(test, next);
spin_lock_init(&next->lock);
init_completion(&port.enable_completion);
KUNIT_ASSERT_TRUE(test, afk_service_reinit(first, NULL, &prepared_ops, 1));
KUNIT_ASSERT_EQ(test, dptx_service_bind(first, &port, 3), 0);
/* An observer during preparation/OPEN sees no available port or owner. */
KUNIT_EXPECT_FALSE(test, dptx_service_available(&port));
KUNIT_EXPECT_PTR_EQ(test, port.service, NULL);
KUNIT_EXPECT_PTR_EQ(test, first->cookie, &port);
/* Failed OPEN does not publish anything and permits a fresh attempt. */
afk_service_discard(first);
KUNIT_EXPECT_FALSE(test, port.enabled);
KUNIT_EXPECT_PTR_EQ(test, port.service, NULL);
KUNIT_ASSERT_TRUE(test, afk_service_reinit(first, NULL, &prepared_ops, 1));
KUNIT_ASSERT_EQ(test, dptx_service_bind(first, &port, 3), 0);
afk_service_publish(first);
KUNIT_EXPECT_FALSE(test, port.enabled);
dptx_service_publish(first);
KUNIT_EXPECT_TRUE(test, dptx_service_available(&port));
KUNIT_EXPECT_PTR_EQ(test, port.service->cookie, &port);
KUNIT_ASSERT_TRUE(test, afk_service_reinit(next, NULL, &prepared_ops, 2));
KUNIT_EXPECT_EQ(test, dptx_service_bind(next, &port, 3), -EBUSY);
afk_service_discard(next);
KUNIT_EXPECT_TRUE(test, port.enabled);
KUNIT_EXPECT_PTR_EQ(test, port.service, first);
/* CLOSE invalidates a connected session without publishing a replacement. */
port.connected = true;
afk_test_retire(first);
dptx_service_unbind(first);
KUNIT_EXPECT_FALSE(test, port.enabled);
KUNIT_EXPECT_FALSE(test, port.connected);
KUNIT_EXPECT_PTR_EQ(test, first->cookie, &port);
KUNIT_ASSERT_TRUE(test, afk_service_reinit(next, NULL, &prepared_ops, 3));
KUNIT_EXPECT_EQ(test, dptx_service_bind(next, &port, 3), -EBUSY);
afk_service_discard(next);
/* Old work between validate/connect/request still names the old session. */
KUNIT_EXPECT_PTR_EQ(test, port.service, first);
KUNIT_EXPECT_PTR_EQ(test, afk_service_get(port.service), NULL);
KUNIT_EXPECT_FALSE(test, port.enabled);
}

static struct kunit_case afk_service_cases[] = {
KUNIT_CASE(afk_service_admission_test),
KUNIT_CASE(dptx_service_identity_test),
KUNIT_CASE(dptx_service_duplicate_close_test),
KUNIT_CASE(afk_service_many_generations_test),
KUNIT_CASE(afk_service_reader_pin_test),
KUNIT_CASE(afk_service_pending_reply_test),
Expand Down
Loading