gpio09配置为AUD_MCLK要怎么设置

背景:orin nx, sdk6.2.1, Ubuntu22.04, 自研底板

这里要把GPIO09配置为什AUD_MCLK用,要怎么配置?

*** Please note that this reply is generated by LLM automatically ***

Based on the provided context, it appears that you are asking about the Jetson Orin NX module, specifically the SDK version, operating system, and GPIO configuration.

Here’s a breakdown of the information:

  1. Jetson Orin NX: This is a module from NVIDIA’s Jetson series, which is a family of embedded computing boards designed for AI, computer vision, and robotics applications.
  2. SDK version: The SDK version mentioned is “sdk621”. This likely refers to the JetPack SDK, which is a software development kit provided by NVIDIA for developing applications on Jetson modules. The version number “621” might indicate a specific release or update of the SDK.
  3. Ubuntu 22.04: This is the operating system running on the Jetson Orin NX module. Ubuntu is a popular Linux distribution, and version 22.04 is a specific release of the operating system.
  4. GPIO09AUDMCLK image: This appears to be a specific configuration or image related to the GPIO (General Purpose Input/Output) pins on the Jetson Orin NX module. GPIO09AUDMCLK might refer to a specific pin or signal on the module.
  5. 690283: This number might be a build number, revision number, or some other identifier related to the image or configuration.
  6. 266 KB: This is likely the size of the image or configuration file.

In comparison to other Jetson modules, the Orin NX is a more recent release, and its SDK and operating system versions might be different from those of older modules. For example, the Jetson Xavier NX and Jetson AGX Xavier modules might have different SDK versions and operating system releases.

To provide a more comprehensive answer, I would need more information about the specific requirements or questions you have regarding the Jetson Orin NX module. However, based on the provided context, it appears that you are working with a specific configuration or image on the Jetson Orin NX module, and you might be looking for information on how to develop applications or configure the module using the provided SDK and operating system.

*** Please give the thumbs up if you get answers you like. Or provide feedback to help us improve the answer. ***

Hi jeremyzhang,

What’s your use case for this pin?
Are you trying to configure it for Audio Clock?

Have you tried to configure it through pinmux spreadsheet?

做Audio Clock用,

把GPIO09配置为AUD_MCLK,es8389挂在i2s2上

参照:Jetson_Orin_NX_and_Orin_Nano_series_Pinmux_Config_Template.xlsm

211 GPIO09 GPIO09 (AUD_MCLK) 50k pd GPIO3_PAC.06 Input Int PU Initiator Disable GPIO #9 or Audio Codec Master Clock

配置:
root@wel-tegra:/home/wel# cat /sys/kernel/debug/pinctrl/2430000.pinmux/pinmux-pins | grep -E “soc_gpio41_ph7|soc_gpio42_pi0|soc_gpio43_pi1|soc_gpio44_pi2|soc_gpio59_pac6”
pin 50 (SOC_GPIO41_PH7): 2901100.i2s (GPIO UNCLAIMED) function i2s2 group soc_gpio41_ph7
pin 51 (SOC_GPIO42_PI0): 2901100.i2s (GPIO UNCLAIMED) function i2s2 group soc_gpio42_pi0
pin 52 (SOC_GPIO43_PI1): 2901100.i2s (GPIO UNCLAIMED) function i2s2 group soc_gpio43_pi1
pin 53 (SOC_GPIO44_PI2): 2901100.i2s (GPIO UNCLAIMED) function i2s2 group soc_gpio44_pi2
pin 144 (SOC_GPIO59_PAC6): 2901100.i2s (GPIO UNCLAIMED) function aud group soc_gpio59_pac6
root@wel-tegra:/home/wel# cat /sys/kernel/debug/clk/clk_summary | grep -E “i2s2|aud_mclk”
i2s2_sync_input 0 0 0 0 0 0 50000 Y
i2s2_sync_clk 0 0 0 0 0 0 50000 Y
i2s2 1 1 0 11289599 0 0 50000 Y
aud_mclk 1 1 0 11289599 0 0 50000 Y
root@wel-tegra:/home/wel# cat /proc/asound/cards
0 [HDA ]: tegra-hda - NVIDIA Jetson Orin NX HDA
NVIDIA Jetson Orin NX HDA at 0x3518000 irq 120
1 [tegra234es8389 ]: simple-card - tegra234-es8389
NVIDIA-NVIDIAJetsonOrinNXEngineeringReferenceDeveloperKit-NotSpecified-Jetson

