Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
57 changes: 57 additions & 0 deletions arch/arm64/boot/dts/apple/t6050-aop.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
// SPDX-License-Identifier: GPL-2.0+ OR MIT
/*
* The AOP of the T6050 MacBook Pros (J714c, J714s, J716c, J716s, K114c, K114s, K116c, K116s),
* with its sensor services (ambient light, lid angle) and its audio service, and the
* microphone array that service captures.
*
* Each of these boards' ADTs has the same nodes here: the AOP (ASC 0x290600000, interrupts
* 578-581), its setup port (aop-exclave-mailbox at 0x2d067c000, dart-aop stream 1), dart-aop
* (0x290fc0000, IRQ 616), admac-base-ns (0x293800000, IRQ 637, dart-aop stream 8), the
* ambient light sensor and the audio service under the AOP, and the same microphone array:
* audio-hp-mic, three microphones on leap-s ADMAC RX0, which the AP reaches through the proxy
* aperture admac-hp-mic-ec-proxy (0x2d3200000, dma-channel 0, admac-leap-s interrupt 638,
* dart-aop stream 11). The nodes themselves are in t6050-die0.dtsi and t6050-peripherals.dtsi,
* disabled. The lid angle is a service the AOP firmware announces; it has no node of its own.
*
* The LEAP leaves have no AP power state: the firmware raises them with the hpai service's
* "pw0 " when the capture opens, and the proxy ADMAC's registers are first touched after
* that, when the capture requests its channel.
*
* Only the chassis name, the microphone card's identity (Apple<chassis>HPAI), differs: each
* board sets &aop_audio's apple,chassis-name before it includes this file, after
* t6050-peripherals.dtsi.
*/

/* The AOP, booted through its setup port, with its sensor and audio services. */
&aop_mbox {
status = "okay";
};

&aop_setup_mbox {
status = "okay";
};

&aop_dart {
status = "okay";
};

&aop {
status = "okay";
};

&admac_base_ns {
status = "okay";
};

&admac_ec_proxy {
status = "okay";
};

