AM3358: Trouble with SPI1 in U-Boot with TPM

Part Number: AM3358
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

I am having an issue where I am unable to get any activity on the SPI1 bus using U-Boot version 2021.07.

Below is my .dts file for the board (I'm using the OSD3358-SM-RED along with an infineon SLB9670 TPM):

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
&spi1 { /* MIO6, 9-11 */
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&spi1_pins>;
u-boot,dm-spl;
u-boot,dm-pre-reloc;
num-cs = <1>;
slb96: tpm_spi_tis@0 {
u-boot,dm-spl;
u-boot,dm-pre-reloc;
compatible = "tcg,tpm_tis-spi";
reg = <0>;
spi-max-frequency = <12000000>;
gpio-reset = <&gpio1 12 GPIO_ACTIVE_LOW>;
status = "okay";
};
};
&am33xx_pinmux {
spi1_pins: pinmux_spi1_pins {
pinctrl-single,pins = <
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


I have also applied the fixes mentioned in this post, to no avail: e2e.ti.com/.../am3352-u-boot-use-tpm2-0-via-spi1

When running the command:

tpm2 init

I receive the following error message:



When a logic analyzer is attached, there is absolutely no activity on ANY of the SPI1 pins. The TPM driver seems to successfully recognize the devicetree entry, but no clock signal is generated on the SCLK pin. The only one that works is the reset GPIO.

I've been spinning my wheels on what's going wrong here for a while, any help would be greatly appreciated!

  • To start, you might want to double-check your pinmux configuration. It is recommended to use the SysConfig Pinmux tool provided by TI (https://www.ti.com/tool/SYSCONFIG). If I plug in the SPI pins you are wanting to use I get the following configuration (note the difference in pad control register configuration--- this is important to follow for things to work properly, see TRM).

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    &am33xx_pinmux {
    myspi1_pins_default: myspi1-default-pins {
    pinctrl-single,pins = <
    AM33XX_IOPAD(0x990, PIN_INPUT | MUX_MODE3) /* (A13) mcasp0_aclkx.spi1_sclk */
    AM33XX_IOPAD(0x994, PIN_INPUT | MUX_MODE3) /* (B13) mcasp0_fsx.spi1_d0 */
    AM33XX_IOPAD(0x998, PIN_INPUT | MUX_MODE3) /* (D12) mcasp0_axr0.spi1_d1 */
    AM33XX_IOPAD(0x99c, PIN_INPUT | MUX_MODE3) /* (C12) mcasp0_ahclkr.spi1_cs0 */
    >;
    };
    };
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Regards, Andreas