Mark Kettenis | aba8f2a | 2022-01-10 20:58:42 +0100 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ OR MIT |
| 2 | /* |
| 3 | * Apple MacBook Air (M1, 2020) |
| 4 | * |
| 5 | * target-type: J313 |
| 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,j313", "apple,t8103", "apple,arm-platform"; |
| 17 | model = "Apple MacBook Air (M1, 2020)"; |
| 18 | }; |
| 19 | |
| 20 | &wifi0 { |
| 21 | brcm,board-type = "apple,shikoku"; |
| 22 | }; |
| 23 | |
| 24 | /* |
| 25 | * Provide labels for the USB type C ports. |
| 26 | */ |
| 27 | |
| 28 | &typec0 { |
| 29 | label = "USB-C Left-back"; |
| 30 | }; |
| 31 | |
| 32 | &typec1 { |
| 33 | label = "USB-C Left-front"; |
| 34 | }; |
| 35 | |
| 36 | &spi3 { |
| 37 | status = "okay"; |
| 38 | |
| 39 | hid-transport@0 { |
| 40 | compatible = "apple,spi-hid-transport"; |
| 41 | reg = <0>; |
| 42 | spi-max-frequency = <8000000>; |
| 43 | /* |
| 44 | * cs-setup and cs-hold delays are derived from Apple's ADT |
| 45 | * Mac OS driver meta data secify 45 us for 'cs to clock' and |
| 46 | * 'clock to cs' delays. |
| 47 | */ |
| 48 | spi-cs-setup-delay-ns = <20000>; |
| 49 | spi-cs-hold-delay-ns = <20000>; |
| 50 | spi-cs-inactive-delay-ns = <250000>; |
| 51 | spien-gpios = <&pinctrl_ap 195 0>; |
| 52 | interrupts-extended = <&pinctrl_nub 13 IRQ_TYPE_LEVEL_LOW>; |
| 53 | }; |
| 54 | }; |
| 55 | |
| 56 | /* |
| 57 | * Remove unused PCIe ports and disable the associated DARTs. |
| 58 | */ |
| 59 | |
| 60 | &pcie0_dart_1 { |
| 61 | status = "disabled"; |
| 62 | }; |
| 63 | |
| 64 | &pcie0_dart_2 { |
| 65 | status = "disabled"; |
| 66 | }; |
| 67 | |
| 68 | /delete-node/ &port01; |
| 69 | /delete-node/ &port02; |
| 70 | |
| 71 | &i2c3 { |
| 72 | clock-frequency = <50000>; |
| 73 | |
| 74 | jack_codec: codec@48 { |
| 75 | compatible = "cirrus,cs42l83", "cirrus,cs42l42"; |
| 76 | reg = <0x48>; |
| 77 | reset-gpios = <&pinctrl_nub 11 GPIO_ACTIVE_HIGH>; |
| 78 | interrupt-parent = <&pinctrl_ap>; |
| 79 | interrupts = <183 IRQ_TYPE_LEVEL_LOW>; |
| 80 | #sound-dai-cells = <0>; |
| 81 | cirrus,ts-inv = <1>; |
| 82 | }; |
| 83 | }; |
| 84 | |
| 85 | / { |
| 86 | sound { |
| 87 | compatible = "simple-audio-card"; |
| 88 | simple-audio-card,name = "MacBook integrated audio"; |
| 89 | #address-cells = <1>; |
| 90 | #size-cells = <0>; |
| 91 | |
| 92 | simple-audio-card,dai-link@0 { |
| 93 | bitclock-inversion; |
| 94 | frame-inversion; |
| 95 | reg = <0>; |
| 96 | format = "i2s"; |
| 97 | mclk-fs = <64>; |
| 98 | tdm-slot-width = <32>; |
| 99 | |
| 100 | link0_cpu: cpu { |
| 101 | sound-dai = <&mca 2>; |
| 102 | bitclock-master; |
| 103 | frame-master; |
| 104 | }; |
| 105 | |
| 106 | link0_codec: codec { |
| 107 | sound-dai = <&jack_codec>; |
| 108 | }; |
| 109 | }; |
| 110 | }; |
| 111 | }; |