From: Aidan <[email protected]>

Add a TPM 2.0 TIS MMIO node at the address QEMU's virt machine
exposes when started with -device tpm-tis-device.  This lets the
in-tree QEMU+swtpm test path (used by the wolfTPM Python test
suite, and similarly usable by anyone bringing up the existing
TPM 2.0 stack against swtpm) work without having to inject a DT
overlay at runtime.

Address 0x0c000000 / size 0x5000 matches QEMU's virt machine TPM
TIS region.

Signed-off-by: Aidan Garske <[email protected]>
---
 arch/arm/dts/qemu-arm64.dts | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/dts/qemu-arm64.dts b/arch/arm/dts/qemu-arm64.dts
index 95fcf53ed74..e74d036a532 100644
--- a/arch/arm/dts/qemu-arm64.dts
+++ b/arch/arm/dts/qemu-arm64.dts
@@ -12,4 +12,8 @@
 #endif
 
 / {
+       tpm@0c000000 {
+               compatible = "tcg,tpm-tis-mmio";
+               reg = <0x0 0x0c000000 0x0 0x5000>;
+       };
 };
-- 
2.49.0

Reply via email to