Hi,
We are trying to make audio up using stgl5000 in Nvidia Xavier jetson.
I am able to see m_clk in oscilloscope.
Below is the dmesg log:
stgl5000 7-000a: sgtl5000 revision 0x11
tegra-asoc : sound: Inside tegra_machine_driver_probe
ERROR: could not get clock /sound:externl(5)
tegra-asoc: sound: Can't retrieve clk cdev1
tegra-asoc:: probe of sound failed with error -2
I am also able to see 0x0A address as “UU” enumerated in i2cdetect
Below is my audio device tree in tegra194-audio-p2822-0000.dtsi:
/ {
aconnect@2a41000 {
status = "okay";
agic-controller@2a41000 {
status = "okay";
};
adsp@2993000 {
status = "okay";
};
};
i2c@c250000 {
sgtl5000: sgtl5000.7-000a@0a {
compatible = "fsl,sgtl5000";
reg = <0x0a>;
clocks = <&bpmp_clks TEGRA194_CLK_AUD_MCLK>;
clock-names = "extern1";
/*
realtek,jd-src = <RT5659_JD_NULL>;
realtek,dmic1-data-pin = <RT5659_DMIC1_NULL>;
realtek,dmic2-data-pin = <RT5659_DMIC2_DATA_IN2P>;
gpios = <&tegra_main_gpio TEGRA194_MAIN_GPIO(S, 5) 0>;
*/
status = "okay";
};
};
/* Default for all I2S is long fsync width(31) */
aconnect@2a41000 {
ahub {
/* I2S4 in Short frame sync for BT SCO */
i2s@2901300 {
fsync-width = <0>;
};
};
};
hda@3510000 {
status = "okay";
resets = <&bpmp_resets TEGRA194_RESET_HDA>,
<&bpmp_resets TEGRA194_RESET_HDA2CODEC_2X>,
<&bpmp_resets TEGRA194_RESET_HDA2HDMICODEC>;
reset-names = "hda_rst", "hda2codec_2x_rst",
"hda2hdmi_rst";
nvidia,do-reset;
};
tegra_sound: sound {
status = "okay";
compatible = "nvidia,tegra-audio-t186ref-mobile-rt565x";
nvidia,model = "tegra-snd-t19x-mobile-rt565x";
clocks = <&bpmp_clks TEGRA194_CLK_PLLP_OUT0>,
<&bpmp_clks TEGRA194_CLK_PLLA>,
<&bpmp_clks TEGRA194_CLK_PLLA_OUT0>,
<&bpmp_clks TEGRA194_CLK_AHUB>,
<&bpmp_clks TEGRA194_CLK_CLK_M>;
clock-names = "pll_p_out1", "pll_a", "pll_a_out0", "ahub",
"clk_m" , "extern1";
nvidia,audio-routing =
"x Headphone Jack", "x HPO L Playback",
"x Headphone Jack", "x HPO R Playback",
"x IN1P", "x Mic Jack",
"x Int Spk", "x SPO Playback",
"x DMIC L1", "x Int Mic",
"x DMIC L2", "x Int Mic",
"x DMIC R1", "x Int Mic",
"x DMIC R2", "x Int Mic",
"x Headphone", "x HP_OUT",
"x MIC_IN", "x Mic",
"y Headphone", "y OUT",
"y IN", "y Mic",
"z Headphone", "z OUT",
"z IN", "z Mic",
"m Headphone", "m OUT",
"m IN", "m Mic",
"n Headphone", "n OUT",
"n IN", "n Mic",
"o Headphone", "o OUT",
"o IN", "o Mic",
"a IN", "a Mic",
"b IN", "b Mic",
"c IN", "c Mic",
"d IN", "d Mic",
"d1 Headphone", "d1 OUT",
"d2 Headphone", "d2 OUT";
/* Default config for all I2S dai links are
format = "i2s", bitclock-slave, frame-slave,
bitclock-noninversion, frame-noninversion,
bclk_ratio = 1 , Any change from default needs
override on platform specific files. */
/* Override with Codec entries */
nvidia,dai-link-1 {
link-name = "sgtl5000-playback";
codec-dai = <&sgtl5000>;
codec-dai-name = "sgtl5000";
};
/* Override with BT SCO entries */
nvidia,dai-link-4 {
format = "dsp_a";
tx-mask = <0xFF>;
rx-mask = <0xFF>;
bitclock-inversion;
bclk_ratio = <4>;
srate = <8000>;
num-channel = <1>;
};
};
};
Please let me know is there any changes required in dts or in driver source.
Thanks
Vinayak