TPM SLB9670 with AM3359

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I'm not sure it this is the right mailinglist for this issue, but it not, I would appreciate to be directed to the right list.

I'm trying to commission an TPM Infinion SLB9670 connected via SPI0 (CS0) to my AM3359. Unfortunately probing of the tpm-tis-spi driver fails with the following message:

[  133.081749] tpm tpm0: tpm_transmit: tpm_send: error -5
[  133.082185] tpm_tis_spi: probe of spi1.0 failed with error -5

I tried to it debug as far as possible and it seems that the problem occurs in tpm_tis_core.c: tpm_tis_send_data() on the following line:

            /* write last byte */
            rc = tpm_tis_write8(priv, TPM_DATA_FIFO(priv->locality), buf[count]);
            if (rc < 0)
                        goto out_err;

            if (wait_for_tpm_stat(chip, TPM_STS_VALID, chip->timeout_c,
                                                &priv->int_queue, false) < 0) {
                        rc = -ETIME;
                        goto out_err;
            }
            dev_info(&chip->dev, "tpm_tis_send_data last byte wait for status successful");   // own debug comment, appears on the console

            status = tpm_tis_status(chip);
            if (!itpm && (status & TPM_STS_DATA_EXPECT) != 0) {       // error, -EIO = -5
                        rc = -EIO;
                        goto out_err;
            }


I'm running a yocto-linux kernel 4.10 and I've set up the pin muxing and device tree as follows:

            spi0_pins: pinmux_spi0_pins {
                       pinctrl-single,pins = <
                                    AM33XX_IOPAD( 0x950, PIN_INPUT_PULLUP | MUX_MODE0)    /* spi0_sclk.spi0_sclk */
                                    AM33XX_IOPAD( 0x954, PIN_INPUT_PULLUP | MUX_MODE0)    /* spi0_d0.spi0_d0 */
                                    AM33XX_IOPAD( 0x958, PIN_INPUT_PULLUP | MUX_MODE0)    /* spi0_d1.spi0_d1 */
                                    AM33XX_IOPAD( 0x95c, PIN_INPUT_PULLUP | MUX_MODE0)    /* spi0_cs0.spi0_cs0 */
                       >;
           };


&spi0 {
            #address-cells = <1>;
            #size-cells = <0>;
            status = "okay";
            pinctrl-names = "default";
            pinctrl-0 = <&spi0_pins>;
/*          ti,pindir-d0-out-d1-in = <1>; */

    tpm_tis_spi@0{
                        compatible = "tcg,tpm_tis-spi";
                        spi-max-frequency = <1000000>;
                        reg = <0>;
            };
};

And my TPM Kernel fragment is 

CONFIG_HW_RANDOM=y
CONFIG_HW_RANDOM_TPM=y
CONFIG_TCG_TPM=y
CONFIG_TCG_TIS_CORE=y
CONFIG_TCG_TIS=y
CONFIG_TCG_TIS_SPI=m

I also have an FPGA connected to SPI1 of the same CPU and that one works fine.

Any idea what I'm doing wrong?

BR

Isak Lichtenstein






[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux