Transactions on SPI3 without CS0 going low

I’m trying to interface an AD74413R connected to SPI3 CS0 on a custom Orin NX carrier board. I’m using the following devicetree entries:

spi@3230000 { //SPI1 Customer Usage SPI3
                    status = "okay";
                    nvidia,enable-hw-based-cs;

                    /delete-node/ spi@0;
                    /delete-node/ spi@1;

                    ad74413r@0 {
                            compatible = "adi,ad74413r";
                            status = "okay";
                            reg = <0>;

                            spi-max-frequency = <1000000>;
                            /*spi-cpol;*/
                            spi-cpha;

                            interrupt-parent = <&gpio>;
                            interrupts = <TEGRA234_MAIN_GPIO(A, 6) IRQ_TYPE_EDGE_FALLING>;

                            refin-supply = <&ad74413r_refin>;

                            #address-cells = <1>;
                            #size-cells = <0>;

                            channel@0 { reg = <0>; adi,ch-func = <0> /*<CH_FUNC_HIGH_IMPEDANCE>*/; };
                            channel@1 { reg = <1>; adi,ch-func = <1> /*<CH_FUNC_HIGH_IMPEDANCE>*/; };
                            channel@2 { reg = <2>; adi,ch-func = <2> /*<CH_FUNC_HIGH_IMPEDANCE>*/; };
                            channel@3 { reg = <3>; adi,ch-func = <3> /*<CH_FUNC_HIGH_IMPEDANCE>*/; };
                    };
            };

The kernel can communicate with the IC but failes to fully initialize the device:

[ 10.198167] ad74413r spi1.0: Bad CRC ff for ffffff
[ 10.198173] ad74413r: probe of spi1.0 failed with error -22

A logic analyzer shows that the first two transactions are a success:

but the following transactions seem strange. CS is elongated on the third transaction and completely failes to go low on the fourth transaction:

Can you give me any hint on how to set up my device to successfully interface with the IC?

Thanks.

— 🤖 This is an automated AI response. I’m here to help, but please verify important details! —

I could not find clear support for that in the provided Jetson Orin NX documentation. However, I can provide some general information about SPI3 on the Jetson Orin NX.

According to the provided context, SPI3 is available on Bus 2, and the pin configuration is as follows:

Bus 2: /dev/spidev2.0, /dev/spidev2.1 => spi2: spi@3230000 (&spi2: nvidia,tegra186-spi) => SPI3 (PY00,PY01,PY02,PY03,PY04): 40-pins SPI1

This suggests that SPI3 is available on pins PY00-PY04.

Additionally, the provided context mentions that the GPIO sysfs interface has been deprecated starting with JetPack 6, and that the devmem command can be used to configure GPIO drive strength directly. However, this information is not directly related to your question about SPI3 transactions.

If you are experiencing issues with SPI3 transactions, I recommend checking the device tree configuration and ensuring that the SPI3 interface is properly configured. You may also want to try using a different SPI mode or adjusting the SPI clock frequency to see if it resolves the issue.

Unfortunately, without more specific information about your setup and configuration, I cannot provide a more detailed answer. If you have any further questions or would like to provide more context, I would be happy to try and assist you further.

— We support team will also look into your issue to have further suggestions soon. please stay tuned. —

Hi marcus.huenerbein,

What’s the Jetpack version in use?

Could you check the custom ad74413r driver for the cause of error -22?

Do you mean the issue is caused from the unexpected CS behavior?
If so, please check if the patch from the following thread helps for your case.
Jetson orin nano SPI Speed not changing - #9 by KevinFFF