blob: 8624168bdb73d6c891b0c8ea5f4c5c783573abf9 [file] [log] [blame]
Mark Kettenisc918e2c2022-01-10 20:58:42 +01001// SPDX-License-Identifier: GPL-2.0+ OR MIT
2/*
3 * Apple iMac (24-inch, 4x USB-C, M1, 2020)
4 *
5 * target-type: J456
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,j456", "apple,t8103", "apple,arm-platform";
17 model = "Apple iMac (24-inch, 4x USB-C, M1, 2020)";
18
19 aliases {
20 ethernet0 = &ethernet0;
21 };
22};
23
24&wifi0 {
25 brcm,board-type = "apple,capri";
26};
27
28&i2c0 {
29 hpm2: usb-pd@3b {
30 compatible = "apple,cd321x";
31 reg = <0x3b>;
32 interrupt-parent = <&pinctrl_ap>;
33 interrupts = <106 IRQ_TYPE_LEVEL_LOW>;
34 interrupt-names = "irq";
35 };
36
37 hpm3: usb-pd@3c {
38 compatible = "apple,cd321x";
39 reg = <0x3c>;
40 interrupt-parent = <&pinctrl_ap>;
41 interrupts = <106 IRQ_TYPE_LEVEL_LOW>;
42 interrupt-names = "irq";
43 };
44};
45
46/*
47 * Provide labels for the USB type C ports.
48 */
49
50&typec0 {
51 label = "USB-C Back-right";
52};
53
54&typec1 {
55 label = "USB-C Back-right-middle";
56};
57
58/*
59 * Force the bus number assignments so that we can declare some of the
60 * on-board devices and properties that are populated by the bootloader
61 * (such as MAC addresses).
62 */
63
64&port01 {
65 bus-range = <2 2>;
66};
67
68&port02 {
69 bus-range = <3 3>;
70 ethernet0: ethernet@0,0 {
71 reg = <0x30000 0x0 0x0 0x0 0x0>;
72 /* To be filled by the loader */
73 local-mac-address = [00 10 18 00 00 00];
74 };
75};
76
77&i2c1 {
78 clock-frequency = <50000>;
79
80 jack_codec: codec@48 {
81 compatible = "cirrus,cs42l83", "cirrus,cs42l42";
82 reg = <0x48>;
83 reset-gpios = <&pinctrl_nub 11 GPIO_ACTIVE_HIGH>;
84 interrupt-parent = <&pinctrl_ap>;
85 interrupts = <183 IRQ_TYPE_LEVEL_LOW>;
86 #sound-dai-cells = <0>;
87 cirrus,ts-inv = <1>;
88 };
89};
90
91/ {
92 sound {
93 compatible = "simple-audio-card";
94 simple-audio-card,name = "iMac integrated audio";
95 #address-cells = <1>;
96 #size-cells = <0>;
97
98 simple-audio-card,dai-link@0 {
99 bitclock-inversion;
100 frame-inversion;
101 reg = <0>;
102 format = "i2s";
103 mclk-fs = <64>;
104 tdm-slot-width = <32>;
105
106 link0_cpu: cpu {
107 sound-dai = <&mca 2>;
108 bitclock-master;
109 frame-master;
110 };
111
112 link0_codec: codec {
113 sound-dai = <&jack_codec>;
114 };
115 };
116 };
117};