Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
9fcc4f4
dt-bindings: soc: apple: t8010-aop: The iPhone 7's firmware takes bbO…
paulscalise1 Dec 1, 2026
ddfb712
soc: apple: aop: Pass the iPhone 7's firmware its baseband flag
paulscalise1 Dec 1, 2026
5dac337
arm64: dts: apple: t8010-7: Tell the AOP the iPhone 7 has a baseband
paulscalise1 Dec 1, 2026
2e78ca2
soc: apple: aop: Find a service's node by its lowercase name
paulscalise1 Dec 1, 2026
5e6652f
soc: apple: aop: Let a caller see the service's return code
paulscalise1 Dec 1, 2026
c860fb8
dt-bindings: soc: apple: t8010-aop: Add the iPhone 7's SPUApp service
paulscalise1 Dec 1, 2026
e4e2ac6
soc: apple: Add the iPhone 7's AOP SPUApp service
paulscalise1 Dec 1, 2026
462ae07
dt-bindings: sound: Add the Cirrus Logic CS35L26
paulscalise1 Dec 1, 2026
8f6accd
ASoC: codecs: Add the Cirrus Logic CS35L26
paulscalise1 Dec 1, 2026
60ac98f
dt-bindings: sound: Add the iPhone 7's Maggie FPGA
paulscalise1 Dec 1, 2026
d0b7604
ASoC: apple: Add the iPhone 7's Maggie FPGA
paulscalise1 Dec 1, 2026
0150a2b
dt-bindings: sound: apple,s8000-mca: Add the iPhone 7's loudspeaker link
paulscalise1 Dec 1, 2026
885a37d
ASoC: apple: s8000-mca: Add the iPhone 7's loudspeaker link
paulscalise1 Dec 1, 2026
3d223b0
soc: apple: sio: Add the iPhone 7's MCA1 endpoint
paulscalise1 Dec 1, 2026
bb43363
ASoC: cs42l71: Add the iPhone 7's receiver output
paulscalise1 Dec 1, 2026
85e7af6
arm64: dts: apple: t8010: Add MCA1
paulscalise1 Dec 1, 2026
cec65dd
arm64: dts: apple: t8010-7: Add the loudspeakers and the earpiece
paulscalise1 Dec 1, 2026
37ac90e
arm64: configs: orchard_apple16k: Build the iPhone 7's speaker drivers
paulscalise1 Dec 1, 2026
6270a8e
Merge remote-tracking branch 'origin/main' into iphone7-speakers
paulscalise1 Dec 2, 2026
4526168
Merge remote-tracking branch 'origin/main' into iphone7-speakers
henrikklee Dec 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 39 additions & 1 deletion Documentation/devicetree/bindings/soc/apple/apple,t8010-aop.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,9 @@ properties:
type: boolean
description:
The device has a cellular modem. From the Apple device tree's AOP nub,
as iBoot passes it to the A12's firmware (boot argument "bbOn").
as iBoot passes it to the A12's and the iPhone 7's (apple,d10-aop)
firmware (boot argument "bbOn"). The iPhone 7's firmware serves its
loudspeaker amplifiers only when it is set.

apple,pmu-arc-reset:
type: boolean
Expand Down Expand Up @@ -204,6 +206,42 @@ properties:
- "#clock-cells"
additionalProperties: false

spuapp:
type: object
description:
The iPhone 7 firmware's loudspeaker service ("SPUApp"). It switches
the 12 MHz MCLK of the top speaker's amplifier and the Maggie FPGA
(clock 0) and the FPGA's enable (clock 1), and drives the bottom
speaker's and the Taptic Engine's amplifiers, which sit on the AOP's
own I2C bus.
properties:
compatible:
const: apple,t8010-aop-spuapp

"#clock-cells":
const: 1

apple,btmspk-config:
$ref: /schemas/types.yaml#/definitions/uint8-array
minItems: 1
maxItems: 64
description:
The bottom speaker amplifier's configuration, the Apple device
tree's SPUApp spkamp-config_btmspk.

apple,arc-config:
$ref: /schemas/types.yaml#/definitions/uint8-array
minItems: 1
maxItems: 64
description:
The Taptic Engine amplifier's configuration, the Apple device
tree's SPUApp spkamp-config_arc.

required:
- compatible
- "#clock-cells"
additionalProperties: false

patternProperties:
"^(accel|gyro|compass|pressure)$":
type: object
Expand Down
4 changes: 4 additions & 0 deletions Documentation/devicetree/bindings/sound/apple,s8000-mca.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ description: |
iPhone 6s Plus. apple,s8000-mca-codec is the A9 MCA0 link to the iPhone 6s
and 6s Plus headset codec, a clock consumer with four 16-bit TDM slots,
and apple,t8010-mca-codec the same link to the iPhone 7's codec.
apple,t8010-mca-maggie is the iPhone 7's playback-only loudspeaker link
(TDM), a consumer of the clocks of its Maggie FPGA, with fifteen 16-bit
slots and ten idle bit clocks per frame.
The MCAs are the same block; the compatible names
the link setup iOS programs into it. The T7001 (A8X) MCA is the older
"mca-version 1" register layout with the same fields: apple,t7001-mca is
Expand Down Expand Up @@ -71,6 +74,7 @@ properties:
- apple,t8010-mca
- apple,t8010-mca-codec
- apple,t8010-mca-i2s
- apple,t8010-mca-maggie
- apple,t8011-mca

