Hi, we are using our custom board with orin nx. And want to test rt5640.
I followed the
and here is my custom device tree
{
bus@0 {
/*pin 232 234*/
i2c@3160000 {
rt5640: rt5640@1c {
status = "okay";
compatible = "realtek,rt5640";
reg = <0x1c>;
clocks = <&bpmp TEGRA234_CLK_AUD_MCLK>;
clock-names = "mclk";
sound-name-prefix = "CVB-RT";
port {
rt5640_ep: endpoint {
remote-endpoint = <&i2s1_dap>;
mclk-fs = <256>;
};
};
};
};
/*ALC5640*/
tegra_sound_graph: tegra_sound: sound {
compatible = "nvidia,tegra186-audio-graph-card",
"nvidia,tegra186-ape";
clocks = <&bpmp TEGRA234_CLK_PLLA>,
<&bpmp TEGRA234_CLK_PLLA_OUT0>,
<&bpmp TEGRA234_CLK_AUD_MCLK>;
clock-names = "pll_a", "plla_out0", "extern1";
assigned-clocks = <&bpmp TEGRA234_CLK_AUD_MCLK>;
assigned-clock-parents = <&bpmp TEGRA234_CLK_PLLA_OUT0>;
nvidia-audio-card,name = "NVIDIA Jetson Orin NX APE";
nvidia-audio-card,widgets =
"Headphone", "CVB-RT Headphone Jack",
"Microphone", "CVB-RT Mic Jack",
"Speaker", "CVB-RT Int Spk",
"Microphone", "CVB-RT Int Mic";
nvidia-audio-card,routing =
"CVB-RT Headphone Jack", "CVB-RT HPOL",
"CVB-RT Headphone Jack", "CVB-RT HPOR",
"CVB-RT IN1P", "CVB-RT Mic Jack",
"CVB-RT IN2P", "CVB-RT Mic Jack",
"CVB-RT IN1P", "CVB-RT Int Mic",
"CVB-RT IN2P", "CVB-RT Int Mic",
"CVB-RT Int Spk", "CVB-RT SPOLP",
"CVB-RT Int Spk", "CVB-RT SPORP",
"CVB-RT Line Out", "CVB-RT LOUTL",
"CVB-RT Line Out", "CVB-RT LOUTR";
};
};
&i2s1_to_codec {
link-name = "rt5640-playback";
bitclock-master;
frame-master;
codec {
sound-dai = <&rt5640 0>;
prefix = "CVB-RT";
};
};
/* Audio graph related bindings */
&i2s1_dap {
//bitclock-master;
//frame-master;
remote-endpoint = <&rt5640_ep>;
};
And when system boot I can’t find the APE card
uis.c.root@uis:~$ cat /proc/asound/cards
0 [V1 ]: USB-Audio - HK DXMIC V1
CF-IC HK DXMIC V1 at usb-3610000.usb-2.1.1, full speed
1 [HDA ]: tegra-hda - NVIDIA Jetson Orin NX HDA
NVIDIA Jetson Orin NX HDA at 0x3518000 irq 120