I have been reading through various posts about getting the SGTL5000 audio codec to work on Jetsons, and I have been attempting to follow these and the latest (R32.3) ASoC Driver documentation (which deals explicitly with the subject), but I have hit some snags.
I have a TX2i (running R32.3.1) on a DevKit board and I have successfully reflashed the pinmux to enable AUD_MCLK on J21. I then edited the machine driver and device tree based on information I collected as closely as possible.
On recompiling tegra186-quill-p3489-1000-a00-00-ucm1.dtb, I found that I had various errors, including
./tegra186-quill-p3489-1000-a00-00-ucm1.dtb: ERROR (phandle_references): Reference to non-existent node or label “vdd_3v3”
./tegra186-quill-p3489-1000-a00-00-ucm1.dtb: ERROR (phandle_references): Reference to non-existent node or label “vdd_1v8_ap”
stemming from my device tree entry
sgtl5000: sgtl5000@0a { compatible = "fsl,sgtl5000"; reg = <0x0a>; clock-names = "extern1"; micbias-resistor-k-ohms = <2>; micbias-voltage-m-volts = <3000>; VDDA-supply = <&vdd_3v3>; VDDIO-supply = <&vdd_1v8_ap>; status = "okay"; };
dtc seemed to generate a lot of other warnings as well, but by deleting the lines concerning the supplies which generated the errors, I was able to reflash and reboot with the new kernel and device tree. Dmesg then showed errors such as "failed to get supply VDDA’: -19.
Have I missed something out in my dts file which defines these values?
PS: The codec board I am trying to get working is the Audio Shield for the Teensy 4.0, which operates in slave mode with all clocks supplied by the TX2i, so I may also need help with that.
edit -
An additional thing I note is that the result of de-compiling tegra186-quill-p3489-1000-a00-00-ucm1.dtb has many of the text labels replaced by hexadecimal constants. Does this mean I can no longer use the text labels for clocks etc in my edits?
sound {
iommus = <0x11 0x1e>;
dma-mask = <0x0 0x5e000000>;
iommu-resv-regions = <0x0 0x0 0x0 0x40000000 0x0 0x60000000 0xffffffff 0xffffffff>;
iommu-group-id = <0x2>;
status = “okay”;
compatible = “nvidia,tegra-audio-t186ref-mobile-rt565x”;
nvidia,model = “tegra-snd-t186ref-mobile-rt565x”;
nvidia,num-codec-link = <0x1>;
clocks = <0x10 0x10f 0x10 0xf6 0x10 0x57 0x10 0x7c>;
clock-names = “pll_a”, “pll_a_out0”, “ahub”, “extern1”;
assigned-clocks = <0x10 0xf6 0x10 0x57 0x10 0x7c>;
assigned-clock-parents = <0x10 0x10f 0x10 0xf6 0x10 0xf6>;
resets = <0x10 0x92>;
reset-names = “extern1_rst”;
nvidia,audio-routing = “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”, “d3 Headphone”, “d3 OUT”;
nvidia,xbar = <0xb9>;
mclk-fs = <0x100>;
linux,phandle = <0x105>;
phandle = <0x105>;