Commit 5862ae43 authored by Mohan Kumar's avatar Mohan Kumar Committed by Thierry Reding

arm64: tegra: Add audio support for IGX Orin

Add audio support for the NVIDIA IGX Orin development kit having P3701
module with P3740 carrier board.

Move the common device-tree nodes to a new file tegra234-p3701.dtsi and
use this for Jetson AGX Orin and NVIDIA IGX Orin platforms
Signed-off-by: default avatarMohan Kumar <mkumard@nvidia.com>
[treding@nvidia.com: properly sort nodes]
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
parent 20515700
// SPDX-License-Identifier: GPL-2.0 // SPDX-License-Identifier: GPL-2.0
#include "tegra234.dtsi" #include "tegra234.dtsi"
#include "tegra234-p3701.dtsi"
/ { / {
model = "NVIDIA Jetson AGX Orin"; model = "NVIDIA Jetson AGX Orin";
......
// SPDX-License-Identifier: GPL-2.0 // SPDX-License-Identifier: GPL-2.0
#include "tegra234.dtsi" #include "tegra234.dtsi"
#include "tegra234-p3701.dtsi"
/ { / {
compatible = "nvidia,p3701-0008", "nvidia,tegra234"; compatible = "nvidia,p3701-0008", "nvidia,tegra234";
......
This diff is collapsed.
// SPDX-License-Identifier: GPL-2.0 // SPDX-License-Identifier: GPL-2.0
#include <dt-bindings/sound/rt5640.h>
/ { / {
compatible = "nvidia,p3737-0000"; compatible = "nvidia,p3737-0000";
bus@0 { bus@0 {
aconnect@2900000 {
ahub@2900800 {
i2s@2901000 {
ports {
port@1 {
endpoint {
dai-format = "i2s";
remote-endpoint = <&rt5640_ep>;
};
};
};
};
};
};
i2c@3160000 { i2c@3160000 {
status = "okay"; status = "okay";
...@@ -20,6 +37,30 @@ eeprom@56 { ...@@ -20,6 +37,30 @@ eeprom@56 {
}; };
}; };
i2c@31e0000 {
status = "okay";
audio-codec@1c {
compatible = "realtek,rt5640";
reg = <0x1c>;
interrupt-parent = <&gpio>;
interrupts = <TEGRA234_MAIN_GPIO(AC, 5) GPIO_ACTIVE_HIGH>;
clocks = <&bpmp TEGRA234_CLK_AUD_MCLK>;
clock-names = "mclk";
realtek,dmic1-data-pin = <RT5640_DMIC1_DATA_PIN_NONE>;
realtek,dmic2-data-pin = <RT5640_DMIC2_DATA_PIN_NONE>;
realtek,jack-detect-source = <RT5640_JD_SRC_HDA_HEADER>;
sound-name-prefix = "CVB-RT";
port {
rt5640_ep: endpoint {
remote-endpoint = <&i2s1_dap>;
mclk-fs = <256>;
};
};
};
};
pwm@3280000 { pwm@3280000 {
status = "okay"; status = "okay";
}; };
......
...@@ -65,10 +65,6 @@ pcie@141e0000 { ...@@ -65,10 +65,6 @@ pcie@141e0000 {
phy-names = "p2u-0", "p2u-1"; phy-names = "p2u-0", "p2u-1";
}; };
aconnect@2900000 {
status = "okay";
};
serial@3100000 { serial@3100000 {
compatible = "nvidia,tegra194-hsuart"; compatible = "nvidia,tegra194-hsuart";
status = "okay"; status = "okay";
...@@ -104,7 +100,7 @@ spi@3270000 { ...@@ -104,7 +100,7 @@ spi@3270000 {
}; };
hda@3510000 { hda@3510000 {
nvidia,model = "NVIDIA IGX HDA"; nvidia,model = "NVIDIA IGX Orin HDA";
status = "okay"; status = "okay";
}; };
...@@ -152,4 +148,89 @@ key-suspend { ...@@ -152,4 +148,89 @@ key-suspend {
serial { serial {
status = "okay"; status = "okay";
}; };
sound {
status = "okay";
compatible = "nvidia,tegra186-audio-graph-card";
dais = /* ADMAIF (FE) Ports */
<&admaif0_port>, <&admaif1_port>, <&admaif2_port>, <&admaif3_port>,
<&admaif4_port>, <&admaif5_port>, <&admaif6_port>, <&admaif7_port>,
<&admaif8_port>, <&admaif9_port>, <&admaif10_port>, <&admaif11_port>,
<&admaif12_port>, <&admaif13_port>, <&admaif14_port>, <&admaif15_port>,
<&admaif16_port>, <&admaif17_port>, <&admaif18_port>, <&admaif19_port>,
/* XBAR Ports */
<&xbar_i2s1_port>, <&xbar_i2s2_port>, <&xbar_i2s4_port>,
<&xbar_i2s6_port>, <&xbar_dmic3_port>,
<&xbar_sfc1_in_port>, <&xbar_sfc2_in_port>,
<&xbar_sfc3_in_port>, <&xbar_sfc4_in_port>,
<&xbar_mvc1_in_port>, <&xbar_mvc2_in_port>,
<&xbar_amx1_in1_port>, <&xbar_amx1_in2_port>,
<&xbar_amx1_in3_port>, <&xbar_amx1_in4_port>,
<&xbar_amx2_in1_port>, <&xbar_amx2_in2_port>,
<&xbar_amx2_in3_port>, <&xbar_amx2_in4_port>,
<&xbar_amx3_in1_port>, <&xbar_amx3_in2_port>,
<&xbar_amx3_in3_port>, <&xbar_amx3_in4_port>,
<&xbar_amx4_in1_port>, <&xbar_amx4_in2_port>,
<&xbar_amx4_in3_port>, <&xbar_amx4_in4_port>,
<&xbar_adx1_in_port>, <&xbar_adx2_in_port>,
<&xbar_adx3_in_port>, <&xbar_adx4_in_port>,
<&xbar_mix_in1_port>, <&xbar_mix_in2_port>,
<&xbar_mix_in3_port>, <&xbar_mix_in4_port>,
<&xbar_mix_in5_port>, <&xbar_mix_in6_port>,
<&xbar_mix_in7_port>, <&xbar_mix_in8_port>,
<&xbar_mix_in9_port>, <&xbar_mix_in10_port>,
<&xbar_asrc_in1_port>, <&xbar_asrc_in2_port>,
<&xbar_asrc_in3_port>, <&xbar_asrc_in4_port>,
<&xbar_asrc_in5_port>, <&xbar_asrc_in6_port>,
<&xbar_asrc_in7_port>,
<&xbar_ope1_in_port>,
/* HW accelerators */
<&sfc1_out_port>, <&sfc2_out_port>,
<&sfc3_out_port>, <&sfc4_out_port>,
<&mvc1_out_port>, <&mvc2_out_port>,
<&amx1_out_port>, <&amx2_out_port>,
<&amx3_out_port>, <&amx4_out_port>,
<&adx1_out1_port>, <&adx1_out2_port>,
<&adx1_out3_port>, <&adx1_out4_port>,
<&adx2_out1_port>, <&adx2_out2_port>,
<&adx2_out3_port>, <&adx2_out4_port>,
<&adx3_out1_port>, <&adx3_out2_port>,
<&adx3_out3_port>, <&adx3_out4_port>,
<&adx4_out1_port>, <&adx4_out2_port>,
<&adx4_out3_port>, <&adx4_out4_port>,
<&mix_out1_port>, <&mix_out2_port>, <&mix_out3_port>,
<&mix_out4_port>, <&mix_out5_port>,
<&asrc_out1_port>, <&asrc_out2_port>, <&asrc_out3_port>,
<&asrc_out4_port>, <&asrc_out5_port>, <&asrc_out6_port>,
<&ope1_out_port>,
/* BE I/O Ports */
<&i2s1_port>, <&i2s2_port>, <&i2s4_port>, <&i2s6_port>,
<&dmic3_port>;
label = "NVIDIA IGX Orin APE";
widgets = "Microphone", "CVB-RT MIC Jack",
"Microphone", "CVB-RT MIC",
"Headphone", "CVB-RT HP Jack",
"Speaker", "CVB-RT SPK";
routing = /* I2S4 <-> RT5640 */
"CVB-RT AIF1 Playback", "I2S4 DAP-Playback",
"I2S4 DAP-Capture", "CVB-RT AIF1 Capture",
/* RT5640 codec controls */
"CVB-RT HP Jack", "CVB-RT HPOL",
"CVB-RT HP Jack", "CVB-RT HPOR",
"CVB-RT IN1P", "CVB-RT MIC Jack",
"CVB-RT IN2P", "CVB-RT MIC Jack",
"CVB-RT IN2N", "CVB-RT MIC Jack",
"CVB-RT IN3P", "CVB-RT MIC Jack",
"CVB-RT SPK", "CVB-RT SPOLP",
"CVB-RT SPK", "CVB-RT SPORP",
"CVB-RT SPK", "CVB-RT LOUTL",
"CVB-RT SPK", "CVB-RT LOUTR",
"CVB-RT DMIC1", "CVB-RT MIC",
"CVB-RT DMIC2", "CVB-RT MIC";
};
}; };
// SPDX-License-Identifier: GPL-2.0 // SPDX-License-Identifier: GPL-2.0
#include <dt-bindings/sound/rt5640.h>
/ { / {
compatible = "nvidia,p3740-0002"; compatible = "nvidia,p3740-0002";
bus@0 { bus@0 {
aconnect@2900000 {
ahub@2900800 {
i2s@2901300 {
ports {
port@1 {
endpoint {
dai-format = "i2s";
remote-endpoint = <&rt5640_ep>;
};
};
};
};
i2s@2901500 {
ports {
port@1 {
endpoint {
bitclock-master;
frame-master;
};
};
};
};
};
};
i2c@31c0000 { i2c@31c0000 {
rt5640: audio-codec@1c {
compatible = "realtek,rt5640";
reg = <0x1c>;
interrupt-parent = <&gpio>;
interrupts = <TEGRA234_MAIN_GPIO(F, 3) GPIO_ACTIVE_HIGH>;
clocks = <&bpmp TEGRA234_CLK_AUD_MCLK>;
clock-names = "mclk";
realtek,dmic1-data-pin = <RT5640_DMIC1_DATA_PIN_NONE>;
realtek,dmic2-data-pin = <RT5640_DMIC2_DATA_PIN_NONE>;
realtek,jack-detect-source = <RT5640_JD_SRC_HDA_HEADER>;
sound-name-prefix = "CVB-RT";
port {
rt5640_ep: endpoint {
remote-endpoint = <&i2s4_dap>;
mclk-fs = <256>;
};
};
};
/* carrier board ID EEPROM */ /* carrier board ID EEPROM */
eeprom@55 { eeprom@55 {
compatible = "atmel,24c02"; compatible = "atmel,24c02";
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment