How to power on iMX8M-EVK USB by SMC32 ?

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

How to power on iMX8M-EVK USB by SMC32 ?

Jump to solution
835 Views
mileswang
Contributor II

Hello,

I'm writing VxWorks USB host driver for iMX8MQ-EVK. VxWorks USB host driver works in 64-bit AArch64 mode. It fails in 32-bit AArch32 mode. The root cause is to power on USB. Linux uses SMC64 to power on USB.

In Linux gpc-psci.c,  imx_gpc_pd_power_on() has below statements:

mutex_lock(&gpc_pd_mutex);
arm_smccc_smc(FSL_SIP_GPC, FSL_SIP_CONFIG_GPC_PM_DOMAIN, pd->gpc_domain_id,
GPC_PD_STATE_ON, 0, 0, 0, 0, &res);
mutex_unlock(&gpc_pd_mutex);

Here,

#define FSL_SIP_GPC 0xC2000000
#define FSL_SIP_CONFIG_GPC_PM_DOMAIN 0x03

We know 0xC2000000 is SMC64 SiP Service Calls. It works on AArch64 mode VxWorks. 

But I want to use it on  AArch32 VxWorks. Here it needs SMC32 to power on USB. So I write SMC32 API and change the definition of FSL_SIP_GPC from 0xC2000000 to 0x82000000. 0x82000000 is SMC32 SiP Service Calls.

Unfortunately after SMC32 call, system hang-up.

Please tell me how to do SMC32 call to power on iMX8M-EVK USB. Thanks.

Best regards,

Miles

Labels (1)
Tags (2)
0 Kudos
1 Solution
727 Views
igorpadykov
NXP Employee
NXP Employee

Hi Miles

one can check AN12212 describing difference between AARCH64 and AARCH32

and software approaches for customer projects

Software Solutions for Migration Guide from Aarch32 to Aarch64

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
1 Reply
728 Views
igorpadykov
NXP Employee
NXP Employee

Hi Miles

one can check AN12212 describing difference between AARCH64 and AARCH32

and software approaches for customer projects

Software Solutions for Migration Guide from Aarch32 to Aarch64

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos