[PATCH v1 11/18] ARM: tegra: tegratab: Add audio codec and sound card configuration

From: Svyatoslav Ryhel

Date: Sun Nov 22 2026 - 15:14:59 EST


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@xxxxxxxxx>
---
.../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