Hi,
we have several Variscite SD410 modules. I’m not sure if this is also an issue on Dragonboard.
When executing ‘reboot’ cammand on Linux some modules reboot fine and other do not using same software version. Kernel is 4.14 used in Yocto Rocko.
The call stack in kernel is:
machine_restart
arm_pm_restart (mapped to ‘psci_sys_reset’)
psci_sys_reset
invoke_psci_fn (with parmeter ‘PSCI_0_2_FN_SYSTEM_RESET’, mapped to ‘__invoke_psci_fn_smc’)
__invoke_psci_fn_smc
arm_smccc_smc (assember, doing: “SMCCC smc”) // don’t know what that is
===> HANG
Because the PM8916 is the only one who controls RESIN_N from APQ8016 directly I assume someone has to call for a HARD_RESET on PM8916 through SPMI after the above sequencue.
And because RPM driver is not involved in the reset sequence I bet this mus be done by the CORTEX A53 running the reset sequence. It seems to be a subsystem called SMC ( Secure Monitor Call?).
Is this a known issue?
Can anybody confirm that my asumptions are OK?
Can anybody tell me how the PM8916 is triggered exactly?
What could be the reason that the system hangs?
I can’t observe the SPMI bus since we do not have schematics/information of test points to read the bus signals.
In Android kernel I found a direct access to the PMIC through SPMI:
So it seems to be at leas a possibility to use this as workarround.
I also found that there is the msm-poweroff driver compiled in and enabled by device tree.
This driver writes a ‘0’ into a ‘ps-hold’ register:
static int do_msm_restart(struct notifier_block *nb, unsigned long action,
void *data)
{
writel(0, msm_ps_hold);
mdelay(10000);
return NOTIFY_DONE;
}
However, the reset notifier is never called due to the fact that it is registered as
restart handler to be called during ‘do_kernel_restart(…)’.
Bit since psci firmware driver is enabled ‘do_kernel_restart(…)’ is never called because psci sets ‘arm_pm_restart’ and:
void machine_restart(char *cmd)
{
...
/* Now call the architecture specific reboot code. */
if (arm_pm_restart)
arm_pm_restart(reboot_mode, cmd);
else
do_kernel_restart(cmd); // <- NEVER CALLED
...
}
Further, registering ‘do_msm_restart’ as reboot notifier instead in msm-poweroff driver allows the
this handler to be called before ‘arm_pm_restart’. But it the kernel hangs also.
Best regards
-Carsten