Skip to content

Commit 05d292e

Browse files
committed
arm64: dts: apple: t8103: Add dwc3 nodes
Signed-off-by: Hector Martin <marcan@marcan.st>
1 parent 4cb3f42 commit 05d292e

File tree

7 files changed

+171
-0
lines changed

7 files changed

+171
-0
lines changed

arch/arm64/boot/dts/apple/t8103-j274.dts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,18 @@
2121
};
2222
};
2323

24+
/*
25+
* Provide labels for the USB type C ports.
26+
*/
27+
28+
&typec0 {
29+
label = "USB-C Back-left";
30+
};
31+
32+
&typec1 {
33+
label = "USB-C Back-right";
34+
};
35+
2436
/*
2537
* Force the bus number assignments so that we can declare some of the
2638
* on-board devices and properties that are populated by the bootloader

arch/arm64/boot/dts/apple/t8103-j293.dts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,18 @@
1717
model = "Apple MacBook Pro (13-inch, M1, 2020)";
1818
};
1919

20+
/*
21+
* Provide labels for the USB type C ports.
22+
*/
23+
24+
&typec0 {
25+
label = "USB-C Left-back";
26+
};
27+
28+
&typec1 {
29+
label = "USB-C Left-front";
30+
};
31+
2032
/*
2133
* Remove unused PCIe ports and disable the associated DARTs.
2234
*/

arch/arm64/boot/dts/apple/t8103-j313.dts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,18 @@
1717
model = "Apple MacBook Air (M1, 2020)";
1818
};
1919

20+
/*
21+
* Provide labels for the USB type C ports.
22+
*/
23+
24+
&typec0 {
25+
label = "USB-C Left-back";
26+
};
27+
28+
&typec1 {
29+
label = "USB-C Left-front";
30+
};
31+
2032
/*
2133
* Remove unused PCIe ports and disable the associated DARTs.
2234
*/

arch/arm64/boot/dts/apple/t8103-j456.dts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,18 @@
3939
};
4040
};
4141

42+
/*
43+
* Provide labels for the USB type C ports.
44+
*/
45+
46+
&typec0 {
47+
label = "USB-C Back-right";
48+
};
49+
50+
&typec1 {
51+
label = "USB-C Back-right-middle";
52+
};
53+
4254
/*
4355
* Force the bus number assignments so that we can declare some of the
4456
* on-board devices and properties that are populated by the bootloader

arch/arm64/boot/dts/apple/t8103-j457.dts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,18 @@
2121
};
2222
};
2323

24+
/*
25+
* Provide labels for the USB type C ports.
26+
*/
27+
28+
&typec0 {
29+
label = "USB-C Back-right";
30+
};
31+
32+
&typec1 {
33+
label = "USB-C Back-left";
34+
};
35+
2436
/*
2537
* Force the bus number assignments so that we can declare some of the
2638
* on-board devices and properties that are populated by the bootloader

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

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,23 @@
5252
interrupt-parent = <&pinctrl_ap>;
5353
interrupts = <106 IRQ_TYPE_LEVEL_LOW>;
5454
interrupt-names = "irq";
55+
56+
typec0: connector {
57+
compatible = "usb-c-connector";
58+
power-role = "dual";
59+
data-role = "dual";
60+
61+
ports {
62+
#address-cells = <1>;
63+
#size-cells = <0>;
64+
port@0 {
65+
reg = <0>;
66+
typec0_con_hs: endpoint {
67+
remote-endpoint = <&typec0_usb_hs>;
68+
};
69+
};
70+
};
71+
};
5572
};
5673

5774
hpm1: usb-pd@3f {
@@ -60,6 +77,40 @@
6077
interrupt-parent = <&pinctrl_ap>;
6178
interrupts = <106 IRQ_TYPE_LEVEL_LOW>;
6279
interrupt-names = "irq";
80+
81+
typec1: connector {
82+
compatible = "usb-c-connector";
83+
power-role = "dual";
84+
data-role = "dual";
85+
86+
ports {
87+
#address-cells = <1>;
88+
#size-cells = <0>;
89+
port@0 {
90+
reg = <0>;
91+
typec1_con_hs: endpoint {
92+
remote-endpoint = <&typec1_usb_hs>;
93+
};
94+
};
95+
};
96+
};
97+
};
98+
};
99+
100+
/* USB controllers */
101+
&dwc3_0 {
102+
port {
103+
typec0_usb_hs: endpoint {
104+
remote-endpoint = <&typec0_con_hs>;
105+
};
106+
};
107+
};
108+
109+
&dwc3_1 {
110+
port {
111+
typec1_usb_hs: endpoint {
112+
remote-endpoint = <&typec1_con_hs>;
113+
};
63114
};
64115
};
65116

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

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,66 @@
411411
resets = <&ps_ans2>;
412412
};
413413

