linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] arm64: dts: rockchip: add ES8316 codec for Rock Pi4
@ 2021-06-17  4:49 Alex Bee
  2021-06-17  4:49 ` [PATCH 2/3] arm64: dts: rockchip: Add RK3399 Rock Pi 4a plus board Alex Bee
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Alex Bee @ 2021-06-17  4:49 UTC (permalink / raw)
  To: Heiko Stuebner
  Cc: devicetree, balbi, gregkh, linux-usb, linux-kernel,
	linux-rockchip, robh+dt, linux-arm-kernel, Alex Bee

Rock Pi4 boards have the codec connected to i2s0 and it is accessible
via i2c1 address 0x11.
Add an audio-graph-card it.

Signed-off-by: Alex Bee <knaerzche@gmail.com>
---
 .../boot/dts/rockchip/rk3399-rock-pi-4.dtsi   | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi
index 7d0a7c697703..e5c1083174ff 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi
@@ -36,6 +36,12 @@ sdio_pwrseq: sdio-pwrseq {
 		reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>;
 	};
 
+	sound {
+		compatible = "audio-graph-card";
+		label = "rockchip,rk3399";
+		dais = <&i2s0_p0>;
+	};
+
 	vcc12v_dcin: dc-12v {
 		compatible = "regulator-fixed";
 		regulator-name = "vcc12v_dcin";
@@ -422,6 +428,20 @@ &i2c1 {
 	i2c-scl-rising-time-ns = <300>;
 	i2c-scl-falling-time-ns = <15>;
 	status = "okay";
+
+	es8316: codec@11 {
+		compatible = "everest,es8316";
+		reg = <0x11>;
+		clocks = <&cru SCLK_I2S_8CH_OUT>;
+		clock-names = "mclk";
+		#sound-dai-cells = <0>;
+
+		port {
+			es8316_p0_0: endpoint {
+				remote-endpoint = <&i2s0_p0_0>;
+			};
+		};
+	};
 };
 
 &i2c3 {
@@ -441,6 +461,14 @@ &i2s0 {
 	rockchip,capture-channels = <2>;
 	rockchip,playback-channels = <2>;
 	status = "okay";
+
+	i2s0_p0: port {
+		i2s0_p0_0: endpoint {
+			dai-format = "i2s";
+			mclk-fs = <256>;
+			remote-endpoint = <&es8316_p0_0>;
+		};
+	};
 };
 
 &i2s1 {
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-06-18 16:30 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-17  4:49 [PATCH 1/3] arm64: dts: rockchip: add ES8316 codec for Rock Pi4 Alex Bee
2021-06-17  4:49 ` [PATCH 2/3] arm64: dts: rockchip: Add RK3399 Rock Pi 4a plus board Alex Bee
2021-06-18 13:08   ` Heiko Stübner
2021-06-18 16:30     ` Alex Bee
2021-06-17  4:49 ` [PATCH 3/3] arm64: dts: rockchip: Add RK3399 Rock Pi 4b " Alex Bee
2021-06-18  9:54 ` [PATCH 1/3] arm64: dts: rockchip: add ES8316 codec for Rock Pi4 Johan Jonker
2021-06-18 16:14   ` Alex Bee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).