Hi community,
I need to look and work through the shutdown procedure of our imx6DL custom board that was based on sabresd and using PFUZE100 pmic.
PMIC_ON_REQ line is connected to PMIC_PWRON
kernel version - 4.1.15
I'm trying to find the implementation of pm_power_off() function that is called on shutdown, and find a place where software toggles the PMIC_ON_REQ line, in case of a soft shutdown (issuing "$shutdown -h -P now")
We are using the device tree, and there is nothing that i could find in arch/arm/mach-imx
the rtc-snvs driver is disabled (CONFIG_POWER_RESET_IMX is not set)
Any tips ?
Thanks,
Stas
已解决! 转到解答。
Looks like i found it:
in drivers/power/reset/syscon-poweroff.c syscon_poweroff() function - writes 0x61 to SNVS_LCPR register, clearing PK_OVERRIDE and PK_EN bits, which triggers PMIC_ON_REQ signal to go low.
Could anyone confirm that this is correct ?
Hi Stas
one can look on
Q&A: How is mx6 PMIC_ON_REQ under SW control?
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Igor,
Thanks, i've read this note before and there is something in it that's not quite clear.
This means that you are correct, there only 2 ways to get PMIC_ON_REQ to power up for the mx6q/d
1 - a low on the ON/OFF pin greater than the debounce time (750ms)
2 - a wake-up/tamper event.
Does this mean that it is not possible to power on the mx6q/d micro without having the ONOFF pin connected ?
A wake-up/tamper event - is this referring ONLY to a SNVS tamper detection (RM chapter 11.4.2) ? Which wake-up event do they mean ?
On our custom design we want to use a GPIO instead of an ONOFF, as we have a requirement for the Power On button to detect and process an interrupt as well.
From the document that you link (And also Table 6-03 in IMX6QD RM), am i correct in saying that if using external PFUZE100 PMIC with PMIC_ON_REQ,
it is impossible to power up the microcontroller without connecting button to the ONOFF pin ? (Assuming no custom hardware solutions to drive PMIC_ON_REQ high)
Hi Stas
ONOFF has on-chip pullup, according to Table 2-6. Power and decouple recommendations
i.MX6 System Development User’s Guide :
"If unused, the following signals should be left unconnected: ONOFF.."
https://www.nxp.com/docs/en/user-guide/IMX6DQ6SDLHDG.pdf
Best regards
igor
Hi Igor,
Thanks for the response. I appreciate your help, and don't want to be too much of a bother, but there is still something that is not quite cleare to me, sorry.
So in the document you linked, there is an implication that it's ok to not use the ONOFF button. But it is still not clear to me how the power up sequence would look like if the ONOFF button is not connected.
From Table 60-3 Power mode transitions in imx6 reference manual:
On, first time 1) Power supply connected to SNVS
2) When button is pressed, PMIC powers on.
So if we are not using the ONOFF button which "button" is implied there ? Can any GPIO interrupt be configured to become this "button" ? Or does it have to be a TAMPER event ? This is what's not clear, even from this https://community.nxp.com/docs/DOC-97660 document
Looks like i found it:
in drivers/power/reset/syscon-poweroff.c syscon_poweroff() function - writes 0x61 to SNVS_LCPR register, clearing PK_OVERRIDE and PK_EN bits, which triggers PMIC_ON_REQ signal to go low.
Could anyone confirm that this is correct ?