Mark Kettenis | 2ec941f | 2021-10-23 16:58:06 +0200 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ OR MIT |
| 2 | /* |
Mark Kettenis | aba8f2a | 2022-01-10 20:58:42 +0100 | [diff] [blame] | 3 | * Apple MacBook Pro (13-inch, M1, 2020) |
Mark Kettenis | 2ec941f | 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 | 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,j293", "apple,t8103", "apple,arm-platform"; |
Mark Kettenis | aba8f2a | 2022-01-10 20:58:42 +0100 | [diff] [blame] | 17 | model = "Apple MacBook Pro (13-inch, M1, 2020)"; |
| 18 | }; |
Mark Kettenis | 2ec941f | 2021-10-23 16:58:06 +0200 | [diff] [blame] | 19 | |
Mark Kettenis | aba8f2a | 2022-01-10 20:58:42 +0100 | [diff] [blame] | 20 | &wifi0 { |
| 21 | brcm,board-type = "apple,honshu"; |
Mark Kettenis | 2ec941f | 2021-10-23 16:58:06 +0200 | [diff] [blame] | 22 | }; |
| 23 | |
Mark Kettenis | aba8f2a | 2022-01-10 20:58:42 +0100 | [diff] [blame] | 24 | /* |
| 25 | * Provide labels for the USB type C ports. |
| 26 | */ |
| 27 | |
| 28 | &typec0 { |
| 29 | label = "USB-C Left-back"; |
Mark Kettenis | 2ec941f | 2021-10-23 16:58:06 +0200 | [diff] [blame] | 30 | }; |
| 31 | |
Mark Kettenis | aba8f2a | 2022-01-10 20:58:42 +0100 | [diff] [blame] | 32 | &typec1 { |
| 33 | label = "USB-C Left-front"; |
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 | &spi3 { |
Mark Kettenis | 2ec941f | 2021-10-23 16:58:06 +0200 | [diff] [blame] | 37 | status = "okay"; |
| 38 | |
Mark Kettenis | aba8f2a | 2022-01-10 20:58:42 +0100 | [diff] [blame] | 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 | 2ec941f | 2021-10-23 16:58:06 +0200 | [diff] [blame] | 53 | }; |
| 54 | }; |
| 55 | |
Mark Kettenis | aba8f2a | 2022-01-10 20:58:42 +0100 | [diff] [blame] | 56 | /* |
| 57 | * Remove unused PCIe ports and disable the associated DARTs. |
| 58 | */ |
Mark Kettenis | 2ec941f | 2021-10-23 16:58:06 +0200 | [diff] [blame] | 59 | |
Mark Kettenis | aba8f2a | 2022-01-10 20:58:42 +0100 | [diff] [blame] | 60 | &pcie0_dart_1 { |
| 61 | status = "disabled"; |
Mark Kettenis | 2ec941f | 2021-10-23 16:58:06 +0200 | [diff] [blame] | 62 | }; |
| 63 | |
Mark Kettenis | aba8f2a | 2022-01-10 20:58:42 +0100 | [diff] [blame] | 64 | &pcie0_dart_2 { |
| 65 | status = "disabled"; |
Mark Kettenis | 2ec941f | 2021-10-23 16:58:06 +0200 | [diff] [blame] | 66 | }; |
| 67 | |
Mark Kettenis | aba8f2a | 2022-01-10 20:58:42 +0100 | [diff] [blame] | 68 | /delete-node/ &port01; |
| 69 | /delete-node/ &port02; |
Mark Kettenis | 2ec941f | 2021-10-23 16:58:06 +0200 | [diff] [blame] | 70 | |
Mark Kettenis | aba8f2a | 2022-01-10 20:58:42 +0100 | [diff] [blame] | 71 | &i2c2 { |
Mark Kettenis | 2ec941f | 2021-10-23 16:58:06 +0200 | [diff] [blame] | 72 | status = "okay"; |
Mark Kettenis | aba8f2a | 2022-01-10 20:58:42 +0100 | [diff] [blame] | 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 | }; |
Mark Kettenis | 2ec941f | 2021-10-23 16:58:06 +0200 | [diff] [blame] | 84 | }; |
| 85 | |
Mark Kettenis | aba8f2a | 2022-01-10 20:58:42 +0100 | [diff] [blame] | 86 | &i2c4 { |
Mark Kettenis | 2ec941f | 2021-10-23 16:58:06 +0200 | [diff] [blame] | 87 | status = "okay"; |
| 88 | }; |
| 89 | |
Mark Kettenis | aba8f2a | 2022-01-10 20:58:42 +0100 | [diff] [blame] | 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 | }; |
| 114 | }; |
| 115 | }; |
Mark Kettenis | 2ec941f | 2021-10-23 16:58:06 +0200 | [diff] [blame] | 116 | }; |