root@wel-tegra:/home/wel# dmesg | grep -i “audio|sound|es8389|i2s|dai”
[ 0.127255] Advanced Linux Sound Architecture Driver Initialized.
[ 2.880413] usbcore: registered new interface driver snd-usb-audio
[ 3.152933] No soundcards found.
[ 13.171599] input: NVIDIA Jetson Orin NX HDA HDMI/DP,pcm=3 as /devices/platform/bus@0/3510000.hda/sound/card0/input4
[ 13.175618] input: NVIDIA Jetson Orin NX HDA HDMI/DP,pcm=7 as /devices/platform/bus@0/3510000.hda/sound/card0/input5
[ 13.176034] input: NVIDIA Jetson Orin NX HDA HDMI/DP,pcm=8 as /devices/platform/bus@0/3510000.hda/sound/card0/input6
[ 13.177021] input: NVIDIA Jetson Orin NX HDA HDMI/DP,pcm=9 as /devices/platform/bus@0/3510000.hda/sound/card0/input7
[ 13.668690] platform 2901100.i2s: Fixing up cyclic dependency with 0-0010
[ 13.688375] Enter into es8389_i2c_probe
[ 13.688451] ES8389: DAI name = ‘ES8389 HiFi’
[ 13.688454] ES8389: Playback stream = ‘Playback’
[ 13.688455] ES8389: Capture stream = ‘Capture’
[ 13.688471] ES8389: Component registered successfully, Exit es8389_i2c_probe
[ 13.919334] es8389_probe(): Component name: es8389.0-0010
[ 13.928440] Exit es8389_init
[ 13.930205] Enter into es8389_set_dai_sysclk()
[ 13.931354] Enter into es8389_set_bias_level(), level = 1
[ 13.931359] es8389_set_bias_level standby
[ 14.015372] Enter into es8389_set_bias_level(), level = 2
[ 14.015378] es8389_set_bias_level prepare
[ 14.015583] Enter into es8389_set_bias_level(), level = 3
[ 14.015586] es8389_set_bias_level on
但播放音频失败:
wel@wel-tegra:~$ speaker-test -D hw:1,0 -c 2 -r 44100 -t sine -f 1000

speaker-test 1.2.6

Playback device is hw:1,0
Stream parameters are 44100Hz, S16_LE, 2 channels
Sine wave rate is 1000.0000Hz
Playback open error: -22,Invalid argument

Have you referred to Audio Setup and Development — NVIDIA Jetson Linux Developer Guide for the Audio porting?

You have to configure it as AUD_MCLK in Column-AT.

Please also share the full dmesg and device tree for further check.

在tegra234-p3767.dtsi中:
sound {
compatible = “nvidia,tegra186-audio-graph-card”;
status = “disabled”;

            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_i2s2_port>, <&xbar_i2s4_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 */
                   <&i2s2_port>, <&i2s4_port>;
    };

    es8389_sound: sound-es8389 {
                compatible = "simple-audio-card";
                status = "okay";
                simple-audio-card,name = "tegra234-es8389";
                simple-audio-card,format = "i2s";
                simple-audio-card,mclk-fs = <256>;
                simple-audio-card,bitclock-master = <&dailink_master>;
                simple-audio-card,frame-master = <&dailink_master>;

               dailink_master: simple-audio-card,cpu {
                    sound-dai = <&tegra_i2s2 1>;
               };

               simple-audio-card,codec {
                    sound-dai = <&es8389>;
               };
    };

