dm: tpm: Add a 'tpmtest' command

These tests come from Chrome OS code. They are not particularly tidy but can
be useful for checking that the TPM is behaving correctly. Some knowledge of
TPM operation is required to use these.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Christophe Ricard<christophe-h.ricard@st.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
diff --git a/common/Kconfig b/common/Kconfig
index bacc4e0..2c42b8e 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -635,6 +635,16 @@
 	  command requires a suitable TPM on your board and the correct driver
 	  must be enabled.
 
+config CMD_TPM_TEST
+	bool "Enable the 'tpm test' command"
+	depends on CMD_TPM
+	help
+	  This provides a a series of tests to confirm that the TPM is working
+	  correctly. The tests cover initialisation, non-volatile RAM, extend,
+	  global lock and checking that timing is within expectations. The
+	  tests pass correctly on Infineon TPMs but may need to be adjusted
+	  for other devices.
+
 endmenu
 
 endmenu