So I’m trying to interface a CS4272 with the Jetson Orin Nano and i had a few questions about the I2S interface on the Orin Nano. I’m under the impression that configuring the I2S bus via jetson-io configures the I2S interface at a high level. So the clocks for SCLK and FS are not set, i was wondering how to set these, whether through scripts or device tree configuration, i am new to the latter. Here is what i have for the device tree configuration:
So i would either modified the auto generated overlay or create a new one (cs4272.dts) with the explicit clock settings, here is the device tree configuration I’ve been looking at, do keep in mind that i have not created or applied a new .dts, this is more so a check before i do all of that :
/dts-v1/;
/plugin/;
/ {
fragment@0 {
target-path = "/";
__overlay__ {
cs4272: cs4272 {
compatible = "cirrus,cs4272";
status = "okay";
};
};
};
fragment@1 {
target = <&i2s1>; // Target the Jetson's I2S controller
__overlay__ {
status = "okay";
#sound-dai-cells = <0>;
// Configure clocks for 48 kHz LRCK, 24-bit depth
clocks = <&tegra_asrc 1>; // Use ASRC for clock generation
clock-names = "asrc";
assigned-clocks = <&tegra_asrc 1>;
assigned-clock-rates = <12288000>; // MCLK for internal PLL (not used by CS4272)
// Define I2S format (I²S, 24-bit)
dai-format = "i2s";
bitclock-master = <&i2s1>;
frame-master = <&i2s1>;
};
};
};
The i would compile and apply the overlay (not exactly sure if this is the correct way:
Just to be clear, the MCLK is being generated by an external crystal that will be connected to the XTI and XTO pins on the CXS4272 CODEC to generate a 12.288 MHZ clock signal. So the LRCK and SCLK need to be 48 kHz (the sampling rate) and 3.072 MHz respectively.
I will read into this more as i am fairly new to developing with the jetson orin nano and I will get back to you with any questions i have regarding these topics.
Also i was under the impression that the Orin Nano could not generate a clock signal from one of its GPIOs, hence the use of an external parallel resonant crystal connected to the codec. However, from another topic i was told otherwise as shown here:
I’m assuming this is another device tree configuration I would have to look into or what would be the correct course of action in regards to looking into this configuration.
NOTE: I made a typo, the codec I am using is the CS4272 (NOT CXS4272)
Just to be clear, do I still need to configure the pins via jetson-io and look into device-tree configurations or just the latter?