Hi Aidan, On 2026-05-13T00:26:04, Aidan Garske <[email protected]> wrote: > sandbox: dts: add TPM SPI emulator node > > Add a 'sandbox,tpm-spi' slave on the existing sandbox SPI bus and > a matching 'sandbox,tpm-spi-emul' emulator node, so the sandbox > unit-test target can exercise SPI-attached TPM code paths without > real hardware. > > The slave device sits on CS 1 (CS 0 is the SPI-NOR flash emulator > that other sandbox tests use), and the slave's sandbox,emul > phandle points at the emulator node added at the root of the > sandbox device tree. > > Signed-off-by: Aidan Garske <[email protected]> > > arch/sandbox/dts/sandbox.dtsi | 11 +++++++++++ > 1 file changed, 11 insertions(+)
Reviewed-by: Simon Glass <[email protected]> > diff --git a/arch/sandbox/dts/sandbox.dtsi b/arch/sandbox/dts/sandbox.dtsi > @@ -286,6 +286,17 @@ > + tpm_spi: tpm@1 { > + reg = <1>; > + compatible = 'sandbox,tpm-spi'; > + spi-max-frequency = <10000000>; > + sandbox,emul = <&tpm_spi_emul>; > + }; Just to check - is there a reason this is in sandbox.dtsi rather than test.dts? Only the C unit tests in patch 12 exercise this emulator, and test-only nodes normally live in test.dts. The existing sandbox TPM nodes in sandbox.dtsi are arguably an exception rather than the rule. It's fine to have the node in both, though. Regards, Simon

