+In case a ast2600-evb bmc machine is emulated and want to use TPM device
+attached to I2C bus, use the following command line:
+
+.. code-block:: console
+
+ qemu-system-arm -M ast2600-evb -nographic \
+ -kernel arch/arm/boot/zImage \
+ -dtb arch/arm/boot/dts/aspeed-ast2600-evb.dtb \
+ -initrd rootfs.cpio \
+ -chardev socket,id=chrtpm,path=/tmp/mytpm1/swtpm-sock \
+ -tpmdev emulator,id=tpm0,chardev=chrtpm \
+ -device tpm-tis-i2c,tpmdev=tpm0,bus=aspeed.i2c.bus.12,address=0x2e
For testing, use this command to load the driver to the correct address:
echo tpm_tis_i2c 0x2e > /sys/bus/i2c/devices/i2c-12/new_device
(I don't know how specific we want to make the instructions, but
adding a line like above would help others from having to re-discover
the command).
or/and add an avocado test for it. See tests/avocado/machine_aspeed.py.
The avocado framework is a bit fragile when reading from the console but
we hope to fix that.
I never used it before so it will take little longer.
Is it required to merge this i2c work?
It isn't.
C.