Mark Kettenis | 2ec941f | 2021-10-23 16:58:06 +0200 | [diff] [blame] | 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" |
Mark Kettenis | aba8f2a | 2022-01-10 20:58:42 +0100 | [diff] [blame] | 13 | #include "t8103-jxxx.dtsi" |
Mark Kettenis | 2ec941f | 2021-10-23 16:58:06 +0200 | [diff] [blame] | 14 | |
| 15 | / { |
| 16 | compatible = "apple,j274", "apple,t8103", "apple,arm-platform"; |
| 17 | model = "Apple Mac mini (M1, 2020)"; |
| 18 | |
| 19 | aliases { |
Mark Kettenis | aba8f2a | 2022-01-10 20:58:42 +0100 | [diff] [blame] | 20 | ethernet0 = ðernet0; |
Mark Kettenis | 2ec941f | 2021-10-23 16:58:06 +0200 | [diff] [blame] | 21 | }; |
| 22 | }; |
| 23 | |
Mark Kettenis | aba8f2a | 2022-01-10 20:58:42 +0100 | [diff] [blame] | 24 | &wifi0 { |
| 25 | brcm,board-type = "apple,atlantisb"; |
Mark Kettenis | 2ec941f | 2021-10-23 16:58:06 +0200 | [diff] [blame] | 26 | }; |
| 27 | |
Mark Kettenis | aba8f2a | 2022-01-10 20:58:42 +0100 | [diff] [blame] | 28 | /* |
| 29 | * Provide labels for the USB type C ports. |
| 30 | */ |
Mark Kettenis | 2ec941f | 2021-10-23 16:58:06 +0200 | [diff] [blame] | 31 | |
Mark Kettenis | aba8f2a | 2022-01-10 20:58:42 +0100 | [diff] [blame] | 32 | &typec0 { |
| 33 | label = "USB-C Back-left"; |
Mark Kettenis | 2ec941f | 2021-10-23 16:58:06 +0200 | [diff] [blame] | 34 | }; |
| 35 | |
Mark Kettenis | aba8f2a | 2022-01-10 20:58:42 +0100 | [diff] [blame] | 36 | &typec1 { |
| 37 | label = "USB-C Back-right"; |
Mark Kettenis | 2ec941f | 2021-10-23 16:58:06 +0200 | [diff] [blame] | 38 | }; |
| 39 | |
Mark Kettenis | aba8f2a | 2022-01-10 20:58:42 +0100 | [diff] [blame] | 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 | */ |
Mark Kettenis | 2ec941f | 2021-10-23 16:58:06 +0200 | [diff] [blame] | 45 | |
Mark Kettenis | aba8f2a | 2022-01-10 20:58:42 +0100 | [diff] [blame] | 46 | &port01 { |
| 47 | bus-range = <2 2>; |
| 48 | }; |
Mark Kettenis | 2ec941f | 2021-10-23 16:58:06 +0200 | [diff] [blame] | 49 | |
Mark Kettenis | aba8f2a | 2022-01-10 20:58:42 +0100 | [diff] [blame] | 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]; |
Mark Kettenis | 2ec941f | 2021-10-23 16:58:06 +0200 | [diff] [blame] | 56 | }; |
Mark Kettenis | aba8f2a | 2022-01-10 20:58:42 +0100 | [diff] [blame] | 57 | }; |
Mark Kettenis | 2ec941f | 2021-10-23 16:58:06 +0200 | [diff] [blame] | 58 | |
Mark Kettenis | aba8f2a | 2022-01-10 20:58:42 +0100 | [diff] [blame] | 59 | &i2c1 { |
| 60 | clock-frequency = <50000>; |
Mark Kettenis | 2ec941f | 2021-10-23 16:58:06 +0200 | [diff] [blame] | 61 | |
Mark Kettenis | aba8f2a | 2022-01-10 20:58:42 +0100 | [diff] [blame] | 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>; |
Mark Kettenis | 2ec941f | 2021-10-23 16:58:06 +0200 | [diff] [blame] | 67 | }; |
Mark Kettenis | aba8f2a | 2022-01-10 20:58:42 +0100 | [diff] [blame] | 68 | }; |
Mark Kettenis | 2ec941f | 2021-10-23 16:58:06 +0200 | [diff] [blame] | 69 | |
Mark Kettenis | aba8f2a | 2022-01-10 20:58:42 +0100 | [diff] [blame] | 70 | &i2c2 { |
| 71 | status = "okay"; |
Mark Kettenis | 2ec941f | 2021-10-23 16:58:06 +0200 | [diff] [blame] | 72 | |
Mark Kettenis | aba8f2a | 2022-01-10 20:58:42 +0100 | [diff] [blame] | 73 | clock-frequency = <50000>; |
Mark Kettenis | 2ec941f | 2021-10-23 16:58:06 +0200 | [diff] [blame] | 74 | |
Mark Kettenis | aba8f2a | 2022-01-10 20:58:42 +0100 | [diff] [blame] | 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>; |
Mark Kettenis | 2ec941f | 2021-10-23 16:58:06 +0200 | [diff] [blame] | 83 | }; |
| 84 | }; |
| 85 | |
Mark Kettenis | aba8f2a | 2022-01-10 20:58:42 +0100 | [diff] [blame] | 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>; |
Mark Kettenis | 2ec941f | 2021-10-23 16:58:06 +0200 | [diff] [blame] | 92 | |
Mark Kettenis | aba8f2a | 2022-01-10 20:58:42 +0100 | [diff] [blame] | 93 | simple-audio-card,dai-link@0 { |
| 94 | reg = <0>; |
| 95 | format = "left_j"; |
| 96 | tdm-slot-width = <32>; |
| 97 | mclk-fs = <64>; |
Mark Kettenis | 2ec941f | 2021-10-23 16:58:06 +0200 | [diff] [blame] | 98 | |
Mark Kettenis | aba8f2a | 2022-01-10 20:58:42 +0100 | [diff] [blame] | 99 | link0_cpu: cpu { |
| 100 | sound-dai = <&mca 0>; |
| 101 | bitclock-master; |
| 102 | frame-master; |
| 103 | }; |
Mark Kettenis | 2ec941f | 2021-10-23 16:58:06 +0200 | [diff] [blame] | 104 | |
Mark Kettenis | aba8f2a | 2022-01-10 20:58:42 +0100 | [diff] [blame] | 105 | link0_codec: codec { |
| 106 | sound-dai = <&speaker_amp>; |
| 107 | }; |
| 108 | }; |
Mark Kettenis | 2ec941f | 2021-10-23 16:58:06 +0200 | [diff] [blame] | 109 | |
Mark Kettenis | aba8f2a | 2022-01-10 20:58:42 +0100 | [diff] [blame] | 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>; |
Mark Kettenis | 2ec941f | 2021-10-23 16:58:06 +0200 | [diff] [blame] | 117 | |
Mark Kettenis | aba8f2a | 2022-01-10 20:58:42 +0100 | [diff] [blame] | 118 | link1_cpu: cpu { |
| 119 | sound-dai = <&mca 2>; |
| 120 | bitclock-master; |
| 121 | frame-master; |
| 122 | }; |
Mark Kettenis | 2ec941f | 2021-10-23 16:58:06 +0200 | [diff] [blame] | 123 | |
Mark Kettenis | aba8f2a | 2022-01-10 20:58:42 +0100 | [diff] [blame] | 124 | link1_codec: codec { |
| 125 | sound-dai = <&jack_codec>; |
| 126 | }; |
| 127 | }; |
| 128 | }; |
Mark Kettenis | 2ec941f | 2021-10-23 16:58:06 +0200 | [diff] [blame] | 129 | }; |