在audio-es8389.dtsi中:
&gen1_i2c {
status = “okay”;

es8389: es8389@10 {
    compatible = "everest,es8389";
    reg = <0x10>;
    AVDD-supply = <&vdd_3v3_audio>;
    DVDD-supply = <&vdd_1v8_audio>;
    PVDD-supply = <&vdd_1v8_audio>;

    #sound-dai-cells = <0>;

    clocks = <&bpmp TEGRA234_CLK_AUD_MCLK>;
    clock-names = "mclk";
    assigned-clocks = <&bpmp TEGRA234_CLK_AUD_MCLK>;
    assigned-clock-rates = <11289600>;  // 11.2896 MHz for 44.1kHz
    assigned-clock-parents = <&bpmp TEGRA234_CLK_PLLA_OUT0>;

    status = "okay";
};

};

&pinmux {
es8389_default: es8389_default {
/* I2S2_SCLK (位时钟) - 主设备输出,设置为输出 /
soc_gpio41_ph7 {
nvidia,pins = “soc_gpio41_ph7”;
nvidia,function = “i2s2”;
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_DISABLE>;
};
/
I2S2_DOUT (数据输出,Tegra→ES8389) - 主设备输出,设置为输出 /
soc_gpio42_pi0 {
nvidia,pins = “soc_gpio42_pi0”;
nvidia,function = “i2s2”;
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_DISABLE>;
};
/
I2S2_DIN (数据输入,ES8389→Tegra) - 主设备输入,设置为输入 /
soc_gpio43_pi1 {
nvidia,pins = “soc_gpio43_pi1”;
nvidia,function = “i2s2”;
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_ENABLE>;
nvidia,enable-input = <TEGRA_PIN_ENABLE>;
};
/
I2S2_FS (帧同步/左右时钟) - 主设备输出,设置为输出 /
soc_gpio44_pi2 {
nvidia,pins = “soc_gpio44_pi2”;
nvidia,function = “i2s2”;
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_DISABLE>;
};
/
AUD_MCLK (主时钟) - 主设备输出,设置为输出 */
aud_mclk_pac6 {
nvidia,pins = “soc_gpio59_pac6”;
nvidia,function = “aud”;
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_DISABLE>;
};
};
};

&tegra_i2s2 {
status = “okay”;
#sound-dai-cells = <1>;

clocks = <&bpmp TEGRA234_CLK_I2S2>,
         <&bpmp TEGRA234_CLK_I2S2_SYNC_INPUT>,
         <&bpmp TEGRA234_CLK_AUD_MCLK>;
clock-names = "i2s", "sync_input", "mclk";

assigned-clocks = <&bpmp TEGRA234_CLK_I2S2>,
                  <&bpmp TEGRA234_CLK_AUD_MCLK>;
assigned-clock-parents = <&bpmp TEGRA234_CLK_PLLA_OUT0>,
                         <&bpmp TEGRA234_CLK_PLLA_OUT0>;
assigned-clock-rates = <11289600>, <11289600>;  // 44.1kHz

dai-format = "i2s";
bitclock-inversion = <0>;
frame-inversion = <0>;
bitclock-master = <1>;  /* I2S2 作为主设备 */
frame-master = <1>;
mclk-fs = <256>;

pinctrl-names = "default";
pinctrl-0 = <&es8389_default>;

ports {
    #address-cells = <1>;
    #size-cells = <0>;

    port@0 {
        reg = <0>;
        i2s2_cif: endpoint {
            //remote-endpoint = <&xbar_i2s2>;
        };
    };

    port@1 {
        reg = <1>;
        i2s2_dap: endpoint {
            dai-format = "i2s";
            remote-endpoint = <&es8389_dap>;

            bitclock-slave;
            frame-slave;
            mclk-fs = <256>;
        };
    };
};

};
&es8389 {
status = “okay”;

bitclock-slave;
frame-slave;

ports {
    port@0 {
        es8389_dap: endpoint {
            remote-endpoint = <&i2s2_dap>;
            dai-format = "i2s";
            bitclock-slave;
            frame-slave;
        };
    };
};

};
在tegra234-soc-audio-dai-links.dtsi中:
xbar_to_i2s2: nvidia-audio-card,dai-link@65 {
status = “disabled”;

                    format = "i2s";
                    link-type = <C2C_LINK>;
                    cpu {
                            sound-dai = <&tegra_ahub XBAR_I2S2>;
                    };
                    codec {
                            sound-dai = <&tegra_i2s2 I2S_CIF>;
                            prefix = "I2S2";
                    };
            };
            i2s2_to_codec: nvidia-audio-card,dai-link@77 {
                    status = "disabled";

                    format = "i2s";
                    link-type = <C2C_LINK>;
                    i2s2_cpu: cpu {
                            sound-dai = <&tegra_i2s2 I2S_DAP>;
                    };
                    codec {
                            sound-dai = <&es8389>;
                            mclk-fs = <256>;
                    };
            };