clocks:
Expand Down
98 changes: 98 additions & 0 deletions Documentation/devicetree/bindings/sound/apple,t8010-maggie.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/apple,t8010-maggie.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Apple Maggie FPGA of the iPhone 7

maintainers:
- Paul Scalise <paulscalise1@users.noreply.github.com>

description: |
A Lattice iCE5LP4K FPGA on SPI, between the iPhone 7's loudspeaker link
(MCA1) and its speaker amplifiers. It provides the link's bit and frame
clocks and passes each speaker's slot to its amplifier. It has no flash:
the driver loads Apple's bitstream through SPI. It runs while the
Always-On Processor provides its MCLK and its enable, and the AOP also
drives the bottom speaker's amplifier.

allOf:
- $ref: dai-common.yaml#
- $ref: /schemas/spi/spi-peripheral-props.yaml#

properties:
compatible:
const: apple,t8010-maggie

reg:
maxItems: 1

reset-gpios:
maxItems: 1
description: The FPGA's CRESET_B.

cdone-gpios:
maxItems: 1
description: The FPGA's CDONE, high once it is configured.

clocks:
items:
- description: The FPGA's MCLK
- description: The FPGA's enable

clock-names:
items:
- const: mclk
- const: enable

apple,spuapp:
$ref: /schemas/types.yaml#/definitions/phandle
description:
The AOP's SPUApp service, which drives the bottom speaker's amplifier.

firmware-name:
maxItems: 1
description:
The FPGA's bitstream, the payload of the restore image's
Firmware/Maggie/AppleMaggieFirmwareImage.im4p.

'#sound-dai-cells':
const: 0

required:
- compatible
- reg
- reset-gpios
- cdone-gpios
- clocks
- clock-names
- apple,spuapp
- firmware-name
- '#sound-dai-cells'

unevaluatedProperties: false

examples:
- |
#include <dt-bindings/gpio/gpio.h>

spi {
#address-cells = <1>;
#size-cells = <0>;

fpga@1 {
compatible = "apple,t8010-maggie";
reg = <1>;
spi-max-frequency = <12000000>;
spi-cpha;
spi-cpol;
reset-gpios = <&pinctrl_ap 22 GPIO_ACTIVE_LOW>;
cdone-gpios = <&pinctrl_ap 26 GPIO_ACTIVE_HIGH>;
clocks = <&aop_spuapp 0>, <&aop_spuapp 1>;
clock-names = "mclk", "enable";
apple,spuapp = <&aop_spuapp>;
firmware-name = "apple/maggie-t8010.bin";
#sound-dai-cells = <0>;
};
};
64 changes: 64 additions & 0 deletions Documentation/devicetree/bindings/sound/cirrus,cs35l26.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/sound/cirrus,cs35l26.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Cirrus Logic CS35L26 speaker amplifier

maintainers:
- Paul Scalise <paulscalise1@users.noreply.github.com>

description: |
Boosted speaker amplifier with a PDM and a TDM input, on I2C. The iPhone
7 uses one for its top speaker, which is also its earpiece: the PDM
input takes the headset codec's receiver output, and the TDM input the
top speaker's slot of the loudspeaker frame. The amplifier has no DAI of
its own; a sound card connects its PDMIN and TDMIN inputs and its SPK
output by name.

allOf:
- $ref: dai-common.yaml#

properties:
compatible:
const: cirrus,cs35l26

reg:
maxItems: 1

reset-gpios:
maxItems: 1

clocks:
maxItems: 1

clock-names:
const: mclk

required:
- compatible
- reg
- reset-gpios
- clocks
- clock-names

unevaluatedProperties: false

examples:
- |
#include <dt-bindings/gpio/gpio.h>

i2c {
#address-cells = <1>;
#size-cells = <0>;

amplifier@40 {
compatible = "cirrus,cs35l26";
reg = <0x40>;
reset-gpios = <&pinctrl_ap 140 GPIO_ACTIVE_LOW>;
clocks = <&aop_spuapp 0>;
clock-names = "mclk";
sound-name-prefix = "Top";
};
};
96 changes: 95 additions & 1 deletion arch/arm64/boot/dts/apple/t8010-7.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,24 @@
<0x2 0x10000500 0x0 0x100>,
<0x2 0x10e00000 0x0 0xd8000>;
firmware-name = "apple/aop-t8010.bin", "apple/aop-t8010-ext.bin";
/* the ADT's iop-aop-nub has-baseband; m1n1 adds its aop-target */
apple,has-baseband;
status = "okay";

