Basic I2S (IN and OUT) setup on CM3 and/or IO Board

One idea is to confirm that your I2S LR clock and bit clock line is wired in as expected, then set the “rockchip,clk-trcm” appropriately in the device tree.

Check out my setup for the dummy soundcard (this repo branch) which uses the rock3a (i2s bus 3).

It uses the rock3a as bus master - so that would have to change.

It sets up the dts like so (in this patch) :

+	sound {
+		status = "okay";
+		compatible = "simple-audio-card";
+		simple-audio-card,name = "test";
+		simple-audio-card,format="i2s";
+
+		simple-audio-card,bitclock-master = <&cpu_dai>;
+		simple-audio-card,frame-master = <&cpu_dai>;
+		simple-audio-card,mclk-fs = <256>;
+
+		cpu_dai: simple-audio-card,cpu {
+			sound-dai = <&i2s3_2ch>;
+		};
+
+		codec_dai: simple-audio-card,codec {
+			sound-dai = <&i2s3_out>;
+		};
+
+	};
+
+	i2s3_out: i2s3-out {
+		#sound-dai-cells = <0>;
+		compatible = "flatmax,bare";
+		status = "okay";
+	};
+
+
+	i2s3_2ch {
+		status = "okay";
+	};
+
1 Like