[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251020171059.2786070-12-wens@kernel.org>
Date: Tue, 21 Oct 2025 01:10:57 +0800
From: Chen-Yu Tsai <wens@...nel.org>
To: Chen-Yu Tsai <wens@...nel.org>,
Jernej Skrabec <jernej@...nel.org>,
Samuel Holland <samuel@...lland.org>,
Mark Brown <broonie@...nel.org>,
Stephen Boyd <sboyd@...nel.org>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Vinod Koul <vkoul@...nel.org>
Cc: linux-sunxi@...ts.linux.dev,
linux-sound@...r.kernel.org,
linux-clk@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
devicetree@...r.kernel.org,
dmaengine@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 11/11] [EXAMPLE] arm64: dts: allwinner: a527-cubie-a5e: Enable I2S and SPDIF output
This is an example change.
The Radxa Cubie A5E exposes I2S2 and SPDIF on the 40-pin header. Enable
both.
In this example, I2S2 is connected to adafruit speaker bonnet, which
sports a pair of MAX98357A for speaker amplication. SPDIF is connected
to a SPDIF interface card for PCs, which has both coaxial and optical
outputs. The output was connected via optical cable to a dumb SPDIF to
analog audio converter.
Signed-off-by: Chen-Yu Tsai <wens@...nel.org>
---
.../dts/allwinner/sun55i-a527-cubie-a5e.dts | 52 +++++++++++++++++++
1 file changed, 52 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts b/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts
index bfdf1728cd14..828d101d28e8 100644
--- a/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts
+++ b/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts
@@ -64,6 +64,46 @@ reg_usb_vbus: vbus {
gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
enable-active-high;
};
+
+ codec: audio-codec {
+ compatible = "maxim,max98360a";
+ #sound-dai-cells = <0>;
+ };
+
+ sound-i2s {
+ compatible = "simple-audio-card";
+ simple-audio-card,name = "I2S";
+ simple-audio-card,format = "left_j";
+ simple-audio-card,bitclock-master = <&dailink_cpu>;
+ simple-audio-card,frame-master = <&dailink_cpu>;
+ simple-audio-card,mclk-fs = <128>;
+
+ dailink_cpu: simple-audio-card,cpu {
+ sound-dai = <&i2s2>;
+ };
+
+ dailink0_master: simple-audio-card,codec {
+ sound-dai = <&codec>;
+ };
+ };
+
+ sound-spdif {
+ compatible = "simple-audio-card";
+ simple-audio-card,name = "spdif-out";
+
+ simple-audio-card,cpu {
+ sound-dai = <&spdif>;
+ };
+
+ simple-audio-card,codec {
+ sound-dai = <&spdif_out>;
+ };
+ };
+
+ spdif_out: spdif-out {
+ #sound-dai-cells = <0>;
+ compatible = "linux,spdif-dit";
+ };
};
&ehci0 {
@@ -101,6 +141,12 @@ &gpu {
status = "okay";
};
+&i2s2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&i2s2_pi_pins>;
+ status = "okay";
+};
+
&mdio0 {
ext_rgmii0_phy: ethernet-phy@1 {
compatible = "ethernet-phy-ieee802.3-c22";
@@ -344,6 +390,12 @@ &r_pio {
vcc-pm-supply = <®_aldo3>;
};
+&spdif {
+ pinctrl-names = "default";
+ pinctrl-0 = <&spdif_out_pi_pin>;
+ status = "okay";
+};
+
&uart0 {
pinctrl-names = "default";
pinctrl-0 = <&uart0_pb_pins>;
--
2.47.3
Powered by blists - more mailing lists