public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Trent Piepho <tpiepho@impinj.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [U-Boot,V2] imx: mx7: psci: add system reset support
Date: Mon, 7 May 2018 22:06:33 +0000	[thread overview]
Message-ID: <1525730792.31312.76.camel@impinj.com> (raw)
In-Reply-To: <1515056614-4263-1-git-send-email-Anson.Huang@nxp.com>

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.

  parent reply	other threads:[~2018-05-07 22:06 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-04  9:03 [U-Boot] [PATCH V2] imx: mx7: psci: add system reset support Anson Huang
2018-01-04  9:48 ` Peng Fan
2018-01-04 10:46   ` Anson Huang
2018-01-04 12:57 ` Fabio Estevam
2018-01-05  6:25   ` Anson Huang
2018-01-06 22:47     ` Fabio Estevam
2018-01-07  5:57       ` Anson Huang
2018-01-07  6:27       ` Anson Huang
2018-05-07 22:06 ` Trent Piepho [this message]
2018-05-08  5:29   ` [U-Boot] [U-Boot,V2] " Peng Fan
2018-05-08 20:10     ` Trent Piepho
2018-05-09  1:13       ` Peng Fan
2018-05-09 19:22         ` Trent Piepho
2018-05-10  1:53           ` Peng Fan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1525730792.31312.76.camel@impinj.com \
    --to=tpiepho@impinj.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox