Mark Kettenis | 3dfef53 | 2021-10-23 16:58:06 +0200 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ OR MIT |
| 2 | /* |
Mark Kettenis | c918e2c | 2022-01-10 20:58:42 +0100 | [diff] [blame] | 3 | * Apple MacBook Pro (13-inch, M1, 2020) |
Mark Kettenis | 3dfef53 | 2021-10-23 16:58:06 +0200 | [diff] [blame] | 4 | * |
| 5 | * target-type: J293 |
| 6 | * |
| 7 | * Copyright The Asahi Linux Contributors |
| 8 | */ |
| 9 | |
| 10 | /dts-v1/; |
| 11 | |
| 12 | #include "t8103.dtsi" |
Mark Kettenis | c918e2c | 2022-01-10 20:58:42 +0100 | [diff] [blame] | 13 | #include "t8103-jxxx.dtsi" |
Mark Kettenis | 3dfef53 | 2021-10-23 16:58:06 +0200 | [diff] [blame] | 14 | |
| 15 | / { |
| 16 | compatible = "apple,j293", "apple,t8103", "apple,arm-platform"; |
Mark Kettenis | c918e2c | 2022-01-10 20:58:42 +0100 | [diff] [blame] | 17 | model = "Apple MacBook Pro (13-inch, M1, 2020)"; |
| 18 | }; |
Mark Kettenis | 3dfef53 | 2021-10-23 16:58:06 +0200 | [diff] [blame] | 19 | |
Mark Kettenis | c918e2c | 2022-01-10 20:58:42 +0100 | [diff] [blame] | 20 | &wifi0 { |
| 21 | brcm,board-type = "apple,honshu"; |
| 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>; |
Mark Kettenis | 3dfef53 | 2021-10-23 16:58:06 +0200 | [diff] [blame] | 53 | }; |
Mark Kettenis | c918e2c | 2022-01-10 20:58:42 +0100 | [diff] [blame] | 54 | }; |
Mark Kettenis | 3dfef53 | 2021-10-23 16:58:06 +0200 | [diff] [blame] | 55 | |
Mark Kettenis | c918e2c | 2022-01-10 20:58:42 +0100 | [diff] [blame] | 56 | /* |
| 57 | * Remove unused PCIe ports and disable the associated DARTs. |
| 58 | */ |
Mark Kettenis | 3dfef53 | 2021-10-23 16:58:06 +0200 | [diff] [blame] | 59 | |
Mark Kettenis | c918e2c | 2022-01-10 20:58:42 +0100 | [diff] [blame] | 60 | &pcie0_dart_1 { |
| 61 | status = "disabled"; |
| 62 | }; |
Mark Kettenis | 3dfef53 | 2021-10-23 16:58:06 +0200 | [diff] [blame] | 63 | |
Mark Kettenis | c918e2c | 2022-01-10 20:58:42 +0100 | [diff] [blame] | 64 | &pcie0_dart_2 { |
| 65 | status = "disabled"; |
| 66 | }; |
| 67 | |
| 68 | /delete-node/ &port01; |
| 69 | /delete-node/ &port02; |
| 70 | |
| 71 | &i2c2 { |
| 72 | status = "okay"; |
| 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 | &i2c4 { |
| 87 | status = "okay"; |
| 88 | }; |
| 89 | |
| 90 | / { |
| 91 | sound { |
| 92 | compatible = "simple-audio-card"; |
| 93 | simple-audio-card,name = "MacBook integrated audio"; |
| 94 | #address-cells = <1>; |
| 95 | #size-cells = <0>; |
| 96 | |
| 97 | simple-audio-card,dai-link@0 { |
| 98 | bitclock-inversion; |
| 99 | frame-inversion; |
| 100 | reg = <0>; |
| 101 | format = "i2s"; |
| 102 | mclk-fs = <64>; |
| 103 | tdm-slot-width = <32>; |
| 104 | |
| 105 | link0_cpu: cpu { |
| 106 | sound-dai = <&mca 2>; |
| 107 | bitclock-master; |
| 108 | frame-master; |
| 109 | }; |
| 110 | |
| 111 | link0_codec: codec { |
| 112 | sound-dai = <&jack_codec>; |
| 113 | }; |
Mark Kettenis | 3dfef53 | 2021-10-23 16:58:06 +0200 | [diff] [blame] | 114 | }; |
| 115 | }; |
Mark Kettenis | 3dfef53 | 2021-10-23 16:58:06 +0200 | [diff] [blame] | 116 | }; |