blob: de1a21d97cd7ce8add450dd10e8a132eadbaf0b2 [file] [log] [blame]
Mark Kettenis2ec941f2021-10-23 16:58:06 +02001// SPDX-License-Identifier: GPL-2.0+ OR MIT
2/*
Mark Kettenisaba8f2a2022-01-10 20:58:42 +01003 * Apple MacBook Pro (13-inch, M1, 2020)
Mark Kettenis2ec941f2021-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 Kettenisaba8f2a2022-01-10 20:58:42 +010013#include "t8103-jxxx.dtsi"
Mark Kettenis2ec941f2021-10-23 16:58:06 +020014
15/ {
16 compatible = "apple,j293", "apple,t8103", "apple,arm-platform";
Mark Kettenisaba8f2a2022-01-10 20:58:42 +010017 model = "Apple MacBook Pro (13-inch, M1, 2020)";
18};
Mark Kettenis2ec941f2021-10-23 16:58:06 +020019
Mark Kettenisaba8f2a2022-01-10 20:58:42 +010020&wifi0 {
21 brcm,board-type = "apple,honshu";
Mark Kettenis2ec941f2021-10-23 16:58:06 +020022};
23
Mark Kettenisaba8f2a2022-01-10 20:58:42 +010024/*
25 * Provide labels for the USB type C ports.
26 */
27
28&typec0 {
29 label = "USB-C Left-back";
Mark Kettenis2ec941f2021-10-23 16:58:06 +020030};
31
Mark Kettenisaba8f2a2022-01-10 20:58:42 +010032&typec1 {
33 label = "USB-C Left-front";
Mark Kettenis2ec941f2021-10-23 16:58:06 +020034};
35
Mark Kettenisaba8f2a2022-01-10 20:58:42 +010036&spi3 {
Mark Kettenis2ec941f2021-10-23 16:58:06 +020037 status = "okay";
38
Mark Kettenisaba8f2a2022-01-10 20:58:42 +010039 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 Kettenis2ec941f2021-10-23 16:58:06 +020053 };
54};
55
Mark Kettenisaba8f2a2022-01-10 20:58:42 +010056/*
57 * Remove unused PCIe ports and disable the associated DARTs.
58 */
Mark Kettenis2ec941f2021-10-23 16:58:06 +020059
Mark Kettenisaba8f2a2022-01-10 20:58:42 +010060&pcie0_dart_1 {
61 status = "disabled";
Mark Kettenis2ec941f2021-10-23 16:58:06 +020062};
63
Mark Kettenisaba8f2a2022-01-10 20:58:42 +010064&pcie0_dart_2 {
65 status = "disabled";
Mark Kettenis2ec941f2021-10-23 16:58:06 +020066};
67
Mark Kettenisaba8f2a2022-01-10 20:58:42 +010068/delete-node/ &port01;
69/delete-node/ &port02;
Mark Kettenis2ec941f2021-10-23 16:58:06 +020070
Mark Kettenisaba8f2a2022-01-10 20:58:42 +010071&i2c2 {
Mark Kettenis2ec941f2021-10-23 16:58:06 +020072 status = "okay";
Mark Kettenisaba8f2a2022-01-10 20:58:42 +010073 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 };
Mark Kettenis2ec941f2021-10-23 16:58:06 +020084};
85
Mark Kettenisaba8f2a2022-01-10 20:58:42 +010086&i2c4 {
Mark Kettenis2ec941f2021-10-23 16:58:06 +020087 status = "okay";
88};
89
Mark Kettenisaba8f2a2022-01-10 20:58:42 +010090/ {
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 };
114 };
115 };
Mark Kettenis2ec941f2021-10-23 16:58:06 +0200116};