/*
* The loudspeaker service: the MCLK and enable of the top amplifier
* and the Maggie FPGA, and the AOP's own amplifiers. Their
* configurations are the ADT SPUApp node's spkamp-config_btmspk and
* spkamp-config_arc.
*/
aop_spuapp: spuapp {
compatible = "apple,t8010-aop-spuapp";
#clock-cells = <1>;
apple,btmspk-config = /bits/ 8 <0x00 0x01 0x04 0x02 0x0d 0x00 0x08 0xf0 0xe8 0x40
0x00 0x00 0x30 0x01 0x00 0x00 0x00 0x00 0x00 0x00>;
apple,arc-config = /bits/ 8 <0x06 0x07 0x08 0x02 0x0d 0x00 0x08 0xf0 0xe8 0x43
0x00 0x00 0x30 0x00 0x00 0x00 0x00 0x00 0x00 0x00>;
};
};

/* No audio service in the iPhone 7 AOP: the microphones are on the codec. */
Expand Down Expand Up @@ -284,6 +301,19 @@
&i2c2 {
status = "okay";

/*
* ADT i2c2/audio-speaker-top: the top speaker's amplifier, which also
* drives the earpiece, reset AP GPIO 140. Its MCLK comes from the AOP.
*/
speaker_top: amplifier@40 {
compatible = "cirrus,cs35l26";
reg = <0x40>;
reset-gpios = <&pinctrl_ap 140 GPIO_ACTIVE_LOW>;
clocks = <&aop_spuapp 0>;
clock-names = "mclk";
sound-name-prefix = "Top";
};

light-sensor@29 {
compatible = "apple,ct821", "amstaos,tsl2581";
reg = <0x29>;
Expand Down Expand Up @@ -383,13 +413,62 @@
clock-names = "mclk";
#sound-dai-cells = <0>;
};

/*
* ADT spi1/maggie-arc: the FPGA of the loudspeakers and the Taptic
* Engine, SPI mode 3, CRESET_B on AP GPIO 22 and CDONE on GPIO 26. It
* takes the codec's ASP data line (GPIO 9) as a peripheral pin.
*/
maggie: fpga@1 {
compatible = "apple,t8010-maggie";
reg = <1>;
spi-max-frequency = <12000000>;
spi-cpha;
spi-cpol;
reset-gpios = <&pinctrl_ap 22 GPIO_ACTIVE_LOW>;
cdone-gpios = <&pinctrl_ap 26 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&codec_asp_dout>;
clocks = <&aop_spuapp 0>, <&aop_spuapp 1>;
clock-names = "mclk", "enable";
apple,spuapp = <&aop_spuapp>;
firmware-name = "apple/maggie-t8010.bin";
#sound-dai-cells = <0>;
};
};

&pinctrl_ap {
codec_asp_dout: codec-asp-dout-pins {
pinmux = <APPLE_PINMUX(9, 1)>;
};
};

/* The built-in microphones, through MCA0 and the codec. */
/* ADT mca1 function-i2s_route aud1 -> pin2: the frame comes from Maggie. */
&mca1 {
compatible = "apple,t8010-mca-maggie";
apple,i2s-switch = <&i2s_switch 1 2>;
dmas = <&sio 0x2a>;
dma-names = "tx";
status = "okay";
};

/*
* The earpiece and the microphones on MCA0 and the codec, the loudspeakers
* on MCA1 and Maggie. The top speaker is also the earpiece: its amplifier
* takes the codec's PDM output or Maggie's frame.
*/
/ {
sound {
compatible = "simple-audio-card";
simple-audio-card,name = "iPhone 7";
simple-audio-card,widgets = "Speaker", "Speaker",
"Speaker", "Earpiece";
simple-audio-card,routing = "Top PDMIN", "PDMOUT",
"Top TDMIN", "TDMOUT",
"Earpiece", "Top SPK",
"Speaker", "Top SPK",
"Speaker", "BOTSPK";
simple-audio-card,aux-devs = <&speaker_top>;
#address-cells = <1>;
#size-cells = <0>;

Expand All @@ -407,6 +486,21 @@
sound-dai = <&cs42l71>;
};
};

simple-audio-card,dai-link@1 {
reg = <1>;
format = "dsp_a";
bitclock-master = <&maggie_dai>;
frame-master = <&maggie_dai>;

cpu {
sound-dai = <&mca1>;
};

maggie_dai: codec {
sound-dai = <&maggie>;
};
};
};
};

15 changes: 15 additions & 0 deletions arch/arm64/boot/dts/apple/t8010.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,21 @@
status = "disabled";
};

mca1: mca@20a0a4000 {
compatible = "apple,t8010-mca";
reg = <0x2 0x0a0a4000 0x0 0x4000>,
<0x2 0x0a002004 0x0 0x4>;
reg-names = "mca", "mclk";
interrupts = <AIC_IRQ 228 IRQ_TYPE_LEVEL_HIGH>;
power-domains = <&ps_mca1>;
dmas = <&sio 0x2a>, <&sio 0x2b>;
dma-names = "tx", "rx";
#clock-cells = <0>;
clock-output-names = "mca1-mclk";
#sound-dai-cells = <0>;
status = "disabled";
};

mca2: mca@20a0a8000 {
compatible = "apple,t8010-mca";
reg = <0x2 0x0a0a8000 0x0 0x4000>,
Expand Down
Loading
Loading