|
| 1 | +// SPDX-License-Identifier: GPL-2.0+ OR MIT |
| 2 | +/* |
| 3 | + * Apple MacBook Air (M2, 2022) |
| 4 | + * |
| 5 | + * target-type: J413 |
| 6 | + * |
| 7 | + * Copyright The Asahi Linux Contributors |
| 8 | + */ |
| 9 | + |
| 10 | +/dts-v1/; |
| 11 | + |
| 12 | +#include "t8112.dtsi" |
| 13 | +#include "t8112-jxxx.dtsi" |
| 14 | +#include <dt-bindings/leds/common.h> |
| 15 | + |
| 16 | +/ { |
| 17 | + compatible = "apple,j413", "apple,t8112", "apple,arm-platform"; |
| 18 | + model = "Apple MacBook Air (13-inch, M2, 2022)"; |
| 19 | + |
| 20 | + aliases { |
| 21 | + bluetooth0 = &bluetooth0; |
| 22 | + wifi0 = &wifi0; |
| 23 | + keyboard = &keyboard; |
| 24 | + }; |
| 25 | + |
| 26 | + led-controller { |
| 27 | + compatible = "pwm-leds"; |
| 28 | + led-0 { |
| 29 | + pwms = <&fpwm1 0 40000>; |
| 30 | + label = "kbd_backlight"; |
| 31 | + function = LED_FUNCTION_KBD_BACKLIGHT; |
| 32 | + color = <LED_COLOR_ID_WHITE>; |
| 33 | + max-brightness = <255>; |
| 34 | + default-state = "keep"; |
| 35 | + }; |
| 36 | + }; |
| 37 | +}; |
| 38 | + |
| 39 | +&dcp { |
| 40 | + panel: panel { |
| 41 | + compatible = "apple,panel-j413", "apple,panel"; |
| 42 | + width-mm = <290>; |
| 43 | + height-mm = <189>; |
| 44 | + adj-height-mm = <181>; |
| 45 | + apple,max-brightness = <525>; |
| 46 | + }; |
| 47 | +}; |
| 48 | + |
| 49 | +/* |
| 50 | + * Force the bus number assignments so that we can declare some of the |
| 51 | + * on-board devices and properties that are populated by the bootloader |
| 52 | + * (such as MAC addresses). |
| 53 | + */ |
| 54 | +&port00 { |
| 55 | + bus-range = <1 1>; |
| 56 | + pwren-gpios = <&smc_gpio 13 GPIO_ACTIVE_HIGH>; |
| 57 | + wifi0: wifi@0,0 { |
| 58 | + compatible = "pci14e4,4433"; |
| 59 | + reg = <0x10000 0x0 0x0 0x0 0x0>; |
| 60 | + /* To be filled by the loader */ |
| 61 | + local-mac-address = [00 10 18 00 00 10]; |
| 62 | + apple,antenna-sku = "XX"; |
| 63 | + brcm,board-type = "apple,hokkaido"; |
| 64 | + }; |
| 65 | + |
| 66 | + bluetooth0: bluetooth@0,1 { |
| 67 | + compatible = "pci14e4,5f71"; |
| 68 | + reg = <0x10100 0x0 0x0 0x0 0x0>; |
| 69 | + /* To be filled by the loader */ |
| 70 | + local-bd-address = [00 00 00 00 00 00]; |
| 71 | + brcm,board-type = "apple,hokkaido"; |
| 72 | + }; |
| 73 | +}; |
| 74 | + |
| 75 | +/* |
| 76 | + * Provide labels for the USB type C ports. |
| 77 | + */ |
| 78 | + |
| 79 | +&typec0 { |
| 80 | + label = "USB-C Left-back"; |
| 81 | +}; |
| 82 | + |
| 83 | +&typec1 { |
| 84 | + label = "USB-C Left-front"; |
| 85 | +}; |
| 86 | + |
| 87 | +&i2c0 { |
| 88 | + /* MagSafe port */ |
| 89 | + hpm5: usb-pd@3a { |
| 90 | + compatible = "apple,cd321x"; |
| 91 | + reg = <0x3a>; |
| 92 | + interrupt-parent = <&pinctrl_ap>; |
| 93 | + interrupts = <8 IRQ_TYPE_LEVEL_LOW>; |
| 94 | + interrupt-names = "irq"; |
| 95 | + }; |
| 96 | +}; |
| 97 | + |
| 98 | +/* Virtual regulator representing the shared shutdown GPIO */ |
| 99 | +/ { |
| 100 | + speaker_sdz: fixed-regulator-sn012776-sdz { |
| 101 | + compatible = "regulator-fixed"; |
| 102 | + regulator-name = "sn012776-sdz"; |
| 103 | + startup-delay-us = <5000>; |
| 104 | + gpios = <&pinctrl_ap 88 GPIO_ACTIVE_HIGH>; |
| 105 | + enable-active-high; |
| 106 | + }; |
| 107 | +}; |
| 108 | + |
| 109 | +&i2c1 { |
| 110 | + speaker_left_woof: codec@38 { |
| 111 | + compatible = "ti,sn012776", "ti,tas2764"; |
| 112 | + reg = <0x38>; |
| 113 | + SDZ-supply = <&speaker_sdz>; |
| 114 | + #sound-dai-cells = <0>; |
| 115 | + sound-name-prefix = "Left Woofer"; |
| 116 | + interrupts-extended = <&pinctrl_ap 11 IRQ_TYPE_LEVEL_LOW>; |
| 117 | + ti,imon-slot-no = <0>; |
| 118 | + ti,vmon-slot-no = <2>; |
| 119 | + ti,sdout-force-zero-mask = <0xf0f0>; |
| 120 | + }; |
| 121 | + |
| 122 | + speaker_left_tweet: codec@39 { |
| 123 | + compatible = "ti,sn012776", "ti,tas2764"; |
| 124 | + reg = <0x39>; |
| 125 | + SDZ-supply = <&speaker_sdz>; |
| 126 | + #sound-dai-cells = <0>; |
| 127 | + sound-name-prefix = "Left Tweeter"; |
| 128 | + interrupts-extended = <&pinctrl_ap 11 IRQ_TYPE_LEVEL_LOW>; |
| 129 | + ti,imon-slot-no = <8>; |
| 130 | + ti,vmon-slot-no = <10>; |
| 131 | + }; |
| 132 | +}; |
| 133 | + |
| 134 | +&i2c3 { |
| 135 | + speaker_right_woof: codec@3b { |
| 136 | + compatible = "ti,sn012776", "ti,tas2764"; |
| 137 | + reg = <0x3b>; |
| 138 | + SDZ-supply = <&speaker_sdz>; |
| 139 | + #sound-dai-cells = <0>; |
| 140 | + sound-name-prefix = "Right Woofer"; |
| 141 | + interrupts-extended = <&pinctrl_ap 11 IRQ_TYPE_LEVEL_LOW>; |
| 142 | + ti,imon-slot-no = <4>; |
| 143 | + ti,vmon-slot-no = <6>; |
| 144 | + ti,sdout-force-zero-mask = <0x0f0f>; |
| 145 | + }; |
| 146 | + |
| 147 | + speaker_right_tweet: codec@3c { |
| 148 | + compatible = "ti,sn012776", "ti,tas2764"; |
| 149 | + reg = <0x3c>; |
| 150 | + SDZ-supply = <&speaker_sdz>; |
| 151 | + #sound-dai-cells = <0>; |
| 152 | + sound-name-prefix = "Right Tweeter"; |
| 153 | + interrupts-extended = <&pinctrl_ap 11 IRQ_TYPE_LEVEL_LOW>; |
| 154 | + ti,imon-slot-no = <12>; |
| 155 | + ti,vmon-slot-no = <14>; |
| 156 | + }; |
| 157 | + |
| 158 | + jack_codec: codec@4b { |
| 159 | + compatible = "cirrus,cs42l84"; |
| 160 | + reg = <0x4b>; |
| 161 | + reset-gpios = <&pinctrl_nub 12 GPIO_ACTIVE_HIGH>; |
| 162 | + #sound-dai-cells = <0>; |
| 163 | + interrupts-extended = <&pinctrl_ap 149 IRQ_TYPE_LEVEL_LOW>; |
| 164 | + sound-name-prefix = "Jack"; |
| 165 | + }; |
| 166 | +}; |
| 167 | + |
| 168 | +&i2c4 { |
| 169 | + status = "okay"; |
| 170 | +}; |
| 171 | + |
| 172 | +&fpwm1 { |
| 173 | + status = "okay"; |
| 174 | +}; |
| 175 | + |
| 176 | +/ { |
| 177 | + sound { |
| 178 | + compatible = "apple,j413-macaudio", "apple,macaudio"; |
| 179 | + model = "MacBook Air J413"; |
| 180 | + |
| 181 | + dai-link@0 { |
| 182 | + link-name = "Speakers"; |
| 183 | + |
| 184 | + cpu { |
| 185 | + sound-dai = <&mca 0>, <&mca 1>; |
| 186 | + }; |
| 187 | + codec { |
| 188 | + sound-dai = <&speaker_left_woof>, <&speaker_left_tweet>, |
| 189 | + <&speaker_right_woof>, <&speaker_right_tweet>; |
| 190 | + }; |
| 191 | + }; |
| 192 | + |
| 193 | + dai-link@1 { |
| 194 | + link-name = "Headphone Jack"; |
| 195 | + |
| 196 | + cpu { |
| 197 | + sound-dai = <&mca 2>; |
| 198 | + }; |
| 199 | + codec { |
| 200 | + sound-dai = <&jack_codec>; |
| 201 | + }; |
| 202 | + }; |
| 203 | + }; |
| 204 | +}; |
| 205 | + |
| 206 | +&mtp { |
| 207 | + status = "okay"; |
| 208 | +}; |
| 209 | +&mtp_mbox { |
| 210 | + status = "okay"; |
| 211 | +}; |
| 212 | +&mtp_dart { |
| 213 | + status = "okay"; |
| 214 | +}; |
| 215 | +&mtp_dockchannel { |
| 216 | + status = "okay"; |
| 217 | +}; |
| 218 | +&mtp_hid { |
| 219 | + multi-touch { |
| 220 | + apple,afe-reset-gpios = <&smc_gpio 8 GPIO_ACTIVE_LOW>; |
| 221 | + firmware-name = "apple/tpmtfw-j413.bin"; |
| 222 | + }; |
| 223 | + |
| 224 | + keyboard: keyboard { |
| 225 | + hid-country-code = <0>; |
| 226 | + apple,keyboard-layout-id = <0>; |
| 227 | + }; |
| 228 | + |
| 229 | + stm { |
| 230 | + apple,stm-reset-gpios = <&smc_gpio 24 GPIO_ACTIVE_LOW>; |
| 231 | + }; |
| 232 | + |
| 233 | + actuator { |
| 234 | + }; |
| 235 | + |
| 236 | + tp_accel { |
| 237 | + }; |
| 238 | +}; |
| 239 | + |
| 240 | +#include "isp-imx558-cfg0.dtsi" |
| 241 | + |
| 242 | +&isp { |
| 243 | + apple,platform-id = <14>; |
| 244 | + apple,temporal-filter = <1>; |
| 245 | +}; |
0 commit comments