blob: de1a21d97cd7ce8add450dd10e8a132eadbaf0b2 [file] [log] [blame]
Mark Kettenis3dfef532021-10-23 16:58:06 +02001// SPDX-License-Identifier: GPL-2.0+ OR MIT
2/*
Mark Kettenisc918e2c2022-01-10 20:58:42 +01003 * Apple MacBook Pro (13-inch, M1, 2020)
Mark Kettenis3dfef532021-10-23 16:58:06 +02004 *
5 * target-type: J293
6 *
7 * Copyright The Asahi Linux Contributors
8 */
9
10/dts-v1/;
11
12#include "t8103.dtsi"
Mark Kettenisc918e2c2022-01-10 20:58:42 +010013#include "t8103-jxxx.dtsi"
Mark Kettenis3dfef532021-10-23 16:58:06 +020014
15/ {
16 compatible = "apple,j293", "apple,t8103", "apple,arm-platform";
Mark Kettenisc918e2c2022-01-10 20:58:42 +010017 model = "Apple MacBook Pro (13-inch, M1, 2020)";
18};
Mark Kettenis3dfef532021-10-23 16:58:06 +020019
Mark Kettenisc918e2c2022-01-10 20:58:42 +010020&wifi0 {
21 brcm,board-type = "apple,honshu";
22};
23
24/*
25 * Provide labels for the USB type C ports.
26 */
27
28&typec0 {
29 label = "USB-C Left-back";
30};
31
32&typec1 {
33 label = "USB-C Left-front";
34};
35
36&spi3 {
37 status = "okay";
38
39 hid-transport@0 {
40 compatible = "apple,spi-hid-transport";
41 reg = <0>;
42 spi-max-frequency = <8000000>;
43 /*
44 * cs-setup and cs-hold delays are derived from Apple's ADT
45 * Mac OS driver meta data secify 45 us for 'cs to clock' and
46 * 'clock to cs' delays.
47 */
48 spi-cs-setup-delay-ns = <20000>;
49 spi-cs-hold-delay-ns = <20000>;
50 spi-cs-inactive-delay-ns = <250000>;
51 spien-gpios = <&pinctrl_ap 195 0>;
52 interrupts-extended = <&pinctrl_nub 13 IRQ_TYPE_LEVEL_LOW>;
Mark Kettenis3dfef532021-10-23 16:58:06 +020053 };
Mark Kettenisc918e2c2022-01-10 20:58:42 +010054};
Mark Kettenis3dfef532021-10-23 16:58:06 +020055
Mark Kettenisc918e2c2022-01-10 20:58:42 +010056/*
57 * Remove unused PCIe ports and disable the associated DARTs.
58 */
Mark Kettenis3dfef532021-10-23 16:58:06 +020059
Mark Kettenisc918e2c2022-01-10 20:58:42 +010060&pcie0_dart_1 {
61 status = "disabled";
62};
Mark Kettenis3dfef532021-10-23 16:58:06 +020063
Mark Kettenisc918e2c2022-01-10 20:58:42 +010064&pcie0_dart_2 {
65 status = "disabled";
66};
67
68/delete-node/ &port01;
69/delete-node/ &port02;
70
71&i2c2 {
72 status = "okay";
73 clock-frequency = <50000>;
74
75 jack_codec: codec@48 {
76 compatible = "cirrus,cs42l83", "cirrus,cs42l42";
77 reg = <0x48>;
78 reset-gpios = <&pinctrl_nub 11 GPIO_ACTIVE_HIGH>;
79 interrupt-parent = <&pinctrl_ap>;
80 interrupts = <183 IRQ_TYPE_LEVEL_LOW>;
81 #sound-dai-cells = <0>;
82 cirrus,ts-inv = <1>;
83 };
84};
85
86&i2c4 {
87 status = "okay";
88};
89
90/ {
91 sound {
92 compatible = "simple-audio-card";
93 simple-audio-card,name = "MacBook integrated audio";
94 #address-cells = <1>;
95 #size-cells = <0>;
96
97 simple-audio-card,dai-link@0 {
98 bitclock-inversion;
99 frame-inversion;
100 reg = <0>;
101 format = "i2s";
102 mclk-fs = <64>;
103 tdm-slot-width = <32>;
104
105 link0_cpu: cpu {
106 sound-dai = <&mca 2>;
107 bitclock-master;
108 frame-master;
109 };
110
111 link0_codec: codec {
112 sound-dai = <&jack_codec>;
113 };
Mark Kettenis3dfef532021-10-23 16:58:06 +0200114 };
115 };
Mark Kettenis3dfef532021-10-23 16:58:06 +0200116};