&aop_audio {
apple,machine-kind = "MacBook Pro";
/* hpai: leap-s RX0 is Linux channel 1 of the proxy ADMAC (2N for TX N, 2N+1 for RX N) */
dmas = <&admac_base_ns 4>, <&admac_base_ns 5>,
<&admac_base_ns 0>, <&admac_base_ns 1>,
<&admac_ec_proxy 1>;
dma-names = "cout", "cin", "spkr", "sense", "hpai";
};
11 changes: 9 additions & 2 deletions arch/arm64/boot/dts/apple/t6050-j714c.dts
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@
* 0 left woofer 1, 1 right woofer 1, 2 left woofer 2, 3 right woofer 2, 4 left tweeter,
* 5 right tweeter.
*
* There is no sound card yet: the AOP audio driver is not on this branch, and the jack codec
* (i2c2) is not described. The amps stay in shutdown until a stream asks for them.
* There is no sound card yet: the jack codec (i2c2) is not described. The amps stay in
* shutdown until a stream asks for them.
*/
/ {
speaker_sdz: regulator-sn012776-sdz {
Expand Down Expand Up @@ -543,3 +543,10 @@
&clpc {
apple,high-power-mode;
};

/* The AOP, its sensors and the microphone array (t6050-aop.dtsi) */
&aop_audio {
apple,chassis-name = "J714";
};

#include "t6050-aop.dtsi"
37 changes: 3 additions & 34 deletions arch/arm64/boot/dts/apple/t6050-j714s.dts
Original file line number Diff line number Diff line change
Expand Up @@ -790,44 +790,13 @@

#include "t6050-sn012776-speakers.dtsi"

/* The AOP, booted through its setup port, with its sensor and audio services. */
&aop_mbox {
status = "okay";
};

&aop_setup_mbox {
status = "okay";
};

&aop_dart {
status = "okay";
};

&aop {
status = "okay";
};

/*
* The microphone array: ADT audio-hp-mic, three microphones on leap-s RX0 through the
* proxy ADMAC (Linux channel 1, as on J813), captured by the AOP audio service's own card.
*/
&admac_base_ns {
status = "okay";
};

&admac_ec_proxy {
status = "okay";
};

/* The AOP, its sensors and the microphone array (t6050-aop.dtsi) */
&aop_audio {
apple,chassis-name = "J714";
apple,machine-kind = "MacBook Pro";
dmas = <&admac_base_ns 4>, <&admac_base_ns 5>,
<&admac_base_ns 0>, <&admac_base_ns 1>,
<&admac_ec_proxy 1>;
dma-names = "cout", "cin", "spkr", "sense", "hpai";
};

#include "t6050-aop.dtsi"

/*
* The camera has no light the kernel drives here; the DCP draws the software indicator while
* the camera streams. DRM owns swap slots 0 and 1 on this DCP (no apple,iomfb-surfaces), so
Expand Down
37 changes: 3 additions & 34 deletions arch/arm64/boot/dts/apple/t6050-j716c.dts
Original file line number Diff line number Diff line change
Expand Up @@ -599,44 +599,13 @@
};
};

/* The AOP, booted through its setup port, with its sensor and audio services. */
&aop_mbox {
status = "okay";
};

&aop_setup_mbox {
status = "okay";
};

&aop_dart {
status = "okay";
};

&aop {
status = "okay";
};

/*
* The microphone array: ADT audio-hp-mic, three microphones on leap-s RX0 through the
* proxy ADMAC (Linux channel 1, as on J714s), captured by the AOP audio service's own card.
*/
&admac_base_ns {
status = "okay";
};

&admac_ec_proxy {
status = "okay";
};

/* The AOP, its sensors and the microphone array (t6050-aop.dtsi) */
&aop_audio {
apple,chassis-name = "J716";
apple,machine-kind = "MacBook Pro";
dmas = <&admac_base_ns 4>, <&admac_base_ns 5>,
<&admac_base_ns 0>, <&admac_base_ns 1>,
<&admac_ec_proxy 1>;
dma-names = "cout", "cin", "spkr", "sense", "hpai";
};

#include "t6050-aop.dtsi"

/* macOS offers High Power mode on this machine */
&clpc {
apple,high-power-mode;
Expand Down
37 changes: 3 additions & 34 deletions arch/arm64/boot/dts/apple/t6050-j716s.dts
Original file line number Diff line number Diff line change
Expand Up @@ -790,44 +790,13 @@
};
};

/* The AOP, booted through its setup port, with its sensor and audio services. */
&aop_mbox {
status = "okay";
};

&aop_setup_mbox {
status = "okay";
};

&aop_dart {
status = "okay";
};

&aop {
status = "okay";
};

/*
* The microphone array: ADT audio-hp-mic, three microphones on leap-s RX0 through the
* proxy ADMAC (Linux channel 1, as on J714s), captured by the AOP audio service's own card.
*/
&admac_base_ns {
status = "okay";
};

&admac_ec_proxy {
status = "okay";
};

/* The AOP, its sensors and the microphone array (t6050-aop.dtsi) */
&aop_audio {
apple,chassis-name = "J716";
apple,machine-kind = "MacBook Pro";
dmas = <&admac_base_ns 4>, <&admac_base_ns 5>,
<&admac_base_ns 0>, <&admac_base_ns 1>,
<&admac_ec_proxy 1>;
dma-names = "cout", "cin", "spkr", "sense", "hpai";
};

#include "t6050-aop.dtsi"

/*
* Left-front port (ATC1): the USB4/Thunderbolt router and its PCIe tunnel. The J716sAP ADT's
* /arm-io/acio1, acio-cpu1, dart-acio1, apciec1 and dart-apciec1 have the J714s's addresses,
Expand Down
37 changes: 3 additions & 34 deletions arch/arm64/boot/dts/apple/t6050-k114.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -97,40 +97,9 @@

#include "t6050-sn012776-speakers.dtsi"

/* The AOP, booted through its setup port, with its sensor and audio services. */
&aop_mbox {
status = "okay";
};

&aop_setup_mbox {
status = "okay";
};

&aop_dart {
status = "okay";
};

&aop {
status = "okay";
};

/*
* The microphone array: ADT audio-hp-mic, three microphones on leap-s RX0 through the
* proxy ADMAC (Linux channel 1, as on J813), captured by the AOP audio service's own card.
*/
&admac_base_ns {
status = "okay";
};

&admac_ec_proxy {
status = "okay";
};

/* The AOP, its sensors and the microphone array (t6050-aop.dtsi) */
&aop_audio {
apple,chassis-name = "K114";
apple,machine-kind = "MacBook Pro";
dmas = <&admac_base_ns 4>, <&admac_base_ns 5>,
<&admac_base_ns 0>, <&admac_base_ns 1>,
<&admac_ec_proxy 1>;
dma-names = "cout", "cin", "spkr", "sense", "hpai";
};

#include "t6050-aop.dtsi"
7 changes: 7 additions & 0 deletions arch/arm64/boot/dts/apple/t6050-k116c.dts
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,10 @@
apple,tunable-lane0-rx-top-cio = <0x35c 0xe00 0x0>;
apple,tunable-lane1-rx-top-cio = <0x35c 0xe00 0x0>;
};

