lede/target/linux/silicon/patches-5.19/0032-arm64-dts-apple-t600-Put-in-audio-nodes.patch

232 lines
5.4 KiB
Diff

From c390136c1f033e36969ea59352034603aca42071 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20Povi=C5=A1er?= <povik+lin@cutebit.org>
Date: Fri, 11 Mar 2022 22:16:25 +0100
Subject: [PATCH 032/171] arm64: dts: apple: t600*: Put in audio nodes
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Signed-off-by: Martin Povišer <povik+lin@cutebit.org>
---
arch/arm64/boot/dts/apple/t6001-j375c.dts | 40 +++++++++
arch/arm64/boot/dts/apple/t6002-j375d.dts | 40 +++++++++
.../arm64/boot/dts/apple/t600x-j314-j316.dtsi | 87 +++++++++++++++++++
3 files changed, 167 insertions(+)
diff --git a/arch/arm64/boot/dts/apple/t6001-j375c.dts b/arch/arm64/boot/dts/apple/t6001-j375c.dts
index 561a9a4c2bc1..84be4c83f4d4 100644
--- a/arch/arm64/boot/dts/apple/t6001-j375c.dts
+++ b/arch/arm64/boot/dts/apple/t6001-j375c.dts
@@ -152,6 +152,18 @@ typec3_con_hs: endpoint {
};
};
+/* Audio */
+&i2c1 {
+ status = "okay";
+
+ speaker: codec@38 {
+ compatible = "ti,sn012776", "ti,tas2764";
+ reg = <0x38>;
+ shutdown-gpios = <&pinctrl_ap 178 GPIO_ACTIVE_HIGH>;
+ #sound-dai-cells = <0>;
+ };
+};
+
/* PCIe devices */
&port00 {
/* WLAN */
@@ -230,3 +242,31 @@ typec3_usb_hs: endpoint {
};
};
};
+
+/ {
+ sound {
+ compatible = "apple,j375-macaudio", "apple,macaudio";
+ model = "Mac Studio J375 integrated audio";
+
+ /*
+ * DANGER ZONE: You can blow your speakers!
+ *
+ * The drivers are not ready, and unless you are careful
+ * to attenuate the audio stream, you run the risk of
+ * blowing your speakers.
+ */
+ status = "disabled";
+
+ dai-link@0 {
+ link-name = "Speaker";
+ mclk-fs = <64>;
+
+ cpu {
+ sound-dai = <&mca 0>;
+ };
+ codec {
+ sound-dai = <&speaker>;
+ };
+ };
+ };
+};
diff --git a/arch/arm64/boot/dts/apple/t6002-j375d.dts b/arch/arm64/boot/dts/apple/t6002-j375d.dts
index 72070e9a3277..58463d957d09 100644
--- a/arch/arm64/boot/dts/apple/t6002-j375d.dts
+++ b/arch/arm64/boot/dts/apple/t6002-j375d.dts
@@ -206,6 +206,18 @@ typec5_con_hs: endpoint {
};
};
+/* Audio */
+&i2c1 {
+ status = "okay";
+
+ speaker: codec@38 {
+ compatible = "ti,sn012776", "ti,tas2764";
+ reg = <0x38>;
+ shutdown-gpios = <&pinctrl_ap 178 GPIO_ACTIVE_HIGH>;
+ #sound-dai-cells = <0>;
+ };
+};
+
/* PCIe devices */
&port00 {
/* WLAN */
@@ -322,3 +334,31 @@ typec5_usb_hs: endpoint {
/delete-node/ &ps_disp0_cpu0_die1;
/delete-node/ &ps_disp0_fe_die1;
+
+/ {
+ sound {
+ compatible = "apple,j375-macaudio", "apple,macaudio";
+ model = "Mac Studio J375 integrated audio";
+
+ /*
+ * DANGER ZONE: You can blow your speakers!
+ *
+ * The drivers are not ready, and unless you are careful
+ * to attenuate the audio stream, you run the risk of
+ * blowing your speakers.
+ */
+ status = "disabled";
+
+ dai-link@0 {
+ link-name = "Speaker";
+ mclk-fs = <64>;
+
+ cpu {
+ sound-dai = <&mca 0>;
+ };
+ codec {
+ sound-dai = <&speaker>;
+ };
+ };
+ };
+};
diff --git a/arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi b/arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi
index c5241d5515cf..666183f385b5 100644
--- a/arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi
+++ b/arch/arm64/boot/dts/apple/t600x-j314-j316.dtsi
@@ -131,6 +131,62 @@ hpm5: usb-pd@3a {
};
};
+&i2c1 {
+ status = "okay";
+
+ speaker_left_tweet: codec@3a {
+ compatible = "ti,sn012776", "ti,tas2764";
+ reg = <0x3a>;
+ shutdown-gpios = <&pinctrl_ap 178 GPIO_ACTIVE_HIGH>;
+ #sound-dai-cells = <0>;
+ sound-name-prefix = "Left Tweeter";
+ };
+
+ speaker_left_woof1: codec@38 {
+ compatible = "ti,sn012776", "ti,tas2764";
+ reg = <0x38>;
+ shutdown-gpios = <&pinctrl_ap 178 GPIO_ACTIVE_HIGH>;
+ #sound-dai-cells = <0>;
+ sound-name-prefix = "Left Woofer 1";
+ };
+
+ speaker_left_woof2: codec@39 {
+ compatible = "ti,sn012776", "ti,tas2764";
+ reg = <0x39>;
+ shutdown-gpios = <&pinctrl_ap 178 GPIO_ACTIVE_HIGH>;
+ #sound-dai-cells = <0>;
+ sound-name-prefix = "Left Woofer 2";
+ };
+};
+
+&i2c3 {
+ status = "okay";
+
+ speaker_right_tweet: codec@3d {
+ compatible = "ti,sn012776", "ti,tas2764";
+ reg = <0x3d>;
+ shutdown-gpios = <&pinctrl_ap 178 GPIO_ACTIVE_HIGH>;
+ #sound-dai-cells = <0>;
+ sound-name-prefix = "Right Tweeter";
+ };
+
+ speaker_right_woof1: codec@3b {
+ compatible = "ti,sn012776", "ti,tas2764";
+ reg = <0x3b>;
+ shutdown-gpios = <&pinctrl_ap 178 GPIO_ACTIVE_HIGH>;
+ #sound-dai-cells = <0>;
+ sound-name-prefix = "Right Woofer 1";
+ };
+
+ speaker_right_woof2: codec@3c {
+ compatible = "ti,sn012776", "ti,tas2764";
+ reg = <0x3c>;
+ shutdown-gpios = <&pinctrl_ap 178 GPIO_ACTIVE_HIGH>;
+ #sound-dai-cells = <0>;
+ sound-name-prefix = "Right Woofer 2";
+ };
+};
+
&spi1 {
status = "disabled";
@@ -244,4 +300,35 @@ backlight: gpio-bl {
gpios = <&smc_gpio 19 GPIO_ACTIVE_HIGH>;
default-on;
};
+
+ sound {
+ compatible = "apple,j314-macaudio", "apple,macaudio";
+ model = "MacBook Pro J314/6 integrated audio";
+
+ /*
+ * DANGER ZONE: You can blow your speakers!
+ *
+ * The drivers are not ready, and unless you are careful
+ * to attenuate the audio stream, you run the risk of
+ * blowing your speakers.
+ */
+ status = "disabled";
+
+ dai-link@0 {
+ link-name = "Speakers";
+ mclk-fs = <256>;
+
+ cpu {
+ sound-dai = <&mca 0>, <&mca 1>;
+ };
+ codec {
+ sound-dai = <&speaker_left_woof1>,
+ <&speaker_right_woof1>,
+ <&speaker_left_tweet>,
+ <&speaker_right_tweet>,
+ <&speaker_left_woof2>,
+ <&speaker_right_woof2>;
+ };
+ };
+ };
};
--
2.34.1