Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Novice
1,088 Views

Need help on porting tpm_i2c_atmel to Yocto for Quark

I need to make my Atmel TPM working on Yocto for Quark.

I have the driver source code (tpm_i2c_atmel.c) but it's for kernel 3.4 and 3.14, not for 3.8. Therefore, I need to do the porting job.

I tested another Linux distro (kernel 3.4) on the same board (with Atmel TPM) and the driver works normally.

But when I tried the driver on Yocto (with some minor modification, of course), I don't know why the driver can't print out any debug message.

It seems that the i2c probe function was not called at all.

I also tried a simple driver (tpm_kevin.c attached) to try printing out some message but no success.

 

Without debugging capability, I hardly can do anything now.

Could you please give me any hints to start working on this porting job?

If you need extra information, just let me know.

Thanks.

0 Kudos
7 Replies
Highlighted
Employee

Re: Need help on porting tpm_i2c_atmel to Yocto for Quark

Hello kevin.bui,

Which TPM are you using? On a quick search at Atmel's TPMs I found that the one that supports I2C is AT97SC3205T, is this the one you're trying to use? If so, I couldn't find a datasheet (only summaries of the product) nor any information of its drivers, only that they are available for Windows and Linux, nevertheless not extra info, can you provide more information about the device you're trying to use?

Peter.

Highlighted
Novice

Re: Need help on porting tpm_i2c_atmel to Yocto for Quark

Hi Peter,

Yes, the TPM I am using is AT97SC3205T. This TPM has been officially supported in Linux since kernel 3.14.

You can refer to the driver here: http://git.yoctoproject.org/cgit/cgit.cgi/linux-yocto-3.14/tree/drivers/char/tpm/tpm_i2c_atmel.c linux-yocto-3.14 - Linux 3.14 Embedded Kernel

0 Kudos
Highlighted
Employee

Re: Need help on porting tpm_i2c_atmel to Yocto for Quark

Hi kevin.bui,

As you said the driver is for kernel 3.14, so I'm not sure if it is possible to port it to kernel 3.8, which as you also said is the one the BSP come with, in that case I believe you should contact Atmel to help you port the driver to 3.8.

On the other hand, you could try to build an image that comes with kernel 3.14, some users have been able to do it with the Galileo, like the one here: , however this is not the official for Quark so it's not supported by Intel.

Peter.

0 Kudos
Highlighted
Novice

Re: Need help on porting tpm_i2c_atmel to Yocto for Quark

Hi Peter,

I am trying to get the i2c_probe function to be called in Yocto now but still no success yet.

I just want to try a simple I2C module that can print some debug messages, no need for real jobs.

Do you think that's possible?

Thanks,

0 Kudos
Highlighted
Community Manager

Re: Need help on porting tpm_i2c_atmel to Yocto for Quark

Hi Kevin

I think so you need to register the i2c device. Then the i2c device will be probe.

You can reference the code in drivers/platform/x86/quark/intel_qrk_plat_clanton_hill.c .

0 Kudos
Highlighted
Novice

Re: Need help on porting tpm_i2c_atmel to Yocto for Quark

After many efforts, I am able to bring up the TPM driver on Yocto. My board use intel_qrk_plat_crosshill.c instead.

Thank you very much for your suggestion.

0 Kudos
Highlighted
Employee

Re: Need help on porting tpm_i2c_atmel to Yocto for Quark

Could you post here more information about your project? I'm sure it'll interest and help other users of the community that are developing similar projects and have related issues.

Peter.

0 Kudos