Devicetree
 help / color / mirror / Atom feed
From: Hongyang Zhao <hongyang.zhao@thundersoft.com>
To: Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>,  Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	 Conor Dooley <conor+dt@kernel.org>,
	Daniel Drake <drake@endlessm.com>,
	 Katsuhiro Suzuki <katsuhiro@katsuster.net>,
	 Matteo Martelli <matteomartelli3@gmail.com>,
	 Binbin Zhou <zhoubinbin@loongson.cn>,
	 Srinivas Kandagatla <srini@kernel.org>,
	Jaroslav Kysela <perex@perex.cz>,  Takashi Iwai <tiwai@suse.com>,
	Bjorn Andersson <andersson@kernel.org>,
	 Konrad Dybcio <konradybcio@kernel.org>
Cc: Mohammad Rafi Shaik <mohammad.rafi.shaik@oss.qualcomm.com>,
	 Roger Shimizu <rosh@debian.org>,
	linux-sound@vger.kernel.org,  linux-kernel@vger.kernel.org,
	linux-arm-msm@vger.kernel.org,  devicetree@vger.kernel.org,
	Hongyang Zhao <hongyang.zhao@thundersoft.com>
Subject: [PATCH v3 6/6] arm64: dts: qcom: qcs6490-rubikpi3: Add audio support
Date: Fri, 04 Sep 2026 18:02:30 +0800	[thread overview]
Message-ID: <20260904-rubikpi-next-20260605-v3-6-f49146d85af3@thundersoft.com> (raw)
In-Reply-To: <20260904-rubikpi-next-20260605-v3-0-f49146d85af3@thundersoft.com>

RubikPi 3 uses the AudioReach firmware path for its external audio
interfaces. Primary MI2S connects to an ES8316 codec for headset playback
and capture, while quaternary MI2S feeds the LT9611 HDMI bridge.

Describe the ES8316 supplies, MCLK, jack detection and audio routing, and
add the primary and quaternary MI2S links. The 1.8 V and 3.3 V codec
supplies are both controlled by GPIO117.

Signed-off-by: Hongyang Zhao <hongyang.zhao@thundersoft.com>
---
 .../boot/dts/qcom/qcs6490-thundercomm-rubikpi3.dts | 169 +++++++++++++++++++++
 1 file changed, 169 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/qcs6490-thundercomm-rubikpi3.dts b/arch/arm64/boot/dts/qcom/qcs6490-thundercomm-rubikpi3.dts
index 0f21777c480b..10277bee86b3 100644
--- a/arch/arm64/boot/dts/qcom/qcs6490-thundercomm-rubikpi3.dts
+++ b/arch/arm64/boot/dts/qcom/qcs6490-thundercomm-rubikpi3.dts
@@ -19,6 +19,7 @@
 #include "pm7325.dtsi"
 #include "pm8350c.dtsi" /* PM7350C */
 #include "pmk8350.dtsi" /* PMK7325 */
+#include "qcs6490-audioreach.dtsi"
 
 /delete-node/ &adsp_mem;
 /delete-node/ &cdsp_mem;
@@ -128,6 +129,33 @@ fan0: pwm-fan {
 		pinctrl-names = "default";
 	};
 
