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.

[参考译文] AM3358:使用 TPM 时 U-Boot 中的 SPI1出现故障

Guru**** 2455560 points
Other Parts Discussed in Thread: SYSCONFIG

请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1471535/am3358-trouble-with-spi1-in-u-boot-with-tpm

器件型号:AM3358
主题中讨论的其他器件:SysConfig

工具与软件:

我遇到问题、使用 U-Boot 版本2021.07时、无法在 SPI1总线上获得任何活动。

下面是我的电路板.dts 文件(我使用的是 OSD3358-SM-RED 以及 Infineon SLB9670 TPM):

&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 = <
			AM33XX_IOPAD(0x990, PIN_OUTPUT | MUX_MODE3)		/* mcasp0_aclkx.spi1_sclk */
			AM33XX_IOPAD(0x994, PIN_INPUT_PULLDOWN | MUX_MODE3)		/* mcasp0_fsx.spi1_d0 */
			AM33XX_IOPAD(0x998, PIN_OUTPUT | MUX_MODE3)	/* mcasp0_axr0.spi1_d1 */
			AM33XX_IOPAD(0x99C, PIN_OUTPUT | MUX_MODE3)		/* mcasp0_ahclkr.spi1_cs0 */
		>;
	};
};


我还应用了本文中提到的修复、但没有效果: e2e.ti.com/.../am3352-u-boot-use-tpm2-0-via-spi1

运行命令时:

tpm2初始化

我收到以下错误消息:



连接逻辑分析仪后、任何 SPI1引脚上绝对没有任何活动。 TPM 驱动程序似乎成功识别 devicetree 条目、但在 SCLK 引脚上不会生成时钟信号。 唯一一个正常工作的是复位 GPIO。

我一直在旋转我的轮子在哪里发生了一段时间的错误,任何帮助将会非常感谢!

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    首先、您可能需要仔细检查引脚多路复用配置。 建议使用 TI 提供的 SysConfig Pinmux 工具(https://www.ti.com/tool/SYSCONFIG)。 如果我插入您想要使用的 SPI 引脚、我将获得以下配置(注意焊盘控制寄存器配置的不同之处--这对于正确工作非常重要、请参阅 TRM)。

    &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 */
    		>;
    	};
    };

    此致、Andreas