AnsweredAssumed Answered

How to power on iMX8M-EVK USB by SMC32 ?

Question asked by Miles Wang on Jul 15, 2019
Latest reply on Jul 15, 2019 by igorpadykov

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

 

 

Outcomes