Devicetree
 help / color / mirror / Atom feed
From: Svyatoslav Ryhel <clamor95@gmail.com>
To: Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Thierry Reding <thierry.reding@kernel.org>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	Svyatoslav Ryhel <clamor95@gmail.com>,
	Mikko Perttunen <mperttunen@nvidia.com>
Cc: devicetree@vger.kernel.org, linux-tegra@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH v1 11/18] ARM: tegra: tegratab: Add audio codec and sound card configuration
Date: Sun, 22 Nov 2026 22:14:00 +0200	[thread overview]
Message-ID: <20261122201407.23742-12-clamor95@gmail.com> (raw)
In-Reply-To: <20261122201407.23742-1-clamor95@gmail.com>

The Tegratab supports RT5639 codec for audio processing. Add its node,
configure the ASoC sound card node, and link the codecs to it. Enable
i2s1 and i2s3 in the AHUB used by this device.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
---
 .../tegra114-nvidia-tegratab-common.dtsi      | 61 +++++++++++++++++++
 1 file changed, 61 insertions(+)

diff --git a/arch/arm/boot/dts/nvidia/tegra114-nvidia-tegratab-common.dtsi b/arch/arm/boot/dts/nvidia/tegra114-nvidia-tegratab-common.dtsi
index 911e5e9d8a0db..07091ffa6df19 100644
--- a/arch/arm/boot/dts/nvidia/tegra114-nvidia-tegratab-common.dtsi
+++ b/arch/arm/boot/dts/nvidia/tegra114-nvidia-tegratab-common.dtsi
@@ -989,6 +989,20 @@ gen1_i2c: i2c@7000c000 {
 		status = "okay";
 		clock-frequency = <100000>;
 
+		rt5639: audio-codec@1c {
+			compatible = "realtek,rt5639";
+			reg = <0x1c>;
+
+			clocks = <&tegra_pmc TEGRA_PMC_CLK_OUT_1>;
+			clock-names = "mclk";
+
+			interrupt-parent = <&gpio>;
+			interrupts = <TEGRA_GPIO(W, 3) IRQ_TYPE_LEVEL_HIGH>;
+
+			realtek,ldo1-en-gpios =
+				<&gpio TEGRA_GPIO(V, 3) GPIO_ACTIVE_HIGH>;
+		};
+
 		fuel-gauge@36 {
 			compatible = "maxim,max17048";
 			reg = <0x36>;
@@ -1346,6 +1360,18 @@ hda@70030000 {
 		status = "okay";
 	};
 
+	ahub@70080000 {
+		/* HIFI CODEC */
+		i2s@70080400 {		/* i2s1 */
+			status = "okay";
+		};
+
+		/* BT SCO */
+		i2s@70080600 {		/* i2s3 */
+			status = "okay";
+		};
+	};
+
 	/* Wifi */
 	sdmmc1: mmc@78000000 {
 		status = "okay";
@@ -1619,6 +1645,41 @@ vdd_3v3_com: regulator-com {
 		vin-supply = <&vdd_3v3_sys>;
 	};
 
+	sound {
+		compatible = "nvidia,tegra-audio-rt5639-tegratab",
+			     "nvidia,tegra-audio-rt5640";
+		nvidia,model = "Nvidia Tegra Note 7 RT5639";
+
+		nvidia,audio-routing =
+			"Headphone Jack", "HPOR",
+			"Headphone Jack", "HPOL",
+			"Int Spk", "SPORP",
+			"Int Spk", "SPORN",
+			"Int Spk", "SPOLP",
+			"Int Spk", "SPOLN",
+			"IN1P", "Mic Jack",
+			"IN1N", "Mic Jack",
+			"DMIC1", "Int Mic",
+			"DMIC2", "Int Mic";
+
+		nvidia,i2s-controller = <&tegra_i2s1>;
+		nvidia,audio-codec = <&rt5639>;
+
+		nvidia,hp-det-gpios = <&gpio TEGRA_GPIO(R, 7) GPIO_ACTIVE_LOW>; // check
+		nvidia,int-mic-en-gpios = <&gpio TEGRA_GPIO(K, 3) GPIO_ACTIVE_HIGH>;
+
+		clocks = <&tegra_car TEGRA114_CLK_PLL_A>,
+			 <&tegra_car TEGRA114_CLK_PLL_A_OUT0>,
+			 <&tegra_pmc TEGRA_PMC_CLK_OUT_1>;
+		clock-names = "pll_a", "pll_a_out0", "mclk";
+
+		assigned-clocks = <&tegra_car TEGRA114_CLK_EXTERN1>,
+				  <&tegra_pmc TEGRA_PMC_CLK_OUT_1>;
+
+		assigned-clock-parents = <&tegra_car TEGRA114_CLK_PLL_A_OUT0>,
+					 <&tegra_car TEGRA114_CLK_EXTERN1>;
+	};
+
 	thermistor: thermal-sensor-thermistor {
 		compatible = "generic-adc-thermal";
 		#thermal-sensor-cells = <0>;
-- 
2.53.0


  parent reply	other threads:[~2026-11-22 20:14 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-22 20:13 [PATCH v1 00/18] [WIP] ARM: tegra: Update Tegra Note 7 configuration Svyatoslav Ryhel
2026-11-22 20:13 ` [PATCH v1 01/18] dt-bindings: ARM: tegra: Document Tegra Note 7 variants Svyatoslav Ryhel
2026-11-22 20:13 ` [PATCH v1 02/18] ARM: tegra: Diverge Tegra Note 7 device tree to support its common versions Svyatoslav Ryhel
2026-11-22 20:13 ` [PATCH v1 03/18] ARM: tegra: tegratab: Upgrade powerlines configuration Svyatoslav Ryhel
2026-11-22 20:13 ` [PATCH v1 04/18] ARM: tegra: tegratab: Add pinmux node Svyatoslav Ryhel
2026-11-22 20:13 ` [PATCH v1 05/18] ARM: tegra: tegratab: Bind VDE device Svyatoslav Ryhel
2026-11-22 20:13 ` [PATCH v1 06/18] ARM: tegra: tegratab: Configure USB and power supply Svyatoslav Ryhel
2026-11-22 20:13 ` [PATCH v1 07/18] ARM: tegra: tegratab: Configure MMC devices Svyatoslav Ryhel
2026-11-22 20:13 ` [PATCH v1 08/18] ARM: tegra: tegratab: Configure wireless devices Svyatoslav Ryhel
2026-11-22 20:13 ` [PATCH v1 09/18] ARM: tegra: tegratab: Add thermal configuration Svyatoslav Ryhel
2026-11-22 20:13 ` [PATCH v1 10/18] ARM: tegra: tegratab: Configure HDMI Svyatoslav Ryhel
2026-11-22 20:14 ` Svyatoslav Ryhel [this message]
2026-11-22 20:14 ` [PATCH v1 12/18] ARM: tegra: tegratab: Add common sensor nodes Svyatoslav Ryhel
2026-11-22 20:14 ` [PATCH v1 13/18] ARM: tegra: tegratab: Add MC and EMC timing nodes Svyatoslav Ryhel
2026-11-22 20:14 ` [PATCH v1 14/18] ARM: tegra: tegratab: Add CPU DFLL clock node Svyatoslav Ryhel
2026-11-22 20:14 ` [PATCH v1 15/18] ARM: tegra: tegratab: Update GPIO keys and switches Svyatoslav Ryhel
2026-11-22 20:14 ` [PATCH v1 16/18] ARM: tegra: tegratab: Update aliases, chosen and memory nodes Svyatoslav Ryhel
2026-11-22 20:14 ` [PATCH v1 17/18] ARM: tegra: tegratab: Add video input configuration Svyatoslav Ryhel
2026-11-22 20:14 ` [PATCH v1 18/18] ARM: tegra: tegratab: Add panel rotation Svyatoslav Ryhel

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=20261122201407.23742-12-clamor95@gmail.com \
    --to=clamor95@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jonathanh@nvidia.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=mperttunen@nvidia.com \
    --cc=robh@kernel.org \
    --cc=thierry.reding@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