linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
To: Sudeep Holla <sudeep.holla@arm.com>,
	Cristian Marussi <cristian.marussi@arm.com>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,
	Nicolas Frattaroli <frattaroli.nicolas@gmail.com>,
	Heiko Stuebner <heiko@sntech.de>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Daniel Drake <drake@endlessm.com>,
	Katsuhiro Suzuki <katsuhiro@katsuster.net>
Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org,
	alsa-devel@alsa-project.org, linux-rockchip@lists.infradead.org,
	linux-riscv@lists.infradead.org, kernel@collabora.com
Subject: [PATCH 11/11] arm64: dts: rockchip: rk3588-rock-5b: Add analog audio
Date: Wed, 15 Mar 2023 13:48:06 +0200	[thread overview]
Message-ID: <20230315114806.3819515-12-cristian.ciocaltea@collabora.com> (raw)
In-Reply-To: <20230315114806.3819515-1-cristian.ciocaltea@collabora.com>

Add the necessary DT nodes for the Rock 5B board to enable the analog
audio support provided by the Everest Semi ES8316 codec.

Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
---
 .../boot/dts/rockchip/rk3588-rock-5b.dts      | 62 +++++++++++++++++++
 1 file changed, 62 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
index 95805cb0adfa..945eac304766 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
@@ -2,6 +2,7 @@
 
 /dts-v1/;
 
+#include <dt-bindings/gpio/gpio.h>
 #include "rk3588.dtsi"
 
 / {
@@ -25,6 +26,59 @@ vcc5v0_sys: vcc5v0-sys-regulator {
 		regulator-min-microvolt = <5000000>;
 		regulator-max-microvolt = <5000000>;
 	};
+
+	sound {
+		compatible = "audio-graph-card";
+		label = "Analog";
+
+		widgets = "Microphone", "Mic Jack",
+			  "Headphone", "Headphones";
+
+		routing = "MIC2", "Mic Jack",
+			  "Headphones", "HPOL",
+			  "Headphones", "HPOR";
+
+		dais = <&i2s0_8ch_p0>;
+		hp-det-gpio = <&gpio1 RK_PD5 GPIO_ACTIVE_HIGH>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&hp_detect>;
+	};
+};
+
+&i2c7 {
+	status = "okay";
+
+	es8316: es8316@11 {
+		compatible = "everest,es8316";
+		reg = <0x11>;
+		clocks = <&cru I2S0_8CH_MCLKOUT>;
+		clock-names = "mclk";
+		#sound-dai-cells = <0>;
+
+		port {
+			es8316_p0_0: endpoint {
+				remote-endpoint = <&i2s0_8ch_p0_0>;
+			};
+		};
+	};
+};
+
+&i2s0_8ch {
+	pinctrl-names = "default";
+	pinctrl-0 = <&i2s0_lrck
+		     &i2s0_mclk
+		     &i2s0_sclk
+		     &i2s0_sdi0
+		     &i2s0_sdo0>;
+	status = "okay";
+
+	i2s0_8ch_p0: port {
+		i2s0_8ch_p0_0: endpoint {
+			dai-format = "i2s";
+			mclk-fs = <256>;
+			remote-endpoint = <&es8316_p0_0>;
+		};
+	};
 };
 
 &sdhci {
@@ -42,3 +96,11 @@ &uart2 {
 	pinctrl-0 = <&uart2m0_xfer>;
 	status = "okay";
 };
+
+&pinctrl {
+	sound {
+		hp_detect: hp-detect {
+			rockchip,pins = <1 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
+};
-- 
2.39.1


  parent reply	other threads:[~2023-03-15 11:50 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-15 11:47 [PATCH 00/11] Enable I2S support for RK3588/RK3588S SoCs Cristian Ciocaltea
2023-03-15 11:47 ` [PATCH 01/11] dt-bindings: firmware: arm,scmi: Document assigned-clocks and assigned-clock-rates Cristian Ciocaltea
2023-03-16 20:34   ` Rob Herring
2023-03-16 22:26     ` Sudeep Holla
2023-03-17  9:59       ` Cristian Ciocaltea
2023-03-17 14:27         ` Rob Herring
2023-03-17 17:21           ` Cristian Ciocaltea
2023-03-15 11:47 ` [PATCH 02/11] dt-bindings: serial: snps-dw-apb-uart: Relax dma-names order constraint Cristian Ciocaltea
2023-03-17  8:31   ` Krzysztof Kozlowski
2023-03-17 10:21     ` Cristian Ciocaltea
2023-03-17 15:54       ` Krzysztof Kozlowski
2023-03-17 16:26         ` Conor Dooley
2023-03-17 17:43           ` Cristian Ciocaltea
2023-03-20 16:01             ` Rob Herring
2023-03-20 19:23               ` Cristian Ciocaltea
     [not found]     ` <167904851367.26.16449705310108549543@mailman-core.alsa-project.org>
2023-03-20 15:58       ` Rob Herring
2023-03-20 16:28         ` Mark Brown
2023-03-15 11:47 ` [PATCH 03/11] ASoC: dt-bindings: everest,es8316: Document audio graph port Cristian Ciocaltea
2023-03-20 16:02   ` Rob Herring
2023-03-15 11:47 ` [PATCH 04/11] ASoC: dt-bindings: rockchip: " Cristian Ciocaltea
2023-03-20 16:02   ` Rob Herring
2023-03-15 11:48 ` [PATCH 05/11] ASoC: dt-bindings: rockchip: i2s-tdm: " Cristian Ciocaltea
2023-03-20 16:02   ` Rob Herring
2023-03-15 11:48 ` [PATCH 06/11] ASoC: dt-bindings: rockchip: i2s-tdm: Document power-domains Cristian Ciocaltea
2023-03-20 16:03   ` Rob Herring
2023-03-15 11:48 ` [PATCH 07/11] ASoC: dt-bindings: rockchip: Add compatible for RK3588 Cristian Ciocaltea
2023-03-20 16:03   ` Rob Herring
2023-03-15 11:48 ` [PATCH 08/11] ASoC: rockchip: i2s: " Cristian Ciocaltea
2023-03-15 11:48 ` [PATCH 09/11] arm64: dts: rockchip: rk3588s: Add I2S nodes Cristian Ciocaltea
2023-03-15 11:48 ` [PATCH 10/11] arm64: dts: rockchip: rk3588: " Cristian Ciocaltea
2023-03-15 11:48 ` Cristian Ciocaltea [this message]
2023-03-20 18:31 ` (subset) [PATCH 00/11] Enable I2S support for RK3588/RK3588S SoCs Mark Brown

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=20230315114806.3819515-12-cristian.ciocaltea@collabora.com \
    --to=cristian.ciocaltea@collabora.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=aou@eecs.berkeley.edu \
    --cc=broonie@kernel.org \
    --cc=cristian.marussi@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=drake@endlessm.com \
    --cc=frattaroli.nicolas@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=heiko@sntech.de \
    --cc=katsuhiro@katsuster.net \
    --cc=kernel@collabora.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=perex@perex.cz \
    --cc=robh+dt@kernel.org \
    --cc=sudeep.holla@arm.com \
    --cc=tiwai@suse.com \
    /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).