Enabling TPM on A core imx8ulp

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Enabling TPM on A core imx8ulp

Jump to solution
2,796 Views
wendy-liu
Contributor II

Hi @Chavira

     I'm using iMX8ULP-evk to enable TPM in A core according to your article: https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/How-to-use-PWM-on-iMX93-EVK-board/ta-p/1... 

    I chose PTF19 (J20 pin3) to generate PWM signal.

wendyliu_0-1740448715122.png

     After flashing, I open a terminal and execute the following commands:

cd /sys/class/pwm/pwmchip0;
echo 0 > export;
cd pwm0;
echo 400000 > period;
echo 200000 > duty_cycle;
echo 1 > enable;

    Then , I use oscilloscope to measure it waveform , and it keeps outputting a high-level signal.

    Could you give me some advice?

    My dts ,config, log are as below.

Best Regard!

Labels (1)
0 Kudos
Reply
1 Solution
2,656 Views
Chavira
NXP TechSupport
NXP TechSupport

Hi @wendy-liu!

Try changing the driver from "fsl,imx7ulp-tpm" to "fsl,imx7ulp-pwm" in imx8ulp.dtsi.

tpm5: tpm@29340000 {
      compatible = "fsl,imx8ulp-tpm", "fsl,imx7ulp-pwm";

 

Additional you should disable the LPSPI5 since the LPSPI5 is using the pin PTF19.

 

Best Regards!]

Chavira

 

View solution in original post

0 Kudos
Reply
5 Replies
2,780 Views
wendy-liu
Contributor II

@Chavira 

Also, tpm_rpchip_0 is the node(/sys/class/pwm/pwmchip0/), but where is tpm5?

And, which TPM does tpm_rpchip_0 control?

There are some questions I would like to ask you.Hope your reply!Thanks a lot!

0 Kudos
Reply
2,760 Views
Chavira
NXP TechSupport
NXP TechSupport

HI @wendy-liu!
Thank you for contacting NXP Support!

 

I will start with the research of this issue.

It looks like the TPM only can be managed by M core and you can control the TPM module using rpmsg only.

 

I will give you an update as soon as possible.

 

Best Regards!

Chavira

0 Kudos
Reply
2,752 Views
wendy-liu
Contributor II

@Chavira 

Looking forward your reply!

Thank you very much!

0 Kudos
Reply
2,657 Views
Chavira
NXP TechSupport
NXP TechSupport

Hi @wendy-liu!

Try changing the driver from "fsl,imx7ulp-tpm" to "fsl,imx7ulp-pwm" in imx8ulp.dtsi.

tpm5: tpm@29340000 {
      compatible = "fsl,imx8ulp-tpm", "fsl,imx7ulp-pwm";

 

Additional you should disable the LPSPI5 since the LPSPI5 is using the pin PTF19.

 

Best Regards!]

Chavira

 

0 Kudos
Reply
2,625 Views
wendy-liu
Contributor II

Thanks! I have been solved!

