Skip to content

Commit e21c8e2

Browse files
jannausvenpeter42
authored andcommitted
arm64: dts: apple: t60xx: Add nodes for integrated USB Type-C ports
Add device nodes and connections to support USB 3.x on the SoC's integrated Type-C ports of M1 and M2 Pro, Max and Ultra based devices. Each Type-C port has an Apple Type-C PHY for USB 2.0, USB 3.x, USB4/Thunderbolt, and DisplayPort, a Synopsys Designware USB 3.x controller, two DART iommu instances and a CD321x USB PD controller. M1 and M2 Max based Mac Studio device have two additional USB Type-C ports on the front which are driven by an AsMedia PCIe USB controller and integrated USB hub. These ports are not covered by this change. The port labels use Apple's established naming scheme for the ports. Co-developed-by: R <rqou@berkeley.edu> Signed-off-by: R <rqou@berkeley.edu> Co-developed-by: Hector Martin <marcan@marcan.st> Signed-off-by: Hector Martin <marcan@marcan.st> Signed-off-by: Janne Grunau <j@jannau.net> Tested-by: Sven Peter <sven@kernel.org> # M1 mac mini and macbook air Reviewed-by: Sven Peter <sven@kernel.org> Reviewed-by: Neal Gompa <neal@gompa.dev> Link: https://patch.msgid.link/20260109-apple-dt-usb-c-atc-dwc3-v1-3-ce0e92c1a016@jannau.net Signed-off-by: Sven Peter <sven@kernel.org>
1 parent b4f4054 commit e21c8e2

10 files changed

Lines changed: 1659 additions & 0 deletions

File tree

arch/arm64/boot/dts/apple/t6001.dtsi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <dt-bindings/interrupt-controller/apple-aic.h>
1212
#include <dt-bindings/interrupt-controller/irq.h>
1313
#include <dt-bindings/pinctrl/apple.h>
14+
#include <dt-bindings/phy/phy.h>
1415
#include <dt-bindings/spmi/spmi.h>
1516

1617
#include "multi-die-cpp.h"

arch/arm64/boot/dts/apple/t6002-j375d.dts

Lines changed: 150 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@
1515
/ {
1616
compatible = "apple,j375d", "apple,t6002", "apple,arm-platform";
1717
model = "Apple Mac Studio (M1 Ultra, 2022)";
18+
aliases {
19+
atcphy4 = &atcphy0_die1;
20+
atcphy5 = &atcphy1_die1;
21+
};
1822
};
1923

2024
/* USB Type C */
@@ -26,6 +30,30 @@
2630
interrupt-parent = <&pinctrl_ap>;
2731
interrupts = <174 IRQ_TYPE_LEVEL_LOW>;
2832
interrupt-names = "irq";
33+
34+
typec4: connector {
35+
compatible = "usb-c-connector";
36+
label = "USB-C Front Right";
37+
power-role = "dual";
38+
data-role = "dual";
39+
40+
ports {
41+
#address-cells = <1>;
42+
#size-cells = <0>;
43+
port@0 {
44+
reg = <0>;
45+
typec4_connector_hs: endpoint {
46+
remote-endpoint = <&dwc3_4_hs>;
47+
};
48+
};
49+
port@1 {
50+
reg = <1>;
51+
typec4_connector_ss: endpoint {
52+
remote-endpoint = <&atcphy4_typec_lanes>;
53+
};
54+
};
55+
};
56+
};
2957
};
3058

3159
/* front-left */
@@ -35,6 +63,30 @@
3563
interrupt-parent = <&pinctrl_ap>;
3664
interrupts = <174 IRQ_TYPE_LEVEL_LOW>;
3765
interrupt-names = "irq";
66+
67+
typec5: connector {
68+
compatible = "usb-c-connector";
69+
label = "USB-C Front Left";
70+
power-role = "dual";
71+
data-role = "dual";
72+
73+
ports {
74+
#address-cells = <1>;
75+
#size-cells = <0>;
76+
port@0 {
77+
reg = <0>;
78+
typec5_connector_hs: endpoint {
79+
remote-endpoint = <&dwc3_5_hs>;
80+
};
81+
};
82+
port@1 {
83+
reg = <1>;
84+
typec5_connector_ss: endpoint {
85+
remote-endpoint = <&atcphy5_typec_lanes>;
86+
};
87+
};
88+
};
89+
};
3890
};
3991
};
4092

@@ -46,6 +98,104 @@
4698
brcm,board-type = "apple,okinawa";
4799
};
48100

101+
/* USB controllers on die 1 */
102+
&dwc3_0_die1 {
103+
ports {
104+
#address-cells = <1>;
105+
#size-cells = <0>;
106+
107+
port@0 {
108+
reg = <0>;
109+
dwc3_4_hs: endpoint {
110+
remote-endpoint = <&typec4_connector_hs>;
111+
};
112+
};
113+
114+
port@1 {
115+
reg = <1>;
116+
dwc3_4_ss: endpoint {
117+
remote-endpoint = <&atcphy4_usb3>;
118+
};
119+
};
120+
};
121+
};
122+
123+
&dwc3_1_die1 {
124+
ports {
125+
#address-cells = <1>;
126+
#size-cells = <0>;
127+
128+
port@0 {
129+
reg = <0>;
130+
dwc3_5_hs: endpoint {
131+
remote-endpoint = <&typec5_connector_hs>;
132+
};
133+
};
134+
135+
port@1 {
136+
reg = <1>;
137+
dwc3_5_ss: endpoint {
138+
remote-endpoint = <&atcphy5_usb3>;
139+
};
140+
};
141+
};
142+
};
143+
144+
/* Type-C PHYs */
145+
&atcphy0_die1 {
146+
ports {
147+
#address-cells = <1>;
148+
#size-cells = <0>;
149+
150+
port@0 {
151+
reg = <0>;
152+
atcphy4_typec_lanes: endpoint {
153+
remote-endpoint = <&typec4_connector_ss>;
154+
};
155+
};
156+
157+
port@1 {
158+
reg = <1>;
159+
atcphy4_usb3: endpoint {
160+
remote-endpoint = <&dwc3_4_ss>;
161+
};
162+
};
163+
};
164+
};
165+
166+
&atcphy1_die1 {
167+
ports {
168+
#address-cells = <1>;
169+
#size-cells = <0>;
170+
171+
port@0 {
172+
reg = <0>;
173+
atcphy5_typec_lanes: endpoint {
174+
remote-endpoint = <&typec5_connector_ss>;
175+
};
176+
};
177+
178+
port@1 {
179+
reg = <1>;
180+
atcphy5_usb3: endpoint {
181+
remote-endpoint = <&dwc3_5_ss>;
182+
};
183+
};
184+
};
185+
};
186+
187+
/* delete unused USB nodes on die 1 */
188+
189+
/delete-node/ &dwc3_2_dart_0_die1;
190+
/delete-node/ &dwc3_2_dart_1_die1;
191+
/delete-node/ &dwc3_2_die1;
192+
/delete-node/ &atcphy2_die1;
193+
194+
/delete-node/ &dwc3_3_dart_0_die1;
195+
/delete-node/ &dwc3_3_dart_1_die1;
196+
/delete-node/ &dwc3_3_die1;
197+
/delete-node/ &atcphy3_die1;
198+
49199
/* delete unused always-on power-domains on die 1 */
50200

51201
/delete-node/ &ps_atc2_usb_aon_die1;

arch/arm64/boot/dts/apple/t6002.dtsi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <dt-bindings/interrupt-controller/apple-aic.h>
1212
#include <dt-bindings/interrupt-controller/irq.h>
1313
#include <dt-bindings/pinctrl/apple.h>
14+
#include <dt-bindings/phy/phy.h>
1415
#include <dt-bindings/spmi/spmi.h>
1516

1617
#include "multi-die-cpp.h"

0 commit comments

Comments
 (0)