Skip to content

Commit b903a6c

Browse files
pujarsthierryreding
authored andcommitted
arm64: tegra: Audio codec support on Jetson AGX Orin
Jetson AGX Orin has onboard RT5640 audio codec. This patch adds the codec device node and the bindings to I2S1 interface. Signed-off-by: Sameer Pujar <spujar@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
1 parent e63472e commit b903a6c

1 file changed

Lines changed: 44 additions & 1 deletion

File tree

arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701-0000.dts

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
#include <dt-bindings/input/linux-event-codes.h>
55
#include <dt-bindings/input/gpio-keys.h>
6+
#include <dt-bindings/sound/rt5640.h>
67

78
#include "tegra234-p3701-0000.dtsi"
89
#include "tegra234-p3737-0000.dtsi"
@@ -49,7 +50,7 @@
4950

5051
i2s1_dap: endpoint {
5152
dai-format = "i2s";
52-
/* placeholder for external codec */
53+
remote-endpoint = <&rt5640_ep>;
5354
};
5455
};
5556
};
@@ -2017,6 +2018,30 @@
20172018
status = "okay";
20182019
};
20192020

2021+
i2c@31e0000 {
2022+
status = "okay";
2023+
2024+
audio-codec@1c {
2025+
compatible = "realtek,rt5640";
2026+
reg = <0x1c>;
2027+
interrupt-parent = <&gpio>;
2028+
interrupts = <TEGRA234_MAIN_GPIO(AC, 5) GPIO_ACTIVE_HIGH>;
2029+
clocks = <&bpmp TEGRA234_CLK_AUD_MCLK>;
2030+
clock-names = "mclk";
2031+
realtek,dmic1-data-pin = <RT5640_DMIC1_DATA_PIN_NONE>;
2032+
realtek,dmic2-data-pin = <RT5640_DMIC2_DATA_PIN_NONE>;
2033+
realtek,jack-detect-source = <RT5640_JD_SRC_HDA_HEADER>;
2034+
sound-name-prefix = "CVB-RT";
2035+
2036+
port {
2037+
rt5640_ep: endpoint {
2038+
remote-endpoint = <&i2s1_dap>;
2039+
mclk-fs = <256>;
2040+
};
2041+
};
2042+
};
2043+
};
2044+
20202045
pwm@32a0000 {
20212046
assigned-clocks = <&bpmp TEGRA234_CLK_PWM3>;
20222047
assigned-clock-parents = <&bpmp TEGRA234_CLK_PLLP_OUT0>;
@@ -2293,5 +2318,23 @@
22932318
<&dmic3_port>;
22942319

22952320
label = "NVIDIA Jetson AGX Orin APE";
2321+
2322+
widgets = "Microphone", "CVB-RT MIC Jack",
2323+
"Microphone", "CVB-RT MIC",
2324+
"Headphone", "CVB-RT HP Jack",
2325+
"Speaker", "CVB-RT SPK";
2326+
2327+
routing = /* I2S1 <-> RT5640 */
2328+
"CVB-RT AIF1 Playback", "I2S1 DAP-Playback",
2329+
"I2S1 DAP-Capture", "CVB-RT AIF1 Capture",
2330+
/* RT5640 codec controls */
2331+
"CVB-RT HP Jack", "CVB-RT HPOL",
2332+
"CVB-RT HP Jack", "CVB-RT HPOR",
2333+
"CVB-RT IN1P", "CVB-RT MIC Jack",
2334+
"CVB-RT IN2P", "CVB-RT MIC Jack",
2335+
"CVB-RT SPK", "CVB-RT SPOLP",
2336+
"CVB-RT SPK", "CVB-RT SPORP",
2337+
"CVB-RT DMIC1", "CVB-RT MIC",
2338+
"CVB-RT DMIC2", "CVB-RT MIC";
22962339
};
22972340
};

0 commit comments

Comments
 (0)