Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,30 @@ properties:
- const: sram
- const: cpu

interrupts:
maxItems: 1
description: Type 7 SRAM parity interrupt

interrupt-names:
items:
- const: sram-parity

mboxes:
maxItems: 1
description: Mailbox used for RTKit communication with the co-processor

interrupts:
minItems: 1
maxItems: 4
description: |
Type 7 SRAM parity interrupt, or interrupts of the router's DP IN
adapter blocks, one per DP IN adapter:
a change of the HPD level the adapter receives over the tunnel, and
IRQ_HPD from the sink.

interrupt-names:
oneOf:
- items:
- const: sram-parity
- minItems: 1
items:
- const: dpin0
- const: dpin1
- const: dpin2
- const: dpin3

resets:
maxItems: 1
description: Reset used to start the ACIO block before booting the
Expand Down Expand Up @@ -252,6 +264,12 @@ allOf:
contains:
const: apple,t6040-usb4-acio
then:
properties:
interrupts:
maxItems: 1
interrupt-names:
items:
- const: sram-parity
required:
- iommu@1a80000
- nhi@1f00000
Expand Down
21 changes: 21 additions & 0 deletions drivers/thunderbolt/apple-dpin-state.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,27 @@ const struct apple_dpin_policy apple_dpin_m4 = {
.lazy_idle = true,
};

/*
* T6050: the M3 flow (tunnel changed notifications, with the 10 ms HPD
* Output Set pulse and HPD wait before them; capacity retry, deferred
* bringup). Once a tunnel uses a DP IN block, its pending events are
* acknowledged (+0x04 written back, and +0x00 after a plug event) and its
* two events enabled (+0x08), as the block is prepared for a display. The
* DP IN handshake writes only DPTX_INACTIVE (+0x0c bit 0) and polls its ACK
* (+0x10 bit 0), gated on HPD. A tunnel whose DP IN block DCP never
* activated is torn down without the inactive handshake. A DPRX that is not
* done in time keeps the tunnel: the display may still train.
*/
const struct apple_dpin_policy apple_dpin_m5 = {
.flow = APPLE_DPIN_CHANGED,
.settle_ms = 100,
.capacity_retry = true,
.setup_irqs = true,
.defer_new_bringup = true,
.host_policy = TB_HOST_DP_NOTIFY | TB_HOST_DP_KEEP_DPRX_TIMEOUT,
.lazy_idle = true,
};

enum apple_dpin_flow apple_dpin_hooks(const struct apple_dpin_policy *policy,
bool queue_present, bool display_enabled)
{
Expand Down
2 changes: 2 additions & 0 deletions drivers/thunderbolt/apple-dpin-state.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,15 @@ struct apple_dpin_policy {
unsigned long host_policy;
/* teardown touches the DP IN block only after DCP's Activate/Deactivate did */
bool lazy_idle;
unsigned int settle_ms;
};

extern const struct apple_dpin_policy apple_dpin_disabled;
extern const struct apple_dpin_policy apple_dpin_m1;
extern const struct apple_dpin_policy apple_dpin_m2;
extern const struct apple_dpin_policy apple_dpin_m3;
extern const struct apple_dpin_policy apple_dpin_m4;
extern const struct apple_dpin_policy apple_dpin_m5;

enum apple_dpin_phase {
APPLE_DPIN_IDLE,
Expand Down
2 changes: 2 additions & 0 deletions drivers/thunderbolt/apple-dpin-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,8 @@ static void apple_dpin_qualification_profiles(struct kunit *test)
{ "apple,t6031", &apple_dpin_m3, true, &apple_dpin_disabled },
{ "apple,t8132", &apple_dpin_m4, true, &apple_dpin_m4 },
{ "apple,t8132", &apple_dpin_m4, false, &apple_dpin_m4 },
{ "apple,t6050", &apple_dpin_m5, true, &apple_dpin_m5 },
{ "apple,t6050", &apple_dpin_m5, false, &apple_dpin_m5 },
{ "apple,unknown", &apple_dpin_m1, true, &apple_dpin_disabled },
};
unsigned int i;
Expand Down
Loading