rv1108: SPI DMA failure

Fabio Estevam festevam at gmail.com
Fri May 17 12:49:47 PDT 2024


Hi,

On the new revision of a rv1108-elgin board, there is an Infineon SPL9670
TPM device connected to the SPI bus.

On kernel 6.9, the following SPI transfer errors occur:

[    2.747002] tpm_tis_spi spi0.0: SPI transfer timed out
[    2.747564] spi_master spi0: failed to transfer one message from queue
[    2.748239] spi_master spi0: noqueue transfer failed
[    2.749039] tpm tpm0: tpm_transmit: tpm_recv: error -110
[    2.749569] tpm tpm0: TPM in field failure mode, requires firmware upgrade

The same issue happens with older kernels, such as 5.4.

If SPI DMA support is removed like this:

&spi {
    pinctrl-names = "default";
    pinctrl-0 = <&spim1_clk &spim1_cs0 &spim1_tx &spim1_rx>;
    /delete-property/ dmas;
    /delete-property/ dma-names;
    status = "okay";

    tpm at 0 {
        compatible = "infineon,slb9670", "tcg,tpm_tis-spi";
        reg = <0>;
        spi-max-frequency = <10000000>;
    };
};


Then the TPM device works correctly.

An old RV1108 SPI bug was reported by Otavio:

https://lore.kernel.org/linux-spi/CAP9ODKpW=h6SVtsn-uuDQ4+TgR0NnjBW==8vwyQD4+x_dbFzRQ@mail.gmail.com/

That indicates an RV1108 SPI problem after moving from polling to IRQ.

Mark's made a good point in reply to Otavio's report:

"Does the interrupt ever fire?  I'm wondering if the DT is wired up
correctly for the particular SoC you have, or if it's even wired up at
all in the hardware."

Can we get some help from Rockchip to clarify these issues on the RV1108 SPI?

Have RV1108 SPI DMA and IRQ been tested by Rockchip?

Are the rv1108 SPI DMA/IRQ descriptions in the rv1108.dtsi correct?

Any known SPI hardware issue on RV1108?

Thanks,

Fabio Estevam



More information about the linux-arm-kernel mailing list