Other Parts Discussed in Thread: TAS2562, TAS2563
Hello,
we have designed a custom board with the NXP iMX8M Mini processor and the TAS2110 audio amp. We are using YOCTO to build the Linux Kernel.
From this thread I learned that the TAS2562 driver can be used for TAS2110.
The driver repo contains information on how the device tree node for I2C needs to look like:
tas2562:tas2562@4c { #sound-dai-cells = <0>; compatible = "ti,tas2562"; reg = <0x4c>; ti,left-channel = <0x4c>; ti,right-channel = <0x4d>; ti,channels = <2>; /* channel number */ ti,reset-gpio = <&gpio1 17 0>; ti,reset-gpio2 = <&gpio1 16 0>; ti,irq-gpio = <&gpio1 15 0>; ti,irq-gpio2 = <&gpio1 14 0>; status = "ok"; };
This is fairly straight forward. However, it seems like the device tree is missing essential parts.
We still need to connect the I2S interface (of TAS2110) to the SAI interface (of iMX) as well as expose that to the Linux Kernel (some sort of sound device).
Iwould have assumed something along the lines of:
/* ??? */
sound-tas2562 { compatible = "???"; audio-cpu = <&sai5>; audio-codec = <&tas2562>; }; &sai5 { #sound-dai-cells = <0>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_sai5>; fsl,mode = "i2s-master"; status = "okay"; }; &iomuxc { /* ... */ pinctrl_sai5: sai5grp { fsl,pins = < MX8MM_IOMUXC_SAI5_RXD1_SAI5_TX_SYNC 0xd6 /* FSYNC */ MX8MM_IOMUXC_SAI5_RXD2_SAI5_TX_BCLK 0xd6 /* SBLCK */ MX8MM_IOMUXC_SAI5_RXD3_SAI5_TX_DATA0 0xd6 /* SDIN */ >; }; }; &i2c1 { status = "okay"; clock-frequency = <400000>; /* using mono example from dts.readme in TI driver repo */ tas2562:tas2562@4c { #sound-dai-cells = <0>; compatible = "ti,tas2562"; reg = <0x4c>; ti,left-channel = <0x4c>; ti,channels = <1>; /* channel number */ ti,reset-gpio = <&gpio1 15 0>; status = "ok"; ti,iv-width = <16>; /* IV sense by default is set to 16 bit, in case of power Limiter it should be 12*/ ti,vbat-mon = <0>; /* By default Vbat should be 0, in case os power limiter it should be 1*/ }; };
The driver repo also contains dai_link.readme:
example for connecting CPU DAI #elif defined(CONFIG_TAS2562_CODEC) { .name = LPASS_BE_PRI_MI2S_RX, .stream_name = "Primary MI2S Hostless Playback", .cpu_dai_name = "msm-dai-q6-mi2s.0", .platform_name = "msm-pcm-routing", .codec_name = "tas2562.3-004e", .codec_dai_name = "tas2562 ASI1", .no_pcm = 1, .be_id = MSM_BACKEND_DAI_PRI_MI2S_RX, .be_hw_params_fixup = msm_be_prim_mi2s_hw_params_fixup, .ops = &XXXX_prim_mi2s_be_ops, }, { .name = LPASS_BE_PRI_MI2S_TX, .stream_name = "Primary MI2S Hostless Capture", .cpu_dai_name = "msm-dai-q6-mi2s.0", .platform_name = "msm-pcm-routing", .codec_name = "tas2562.3-004e", .codec_dai_name = "tas2562 ASI1", .no_pcm = 1, .be_id = MSM_BACKEND_DAI_PRI_MI2S_TX, .be_hw_params_fixup = msm_be_prim_mi2s_hw_params_fixup, .ops = &XXXX_prim_mi2s_be_ops, }, #endif
I assume this has to do with what I am looking for, however, I don't really know what to do with it.
TL;DR:
We got TAS2110 (or TAS2562 for all purposes regarding the driver) connected to
- I2C -> I2C1
- I2S -> SAI5
What should the complete device tree look like? How to make the audio device available in Linux?
Thanks for your help.