Debian Codegraph @

scripts/dtc/include-prefixes/arm64/apple/t600x-j314-j316.dtsi

raw
1 // SPDX-License-Identifier: GPL-2.0+ OR MIT
2 /*
3 * MacBook Pro (14/16-inch, 2021)
4 *
5 * This file contains the parts common to J314 and J316 devices with both t6000 and t6001.
6 *
7 * target-type: J314s / J314c / J316s / J316c
8 *
9 * Copyright The Asahi Linux Contributors
10 */
11
12 #include <dt-bindings/leds/common.h>
13
14 / {
15 chassis-type = "laptop";
16
17 aliases {
18 atcphy0 = &atcphy0;
19 atcphy1 = &atcphy1;
20 atcphy2 = &atcphy2;
21 atcphy3 = &atcphy3;
22 bluetooth0 = &bluetooth0;
23 serial0 = &serial0;
24 wifi0 = &wifi0;
25 };
26
27 chosen {
28 #address-cells = <2>;
29 #size-cells = <2>;
30 ranges;
31
32 stdout-path = "serial0";
33
34 framebuffer0: framebuffer@0 {
35 compatible = "apple,simple-framebuffer", "simple-framebuffer";
36 reg = <0 0 0 0>; /* To be filled by loader */
37 /* Format properties will be added by loader */
38 status = "disabled";
39 };
40 };
41
42 memory@10000000000 {
43 device_type = "memory";
44 reg = <0x100 0 0x2 0>; /* To be filled by loader */
45 };
46
47 led-controller {
48 compatible = "pwm-leds";
49 led-0 {
50 pwms = <&fpwm0 0 40000>;
51 label = "kbd_backlight";
52 function = LED_FUNCTION_KBD_BACKLIGHT;
53 color = <LED_COLOR_ID_WHITE>;
54 max-brightness = <255>;
55 default-state = "keep";
56 };
57 };
58 };
59
60 &serial0 {
61 status = "okay";
62 };
63
64 /* USB Type C */
65 &i2c0 {
66 hpm0: usb-pd@38 {
67 compatible = "apple,cd321x";
68 reg = <0x38>;
69 interrupt-parent = <&pinctrl_ap>;
70 interrupts = <174 IRQ_TYPE_LEVEL_LOW>;
71 interrupt-names = "irq";
72
73 typec0: connector {
74 compatible = "usb-c-connector";
75 label = "USB-C Left Rear";
76 power-role = "dual";
77 data-role = "dual";
78
79 ports {
80 #address-cells = <1>;
81 #size-cells = <0>;
82 port@0 {
83 reg = <0>;
84 typec0_connector_hs: endpoint {
85 remote-endpoint = <&dwc3_0_hs>;
86 };
87 };
88 port@1 {
89 reg = <1>;
90 typec0_connector_ss: endpoint {
91 remote-endpoint = <&atcphy0_typec_lanes>;
92 };
93 };
94 };
95 };
96 };
97
98 hpm1: usb-pd@3f {
99 compatible = "apple,cd321x";
100 reg = <0x3f>;
101 interrupt-parent = <&pinctrl_ap>;
102 interrupts = <174 IRQ_TYPE_LEVEL_LOW>;
103 interrupt-names = "irq";
104
105 typec1: connector {
106 compatible = "usb-c-connector";
107 label = "USB-C Left Front";
108 power-role = "dual";
109 data-role = "dual";
110
111 ports {
112 #address-cells = <1>;
113 #size-cells = <0>;
114 port@0 {
115 reg = <0>;
116 typec1_connector_hs: endpoint {
117 remote-endpoint = <&dwc3_1_hs>;
118 };
119 };
120 port@1 {
121 reg = <1>;
122 typec1_connector_ss: endpoint {
123 remote-endpoint = <&atcphy1_typec_lanes>;
124 };
125 };
126 };
127 };
128 };
129
130 hpm2: usb-pd@3b {
131 compatible = "apple,cd321x";
132 reg = <0x3b>;
133 interrupt-parent = <&pinctrl_ap>;
134 interrupts = <174 IRQ_TYPE_LEVEL_LOW>;
135 interrupt-names = "irq";
136
137 typec2: connector {
138 compatible = "usb-c-connector";
139 label = "USB-C Right";
140 power-role = "dual";
141 data-role = "dual";
142
143 ports {
144 #address-cells = <1>;
145 #size-cells = <0>;
146 port@0 {
147 reg = <0>;
148 typec2_connector_hs: endpoint {
149 remote-endpoint = <&dwc3_2_hs>;
150 };
151 };
152 port@1 {
153 reg = <1>;
154 typec2_connector_ss: endpoint {
155 remote-endpoint = <&atcphy2_typec_lanes>;
156 };
157 };
158 };
159 };
160 };
161
162 /* MagSafe port */
163 hpm5: usb-pd@3a {
164 compatible = "apple,cd321x";
165 reg = <0x3a>;
166 interrupt-parent = <&pinctrl_ap>;
167 interrupts = <174 IRQ_TYPE_LEVEL_LOW>;
168 interrupt-names = "irq";
169 };
170 };
171
172 &nco_clkref {
173 clock-frequency = <1068000000>;
174 };
175
176 /* PCIe devices */
177 &port00 {
178 /* WLAN */
179 bus-range = <1 1>;
180 wifi0: wifi@0,0 {
181 compatible = "pci14e4,4433";
182 reg = <0x10000 0x0 0x0 0x0 0x0>;
183 /* To be filled by the loader */
184 local-mac-address = [00 10 18 00 00 10];
185 apple,antenna-sku = "XX";
186 };
187
188 bluetooth0: bluetooth@0,1 {
189 compatible = "pci14e4,5f71";
190 reg = <0x10100 0x0 0x0 0x0 0x0>;
191 /* To be filled by the loader */
192 local-bd-address = [00 00 00 00 00 00];
193 };
194 };
195
196 &port01 {
197 /* SD card reader */
198 bus-range = <2 2>;
199 sdhci0: mmc@0,0 {
200 compatible = "pci17a0,9755";
201 reg = <0x20000 0x0 0x0 0x0 0x0>;
202 cd-inverted;
203 wp-inverted;
204 };
205 };
206
207 &fpwm0 {
208 status = "okay";
209 };
210
211 /* USB controllers */
212 &dwc3_0 {
213 ports {
214 #address-cells = <1>;
215 #size-cells = <0>;
216
217 port@0 {
218 reg = <0>;
219 dwc3_0_hs: endpoint {
220 remote-endpoint = <&typec0_connector_hs>;
221 };
222 };
223
224 port@1 {
225 reg = <1>;
226 dwc3_0_ss: endpoint {
227 remote-endpoint = <&atcphy0_usb3>;
228 };
229 };
230 };
231 };
232
233 &dwc3_1 {
234 ports {
235 #address-cells = <1>;
236 #size-cells = <0>;
237
238 port@0 {
239 reg = <0>;
240 dwc3_1_hs: endpoint {
241 remote-endpoint = <&typec1_connector_hs>;
242 };
243 };
244
245 port@1 {
246 reg = <1>;
247 dwc3_1_ss: endpoint {
248 remote-endpoint = <&atcphy1_usb3>;
249 };
250 };
251 };
252 };
253
254 &dwc3_2 {
255 ports {
256 #address-cells = <1>;
257 #size-cells = <0>;
258
259 port@0 {
260 reg = <0>;
261 dwc3_2_hs: endpoint {
262 remote-endpoint = <&typec2_connector_hs>;
263 };
264 };
265
266 port@1 {
267 reg = <1>;
268 dwc3_2_ss: endpoint {
269 remote-endpoint = <&atcphy2_usb3>;
270 };
271 };
272 };
273 };
274
275 /*
276 * ps_atc3_usb_aon power-domain is always-on to keep dwc3 working over suspend.
277 * atc3 is used exclusively for the DP-to-HDMI so do not keep this always on.
278 */
279 &ps_atc3_usb_aon {
280 /delete-property/ apple,always-on;
281 };
282
283 /* ATC3 is used for DisplayPort -> HDMI only */
284 &dwc3_3_dart_0 {
285 status = "disabled";
286 };
287
288 &dwc3_3_dart_1 {
289 status = "disabled";
290 };
291
292 &dwc3_3 {
293 status = "disabled";
294 };
295
296 /* Delete unused dwc3_3 to prevent dt_disable_missing_devs() from disabling
297 * atcphy3 via phandle references from a disablecd device.
298 */
299 /delete-node/ &dwc3_3;
300
301 /* Type-C PHYs */
302 &atcphy0 {
303 ports {
304 #address-cells = <1>;
305 #size-cells = <0>;
306
307 port@0 {
308 reg = <0>;
309 atcphy0_typec_lanes: endpoint {
310 remote-endpoint = <&typec0_connector_ss>;
311 };
312 };
313
314 port@1 {
315 reg = <1>;
316 atcphy0_usb3: endpoint {
317 remote-endpoint = <&dwc3_0_ss>;
318 };
319 };
320 };
321 };
322
323 &atcphy1 {
324 ports {
325 #address-cells = <1>;
326 #size-cells = <0>;
327
328 port@0 {
329 reg = <0>;
330 atcphy1_typec_lanes: endpoint {
331 remote-endpoint = <&typec1_connector_ss>;
332 };
333 };
334
335 port@1 {
336 reg = <1>;
337 atcphy1_usb3: endpoint {
338 remote-endpoint = <&dwc3_1_ss>;
339 };
340 };
341 };
342 };
343
344 &atcphy2 {
345 ports {
346 #address-cells = <1>;
347 #size-cells = <0>;
348
349 port@0 {
350 reg = <0>;
351 atcphy2_typec_lanes: endpoint {
352 remote-endpoint = <&typec2_connector_ss>;
353 };
354 };
355
356 port@1 {
357 reg = <1>;
358 atcphy2_usb3: endpoint {
359 remote-endpoint = <&dwc3_2_ss>;
360 };
361 };
362 };
363 };
364
365 &atcphy3 {
366 status = "disabled";
367 };
368
369 #include "spi1-nvram.dtsi"