其他:
root@wel-tegra:/home/wel# cat /sys/kernel/debug/pinctrl/2430000.pinmux/pinmux-pins | grep -E “soc_gpio41_ph7|soc_gpio42_pi0|soc_gpio43_pi1|soc_gpio44_pi2|soc_gpio59_pac6”
pin 50 (SOC_GPIO41_PH7): 2901100.i2s (GPIO UNCLAIMED) function i2s2 group soc_gpio41_ph7
pin 51 (SOC_GPIO42_PI0): 2901100.i2s (GPIO UNCLAIMED) function i2s2 group soc_gpio42_pi0
pin 52 (SOC_GPIO43_PI1): 2901100.i2s (GPIO UNCLAIMED) function i2s2 group soc_gpio43_pi1
pin 53 (SOC_GPIO44_PI2): 2901100.i2s (GPIO UNCLAIMED) function i2s2 group soc_gpio44_pi2
pin 144 (SOC_GPIO59_PAC6): 2901100.i2s (GPIO UNCLAIMED) function aud group soc_gpio59_pac6
root@wel-tegra:/home/wel# cat /sys/kernel/debug/clk/clk_summary | grep -E “i2s2|aud_mclk”
i2s2_sync_input 0 0 0 0 0 0 50000 Y
i2s2_sync_clk 0 0 0 0 0 0 50000 Y
i2s2 0 0 0 11289599 0 0 50000 Y
aud_mclk 0 0 0 11289599 0 0 50000 Y
root@wel-tegra:/home/wel# ls /sys/bus/platform/devices/ | grep -E “sound|audio”
regulator-vdd-1v8-audio
regulator-vdd-3v3-audio
sound
sound-es8389
root@wel-tegra:/home/wel# cat /proc/asound/card1/pcm0p/info
card: 1
device: 0
subdevice: 0
stream: PLAYBACK
id: I2S-DAP-ES8389 HiFi es8389.0-0010-0
name:
subname: subdevice #0
class: 0
subclass: 0
subdevices_count: 1
subdevices_avail: 1
root@wel-tegra:/home/wel# cat /sys/kernel/debug/asoc/components |grep es8389
es8389.0-0010
root@wel-tegra:/home/wel# cat /sys/kernel/debug/asoc/dais|grep es8389
es8389.0-0010
//////////////////////////////////////////////////////////////////////////
root@wel-tegra:/home/wel# dmesg | grep -i “audio|sound|es8389|i2s|dai”
[ 0.131014] Advanced Linux Sound Architecture Driver Initialized.
[ 2.863761] usbcore: registered new interface driver snd-usb-audio
[ 3.112546] No soundcards found.
[ 12.815254] input: NVIDIA Jetson Orin NX HDA HDMI/DP,pcm=3 as /devices/platform/bus@0/3510000.hda/sound/card0/input4
[ 12.815492] input: NVIDIA Jetson Orin NX HDA HDMI/DP,pcm=7 as /devices/platform/bus@0/3510000.hda/sound/card0/input5
[ 12.815659] input: NVIDIA Jetson Orin NX HDA HDMI/DP,pcm=8 as /devices/platform/bus@0/3510000.hda/sound/card0/input6
[ 12.815764] input: NVIDIA Jetson Orin NX HDA HDMI/DP,pcm=9 as /devices/platform/bus@0/3510000.hda/sound/card0/input7
[ 13.697528] platform 2901100.i2s: Fixing up cyclic dependency with 0-0010
[ 13.699239] ES8389: i2c_probe start for addr 0x10
[ 13.699330] ES8389: Component registered successfully, Exit es8389_i2c_probe
[ 13.792645] es8389_probe(): Component name: es8389.0-0010
[ 13.807942] Exit es8389_init
[ 13.807950] === ES8389寄存器转储 ===
[ 13.808115] es8389:寄存器 0x00: 0x01
[ 13.808280] es8389:寄存器 0x01: 0x08
[ 13.808443] es8389:寄存器 0x02: 0x0c
[ 13.808445] es8389-DAC电源: 开启
[ 13.808446] es8389-ADC电源: 开启
[ 13.808623] es8389:寄存器 0x03: 0xc3
[ 13.808627] es8389-左输出放大器: 开启
[ 13.808628] es8389-右输出放大器: 开启
[ 13.808798] es8389:寄存器 0x04: 0x00
[ 13.808964] es8389:寄存器 0x05: 0x90
[ 13.808966] es8389-DAC使能: 是
[ 13.809131] es8389:寄存器 0x06: 0x00
[ 13.809297] es8389:寄存器 0x07: 0xc0
[ 13.809473] es8389:寄存器 0x08: 0x00
[ 13.809798] es8389:寄存器 0x09: 0xc0
[ 13.809970] es8389:寄存器 0x0a: 0x80
[ 13.810135] es8389:寄存器 0x0b: 0x04
[ 13.810300] es8389:寄存器 0x0c: 0x01
[ 13.810465] es8389:寄存器 0x0d: 0x00
[ 13.810895] es8389:寄存器 0x0e: 0x00
[ 13.811085] es8389:寄存器 0x0f: 0x00
[ 13.811642] es8389:寄存器 0x10: 0xc4
[ 13.811836] es8389:寄存器 0x11: 0x00
[ 13.812032] es8389:寄存器 0x12: 0x01
[ 13.812218] es8389:寄存器 0x13: 0x01
[ 13.812392] es8389:寄存器 0x14: 0x40
[ 13.812394] es8389-左输出音量: 64, 放大器: 关闭
[ 13.813266] es8389:寄存器 0x15: 0x40
[ 13.813270] es8389-右输出音量: 64, 放大器: 关闭
[ 13.821415] Enter into es8389_set_dai_sysclk():freg:12287988
[ 13.823231] Enter into es8389_set_bias_level(), level = 1
[ 13.823238] es8389_set_bias_level standby
[ 24.189457] Enter into es8389_set_dai_sysclk():freg:0
[ 24.198529] Enter into es8389_set_dai_sysclk():freg:0
[ 24.206470] Enter into es8389_set_dai_sysclk():freg:0
[ 24.215140] Enter into es8389_set_dai_sysclk():freg:0
[ 24.215336] Enter into es8389_set_dai_sysclk():freg:0
[ 24.215464] Enter into es8389_set_dai_sysclk():freg:0