/* The AOP, its sensors and the microphone array (t6050-aop.dtsi) */
&aop_audio {
apple,chassis-name = "K116";
};

#include "t6050-aop.dtsi"
61 changes: 6 additions & 55 deletions arch/arm64/boot/dts/apple/t6050-k116s.dts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@
* file. Its report tells it which devices are on; the PMC honours its votes next to the CLPC.
* The AOP's audio firmware needs it too: its LEAP cluster enable goes through PMP-managed
* power domains (every AOP and AUDIO domain of this ADT is "no_ps"), and without the PMP it
* fails, the audio controller never reaches systemReady and no AOP service is announced.
* fails and the audio controller never reaches systemReady, so the audio service is not
* announced. The sensor services do not wait for it (the K114c announced its ALS without the PMP).
*/
&ps_pms {
status = "okay";
Expand Down Expand Up @@ -307,21 +308,16 @@
};
};

/* ADT admac-base-ns: 0x293800000, IRQ 637, 13 TX + 13 RX channels, dart-aop stream 8 */
&admac_base_ns {
status = "okay";
};

/*
* The AOP audio service (apple,t6050-aop-audio, t6050-die0.dtsi: dmas cout/cin/spkr/sense =
* base-ns 4/5/0/1). The chassis name is the microphone card's identity (AppleK116HPAI), the
* machine kind the card's long name.
* The AOP, its sensors and the microphone array (t6050-aop.dtsi). The chassis name is the
* microphone card's identity (AppleK116HPAI).
*/
&aop_audio {
apple,chassis-name = "K116";
apple,machine-kind = "MacBook Pro";
};

#include "t6050-aop.dtsi"

/*
* The sound card. "apple,k116-macaudio" needs its macaudio.c entry (patches/0001-ASoC-apple-
* macaudio-Add-K116.patch): the same amps, slots, frame and sense layout as J714
Expand Down Expand Up @@ -381,51 +377,6 @@
};
};

/*
* The AOP, booted through its setup port (ADT aop-exclave-mailbox at 0x2d067c000, dart-aop
* stream 1), with its RTKit mailbox (ADT aop interrupts 578-581), dart-aop (0x290fc0000,
* IRQ 616, 17 streams, locked tables on the ADT l1-tt-0 root) and the AOP itself
* (0x290c00000 SRAM window, ASC 0x290600000). All four nodes are in t6050-die0.dtsi /
* t6050-peripherals.dtsi of the PR tree, disabled.
*/
&aop_mbox {
status = "okay";
};

&aop_setup_mbox {
status = "okay";
};

&aop_dart {
status = "okay";
};

&aop {
status = "okay";
};

/*
* The microphone array: ADT audio-hp-mic ("Digital Mic", three microphones imi1/imi2/imi3,
* 48 kHz float32) on leap-s ADMAC RX0, which the AP reaches through the proxy aperture ADT
* admac-hp-mic-ec-proxy: reg 0x2d3200000 size 0x34000 (not behind the arm-io translation,
* like the AOP setup port), dma-channel 0, admac-leap-s interrupt 638, dart-aop
* mapper-admac-leap-s stream 11 (vm-base-11 0x10040000000, vm-size-11 0xffff0000). The K116s
* ADT has the J714s values in each of these. The AOP audio service captures the array on a
* card of its own (AppleK116HPAI). The LEAP leaves have no AP power state: the firmware
* raises them with the hpai service's "pw0 " when the capture opens, and the ADMAC's
* registers are first touched after that, when the capture requests its channel.
*/
&admac_ec_proxy {
status = "okay";
};

&aop_audio {
/* hpai: leap-s RX0 is Linux channel 1 of the proxy ADMAC (2N for TX N, 2N+1 for RX N) */
dmas = <&admac_base_ns 4>, <&admac_base_ns 5>,
<&admac_base_ns 0>, <&admac_base_ns 1>,
<&admac_ec_proxy 1>;
dma-names = "cout", "cin", "spkr", "sense", "hpai";
};
/* The GPU, handed over by the boot loader */
#include "t6050-k114-k116-gpu.dtsi"

Expand Down
Loading