blob: 9bc592bcdbfd74e4470cbb4b9dbba8acf99a4498 [file] [log] [blame]
Mark Kettenis2ec941f2021-10-23 16:58:06 +02001// SPDX-License-Identifier: GPL-2.0+ OR MIT
2/*
3 * Apple Mac mini (M1, 2020)
4 *
5 * target-type: J274
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,j274", "apple,t8103", "apple,arm-platform";
17 model = "Apple Mac mini (M1, 2020)";
18
19 aliases {
Mark Kettenisaba8f2a2022-01-10 20:58:42 +010020 ethernet0 = &ethernet0;
Mark Kettenis2ec941f2021-10-23 16:58:06 +020021 };
22};
23
Mark Kettenisaba8f2a2022-01-10 20:58:42 +010024&wifi0 {
25 brcm,board-type = "apple,atlantisb";
Mark Kettenis2ec941f2021-10-23 16:58:06 +020026};
27
Mark Kettenisaba8f2a2022-01-10 20:58:42 +010028/*
29 * Provide labels for the USB type C ports.
30 */
Mark Kettenis2ec941f2021-10-23 16:58:06 +020031
Mark Kettenisaba8f2a2022-01-10 20:58:42 +010032&typec0 {
33 label = "USB-C Back-left";
Mark Kettenis2ec941f2021-10-23 16:58:06 +020034};
35
Mark Kettenisaba8f2a2022-01-10 20:58:42 +010036&typec1 {
37 label = "USB-C Back-right";
Mark Kettenis2ec941f2021-10-23 16:58:06 +020038};
39
Mark Kettenisaba8f2a2022-01-10 20:58:42 +010040/*
41 * Force the bus number assignments so that we can declare some of the
42 * on-board devices and properties that are populated by the bootloader
43 * (such as MAC addresses).
44 */
Mark Kettenis2ec941f2021-10-23 16:58:06 +020045
Mark Kettenisaba8f2a2022-01-10 20:58:42 +010046&port01 {
47 bus-range = <2 2>;
48};
Mark Kettenis2ec941f2021-10-23 16:58:06 +020049
Mark Kettenisaba8f2a2022-01-10 20:58:42 +010050&port02 {
51 bus-range = <3 3>;
52 ethernet0: ethernet@0,0 {
53 reg = <0x30000 0x0 0x0 0x0 0x0>;
54 /* To be filled by the loader */
55 local-mac-address = [00 10 18 00 00 00];
Mark Kettenis2ec941f2021-10-23 16:58:06 +020056 };
Mark Kettenisaba8f2a2022-01-10 20:58:42 +010057};
Mark Kettenis2ec941f2021-10-23 16:58:06 +020058
Mark Kettenisaba8f2a2022-01-10 20:58:42 +010059&i2c1 {
60 clock-frequency = <50000>;
Mark Kettenis2ec941f2021-10-23 16:58:06 +020061
Mark Kettenisaba8f2a2022-01-10 20:58:42 +010062 speaker_amp: codec@31 {
63 compatible = "ti,tas5770l", "ti,tas2770";
64 reg = <0x31>;
65 reset-gpios = <&pinctrl_ap 181 GPIO_ACTIVE_HIGH>;
66 #sound-dai-cells = <0>;
Mark Kettenis2ec941f2021-10-23 16:58:06 +020067 };
Mark Kettenisaba8f2a2022-01-10 20:58:42 +010068};
Mark Kettenis2ec941f2021-10-23 16:58:06 +020069
Mark Kettenisaba8f2a2022-01-10 20:58:42 +010070&i2c2 {
71 status = "okay";
Mark Kettenis2ec941f2021-10-23 16:58:06 +020072
Mark Kettenisaba8f2a2022-01-10 20:58:42 +010073 clock-frequency = <50000>;
Mark Kettenis2ec941f2021-10-23 16:58:06 +020074
Mark Kettenisaba8f2a2022-01-10 20:58:42 +010075 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>;
Mark Kettenis2ec941f2021-10-23 16:58:06 +020083 };
84};
85
Mark Kettenisaba8f2a2022-01-10 20:58:42 +010086/ {
87 sound {
88 compatible = "simple-audio-card";
89 simple-audio-card,name = "Mac mini integrated audio";
90 #address-cells = <1>;
91 #size-cells = <0>;
Mark Kettenis2ec941f2021-10-23 16:58:06 +020092
Mark Kettenisaba8f2a2022-01-10 20:58:42 +010093 simple-audio-card,dai-link@0 {
94 reg = <0>;
95 format = "left_j";
96 tdm-slot-width = <32>;
97 mclk-fs = <64>;
Mark Kettenis2ec941f2021-10-23 16:58:06 +020098
Mark Kettenisaba8f2a2022-01-10 20:58:42 +010099 link0_cpu: cpu {
100 sound-dai = <&mca 0>;
101 bitclock-master;
102 frame-master;
103 };
Mark Kettenis2ec941f2021-10-23 16:58:06 +0200104
Mark Kettenisaba8f2a2022-01-10 20:58:42 +0100105 link0_codec: codec {
106 sound-dai = <&speaker_amp>;
107 };
108 };
Mark Kettenis2ec941f2021-10-23 16:58:06 +0200109
Mark Kettenisaba8f2a2022-01-10 20:58:42 +0100110 simple-audio-card,dai-link@1 {
111 bitclock-inversion;
112 frame-inversion;
113 reg = <1>;
114 format = "i2s";
115 mclk-fs = <64>;
116 tdm-slot-width = <32>;
Mark Kettenis2ec941f2021-10-23 16:58:06 +0200117
Mark Kettenisaba8f2a2022-01-10 20:58:42 +0100118 link1_cpu: cpu {
119 sound-dai = <&mca 2>;
120 bitclock-master;
121 frame-master;
122 };
Mark Kettenis2ec941f2021-10-23 16:58:06 +0200123
Mark Kettenisaba8f2a2022-01-10 20:58:42 +0100124 link1_codec: codec {
125 sound-dai = <&jack_codec>;
126 };
127 };
128 };
Mark Kettenis2ec941f2021-10-23 16:58:06 +0200129};