Hi Aidan,

On 2026-05-13T00:26:04, Aidan Garske <[email protected]> wrote:
> arm: dts: bcm2711-rpi-4-b: add Infineon SLB9670/9672 TPM in U-Boot dtsi
>
> Add a TPM 2.0 device-tree node on SPI0 CE1 for the Infineon
> SLB9670 / SLB9672 TPM HAT.  The pinout matches the standard Linux
> tpm-slb9670 overlay, so a board configured for U-Boot with this
> addition behaves the same as a Linux kernel using that overlay.
>
> The node is placed in bcm2711-rpi-4-b-u-boot.dtsi (the U-Boot-only
> DT augmentation file) rather than in bcm2711-rpi-4-b.dts.  This
> keeps the upstream-Linux-derived .dts unchanged, so SystemReady
> firmware-provided FDTs and the upstream Linux device tree continue
> to match what kernel.org ships - which addresses the concern raised
> in v3 review about polluting the Linux DT path.
>
> A spi0 alias is added pointing at the BCM2711 SPI controller, so
> that wolfTPM's SPI HAL (which addresses the bus by number) finds
> the TPM at bus 0 CS 1.
>
> Signed-off-by: Aidan Garske <[email protected]>
>
> arch/arm/dts/bcm2711-rpi-4-b-u-boot.dtsi | 39 ++++++++++++++++++++++++++++++++
>  1 file changed, 39 insertions(+)

> diff --git a/arch/arm/dts/bcm2711-rpi-4-b-u-boot.dtsi 
> b/arch/arm/dts/bcm2711-rpi-4-b-u-boot.dtsi
> @@ -0,0 +1,39 @@
> +#include 'bcm283x-u-boot.dtsi'
> +
> +/ {
> +     aliases {
> +             spi0 = &spi;
> +     };
> +};
> +
> +&gpio {
> +     bootph-all;
> +};

bcm283x-u-boot.dtsi (included a few lines above) already adds
bootph-all to &gpio, so you shouldn't need this.

> diff --git a/arch/arm/dts/bcm2711-rpi-4-b-u-boot.dtsi 
> b/arch/arm/dts/bcm2711-rpi-4-b-u-boot.dtsi
> @@ -0,0 +1,39 @@
> +     /* Infineon SLB9670 / SLB9672 TPM 2.0 on CE1 (GPIO7) */
> +     tpm@1 {
> +             compatible = 'infineon,slb9670', 'tcg,tpm_tis-spi';
> +             reg = <1>;
> +             spi-max-frequency = <32000000>;
> +             bootph-all;
> +     };

Just to note - drivers/tpm/tpm2_tis_spi.c already binds to
tcg,tpm_tis-spi, so this node is not wolfTPM-specific; the in-tree
TPM2 stack will probe it too. Combined with Peter's request to split
the BCM2835 SPI driver out, one option is a small standalone series
that lands patch 3 plus this DT node and lets the existing TPM2 stack
drive the SLB9670 on a Pi 4, independent of the wolfTPM question.
Anyway, please adjust the commit message, since it under-sells what it
enables.

Regards,
Simon

Reply via email to