Best Regards!

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2050363%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EEnabling%20TPM%20on%20A%20core%20imx8ulp%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2050363%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CSPAN%3EHi%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F206761%22%20target%3D%22_blank%22%3E%40Chavira%3C%2FA%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3BI'm%20using%20iMX8ULP-evk%20to%20enable%20TPM%20in%20A%20core%20according%20to%20your%20article%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fi-MX-Processors-Knowledge-Base%2FHow-to-use-PWM-on-iMX93-EVK-board%2Fta-p%2F1975410%22%20target%3D%22_self%22%3Ehttps%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fi-MX-Processors-Knowledge-Base%2FHow-to-use-PWM-on-iMX93-EVK-board%2Fta-p%2F1...%3C%2FA%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%26nbsp%3B%20%26nbsp%3B%20I%20chose%20PTF19%20(J20%20pin3)%20to%20generate%20PWM%20signal.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22wendyliu_0-1740448715122.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22wendyliu_0-1740448715122.png%22%20style%3D%22width%3A%20399px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F325441i1E271AF28C3BB287%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22wendyliu_0-1740448715122.png%22%20alt%3D%22wendyliu_0-1740448715122.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3BAfter%20flashing%2C%20I%20o%3CSPAN%3Epen%20a%20terminal%20and%20execute%20the%20following%20commands%3A%3C%2FSPAN%3E%3C%2FP%3E%3CPRE%3E%3CSPAN%3Ecd%20%2Fsys%2Fclass%2Fpwm%2Fpwmchip0%3B%3CBR%20%2F%3Eecho%200%20%26gt%3B%20export%3B%3CBR%20%2F%3Ecd%20pwm0%3B%3CBR%20%2F%3Eecho%20400000%20%26gt%3B%20period%3B%3CBR%20%2F%3Eecho%20200000%20%26gt%3B%20duty_cycle%3B%3CBR%20%2F%3Eecho%201%20%26gt%3B%20enable%3B%3C%2FSPAN%3E%3C%2FPRE%3E%3CP%3E%3CSPAN%3E%26nbsp%3B%20%26nbsp%3B%20Then%20%2C%20I%20use%20oscilloscope%20to%20measure%20it%20waveform%20%2C%20and%20it%20keeps%20outputting%20a%20high-level%20signal.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3E%26nbsp%3B%20%26nbsp%3B%20Could%20you%20give%20me%20some%20advice%3F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%20%26nbsp%3B%20My%20dts%20%2Cconfig%2C%20log%20are%20as%20below.%3C%2FP%3E%3CP%3EBest%20Regard!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2050363%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3Ei.MX8ULP%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2056611%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9A%20Enabling%20TPM%20on%20A%20core%20imx8ulp%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2056611%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EThanks!%20I%20have%20been%20solved!%3C%2FP%3E%3CP%3EBest%20Regards!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2055653%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9A%20Enabling%20TPM%20on%20A%20core%20imx8ulp%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2055653%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F246604%22%20target%3D%22_blank%22%3E%40wendy-liu%3C%2FA%3E!%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%0A%3CP%3ETry%20changing%20the%20driver%20from%20%3CSTRONG%3E%22fsl%2Cimx7ulp-tpm%22%3C%2FSTRONG%3E%20to%3CSTRONG%3E%20%22fsl%2Cimx7ulp-pwm%22%26nbsp%3B%3C%2FSTRONG%3Ein%20%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fnxp-imx%2Flinux-imx%2Fblob%2Fd23d64eea5111e1607efcce1d601834fceec92cb%2Farch%2Farm64%2Fboot%2Fdts%2Ffreescale%2Fimx8ulp.dtsi%22%20target%3D%22_self%22%20rel%3D%22nofollow%20noopener%20noreferrer%22%3Eimx8ulp.dtsi.%3C%2FA%3E%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-c%22%3E%3CCODE%3Etpm5%3A%20tpm%4029340000%20%7B%0A%20%20%20%20%20%20compatible%20%3D%20%22fsl%2Cimx8ulp-tpm%22%2C%20%22fsl%2Cimx7ulp-pwm%22%3B%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CBR%20%2F%3E%0A%3CP%3EAdditional%20you%20should%20disable%20the%20LPSPI5%20since%20the%20LPSPI5%20is%20using%20the%20pin%20PTF19.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EBest%20Regards!%5D%3C%2FP%3E%0A%3CP%3EChavira%3C%2FP%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2052397%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9A%20Enabling%20TPM%20on%20A%20core%20imx8ulp%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2052397%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F206761%22%20target%3D%22_blank%22%3E%40Chavira%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3ELooking%20forward%20your%20reply!%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EThank%20you%20very%20much!%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2051940%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9A%20Enabling%20TPM%20on%20A%20core%20imx8ulp%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2051940%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHI%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F246604%22%20target%3D%22_blank%22%3E%40wendy-liu%3C%2FA%3E!%3CBR%20%2F%3EThank%20you%20for%20contacting%20NXP%20Support!%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EI%20will%20start%20with%20the%20research%20of%20this%20issue.%3C%2FP%3E%0A%3CP%3EIt%20looks%20like%20the%20TPM%20only%20can%20be%20managed%20by%20M%20core%20and%20you%20can%20control%20the%20TPM%20module%20using%20rpmsg%20only.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EI%20will%20give%20you%20an%20update%20as%20soon%20as%20possible.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EBest%20Regards!%3C%2FP%3E%0A%3CP%3EChavira%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2050524%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%E5%9B%9E%E5%A4%8D%EF%BC%9A%20Enabling%20TPM%20on%20A%20core%20imx8ulp%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2050524%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F206761%22%20target%3D%22_blank%22%3E%40Chavira%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EAlso%2C%26nbsp%3Btpm_rpchip_0%20is%20the%20node(%2Fsys%2Fclass%2Fpwm%2Fpwmchip0%2F)%2C%20but%20where%20is%20tpm5%3F%3C%2FP%3E%3CP%3EAnd%2C%20w%3CSPAN%3Ehich%20TPM%20does%20%3C%2FSPAN%3E%3CSTRONG%3Etpm_rpchip_0%3C%2FSTRONG%3E%3CSPAN%3E%20control%3F%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%3EThere%20are%20some%20questions%20I%20would%20like%20to%20ask%20you.Hope%20your%20reply!Thanks%20a%20lot!%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E