Skip to content

Commit 68feab3

Browse files
committed
arm64: dts: apple: t60xx: j[34]75: Add dp-altmode hacks
DP alt mode for Mac Studio, the blessed port is the back left middle port (second closest USB-C port to the power connector). Signed-off-by: Janne Grunau <j@jannau.net>
1 parent a8848a7 commit 68feab3

File tree

6 files changed

+63
-0
lines changed

6 files changed

+63
-0
lines changed

arch/arm64/boot/dts/apple/t6001-j375c.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 "t6001.dtsi"
1315
#include "t600x-j375.dtsi"
1416

arch/arm64/boot/dts/apple/t6002-j375d.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 "t6002.dtsi"
1315
#include "t600x-j375.dtsi"
1416

arch/arm64/boot/dts/apple/t600x-j375.dtsi

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
disp0 = &display;
2424
disp0_piodma = &disp0_piodma;
2525
#endif
26+
#ifdef ENABLE_DCPEXT_TYPEC
27+
dcpext1 = &dcpext1;
28+
#endif
2629
ethernet0 = &ethernet0;
2730
serial0 = &serial0;
2831
sio = &sio;
@@ -111,6 +114,11 @@
111114
power-role = "dual";
112115
data-role = "dual";
113116

117+
#ifdef ENABLE_DCPEXT_TYPEC
118+
/* hacks */
119+
displayport = <&dcpext1>;
120+
#endif
121+
114122
ports {
115123
#address-cells = <1>;
116124
#size-cells = <0>;
@@ -195,6 +203,45 @@
195203
};
196204
};
197205

206+
#ifdef ENABLE_DCPEXT_TYPEC
207+
&display {
208+
iommus = <&disp0_dart 0>, <&dispext1_dart 0>;
209+
};
210+
211+
&dispext1_dart {
212+
status = "okay";
213+
};
214+
215+
&dcpext1_dart {
216+
status = "okay";
217+
};
218+
219+
&dcpext1_mbox {
220+
status = "okay";
221+
};
222+
223+
&dcpext1 {
224+
status = "okay";
225+
apple,connector-type = "DP";
226+
227+
/* hacks */
228+
apple,dptx-phy = <1>;
229+
phys = <&atcphy1 PHY_TYPE_DP>;
230+
phy-names = "dp-phy";
231+
mux-controls = <&atcphy1_xbar 0>;
232+
mux-control-names = "dp-xbar";
233+
mux-index = <2>;
234+
};
235+
236+
&dpaudio2 {
237+
status = "okay";
238+
};
239+
240+
&atcphy1_xbar {
241+
status = "okay";
242+
};
243+
#endif
244+
198245
/* USB controllers */
199246
&dwc3_0 {
200247
ports {

arch/arm64/boot/dts/apple/t6021-j475c.dts

Lines changed: 6 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 "t6021.dtsi"
1315
#include "t602x-j474-j475.dtsi"
1416

@@ -81,7 +83,11 @@
8183
status = "disabled";
8284
};
8385
&display {
86+
#ifdef ENABLE_DCPEXT_TYPEC
87+
iommus = <&dispext0_dart 0>, <&dispext1_dart 0>;
88+
#else
8489
iommus = <&dispext0_dart 0>;
90+
#endif
8591
};
8692
&dispext0_dart {
8793
status = "okay";

arch/arm64/boot/dts/apple/t6022-j475d.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
#define NO_DCP
1315

1416
#include "t6022.dtsi"

arch/arm64/boot/dts/apple/t6022-jxxxd.dtsi

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@
2222
};
2323

2424
&display {
25+
#ifdef ENABLE_DCPEXT_TYPEC
26+
iommus = <&dispext0_dart_die1 0>, <&dispext1_dart 0>;
27+
#else
2528
iommus = <&dispext0_dart_die1 0>;
29+
#endif
2630
};
2731

2832
&dispext0_dart_die1 {

0 commit comments

Comments
 (0)