mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
439 lines
11 KiB
Diff
439 lines
11 KiB
Diff
From 3af244a2705f3894814a305428501a614c26fb7a Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Martin=20Povi=C5=A1er?= <povik+lin@cutebit.org>
|
|
Date: Sat, 19 Feb 2022 09:49:59 +0100
|
|
Subject: [PATCH 013/171] arm64: dts: apple: t8103*: 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/t8103-j274.dts | 52 +++++++++++++++
|
|
arch/arm64/boot/dts/apple/t8103-j293.dts | 85 ++++++++++++++++++++++++
|
|
arch/arm64/boot/dts/apple/t8103-j313.dts | 61 +++++++++++++++++
|
|
arch/arm64/boot/dts/apple/t8103-j456.dts | 31 +++++++++
|
|
arch/arm64/boot/dts/apple/t8103-j457.dts | 40 +++++++++++
|
|
arch/arm64/boot/dts/apple/t8103.dtsi | 73 ++++++++++++++++++++
|
|
6 files changed, 342 insertions(+)
|
|
|
|
diff --git a/arch/arm64/boot/dts/apple/t8103-j274.dts b/arch/arm64/boot/dts/apple/t8103-j274.dts
|
|
index aaa3019a4db2..811008bd73f3 100644
|
|
--- a/arch/arm64/boot/dts/apple/t8103-j274.dts
|
|
+++ b/arch/arm64/boot/dts/apple/t8103-j274.dts
|
|
@@ -56,6 +56,58 @@ ethernet0: ethernet@0,0 {
|
|
};
|
|
};
|
|
|
|
+&i2c1 {
|
|
+ speaker_amp: codec@31 {
|
|
+ compatible = "ti,tas5770l", "ti,tas2770";
|
|
+ reg = <0x31>;
|
|
+ shutdown-gpios = <&pinctrl_ap 181 GPIO_ACTIVE_HIGH>;
|
|
+ #sound-dai-cells = <0>;
|
|
+ };
|
|
+};
|
|
+
|
|
&i2c2 {
|
|
status = "okay";
|
|
+
|
|
+ jack_codec: codec@48 {
|
|
+ compatible = "cirrus,cs42l83", "cirrus,cs42l42";
|
|
+ reg = <0x48>;
|
|
+ reset-gpios = <&pinctrl_nub 11 GPIO_ACTIVE_HIGH>;
|
|
+ interrupt-parent = <&pinctrl_ap>;
|
|
+ interrupts = <183 IRQ_TYPE_LEVEL_LOW>;
|
|
+ #sound-dai-cells = <0>;
|
|
+ cirrus,ts-inv = <1>;
|
|
+ sound-name-prefix = "Jack";
|
|
+ };
|
|
+};
|
|
+
|
|
+/ {
|
|
+ sound {
|
|
+ compatible = "apple,j274-macaudio", "apple,macaudio";
|
|
+ model = "Mac mini J274 integrated audio";
|
|
+
|
|
+ dai-link@0 {
|
|
+ link-name = "Speaker";
|
|
+ mclk-fs = <64>;
|
|
+
|
|
+ cpu {
|
|
+ sound-dai = <&mca 0>;
|
|
+ };
|
|
+ codec {
|
|
+ sound-dai = <&speaker_amp>;
|
|
+ };
|
|
+ };
|
|
+
|
|
+ dai-link@1 {
|
|
+ link-name = "Headphone Jack";
|
|
+ mclk-fs = <64>;
|
|
+
|
|
+ cpu {
|
|
+ sound-dai = <&mca 2>;
|
|
+ };
|
|
+ codec {
|
|
+ sound-dai = <&jack_codec>;
|
|
+ };
|
|
+ };
|
|
+
|
|
+ };
|
|
};
|
|
diff --git a/arch/arm64/boot/dts/apple/t8103-j293.dts b/arch/arm64/boot/dts/apple/t8103-j293.dts
|
|
index 6f1050185a80..7eb98e6b947c 100644
|
|
--- a/arch/arm64/boot/dts/apple/t8103-j293.dts
|
|
+++ b/arch/arm64/boot/dts/apple/t8103-j293.dts
|
|
@@ -68,8 +68,54 @@ &pcie0_dart_2 {
|
|
/delete-node/ &port01;
|
|
/delete-node/ &port02;
|
|
|
|
+&i2c1 {
|
|
+ speaker_left_rear: codec@31 {
|
|
+ compatible = "ti,tas5770l", "ti,tas2770";
|
|
+ reg = <0x31>;
|
|
+ shutdown-gpios = <&pinctrl_ap 181 GPIO_ACTIVE_HIGH>;
|
|
+ #sound-dai-cells = <0>;
|
|
+ sound-name-prefix = "Left Rear";
|
|
+ };
|
|
+
|
|
+ speaker_left_front: codec@32 {
|
|
+ compatible = "ti,tas5770l", "ti,tas2770";
|
|
+ reg = <0x32>;
|
|
+ shutdown-gpios = <&pinctrl_ap 181 GPIO_ACTIVE_HIGH>;
|
|
+ #sound-dai-cells = <0>;
|
|
+ sound-name-prefix = "Left Front";
|
|
+ };
|
|
+};
|
|
+
|
|
&i2c2 {
|
|
status = "okay";
|
|
+
|
|
+ jack_codec: codec@48 {
|
|
+ compatible = "cirrus,cs42l83", "cirrus,cs42l42";
|
|
+ reg = <0x48>;
|
|
+ reset-gpios = <&pinctrl_nub 11 GPIO_ACTIVE_HIGH>;
|
|
+ interrupt-parent = <&pinctrl_ap>;
|
|
+ interrupts = <183 IRQ_TYPE_LEVEL_LOW>;
|
|
+ #sound-dai-cells = <0>;
|
|
+ cirrus,ts-inv = <1>;
|
|
+ };
|
|
+};
|
|
+
|
|
+&i2c3 {
|
|
+ speaker_right_rear: codec@34 {
|
|
+ compatible = "ti,tas5770l", "ti,tas2770";
|
|
+ reg = <0x34>;
|
|
+ shutdown-gpios = <&pinctrl_ap 181 GPIO_ACTIVE_HIGH>;
|
|
+ #sound-dai-cells = <0>;
|
|
+ sound-name-prefix = "Right Rear";
|
|
+ };
|
|
+
|
|
+ speaker_right_front: codec@35 {
|
|
+ compatible = "ti,tas5770l", "ti,tas2770";
|
|
+ reg = <0x35>;
|
|
+ shutdown-gpios = <&pinctrl_ap 181 GPIO_ACTIVE_HIGH>;
|
|
+ #sound-dai-cells = <0>;
|
|
+ sound-name-prefix = "Right Front";
|
|
+ };
|
|
};
|
|
|
|
&i2c4 {
|
|
@@ -82,6 +128,45 @@ backlight: gpio-bl {
|
|
gpios = <&smc_gpio 18 GPIO_ACTIVE_HIGH>;
|
|
default-on;
|
|
};
|
|
+
|
|
+ sound {
|
|
+ compatible = "apple,j293-macaudio", "apple,macaudio";
|
|
+ model = "MacBook Pro J293 integrated audio";
|
|
+
|
|
+ dai-link@0 {
|
|
+ /*
|
|
+ * 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";
|
|
+
|
|
+ link-name = "Speakers";
|
|
+ mclk-fs = <64>;
|
|
+
|
|
+ cpu {
|
|
+ sound-dai = <&mca 0>, <&mca 1>;
|
|
+ };
|
|
+ codec {
|
|
+ sound-dai = <&speaker_left_front>, <&speaker_right_front>,
|
|
+ <&speaker_left_rear>, <&speaker_right_rear>;
|
|
+ };
|
|
+ };
|
|
+
|
|
+ dai-link@1 {
|
|
+ link-name = "Headphone Jack";
|
|
+ mclk-fs = <64>;
|
|
+
|
|
+ cpu {
|
|
+ sound-dai = <&mca 2>;
|
|
+ };
|
|
+ codec {
|
|
+ sound-dai = <&jack_codec>;
|
|
+ };
|
|
+ };
|
|
+ };
|
|
};
|
|
|
|
&framebuffer0 {
|
|
diff --git a/arch/arm64/boot/dts/apple/t8103-j313.dts b/arch/arm64/boot/dts/apple/t8103-j313.dts
|
|
index 3e4045c05905..ad3a6edeb651 100644
|
|
--- a/arch/arm64/boot/dts/apple/t8103-j313.dts
|
|
+++ b/arch/arm64/boot/dts/apple/t8103-j313.dts
|
|
@@ -68,12 +68,73 @@ &pcie0_dart_2 {
|
|
/delete-node/ &port01;
|
|
/delete-node/ &port02;
|
|
|
|
+&i2c1 {
|
|
+ speaker_left: codec@31 {
|
|
+ compatible = "ti,tas5770l", "ti,tas2770";
|
|
+ reg = <0x31>;
|
|
+ shutdown-gpios = <&pinctrl_ap 181 GPIO_ACTIVE_HIGH>;
|
|
+ #sound-dai-cells = <0>;
|
|
+ sound-name-prefix = "Left";
|
|
+
|
|
+ };
|
|
+};
|
|
+
|
|
+&i2c3 {
|
|
+ speaker_right: codec@34 {
|
|
+ compatible = "ti,tas5770l", "ti,tas2770";
|
|
+ reg = <0x34>;
|
|
+ shutdown-gpios = <&pinctrl_ap 181 GPIO_ACTIVE_HIGH>;
|
|
+ #sound-dai-cells = <0>;
|
|
+ sound-name-prefix = "Right";
|
|
+ };
|
|
+
|
|
+ jack_codec: codec@48 {
|
|
+ compatible = "cirrus,cs42l83", "cirrus,cs42l42";
|
|
+ reg = <0x48>;
|
|
+ reset-gpios = <&pinctrl_nub 11 GPIO_ACTIVE_HIGH>;
|
|
+ interrupt-parent = <&pinctrl_ap>;
|
|
+ interrupts = <183 IRQ_TYPE_LEVEL_LOW>;
|
|
+ #sound-dai-cells = <0>;
|
|
+ cirrus,ts-inv = <1>;
|
|
+ sound-name-prefix = "Jack";
|
|
+ };
|
|
+};
|
|
+
|
|
/ {
|
|
backlight: gpio-bl {
|
|
compatible = "gpio-backlight";
|
|
gpios = <&smc_gpio 18 GPIO_ACTIVE_HIGH>;
|
|
default-on;
|
|
};
|
|
+
|
|
+ sound {
|
|
+ compatible = "apple,j313-macaudio", "apple,macaudio";
|
|
+ model = "MacBook Air J313 integrated audio";
|
|
+
|
|
+ dai-link@0 {
|
|
+ link-name = "Speakers";
|
|
+ mclk-fs = <64>;
|
|
+
|
|
+ cpu {
|
|
+ sound-dai = <&mca 0>, <&mca 1>;
|
|
+ };
|
|
+ codec {
|
|
+ sound-dai = <&speaker_left>, <&speaker_right>;
|
|
+ };
|
|
+ };
|
|
+
|
|
+ dai-link@1 {
|
|
+ link-name = "Headphone Jack";
|
|
+ mclk-fs = <64>;
|
|
+
|
|
+ cpu {
|
|
+ sound-dai = <&mca 2>;
|
|
+ };
|
|
+ codec {
|
|
+ sound-dai = <&jack_codec>;
|
|
+ };
|
|
+ };
|
|
+ };
|
|
};
|
|
|
|
&framebuffer0 {
|
|
diff --git a/arch/arm64/boot/dts/apple/t8103-j456.dts b/arch/arm64/boot/dts/apple/t8103-j456.dts
|
|
index 3d0a91ac29ae..e65053f3bd2c 100644
|
|
--- a/arch/arm64/boot/dts/apple/t8103-j456.dts
|
|
+++ b/arch/arm64/boot/dts/apple/t8103-j456.dts
|
|
@@ -73,3 +73,34 @@ ethernet0: ethernet@0,0 {
|
|
local-mac-address = [00 10 18 00 00 00];
|
|
};
|
|
};
|
|
+
|
|
+&i2c1 {
|
|
+ jack_codec: codec@48 {
|
|
+ compatible = "cirrus,cs42l83", "cirrus,cs42l42";
|
|
+ reg = <0x48>;
|
|
+ reset-gpios = <&pinctrl_nub 11 GPIO_ACTIVE_HIGH>;
|
|
+ interrupt-parent = <&pinctrl_ap>;
|
|
+ interrupts = <183 IRQ_TYPE_LEVEL_LOW>;
|
|
+ #sound-dai-cells = <0>;
|
|
+ cirrus,ts-inv = <1>;
|
|
+ };
|
|
+};
|
|
+
|
|
+/ {
|
|
+ sound {
|
|
+ compatible = "apple,j456-macaudio", "apple,macaudio";
|
|
+ model = "iMac J456 integrated audio";
|
|
+
|
|
+ dai-link@0 {
|
|
+ link-name = "Headphone Jack";
|
|
+ mclk-fs = <64>;
|
|
+
|
|
+ cpu {
|
|
+ sound-dai = <&mca 2>;
|
|
+ };
|
|
+ codec {
|
|
+ sound-dai = <&jack_codec>;
|
|
+ };
|
|
+ };
|
|
+ };
|
|
+};
|
|
diff --git a/arch/arm64/boot/dts/apple/t8103-j457.dts b/arch/arm64/boot/dts/apple/t8103-j457.dts
|
|
index 7e3a0e95e837..925fe4058055 100644
|
|
--- a/arch/arm64/boot/dts/apple/t8103-j457.dts
|
|
+++ b/arch/arm64/boot/dts/apple/t8103-j457.dts
|
|
@@ -61,3 +61,43 @@ &pcie0_dart_1 {
|
|
};
|
|
|
|
/delete-node/ &port01;
|
|
+
|
|
+&i2c1 {
|
|
+ jack_codec: codec@48 {
|
|
+ compatible = "cirrus,cs42l83", "cirrus,cs42l42";
|
|
+ reg = <0x48>;
|
|
+ reset-gpios = <&pinctrl_nub 11 GPIO_ACTIVE_HIGH>;
|
|
+ interrupt-parent = <&pinctrl_ap>;
|
|
+ interrupts = <183 IRQ_TYPE_LEVEL_LOW>;
|
|
+ #sound-dai-cells = <0>;
|
|
+ cirrus,ts-inv = <1>;
|
|
+ };
|
|
+};
|
|
+
|
|
+/ {
|
|
+ sound {
|
|
+ compatible = "simple-audio-card";
|
|
+ simple-audio-card,name = "iMac integrated audio";
|
|
+ #address-cells = <1>;
|
|
+ #size-cells = <0>;
|
|
+
|
|
+ simple-audio-card,dai-link@0 {
|
|
+ bitclock-inversion;
|
|
+ frame-inversion;
|
|
+ reg = <0>;
|
|
+ format = "i2s";
|
|
+ mclk-fs = <64>;
|
|
+ tdm-slot-width = <32>;
|
|
+
|
|
+ link0_cpu: cpu {
|
|
+ sound-dai = <&mca 2>;
|
|
+ bitclock-master;
|
|
+ frame-master;
|
|
+ };
|
|
+
|
|
+ link0_codec: codec {
|
|
+ sound-dai = <&jack_codec>;
|
|
+ };
|
|
+ };
|
|
+ };
|
|
+};
|
|
diff --git a/arch/arm64/boot/dts/apple/t8103.dtsi b/arch/arm64/boot/dts/apple/t8103.dtsi
|
|
index f96a732e6211..afb0688cb1c2 100644
|
|
--- a/arch/arm64/boot/dts/apple/t8103.dtsi
|
|
+++ b/arch/arm64/boot/dts/apple/t8103.dtsi
|
|
@@ -917,6 +917,79 @@ port02: pci@2,0 {
|
|
<0 0 0 4 &port02 0 0 0 3>;
|
|
};
|
|
};
|
|
+
|
|
+ dart_sio: iommu@235004000 {
|
|
+ compatible = "apple,t8103-dart", "apple,dart";
|
|
+ reg = <0x2 0x35004000 0x0 0x4000>;
|
|
+ interrupt-parent = <&aic>;
|
|
+ interrupts = <AIC_IRQ 635 IRQ_TYPE_LEVEL_HIGH>;
|
|
+ #iommu-cells = <1>;
|
|
+ power-domains = <&ps_sio_cpu>;
|
|
+ };
|
|
+
|
|
+ nco_inp: clock-ref {
|
|
+ compatible = "fixed-factor-clock";
|
|
+ clocks = <&clkref>;
|
|
+ #clock-cells = <0>;
|
|
+ clock-mult = <75>;
|
|
+ clock-div = <2>; // 24 MHz * (75/2) = 900 MHz
|
|
+ clock-output-names = "nco_inp";
|
|
+ };
|
|
+
|
|
+ nco: nco@23b044000 {
|
|
+ compatible = "apple,t8103-nco", "apple,nco";
|
|
+ reg = <0x2 0x3b044000 0x0 0x14000>;
|
|
+ clocks = <&nco_inp>;
|
|
+ #clock-cells = <1>;
|
|
+ apple,nchannels = <5>;
|
|
+ };
|
|
+
|
|
+ admac: dma-controller@238200000 {
|
|
+ compatible = "apple,t8103-admac", "apple,admac";
|
|
+ reg = <0x2 0x38200000 0x0 0x34000>;
|
|
+ dma-channels = <24>;
|
|
+ interrupt-parent = <&aic>;
|
|
+ interrupts = <AIC_IRQ 626 IRQ_TYPE_LEVEL_HIGH>;
|
|
+ #dma-cells = <1>;
|
|
+ iommus = <&dart_sio 2>;
|
|
+ power-domains = <&ps_sio_adma>;
|
|
+ apple,internal-irq-destination = <1>;
|
|
+ };
|
|
+
|
|
+ mca: mca@38400000 {
|
|
+ compatible = "apple,t8103-mca", "apple,mca";
|
|
+ reg = <0x2 0x38400000 0x0 0x18000>,
|
|
+ <0x2 0x38300000 0x0 0x30000>;
|
|
+ reg-names = "clusters", "switch";
|
|
+
|
|
+ interrupt-parent = <&aic>;
|
|
+ interrupts = <AIC_IRQ 619 IRQ_TYPE_LEVEL_HIGH>,
|
|
+ <AIC_IRQ 620 IRQ_TYPE_LEVEL_HIGH>,
|
|
+ <AIC_IRQ 621 IRQ_TYPE_LEVEL_HIGH>,
|
|
+ <AIC_IRQ 622 IRQ_TYPE_LEVEL_HIGH>,
|
|
+ <AIC_IRQ 623 IRQ_TYPE_LEVEL_HIGH>,
|
|
+ <AIC_IRQ 624 IRQ_TYPE_LEVEL_HIGH>;
|
|
+
|
|
+ clocks = <&nco 0>, <&nco 1>, <&nco 2>,
|
|
+ <&nco 3>, <&nco 4>, <&nco 4>;
|
|
+ power-domains = <&ps_audio_p>, <&ps_mca0>, <&ps_mca1>,
|
|
+ <&ps_mca2>, <&ps_mca3>, <&ps_mca4>, <&ps_mca5>;
|
|
+ dmas = <&admac 0>, <&admac 1>, <&admac 2>, <&admac 3>,
|
|
+ <&admac 4>, <&admac 5>, <&admac 6>, <&admac 7>,
|
|
+ <&admac 8>, <&admac 9>, <&admac 10>, <&admac 11>,
|
|
+ <&admac 12>, <&admac 13>, <&admac 14>, <&admac 15>,
|
|
+ <&admac 16>, <&admac 17>, <&admac 18>, <&admac 19>,
|
|
+ <&admac 20>, <&admac 21>, <&admac 22>, <&admac 23>;
|
|
+ dma-names = "tx0a", "rx0a", "tx0b", "rx0b",
|
|
+ "tx1a", "rx1a", "tx1b", "rx1b",
|
|
+ "tx2a", "rx2a", "tx2b", "rx2b",
|
|
+ "tx3a", "rx3a", "tx3b", "rx3b",
|
|
+ "tx4a", "rx4a", "tx4b", "rx4b",
|
|
+ "tx5a", "rx5a", "tx5b", "rx5b";
|
|
+
|
|
+ #sound-dai-cells = <1>;
|
|
+ apple,nclusters = <6>;
|
|
+ };
|
|
};
|
|
};
|
|
|
|
--
|
|
2.34.1
|
|
|