Jetson Nano and Audioinjector Ultra Sound card

Hi to all,
I’m trying to work with Audioinjector Ultra sound card on Jetson nano.
It doesn’t have a machine driver, it only uses a device tree overlay file. Have a look here : linux/audioinjector-ultra-overlay.dts at rpi-5.4.y · raspberrypi/linux · GitHub

The question is where and how to edit the Jetson Nano data tree?

It appears that the NVIDIA Jetsons’s equivalent pin (29) maps to gpio149.

Does the Jetson use device tree overlays ? If not then I need to
either create a custom device tree for booting OR write a device tree
overlay which I can manually load AND OR write a machine driver?

Thank you for your help!

I tried to translate the RPi overlay to Jetson Nano format. That is what i got:

/dts-v1/;
/plugin/;

/ {
    overlay-name = "Audioinjector Ultra";
    jetson-header-name = "Jetson 40pin Header";
    compatible = "nvidia,jetson-nano", "nvidia,jetson-xavier", "nvidia,jetson-tx2", "nvidia,jetson-tx1", "nvidia,tegra210";

    fragment@0 {
        target = <&tegra_i2s4>;

        __overlay__ {
            status = "okay";
        };
    };

    fragment@1 {
		target = <&i2c1>;
		__overlay__ {
			#address-cells = <1>;
			#size-cells = <0>;
			status = "okay";

			cs4265: cs4265@4e {
				#sound-dai-cells = <0x0>;
				compatible = "cirrus,cs4265";
				reg = <0x4e>;
				reset-gpios = <&gpio 149 0>;
				status = "okay";
			};
		};
	};

	fragment@2 {
		target = <&tegra_sound>;
		__overlay__ {
			compatible = "simple-audio-card";
			i2s-controller = <&tegra_i2s4>;
			status = "okay";

			simple-audio-card,name = "audioinjector-ultra";

			simple-audio-card,widgets =
				"Line", "OUTPUTS",
				"Line", "INPUTS";

			nvidia,audio-routing =
				"OUTPUTS","LINEOUTL",
				"OUTPUTS","LINEOUTR",
				"OUTPUTS","SPDIFOUT",
				"LINEINL","INPUTS",
				"LINEINR","INPUTS",
				"MICL","INPUTS",
				"MICR","INPUTS";

			simple-audio-card,format = "i2s";

			simple-audio-card,bitclock-master = <&sound_master>;
			simple-audio-card,frame-master = <&sound_master>;

			simple-audio-card,cpu {
				sound-dai = <&tegra_i2s4>;
				dai-tdm-slot-num = <2>;
				dai-tdm-slot-width = <32>;
			};

			sound_master: simple-audio-card,codec {
				sound-dai = <&cs4265>;
				system-clock-frequency = <12288000>;
			};
		};
	};
};

After reboot I got this error from dmesg:

[    2.416875] No Device Node present for smmu client: snd-soc-dummy !!
[    2.416884] platform snd-soc-dummy: No iommus property found in DT node, got swgids from fixup(101004000)
[    2.416963] iommu: Adding device snd-soc-dummy to group 37
[    2.421346] OF: /sound/simple-audio-card,cpu: could not get #sound-dai-cells for /aconnect@702c0000/ahub/i2s@702d1300
[    2.427955] input: tegra-hda HDMI/DP,pcm=3 as /devices/70030000.hda/sound/card0/input0
[    2.432222] asoc-simple-card sound: parse error -22
[    2.435693] mmc0: SDHCI controller on sdhci-tegra.0 [sdhci-tegra.0] using ADMA 64-bit with 64 bit addr
[    2.437216] asoc-simple-card: probe of sound failed with error -22

Any ideas?

Please check following document on how to add a codec support…,
https://docs.nvidia.com/jetson/archives/r35.3.1/DeveloperGuide/text/SD/Communications/AudioSetupAndDevelopment.html#device-tree-configuration-for-a-custom-audio-card

Presently binding in your overlay look wrong and will not work for Jetson Nano.