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	aliases {
16		serial0 = &serial0;
17		wifi0 = &wifi0;
18	};
19
20	chosen {
21		#address-cells = <2>;
22		#size-cells = <2>;
23		ranges;
24
25		stdout-path = "serial0";
26
27		framebuffer0: framebuffer@0 {
28			compatible = "apple,simple-framebuffer", "simple-framebuffer";
29			reg = <0 0 0 0>; /* To be filled by loader */
30			/* Format properties will be added by loader */
31			status = "disabled";
32		};
33	};
34
35	memory@10000000000 {
36		device_type = "memory";
37		reg = <0x100 0 0x2 0>; /* To be filled by loader */
38	};
39
40	led-controller {
41		compatible = "pwm-leds";
42		led-0 {
43			pwms = <&fpwm0 0 40000>;
44			label = "kbd_backlight";
45			function = LED_FUNCTION_KBD_BACKLIGHT;
46			color = <LED_COLOR_ID_WHITE>;
47			max-brightness = <255>;
48			default-state = "keep";
49		};
50	};
51};
52
53&serial0 {
54	status = "okay";
55};
56
57/* USB Type C */
58&i2c0 {
59	hpm0: usb-pd@38 {
60		compatible = "apple,cd321x";
61		reg = <0x38>;
62		interrupt-parent = <&pinctrl_ap>;
63		interrupts = <174 IRQ_TYPE_LEVEL_LOW>;
64		interrupt-names = "irq";
65	};
66
67	hpm1: usb-pd@3f {
68		compatible = "apple,cd321x";
69		reg = <0x3f>;
70		interrupt-parent = <&pinctrl_ap>;
71		interrupts = <174 IRQ_TYPE_LEVEL_LOW>;
72		interrupt-names = "irq";
73	};
74
75	hpm2: usb-pd@3b {
76		compatible = "apple,cd321x";
77		reg = <0x3b>;
78		interrupt-parent = <&pinctrl_ap>;
79		interrupts = <174 IRQ_TYPE_LEVEL_LOW>;
80		interrupt-names = "irq";
81	};
82
83	/* MagSafe port */
84	hpm5: usb-pd@3a {
85		compatible = "apple,cd321x";
86		reg = <0x3a>;
87		interrupt-parent = <&pinctrl_ap>;
88		interrupts = <174 IRQ_TYPE_LEVEL_LOW>;
89		interrupt-names = "irq";
90	};
91};
92
93&nco_clkref {
94	clock-frequency = <1068000000>;
95};
96
97/* PCIe devices */
98&port00 {
99	/* WLAN */
100	bus-range = <1 1>;
101	wifi0: wifi@0,0 {
102		reg = <0x10000 0x0 0x0 0x0 0x0>;
103		/* To be filled by the loader */
104		local-mac-address = [00 10 18 00 00 10];
105	};
106};
107
108&port01 {
109	/* SD card reader */
110	bus-range = <2 2>;
111	sdhci0: mmc@0,0 {
112		compatible = "pci17a0,9755";
113		reg = <0x20000 0x0 0x0 0x0 0x0>;
114		cd-inverted;
115		wp-inverted;
116	};
117};
118
119&fpwm0 {
120	status = "okay";
121};
122