+	vreg_es8316_1v8: regulator-es8316-1v8 {
+		compatible = "regulator-fixed";
+
+		regulator-name = "vreg_es8316_1v8";
+		regulator-min-microvolt = <1800000>;
+		regulator-max-microvolt = <1800000>;
+
+		gpio = <&tlmm 117 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+
+		pinctrl-0 = <&es8316_power_on>;
+		pinctrl-names = "default";
+
+		vin-supply = <&vreg_l18b_1p8>;
+	};
+
+	vreg_es8316_3v3: regulator-es8316-3v3 {
+		compatible = "regulator-fixed";
+
+		regulator-name = "vreg_es8316_3v3";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+
+		gpio = <&tlmm 117 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+	};
+
 	vreg_eth_1v8: regulator-eth-1v8 {
 		compatible = "regulator-fixed";
 
@@ -743,6 +771,30 @@ &gpu_zap_shader {
 	firmware-name = "qcom/qcs6490/a660_zap.mbn";
 };
 
+&i2c0 {
+	status = "okay";
+
+	es8316: audio-codec@11 {
+		compatible = "everest,es8316";
+		reg = <0x11>;
+		#sound-dai-cells = <0>;
+
+		clocks = <&q6prmcc LPASS_CLK_ID_MCLK_1 LPASS_CLK_ATTRIBUTE_COUPLE_NO>;
+		clock-names = "mclk";
+
+		interrupts-extended = <&tlmm 63 IRQ_TYPE_LEVEL_HIGH>;
+		avdd-supply = <&vreg_es8316_3v3>;
+		cpvdd-supply = <&vreg_es8316_1v8>;
+		dvdd-supply = <&vreg_es8316_1v8>;
+		pvdd-supply = <&vreg_es8316_1v8>;
+
+		pinctrl-0 = <&es8316_jack_detect>;
+		pinctrl-names = "default";
+
+		everest,jack-detect-inverted;
+	};
+};
+
 /* Pin 3, 5 in 40-pin connector */
 &i2c1 {
 	status = "okay";
@@ -756,6 +808,7 @@ &i2c9 {
 	lt9611_codec: hdmi-bridge@39 {
 		compatible = "lontium,lt9611";
 		reg = <0x39>;
+		#sound-dai-cells = <1>;
 
 		interrupts-extended = <&tlmm 20 IRQ_TYPE_EDGE_FALLING>;
 		reset-gpios = <&tlmm 21 GPIO_ACTIVE_HIGH>;
@@ -994,6 +1047,23 @@ &pon_resin {
 	status = "okay";
 };
 
+&q6apmbedai {
+	#address-cells = <1>;
+	#size-cells = <0>;
+
+	dai@10 {
+		reg = <PRIMARY_MI2S_RX>;
+		clocks = <&q6prmcc LPASS_CLK_ID_PRI_MI2S_IBIT LPASS_CLK_ATTRIBUTE_COUPLE_NO>;
+		clock-names = "bclk";
+	};
+
+	dai@11 {
+		reg = <PRIMARY_MI2S_TX>;
+		clocks = <&q6prmcc LPASS_CLK_ID_PRI_MI2S_IBIT LPASS_CLK_ATTRIBUTE_COUPLE_NO>;
+		clock-names = "bclk";
+	};
+};
+
 &qupv3_id_0 {
 	firmware-name = "qcom/qcm6490/qupv3fw.elf";
 
@@ -1030,6 +1100,69 @@ &sdhc_2 {
 	status = "okay";
 };
 
+&sound {
+	compatible = "thundercomm,qcs6490-rubikpi3-sndcard";
+	model = "QCS6490-Thundercomm-RubikPi3";
+
+	pinctrl-0 = <&mi2s0_data0>, <&mi2s0_data1>, <&mi2s0_mclk>,
+		    <&mi2s0_sclk>, <&mi2s0_ws>,
+		    <&lpass_qua_mi2s_sclk>, <&lpass_qua_mi2s_ws>,
+		    <&lpass_qua_mi2s_data>;
+	pinctrl-names = "default";
+
+	audio-routing = "Headphone Jack", "HPOL",
+			"Headphone Jack", "HPOR",
+			"MIC2", "Mic Jack";
+
+	mi2s-capture-dai-link {
+		link-name = "Primary MI2S Capture";
+
+		codec {
+			sound-dai = <&es8316>;
+		};
+
+		cpu {
+			sound-dai = <&q6apmbedai PRIMARY_MI2S_TX>;
+		};
+
+		platform {
+			sound-dai = <&q6apm>;
+		};
+	};
+
+	mi2s-playback-dai-link {
+		link-name = "Primary MI2S Playback";
+
+		codec {
+			sound-dai = <&es8316>;
+		};
+
+		cpu {
+			sound-dai = <&q6apmbedai PRIMARY_MI2S_RX>;
+		};
+
+		platform {
+			sound-dai = <&q6apm>;
+		};
+	};
+
+	quaternary-mi2s-playback-dai-link {
+		link-name = "HDMI Playback";
+
+		codec {
+			sound-dai = <&lt9611_codec 0>;
+		};
+
+		cpu {
+			sound-dai = <&q6apmbedai QUATERNARY_MI2S_RX>;
+		};
+
+		platform {
+			sound-dai = <&q6apm>;
+		};
+	};
+};
+
 /* Pin 19, 21, 23, 24 in 40-pin connector */
 &spi12 {
 	status = "okay";
@@ -1244,6 +1377,29 @@ &sdc2_data {
 	drive-strength = <10>;
 };
 
+&lpass_tlmm {
+	lpass_qua_mi2s_sclk: qua-mi2s-sclk-state {
+		pins = "gpio0";
+		function = "qua_mi2s_sclk";
+		drive-strength = <8>;
+		bias-disable;
+	};
+
+	lpass_qua_mi2s_ws: qua-mi2s-ws-state {
+		pins = "gpio1";
+		function = "qua_mi2s_ws";
+		drive-strength = <8>;
+		bias-disable;
+	};
+
+	lpass_qua_mi2s_data: qua-mi2s-data-state {
+		pins = "gpio2", "gpio3", "gpio4";
+		function = "qua_mi2s_data";
+		drive-strength = <8>;
+		bias-disable;
+	};
+};
+
 &tlmm {
 	pcie1_reset_n: pcie1-reset-n-state {
 		pins = "gpio2";
@@ -1389,6 +1545,12 @@ m2_vcc_pin: m2-vcc-state {
 		input-disable;
 	};
 
+	es8316_jack_detect: es8316-jack-detect-state {
+		pins = "gpio63";
+		function = "gpio";
+		bias-disable;
+	};
+
 	lt9611_vcc_pin: lt9611-vcc-pin-state {
 		pins = "gpio83";
 		function = "gpio";
@@ -1418,6 +1580,13 @@ pcie0_wake_n: pcie0-wake-n-state {
 		bias-pull-up;
 	};
 
+	es8316_power_on: es8316-power-on-state {
+		pins = "gpio117";
+		function = "gpio";
+		drive-strength = <2>;
+		bias-pull-down;
+	};
+
 	wifi_power_on: wifi-power-on-state {
 		pins = "gpio125";
 		function = "gpio";

-- 
2.43.0


  parent reply	other threads:[~2026-09-04 10:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-04 10:02 [PATCH v3 0/6] Add audio support for QCS6490 Rubik Pi 3 Hongyang Zhao
2026-09-04 10:02 ` [PATCH v3 1/6] ASoC: dt-bindings: es8316: Document jack detect inversion Hongyang Zhao
2026-09-04 10:49   ` sashiko-bot
2026-09-04 10:02 ` [PATCH v3 2/6] ASoC: dt-bindings: qcom,sm8250: Add RubikPi 3 sound card Hongyang Zhao
2026-09-07  9:51   ` Krzysztof Kozlowski
2026-09-04 10:02 ` [PATCH v3 3/6] ASoC: qcom: common: Add generic headset jack helpers Hongyang Zhao
2026-09-04 10:54   ` sashiko-bot
2026-09-04 10:02 ` [PATCH v3 4/6] ASoC: qcom: sc8280xp: Add per-DAI board configuration Hongyang Zhao
2026-09-04 10:58   ` sashiko-bot
2026-09-04 10:02 ` [PATCH v3 5/6] ASoC: qcom: sc8280xp: Add RubikPi 3 sound card support Hongyang Zhao
2026-09-04 10:02 ` Hongyang Zhao [this message]
2026-09-04 10:59   ` [PATCH v3 6/6] arm64: dts: qcom: qcs6490-rubikpi3: Add audio support sashiko-bot
2026-09-07 12:27   ` Konrad Dybcio

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=20260904-rubikpi-next-20260605-v3-6-f49146d85af3@thundersoft.com \
    --to=hongyang.zhao@thundersoft.com \
    --cc=andersson@kernel.org \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=drake@endlessm.com \
    --cc=katsuhiro@katsuster.net \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=matteomartelli3@gmail.com \
    --cc=mohammad.rafi.shaik@oss.qualcomm.com \
    --cc=perex@perex.cz \
    --cc=robh@kernel.org \
    --cc=rosh@debian.org \
    --cc=srini@kernel.org \
    --cc=tiwai@suse.com \
    --cc=zhoubinbin@loongson.cn \
    /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