[U-Boot] [U-Boot,V2] imx: mx7: psci: add system reset support

Trent Piepho tpiepho at impinj.com
Mon May 7 22:06:33 UTC 2018


On Thu, 2018-01-04 at 17:03 +0800, Anson Huang wrote:
> Add i.MX7 PSCI system reset support, linux
> kernel now can use "reboot" command to reset
> system.


> +__secure void imx_system_reset(void)
> +{
> +	writew(1 << 2, WDOG1_BASE_ADDR);
> +}

This does not work properly on our board.

Due to an erratum in iMX7d it is necessary to wire the external WDOG_B
signal to the pmic to cycle power in order to reset the board.  The
Linux IMX watchdog driver works when it does a reboot via the watchdog,
but this code does not.

When the Linux drivers is configured for an external wdog signal, using
a DT property, it sets WCR_SRS to prevent the internal system reset in
response to watchdog triggering.  When that is not done, as in this
patch, the internal reset appears to reset the wdog module or iomux or
something, which causes the imx7d to stop asserting the external wdog
signal.

In my tests, this takes only about 2.4 µs.  Such a short wdog_b pulse
does not appear to be sufficient to trigger the pmic to cycle power.

When SRS is set, then the WDOG_B signal will remain asserted until the
POR_B input signal to the imx7d is asserted.  I.e., until pmic responds
to the watchdog signal.


More information about the U-Boot mailing list