1// SPDX-License-Identifier: GPL-2.0+ OR MIT
2/*
3 * Apple MacBook Pro (13-inch, M1, 2020)
4 *
5 * target-type: J293
6 *
7 * Copyright The Asahi Linux Contributors
8 */
9
10/dts-v1/;
11
12#include "t8103.dtsi"
13#include "t8103-jxxx.dtsi"
14#include <dt-bindings/leds/common.h>
15
16/ {
17	compatible = "apple,j293", "apple,t8103", "apple,arm-platform";
18	model = "Apple MacBook Pro (13-inch, M1, 2020)";
19
20	/*
21	 * All of those are used by the bootloader to pass calibration
22	 * blobs and other device-specific properties
23	 */
24	aliases {
25		touchbar0 = &touchbar0;
26	};
27
28	led-controller {
29		compatible = "pwm-leds";
30		led-0 {
31			pwms = <&fpwm1 0 40000>;
32			label = "kbd_backlight";
33			function = LED_FUNCTION_KBD_BACKLIGHT;
34			color = <LED_COLOR_ID_WHITE>;
35			max-brightness = <255>;
36			default-state = "keep";
37		};
38	};
39};
40
41&bluetooth0 {
42	brcm,board-type = "apple,honshu";
43};
44
45&wifi0 {
46	brcm,board-type = "apple,honshu";
47};
48
49&i2c2 {
50	status = "okay";
51};
52
53&i2c4 {
54	status = "okay";
55};
56
57&fpwm1 {
58	status = "okay";
59};
60
61&spi0 {
62	cs-gpios = <&pinctrl_ap 109 GPIO_ACTIVE_LOW>;
63	status = "okay";
64
65	touchbar0: touchbar@0 {
66		compatible = "apple,j293-touchbar";
67		reg = <0>;
68		spi-max-frequency = <11500000>;
69		spi-cs-setup-delay-ns = <2000>;
70		spi-cs-hold-delay-ns = <2000>;
71		reset-gpios = <&pinctrl_ap 139 GPIO_ACTIVE_LOW>;
72		interrupts-extended = <&pinctrl_ap 194 IRQ_TYPE_EDGE_FALLING>;
73		firmware-name = "apple/dfrmtfw-j293.bin";
74		touchscreen-size-x = <23045>;
75		touchscreen-size-y = <640>;
76		touchscreen-inverted-y;
77	};
78};
79
80/*
81 * The driver depends on boot loader initialized state which resets when this
82 * power-domain is powered off. This happens on suspend or when the driver is
83 * missing during boot. Mark the domain as always on until the driver can
84 * handle this.
85 */
86&ps_dispdfr_be {
87	apple,always-on;
88};
89
90&display_dfr {
91	status = "okay";
92};
93
94&dfr_mipi_out {
95	dfr_mipi_out_panel: endpoint@0 {
96		reg = <0>;
97		remote-endpoint = <&dfr_panel_in>;
98	};
99};
100
101&displaydfr_mipi {
102	status = "okay";
103
104	dfr_panel: panel@0 {
105		compatible = "apple,j293-summit", "apple,summit";
106		reg = <0>;
107		max-brightness = <255>;
108
109		port {
110			dfr_panel_in: endpoint {
111				remote-endpoint = <&dfr_mipi_out_panel>;
112			};
113		};
114	};
115};
116
117&displaydfr_dart {
118	status = "okay";
119};
120