This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM3352: U-boot use TPM2.0 via SPI1

Part Number: AM3352

Hello

We are usinf am3352 with kenel 4.9.59 from TI SDK. We have include the sip TOM v2.0 device SLB9670.

It's working fine with OS.

Now we also need suppont in the u-boot.

I download another SDK verseion am335x-evm-linux-sdk-src-06.00.00.07.tar.xz, this u-boot version include the driver with SLB9670.

In our design, slb9670 is connect to SPI1[MCASP0_ACLKX,MCASP0_FSX,MCASP0_AXR0,MCASP0_AHCLKR]

I add the follow into dts.

 

spi1_pins_default: spi1_pins_default {
    pinctrl-single,pins = <
        0x190 (PIN_INPUT_PULLUP | MUX_MODE3) /* (A13) mcasp0_aclkx.mcasp0_aclkx */
        0x194 (PIN_INPUT_PULLUP | MUX_MODE3) /* (B13) mcasp0_fsx.mcasp0_fsx */
        0x198 (PIN_OUTPUT_PULLUP | MUX_MODE3) /* (D12) mcasp0_axr0.mcasp0_axr0 */
        0x19c (PIN_OUTPUT_PULLUP | MUX_MODE3) /* (C12) mcasp0_ahclkr.mcasp0_axr2*/
    >;
};

&spi1 {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&spi1_pins_default>;
    ti,pindir-d0-out-d1-in;

    slb9670@0 {
        compatible = "tis,tpm2-spi";
        reg = <0>;
        spi-max-frequency = <12000000>;
    };
};

When I running the "tpm init", I got following.


=> tpm init
data abort
pc : [<9ff8eca4>] lr : [<9ffa32e7>]
reloc pc : [<8082aca4>] lr : [<8083f2e7>]
sp : 9df36588 ip : 9df36534 fp : 00000002
r10: 9ffd3428 r9 : 9df43ea0 r8 : 9ffcfbd0
r7 : 00006098 r6 : 9df36760 r5 : 9df44cf0 r4 : 9df54690
r3 : 481a0100 r2 : 00000002 r1 : 9ffbf3bb r0 : 00000001
Flags: nzcv IRQs off FIQs on Mode SVC_32
Code: 75230301 61232308 f3bf6823 22028f5f (695a611a)
Resetting CPU ...

resetting ...

How to resolv this problem??

Thanks,

Juncor