Skip to content

Commit 1a1b4d4

Browse files
committed
Merge patch series "arm64: dts: apple: Add integrated USB Type-C ports"
Janne Grunau <j@jannau.net> says: Now that all dependencies for USB 2.0 and 3.x support are either merged (tipd changes in v6.18, dwc3-apple in v6.19-rc1) or in linux-next (Apple Type-C PHY) prepare device tree changes to expose the ports. Each port on Apple silicon devices is driven by a separate collection of hardware blocks. For USB 2.0 and 3.x the collection consists of: - Apple Type-C PHY, combo PHY for USB 2.0, USB 3.x, USB4/Thunderbolt and DisplayPort - Synopsys Designware dwc3 USB controller - two DART iommu instances for dwc3 - CD321x USB PD controller (similar to Ti's TPS6598x series) The CD321x nodes are already present so this series add the remaining devices nodes, typec connector nodes and connections between all components. The devices expose except for a few exceptions noted below all ports. M1 and M2 have two ports, M1 and M2 Pro and Max have four ports and M1 and M2 Ultra have eight ports. The Pro and Max based Macbook Pros use only three ports. The fourth port is used as DisplayPort PHY to drive a HDMI output via an integrated DP to HDMI converter. The Ultra based Mac studio devices only use six ports. The third and fourth port on the second die is completely fused off. The changes for t600x and t602x are in a single commit since the devices share .dtsi files across SoC generations due to their similarity. Depends on commit c1538b8 ("dt-bindings: phy: Add Apple Type-C PHY") in linux-phy's [1] next branch for `make dtbs_check` to pass. checkpatch warns about the undocumented DT compatible strings "apple,t8112-atcphy", "apple,t6000-atcphy" and "apple,t6020-atcphy" but not about "apple,t8103-atcphy". I don't under why it doesn't warn about the last. "apple,t8103-atcphy" is only found in the added devicetree files and nowhere else in v6.19-rc1. Tested on top of next-20260106 on M1, M2, M1 Max and M2 Pro Mac mini / Mac studio and a few fixes for dwc3-apple and atc [2, 3, 4, 5]. Link: https://patch.msgid.link/20260109-apple-dt-usb-c-atc-dwc3-v1-0-ce0e92c1a016@jannau.net Signed-off-by: Sven Peter <sven@kernel.org>
2 parents 84220bf + e21c8e2 commit 1a1b4d4

23 files changed

Lines changed: 2245 additions & 0 deletions

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)