From the log you shared, it seems the driver has been probed correctly.

Please run the following commands on your board and share the result.

$ cat /proc/asound/cards
$ sudo cat /sys/kernel/debug/pinctrl/2430000.pinmux/pinmux-pins|grep aud_mclk
$ sudo dtc -I fs -O dts -o extracted_proc.dts /proc/device-tree

And provide the extracted_proc.dts as file here.

root@wel-tegra:/home/wel# cat /proc/asound/cards
0 [HDA ]: tegra-hda - NVIDIA Jetson Orin NX HDA
NVIDIA Jetson Orin NX HDA at 0x3518000 irq 120
1 [tegra234es8389 ]: simple-card - tegra234-es8389
NVIDIA-NVIDIAJetsonOrinNXEngineeringReferenceDeveloperKit-NotSpecified-Jetson
2 [APE ]: tegra-ape - NVIDIA Jetson Orin NX APE
NVIDIA-NVIDIAJetsonOrinNXEngineeringReferenceDeveloperKit-NotSpecified-Jetson
root@wel-tegra:/home/wel# dmesg | grep -i “audio|sound|es8389|i2s|dai”
[ 0.129396] Advanced Linux Sound Architecture Driver Initialized.
[ 2.836388] usbcore: registered new interface driver snd-usb-audio
[ 3.086080] No soundcards found.
[ 12.729552] input: NVIDIA Jetson Orin NX HDA HDMI/DP,pcm=3 as /devices/platform/bus@0/3510000.hda/sound/card0/input4
[ 12.733497] input: NVIDIA Jetson Orin NX HDA HDMI/DP,pcm=7 as /devices/platform/bus@0/3510000.hda/sound/card0/input5
[ 12.733959] input: NVIDIA Jetson Orin NX HDA HDMI/DP,pcm=8 as /devices/platform/bus@0/3510000.hda/sound/card0/input6
[ 12.734097] input: NVIDIA Jetson Orin NX HDA HDMI/DP,pcm=9 as /devices/platform/bus@0/3510000.hda/sound/card0/input7
[ 13.552477] platform 2901100.i2s: Fixing up cyclic dependency with 0-0010
[ 13.557971] ES8389: i2c_probe start for addr 0x10
[ 13.558074] ES8389: Component registered successfully, Exit es8389_i2c_probe
[ 13.643736] es8389_probe(): Component name: es8389.0-0010
[ 13.664213] Exit es8389_init
[ 13.664223] === ES8389寄存器转储 ===
[ 13.668828] es8389:寄存器 0x00: 0x01
[ 13.669035] es8389:寄存器 0x01: 0x08
[ 13.669200] es8389:寄存器 0x02: 0x0c
[ 13.669201] es8389-DAC电源: 开启
[ 13.669203] es8389-ADC电源: 开启
[ 13.669363] es8389:寄存器 0x03: 0xc3
[ 13.669365] es8389-左输出放大器: 开启
[ 13.669366] es8389-右输出放大器: 开启
[ 13.669525] es8389:寄存器 0x04: 0x00
[ 13.669687] es8389:寄存器 0x05: 0x90
[ 13.669688] es8389-DAC使能: 是
[ 13.669888] es8389:寄存器 0x06: 0x00
[ 13.670049] es8389:寄存器 0x07: 0xc0
[ 13.670207] es8389:寄存器 0x08: 0x00
[ 13.670366] es8389:寄存器 0x09: 0xc0
[ 13.670525] es8389:寄存器 0x0a: 0x80
[ 13.670686] es8389:寄存器 0x0b: 0x04
[ 13.670868] es8389:寄存器 0x0c: 0x01
[ 13.671029] es8389:寄存器 0x0d: 0x00
[ 13.671189] es8389:寄存器 0x0e: 0x00
[ 13.671348] es8389:寄存器 0x0f: 0x00
[ 13.671519] es8389:寄存器 0x10: 0xc4
[ 13.671695] es8389:寄存器 0x11: 0x00
[ 13.672232] es8389:寄存器 0x12: 0x01
[ 13.672409] es8389:寄存器 0x13: 0x01
[ 13.672577] es8389:寄存器 0x14: 0x40
[ 13.672579] es8389-左输出音量: 64, 放大器: 关闭
[ 13.672741] es8389:寄存器 0x15: 0x40
[ 13.672743] es8389-右输出音量: 64, 放大器: 关闭
[ 13.679426] Enter into es8389_set_dai_sysclk():freg:12287988
[ 13.680794] Enter into es8389_set_bias_level(), level = 1
[ 13.680799] es8389_set_bias_level standby
[ 26.193181] Enter into es8389_set_dai_sysclk():freg:0
[ 26.199417] Enter into es8389_set_dai_sysclk():freg:0
[ 26.205122] Enter into es8389_set_dai_sysclk():freg:0
[ 26.205383] Enter into es8389_set_dai_sysclk():freg:0
[ 26.205502] Enter into es8389_set_dai_sysclk():freg:0
[ 26.205612] Enter into es8389_set_dai_sysclk():freg:0
root@wel-tegra:/home/wel# cat /proc/asound/card1/pcm0p/info
card: 1
device: 0
subdevice: 0
stream: PLAYBACK
id: I2S-DAP-ES8389 HiFi es8389.0-0010-0
name:
subname: subdevice #0
class: 0
subclass: 0
subdevices_count: 1
subdevices_avail: 1
root@wel-tegra:/home/wel# cat /sys/kernel/debug/pinctrl/2430000.pinmux/pinmux-pins | grep -E “soc_gpio41_ph7|soc_gpio42_pi0|soc_gpio43_pi1|soc_gpio44_pi2|soc_gpio59_pac6”
pin 50 (SOC_GPIO41_PH7): 2901100.i2s (GPIO UNCLAIMED) function i2s2 group soc_gpio41_ph7
pin 51 (SOC_GPIO42_PI0): 2901100.i2s (GPIO UNCLAIMED) function i2s2 group soc_gpio42_pi0
pin 52 (SOC_GPIO43_PI1): 2901100.i2s (GPIO UNCLAIMED) function i2s2 group soc_gpio43_pi1
pin 53 (SOC_GPIO44_PI2): 2901100.i2s (GPIO UNCLAIMED) function i2s2 group soc_gpio44_pi2
pin 144 (SOC_GPIO59_PAC6): 2901100.i2s (GPIO UNCLAIMED) function aud group soc_gpio59_pac6
root@wel-tegra:/home/wel# cat /sys/kernel/debug/clk/clk_summary | grep -E “i2s2|aud_mclk”
i2s2_sync_input 0 0 0 0 0 0 50000 Y
i2s2_sync_clk 0 0 0 0 0 0 50000 Y
i2s2 0 0 0 11289599 0 0 50000 Y
aud_mclk 0 0 0 11289599 0 0 50000 Y
root@wel-tegra:/home/wel# cat /sys/kernel/debug/pinctrl/2430000.pinmux/pinmux-pins|grep aud_mclk
root@wel-tegra:/home/wel# cat /sys/kernel/debug/asoc/components | grep es8389
es8389.0-0010
root@wel-tegra:/home/wel# ls /sys/bus/platform/devices/ | grep -E “sound|audio”
regulator-vdd-1v8-audio
regulator-vdd-3v3-audio
sound
sound-es8389
dts:extracted_proc.txt

extracted_proc.txt (316.2 KB)

Your driver has been probed correctly and the pinmux/clock configurations look good to me.

You cannot measure the clock signal because the system is in idle state. The clk_summary shows an enable count of 0, meaning the clock is turned off by the power management system when no audio is playing.
The clock only outputs when an audio stream is active.
Please run the following command to start a stream:

$ speaker-test -D hw:1,0 -c 2 -r 44100 -F S16_LE -t pink

While this command is running, please measure GPIO09 with your oscilloscope. You should see the ~11.28 MHz signal.

The current logs show the amplifier is currently “Off.” Please use amixer to unmute the outputs:

$ amixer -c 1 set 'Left Output' on
$ amixer -c 1 set 'Right Output' on
$ amixer -c 1 set 'Master' 100%