AD5420 daisy chain is not working with IMX6

Hi
I am not sure if this question is relevant to this forum but any sort of hints/clue/debug my issue will be really helpful

I have IMX6 module plugged into the custom board, with following software summary

SoM is connected to DAC chip (AD5420) in a daisy chain manner (without common chip select) as shown in figure below

I am using following dts file with local patches
imx6q-apalis-ixora-v1.1.dts (9.2 KB)

/*imx6q-apalis-ixora-v1.1.dts*/

/* Apalis SPI2 */
&ecspi2 {
	status = "okay";

	spidev1: spidev@1 {
		compatible = "rohm,dh2228fv";
		reg = <0 1>;
		spi-max-frequency = <24000000>;
		spi-cpha;
		spi-cpol;
                
	};
};


/*imx6qdl-apalis.dtsi*/

pinctrl_ecspi2: ecspi2grp {
		fsl,pins = <
			MX6QDL_PAD_EIM_OE__ECSPI2_MISO 0x100b1
			MX6QDL_PAD_EIM_CS1__ECSPI2_MOSI 0x100b1 
			MX6QDL_PAD_EIM_CS0__ECSPI2_SCLK 0x100b1 //SPI2_CLK

			MX6QDL_PAD_EIM_RW__GPIO2_IO26 0x1b0b1 //SPI2_LATCH_1
			MX6QDL_PAD_EIM_A16__GPIO2_IO22 0x1b0b1 //SPI2_LATCH_2

			MX6QDL_PAD_EIM_DA11__GPIO3_IO11 0x1b0b1 //SPI2_CLEAR_2
			MX6QDL_PAD_EIM_DA12__GPIO3_IO12 0x1b0b1 //SPI2_CLEAR_1

			MX6QDL_PAD_EIM_DA10__GPIO3_IO10 0x1b0b1 //SPI2_Fault_1
			MX6QDL_PAD_EIM_A21__GPIO2_IO17 0x1b0b1 //SPI2_Fault_2

		>;
	};

IMX6 is connected to AD5420 via SPI interface

My first issue is that the daisy chain is not working. Tx data is not received on the second chip
Only current on the 1st port Iout and nothing on the slave chip.

I have double checked the Clear and Latch pins of both AD5420 chips and they are working as expected i.e. low/high

Please let me know if more information is needed. I would appreciate some pointers to resolve this issue. Thanks

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Based on the context provided, it seems you are experiencing issues with the SPI daisy chain configuration on an iMX6 module connected to AD5420 DAC chips. Here are a few pointers that might help you debug the issue:

  1. SPI Configuration: Ensure that the SPI configuration in your device tree is correct. The spi-cpha and spi-cpol properties are set, which is good, but double-check that these settings match the requirements of the AD5420.

  2. Chip Select Management: Since you are using a daisy chain without a common chip select, ensure that the data is being correctly passed from the first to the second chip. This typically involves ensuring that the first chip is configured to pass data through to the second chip.

  3. Data Transmission: Verify that the data being sent to the first chip is correct and that the chip is configured to forward the data to the next chip in the chain. You might need to refer to the AD5420 datasheet to ensure proper configuration for daisy chaining.

  4. Signal Integrity: Check the physical connections and signal integrity between the iMX6 and the AD5420 chips. Ensure that the SPI clock, MOSI, and MISO lines are clean and free from noise.

  5. Debugging: Use an oscilloscope or logic analyzer to monitor the SPI signals and ensure that the data is being transmitted as expected. This can help identify if the issue is with the data transmission or with the configuration of the chips.

  6. Driver Support: Ensure that the Linux kernel and SPI driver you are using support the daisy chain configuration you are attempting to implement.

If these suggestions do not resolve the issue, you may need to provide more specific details or consult with Toradex support for further assistance.

Please, also check if these links can help you solve your problem:

2 Devices on 1 SPI Port, CS0 problem.

Hello @Usman,

From the schematics you sent, it appears that the LATCH signals are not connected to the SoM.
If they are connected and working as expected, I would recommend that you review the requirements for operation of the AD5420 in daisy chain mode.
It does seem to support it, so maybe the input is not following what it expects for this mode.

This really ends up being more related to your application development than to the actual SoM being used.
Maybe one of the following implementations is useful to better understand how this DAC works in daisy-chain mode:

Best Regards,
Bruno