414+
dwc3_0: usb@382280000 {
415+
compatible = "apple,t8103-dwc3", "apple,dwc3", "snps,dwc3";
416+
reg = <0x3 0x82280000 0x0 0x100000>;
417+
interrupt-parent = <&aic>;
418+
interrupts = <AIC_IRQ 777 IRQ_TYPE_LEVEL_HIGH>;
419+
dr_mode = "otg";
420+
usb-role-switch;
421+
role-switch-default-mode = "host";
422+
iommus = <&dwc3_0_dart_0 0>, <&dwc3_0_dart_1 1>;
423+
power-domains = <&ps_atc0_usb>;
424+
};
425+
426+
dwc3_0_dart_0: iommu@382f00000 {
427+
compatible = "apple,t8103-dart";
428+
reg = <0x3 0x82f00000 0x0 0x4000>;
429+
interrupt-parent = <&aic>;
430+
interrupts = <AIC_IRQ 781 IRQ_TYPE_LEVEL_HIGH>;
431+
#iommu-cells = <1>;
432+
power-domains = <&ps_atc0_usb>;
433+
};
434+
435+
dwc3_0_dart_1: iommu@382f80000 {
436+
compatible = "apple,t8103-dart";
437+
reg = <0x3 0x82f80000 0x0 0x4000>;
438+
interrupt-parent = <&aic>;
439+
interrupts = <AIC_IRQ 781 IRQ_TYPE_LEVEL_HIGH>;
440+
#iommu-cells = <1>;
441+
power-domains = <&ps_atc0_usb>;
442+
};
443+
444+
dwc3_1: usb@502280000 {
445+
compatible = "apple,t8103-dwc3", "apple,dwc3", "snps,dwc3";
446+
reg = <0x5 0x02280000 0x0 0x100000>;
447+
interrupt-parent = <&aic>;
448+
interrupts = <AIC_IRQ 857 IRQ_TYPE_LEVEL_HIGH>;
449+
dr_mode = "otg";
450+
usb-role-switch;
451+
role-switch-default-mode = "host";
452+
iommus = <&dwc3_1_dart_0 0>, <&dwc3_1_dart_1 1>;
453+
power-domains = <&ps_atc1_usb>;
454+
};
455+
456+
dwc3_1_dart_0: iommu@502f00000 {
457+
compatible = "apple,t8103-dart";
458+
reg = <0x5 0x02f00000 0x0 0x4000>;
459+
interrupt-parent = <&aic>;
460+
interrupts = <AIC_IRQ 861 IRQ_TYPE_LEVEL_HIGH>;
461+
#iommu-cells = <1>;
462+
power-domains = <&ps_atc1_usb>;
463+
};
464+
465+
dwc3_1_dart_1: iommu@502f80000 {
466+
compatible = "apple,t8103-dart";
467+
reg = <0x5 0x02f80000 0x0 0x4000>;
468+
interrupt-parent = <&aic>;
469+
interrupts = <AIC_IRQ 861 IRQ_TYPE_LEVEL_HIGH>;
470+
#iommu-cells = <1>;
471+
power-domains = <&ps_atc1_usb>;
472+
};
473+
414474
pcie0_dart_0: dart@681008000 {
415475
compatible = "apple,t8103-dart";
416476
reg = <0x6 0x81008000 0x0 0x4000>;

0 commit comments

Comments
 (0)