On 2017-09-29 14:44, Peter Huewe wrote:
Hi Mimi, Hi Nayna,
The patch replaces the call to builtin_platform_driver(), with a call
to core_initcall().
https://github.com/raspberrypi/linux/blob/rpi-4.8.y/drivers/clk/bcm/cl
k-bcm2835.c
static int __init __bcm2835_clk_driver_init(void)
{
return platform_driver_register(&bcm2835_clk_driver);
}
core_initcall(__bcm2835_clk_driver_init);
Ah it is already in the rpi sources - however I *am* using these, but
it does not work?
Any ideas or pointers highly appreciated.
Peter,
I made TPM work on my RPI 3 Model B running a version of rpi-4.8.y.
From the dmesg you provided in the previous email, there could be
several possible reasons why the kernel is not detecting the
TPM-SPI chip :
1. The SPI bus is not enabled on the Pi. You can use the
raspi-config
command with sudo.
sudo raspi-config
then select Advanced Options,
then select SPI.
https://www.raspberrypi.org/documentation/configuration/raspi-config.md
2. A node for the TPM chip is not properly added to the device tree.
3. A node is added to the device tree source, but it is not compiled
into
binary from.
4. The node is compiled, but you did not tell the kernel to use it
during boot.
The binary overlay files (.dtbo) are placed under
/boot/overlays.
To activate the TPM overlay, place the line
dtoverlay=tpm_tis_spi
in /boot/config.txt.
But first make sure there is this file
/boot/overlays/tpm_tis_spi.dtbo
Regarding device tree (points 2. and 3.), it is more involved and I
did not have
time now to give a detailed answer. But as a starter, besides the
dmesg msgs in
your previous email, did dmesg give any other message on TPM ?
Also, it is possible that TPM initialization was delayed but
eventually completed
at a later time during boot (although not in time for IMA). After
the completion
of the boot process, is there a /dev/tpm0 char special file (or
/dev/tpm*) ?
Pau-Chen