|
| 1 | +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) |
| 2 | +%YAML 1.2 |
| 3 | +--- |
| 4 | +$id: http://devicetree.org/schemas/sound/apple,macaudio.yaml# |
| 5 | +$schema: http://devicetree.org/meta-schemas/core.yaml# |
| 6 | + |
| 7 | +title: Apple Silicon Macs integrated sound peripherals |
| 8 | + |
| 9 | +description: |
| 10 | + This binding represents the overall machine-level integration of sound |
| 11 | + peripherals on 'Apple Silicon' machines by Apple. |
| 12 | + |
| 13 | +maintainers: |
| 14 | + - Martin Povišer <povik+lin@cutebit.org> |
| 15 | + |
| 16 | +properties: |
| 17 | + compatible: |
| 18 | + items: |
| 19 | + - enum: |
| 20 | + - apple,j274-macaudio |
| 21 | + - apple,j293-macaudio |
| 22 | + - apple,j314-macaudio |
| 23 | + - const: apple,macaudio |
| 24 | + |
| 25 | + "#address-cells": |
| 26 | + const: 1 |
| 27 | + |
| 28 | + "#size-cells": |
| 29 | + const: 0 |
| 30 | + |
| 31 | + model: |
| 32 | + description: |
| 33 | + Model name for presentation to users |
| 34 | + $ref: /schemas/types.yaml#/definitions/string |
| 35 | + |
| 36 | +patternProperties: |
| 37 | + "^dai-link(@[0-9a-f]+)?$": |
| 38 | + description: | |
| 39 | + Node for each sound peripheral such as the speaker array, headphones jack, |
| 40 | + or microphone. |
| 41 | + type: object |
| 42 | + |
| 43 | + additionalProperties: false |
| 44 | + |
| 45 | + properties: |
| 46 | + reg: |
| 47 | + maxItems: 1 |
| 48 | + |
| 49 | + link-name: |
| 50 | + description: | |
| 51 | + Name for the peripheral, expecting 'Speaker' or 'Speakers' if this is |
| 52 | + the speaker array. |
| 53 | + $ref: /schemas/types.yaml#/definitions/string |
| 54 | + |
| 55 | + cpu: |
| 56 | + type: object |
| 57 | + |
| 58 | + properties: |
| 59 | + sound-dai: |
| 60 | + description: | |
| 61 | + DAI list with CPU-side I2S ports involved in this peripheral. |
| 62 | + minItems: 1 |
| 63 | + maxItems: 2 |
| 64 | + |
| 65 | + required: |
| 66 | + - sound-dai |
| 67 | + |
| 68 | + codec: |
| 69 | + type: object |
| 70 | + |
| 71 | + properties: |
| 72 | + sound-dai: |
| 73 | + minItems: 1 |
| 74 | + maxItems: 8 |
| 75 | + description: | |
| 76 | + DAI list with the CODEC-side DAIs connected to the above CPU-side |
| 77 | + DAIs and involved in this sound peripheral. |
| 78 | +
|
| 79 | + The list is in left/right order if applicable. If there are more |
| 80 | + than one CPU-side DAIs (there can be two), the CODECs must be |
| 81 | + listed first those connected to the first CPU, then those |
| 82 | + connected to the second. |
| 83 | +
|
| 84 | + In addition, on some machines with many speaker codecs, the CODECs |
| 85 | + are listed in this fixed order: |
| 86 | +
|
| 87 | + J293: Left Front, Left Rear, Right Front, Right Rear |
| 88 | + J314: Left Woofer 1, Left Tweeter, Left Woofer 2, |
| 89 | + Right Woofer 1, Right Tweeter, Right Woofer 2 |
| 90 | +
|
| 91 | + required: |
| 92 | + - sound-dai |
| 93 | + |
| 94 | + required: |
| 95 | + - reg |
| 96 | + - cpu |
| 97 | + - codec |
| 98 | + |
| 99 | +required: |
| 100 | + - compatible |
| 101 | + - model |
| 102 | + |
| 103 | +additionalProperties: false |
| 104 | + |
| 105 | +examples: |
| 106 | + - | |
| 107 | + mca: mca@9b600000 { |
| 108 | + compatible = "apple,t6000-mca", "apple,mca"; |
| 109 | + reg = <0x9b600000 0x10000>, |
| 110 | + <0x9b500000 0x20000>; |
| 111 | +
|
| 112 | + clocks = <&nco 0>, <&nco 1>, <&nco 2>, <&nco 3>; |
| 113 | + power-domains = <&ps_audio_p>, <&ps_mca0>, <&ps_mca1>, |
| 114 | + <&ps_mca2>, <&ps_mca3>; |
| 115 | + dmas = <&admac 0>, <&admac 1>, <&admac 2>, <&admac 3>, |
| 116 | + <&admac 4>, <&admac 5>, <&admac 6>, <&admac 7>, |
| 117 | + <&admac 8>, <&admac 9>, <&admac 10>, <&admac 11>, |
| 118 | + <&admac 12>, <&admac 13>, <&admac 14>, <&admac 15>; |
| 119 | + dma-names = "tx0a", "rx0a", "tx0b", "rx0b", |
| 120 | + "tx1a", "rx1a", "tx1b", "rx1b", |
| 121 | + "tx2a", "rx2a", "tx2b", "rx2b", |
| 122 | + "tx3a", "rx3a", "tx3b", "rx3b"; |
| 123 | +
|
| 124 | + #sound-dai-cells = <1>; |
| 125 | + }; |
| 126 | +
|
| 127 | + sound { |
| 128 | + compatible = "apple,j314-macaudio", "apple,macaudio"; |
| 129 | + model = "MacBook Pro J314 integrated audio"; |
| 130 | +
|
| 131 | + #address-cells = <1>; |
| 132 | + #size-cells = <0>; |
| 133 | +
|
| 134 | + dai-link@0 { |
| 135 | + reg = <0>; |
| 136 | + link-name = "Speakers"; |
| 137 | +
|
| 138 | + cpu { |
| 139 | + sound-dai = <&mca 0>, <&mca 1>; |
| 140 | + }; |
| 141 | + codec { |
| 142 | + sound-dai = <&speaker_left_woof1>, |
| 143 | + <&speaker_left_tweet>, |
| 144 | + <&speaker_left_woof2>, |
| 145 | + <&speaker_right_woof1>, |
| 146 | + <&speaker_right_tweet>, |
| 147 | + <&speaker_right_woof2>; |
| 148 | + }; |
| 149 | + }; |
| 150 | +
|
| 151 | + dai-link@1 { |
| 152 | + reg = <1>; |
| 153 | + link-name = "Headphones Jack"; |
| 154 | +
|
| 155 | + cpu { |
| 156 | + sound-dai = <&mca 2>; |
| 157 | + }; |
| 158 | + codec { |
| 159 | + sound-dai = <&jack_codec>; |
| 160 | + }; |
| 161 | + }; |
| 162 | + }; |
0 commit comments