[PATCH v4 14/14] configs: add rpi_4_wolftpm_defconfig

Matthias Brugger mbrugger at suse.com
Fri May 15 13:31:02 CEST 2026



On 13/05/2026 02:26, Aidan Garske wrote:
> From: Aidan <aidan at wolfssl.com>
> 
> Add a new defconfig variant for Raspberry Pi 4 that enables the
> wolfTPM stack and the hardware SPI driver out of the box, so users
> with an Infineon SLB9670 / SLB9672 TPM HAT can build a working
> U-Boot in a single 'make rpi_4_wolftpm_defconfig && make' step.
> 
> This is a separate defconfig rather than a modification to
> rpi_4_defconfig because the average RPi 4 user does not have a
> TPM attached and should not pay for SPI + TPM + wolfTPM code size
> by default - that was the concern raised against v3's modification
> of rpi_4_defconfig.
> 
> Compared to rpi_4_defconfig this enables:
>   - CONFIG_SPI / CONFIG_DM_SPI / CONFIG_BCM2835_SPI / CONFIG_CMD_SPI
>     The hardware SPI controller driver added earlier in this series,
>     plus the spi command for diagnostics.
>   - CONFIG_TPM / CONFIG_TPM_V2 / CONFIG_CMD_TPM
>     The core TPM 2.0 stack and 'tpm2' command.
>   - CONFIG_TPM_WOLF / CONFIG_CMD_WOLFTPM / CONFIG_WOLFTPM_SLB9672
>     wolfTPM as the active TPM backend, with SLB9672 firmware-update
>     support enabled.  CONFIG_WOLFTPM_LINUX_DEV is left off so
>     wolfTPM uses its native SPI HAL (the Linux-dev path is the
>     QEMU+swtpm path, not the bare-metal RPi path).
> 
> No debug / unit-test config (LOG, LOGLEVEL, UNIT_TEST,
> CONSOLE_RECORD, HEXDUMP) is enabled - those belong in a developer's
> local .config, not in a defconfig shipped in tree.
> 
> Signed-off-by: Aidan Garske <aidan at wolfssl.com>

Peter what is your view on that. Shall we add config options for specific hats?

I'm inclined to do so, but I wonder if we can have some kind of config overlay 
instead of a fresh new config. (I'm not aware that U-Boot allows for something 
like this right now).

Regards,
Matthias

> ---
>   configs/rpi_4_wolftpm_defconfig | 81 +++++++++++++++++++++++++++++++++
>   1 file changed, 81 insertions(+)
>   create mode 100644 configs/rpi_4_wolftpm_defconfig
> 
> diff --git a/configs/rpi_4_wolftpm_defconfig b/configs/rpi_4_wolftpm_defconfig
> new file mode 100644
> index 00000000000..4301d2a3e93
> --- /dev/null
> +++ b/configs/rpi_4_wolftpm_defconfig
> @@ -0,0 +1,81 @@
> +CONFIG_ARM=y
> +CONFIG_ARCH_BCM283X=y
> +CONFIG_TEXT_BASE=0x00080000
> +CONFIG_TARGET_RPI_4=y
> +CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
> +CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x7fffe30
> +CONFIG_ENV_SIZE=0x4000
> +CONFIG_DEFAULT_DEVICE_TREE="bcm2711-rpi-4-b"
> +CONFIG_OF_LIBFDT_OVERLAY=y
> +CONFIG_DM_RESET=y
> +CONFIG_SYS_LOAD_ADDR=0x1000000
> +CONFIG_PCI=y
> +CONFIG_EFI_RUNTIME_UPDATE_CAPSULE=y
> +CONFIG_EFI_CAPSULE_FIRMWARE_RAW=y
> +CONFIG_BOOTSTD_DEFAULTS=y
> +CONFIG_OF_BOARD_SETUP=y
> +CONFIG_FDT_SIMPLEFB=y
> +CONFIG_USE_PREBOOT=y
> +CONFIG_PREBOOT="pci enum; usb start;"
> +CONFIG_SYS_PBSIZE=1049
> +# CONFIG_DISPLAY_CPUINFO is not set
> +# CONFIG_DISPLAY_BOARDINFO is not set
> +CONFIG_MISC_INIT_R=y
> +CONFIG_SYS_PROMPT="U-Boot> "
> +CONFIG_CMD_NVEDIT_EFI=y
> +CONFIG_CMD_DFU=y
> +CONFIG_CMD_GPIO=y
> +CONFIG_CMD_MMC=y
> +CONFIG_CMD_PCI=y
> +CONFIG_CMD_SPI=y
> +CONFIG_CMD_USB=y
> +CONFIG_CMD_EFIDEBUG=y
> +CONFIG_CMD_TPM=y
> +CONFIG_CMD_FS_UUID=y
> +CONFIG_CMD_WOLFTPM=y
> +CONFIG_ENV_FAT_DEVICE_AND_PART="0:1"
> +CONFIG_ENV_RELOC_GD_ENV_ADDR=y
> +CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
> +CONFIG_TFTP_TSIZE=y
> +CONFIG_DM_DMA=y
> +CONFIG_DFU_MMC=y
> +CONFIG_SYS_DFU_DATA_BUF_SIZE=0x100000
> +CONFIG_SYS_DFU_MAX_FILE_SIZE=0x200000
> +CONFIG_BCM2835_GPIO=y
> +CONFIG_MMC_SDHCI=y
> +CONFIG_MMC_SDHCI_SDMA=y
> +CONFIG_MMC_SDHCI_BCM2835=y
> +CONFIG_BCMGENET=y
> +CONFIG_PCI_BRCMSTB=y
> +CONFIG_DM_RNG=y
> +CONFIG_PINCTRL=y
> +# CONFIG_PINCTRL_GENERIC is not set
> +CONFIG_RNG_IPROC200=y
> +# CONFIG_REQUIRE_SERIAL_CONSOLE is not set
> +CONFIG_SPI=y
> +CONFIG_DM_SPI=y
> +CONFIG_BCM2835_SPI=y
> +CONFIG_SYSINFO=y
> +CONFIG_SYSINFO_SMBIOS=y
> +# CONFIG_WOLFTPM_LINUX_DEV is not set
> +CONFIG_WOLFTPM_SLB9672=y
> +CONFIG_USB=y
> +CONFIG_DM_USB_GADGET=y
> +CONFIG_USB_XHCI_HCD=y
> +CONFIG_USB_XHCI_PCI=y
> +CONFIG_USB_KEYBOARD=y
> +CONFIG_USB_GADGET=y
> +CONFIG_USB_GADGET_MANUFACTURER="FSL"
> +CONFIG_USB_GADGET_VENDOR_NUM=0x0525
> +CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
> +CONFIG_USB_GADGET_DWC2_OTG=y
> +CONFIG_USB_GADGET_DOWNLOAD=y
> +CONFIG_VIDEO=y
> +# CONFIG_VIDEO_BPP8 is not set
> +# CONFIG_VIDEO_BPP16 is not set
> +CONFIG_SYS_WHITE_ON_BLACK=y
> +CONFIG_VIDEO_BCM2835=y
> +CONFIG_CONSOLE_SCROLL_LINES=10
> +CONFIG_PHYS_TO_BUS=y
> +CONFIG_TPM=y
> +# CONFIG_HEXDUMP is not set



More information about the U-Boot mailing list