arm: dts: apple: Update Apple M1 device trees
[pandora-u-boot.git] / arch / arm / dts / t8103-j274.dts
1 // 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"
13 #include "t8103-jxxx.dtsi"
14
15 / {
16         compatible = "apple,j274", "apple,t8103", "apple,arm-platform";
17         model = "Apple Mac mini (M1, 2020)";
18
19         aliases {
20                 ethernet0 = &ethernet0;
21         };
22 };
23
24 &wifi0 {
25         brcm,board-type = "apple,atlantisb";
26 };
27
28 /*
29  * Provide labels for the USB type C ports.
30  */
31
32 &typec0 {
33         label = "USB-C Back-left";
34 };
35
36 &typec1 {
37         label = "USB-C Back-right";
38 };
39
40 /*
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  */
45
46 &port01 {
47         bus-range = <2 2>;
48 };
49
50 &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];
56         };
57 };
58
59 &i2c1 {
60         clock-frequency = <50000>;
61
62         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>;
67         };
68 };
69
70 &i2c2 {
71         status = "okay";
72
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 / {
87         sound {
88                 compatible = "simple-audio-card";
89                 simple-audio-card,name = "Mac mini integrated audio";
90                 #address-cells = <1>;
91                 #size-cells = <0>;
92
93                 simple-audio-card,dai-link@0 {
94                         reg = <0>;
95                         format = "left_j";
96                         tdm-slot-width = <32>;
97                         mclk-fs = <64>;
98
99                         link0_cpu: cpu {
100                                 sound-dai = <&mca 0>;
101                                 bitclock-master;
102                                 frame-master;
103                         };
104
105                         link0_codec: codec {
106                                 sound-dai = <&speaker_amp>;
107                         };
108                 };
109
110                 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>;
117
118                         link1_cpu: cpu {
119                                 sound-dai = <&mca 2>;
120                                 bitclock-master;
121                                 frame-master;
122                         };
123
124                         link1_codec: codec {
125                                 sound-dai = <&jack_codec>;
126                         };
127                 };
128         };
129 };