Skip to content

Commit 497fbae

Browse files
committed
arm64: dts: apple: t8112: Add dp-altmode dts hacks
Enable DP alt mode for the front left USB-C port of Macbook Air 13 (M2, 13/15-inch) and Macbook Pro (M2, 13-inch). Can't easily enabled on on the M2 Mac Mini since dcpext is used for the HDMI port and dcp bringup is troublesome. Signed-off-by: Janne Grunau <j@jannau.net>
1 parent 383d3b6 commit 497fbae

4 files changed

Lines changed: 52 additions & 0 deletions

File tree

arch/arm64/boot/dts/apple/t8112-j413.dts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
/dts-v1/;
1111

12+
#define ENABLE_DCPEXT_TYPEC
13+
1214
#include "t8112.dtsi"
1315
#include "t8112-jxxx.dtsi"
1416
#include <dt-bindings/leds/common.h>

arch/arm64/boot/dts/apple/t8112-j415.dts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
/dts-v1/;
1111

12+
#define ENABLE_DCPEXT_TYPEC
13+
1214
#include "t8112.dtsi"
1315
#include "t8112-jxxx.dtsi"
1416
#include <dt-bindings/leds/common.h>

arch/arm64/boot/dts/apple/t8112-j493.dts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
/dts-v1/;
1111

12+
#define ENABLE_DCPEXT_TYPEC
13+
1214
#include "t8112.dtsi"
1315
#include "t8112-jxxx.dtsi"
1416
#include <dt-bindings/leds/common.h>

arch/arm64/boot/dts/apple/t8112-jxxx.dtsi

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,11 @@
9696
power-role = "dual";
9797
data-role = "dual";
9898

99+
#ifdef ENABLE_DCPEXT_TYPEC
100+
/* hacks */
101+
displayport = <&dcpext>;
102+
#endif
103+
99104
ports {
100105
#address-cells = <1>;
101106
#size-cells = <0>;
@@ -116,6 +121,47 @@
116121
};
117122
};
118123

124+
#ifdef ENABLE_DCPEXT_TYPEC
125+
/ {
126+
aliases {
127+
dcpext = &dcpext;
128+
};
129+
};
130+
131+
&display {
132+
iommus = <&disp0_dart 0>, <&dispext0_dart 0>;
133+
};
134+
135+
&dispext0_dart {
136+
status = "okay";
137+
};
138+
139+
&dcpext_dart {
140+
status = "okay";
141+
};
142+
143+
&dcpext_mbox {
144+
status = "okay";
145+
};
146+
147+
&dcpext {
148+
status = "okay";
149+
apple,connector-type = "DP";
150+
151+
/* hacks */
152+
apple,dptx-phy = <1>;
153+
phys = <&atcphy1 PHY_TYPE_DP>;
154+
phy-names = "dp-phy";
155+
mux-controls = <&atcphy1_xbar 0>;
156+
mux-control-names = "dp-xbar";
157+
mux-index = <2>;
158+
};
159+
160+
&dpaudio1 {
161+
status = "okay";
162+
};
163+
#endif
164+
119165
/* USB controllers */
120166
&dwc3_0 {
121167
ports {

0 commit comments

Comments
 (0)