From: Adrian Ratiu <adrian.ratiu@collabora.com>
To: Rob Herring <robh+dt@kernel.org>, Heiko Stuebner <heiko@sntech.de>
Cc: jack@radxa.com, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org,
kernel@collabora.com
Subject: [PATCH] arm64: dts: rockchip: add rock-pi-4 analog audio
Date: Mon, 28 Jun 2021 14:30:33 +0300 [thread overview]
Message-ID: <20210628113033.9145-1-adrian.ratiu@collabora.com> (raw)
This adds the necessary pinctrl and nodes to enable the
analog audio on rk3399 rock-pi-4 SBCs using the es8316
codec and the audio-graph-card driver.
Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
---
.../boot/dts/rockchip/rk3399-rock-pi-4.dtsi | 38 +++++++++++++++++++
1 file changed, 38 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 b28888ea9262..77781d9150ac 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399-rock-pi-4.dtsi
@@ -128,6 +128,12 @@ vdd_log: vdd-log {
regulator-max-microvolt = <1400000>;
vin-supply = <&vcc5v0_sys>;
};
+
+ sound {
+ compatible = "audio-graph-card";
+ label = "rockchip,rk3399";
+ dais = <&i2s0_p0>;
+ };
};
&cpu_l0 {
@@ -422,6 +428,24 @@ &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";
+ pinctrl-names = "default";
+ pinctrl-0 = <&hp_det_pin>;
+ interrupt-parent = <&gpio1>;
+ interrupts = <RK_PA0 IRQ_TYPE_LEVEL_HIGH>;
+ #sound-dai-cells = <0>;
+
+ port {
+ es8316_p0_0: endpoint {
+ remote-endpoint = <&i2s0_p0_0>;
+ };
+ };
+ };
};
&i2c3 {
@@ -441,6 +465,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 {
@@ -556,6 +588,12 @@ wifi_host_wake_l: wifi-host-wake-l {
rockchip,pins = <0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
};
};
+
+ es8316 {
+ hp_det_pin: hp-det-pin {
+ rockchip,pins = <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>;
+ };
+ };
};
&pwm2 {
--
2.32.0
next reply other threads:[~2021-06-28 11:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-28 11:30 Adrian Ratiu [this message]
2021-06-29 9:06 ` [PATCH] arm64: dts: rockchip: add rock-pi-4 analog audio Alex Bee
2021-06-29 15:07 ` Adrian Ratiu
2021-06-29 15:42 ` Robin Murphy
2021-06-29 17:04 ` Alex Bee
2021-06-29 17:30 ` Adrian Ratiu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210628113033.9145-1-adrian.ratiu@collabora.com \
--to=adrian.ratiu@collabora.com \
--cc=devicetree@vger.kernel.org \
--cc=heiko@sntech.de \
--cc=jack@radxa.com \
--cc=kernel@collabora.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).