All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Niedermaier <cniedermaier@dh-electronics.com>
To: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>,
	Andrej Picej <andrej.picej@norik.com>,
	Support Opensource <Support.Opensource@diasemi.com>,
	"linux@roeck-us.net" <linux@roeck-us.net>,
	"linux-watchdog@vger.kernel.org" <linux-watchdog@vger.kernel.org>
Cc: "wim@linux-watchdog.org" <wim@linux-watchdog.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"shawnguo@kernel.org" <shawnguo@kernel.org>,
	"s.hauer@pengutronix.de" <s.hauer@pengutronix.de>,
	"kernel@pengutronix.de" <kernel@pengutronix.de>,
	"festevam@gmail.com" <festevam@gmail.com>,
	"linux-imx@nxp.com" <linux-imx@nxp.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: RE: [PATCH v3 2/4] watchdog: da9062: reset board on watchdog timeout
Date: Thu, 2 Dec 2021 15:46:10 +0000	[thread overview]
Message-ID: <91ecb1bf010143d4987807811cab4bb6@dh-electronics.com> (raw)
In-Reply-To: <DB9PR10MB4652D886000C35FFB91E511D80699@DB9PR10MB4652.EURPRD10.PROD.OUTLOOK.COM>

From: Adam Thomson [mailto:Adam.Thomson.Opensource@diasemi.com]
Sent: Thursday, December 2, 2021 1:12 PM
> On 02 December 2021 07:43, Andrej Picej wrote:
>>> I have a question how to correctly restart the system after
>>> watchdog timeout.
>>> If I understand it correct after watchdog timeout the system
>>> restarts only if WATCHDOG_SD (Bit 3) in register CONFIG_I is
>>> set.
>>> What is the difference if WATCHDOG_SD isn't set, but WAKE_UP
>>> (Bit 2) in register CONTROL_F is set? From outside on my
>>> system I observe the same behavior. After watchdog timeout
>>> my system restarts. So where are the differences?
>>> It would be nice if you could answer this question, as you
>>> certainly know this chip very well.
>>
>> To be honest I don't really know the chip that well, I'm just trying to
>> add this feature and hopefully help others if they run into the same
>> problem. I think @Adam will be more helpful here.
>>
>> But from quick look at da9062 datasheet, mainly chapter "8.8 Power
>> Modes" I see next main differences:
>> - setting WATCHDOG_SD enables SHUTDOWN sequence when the watchdog
>> timeout is triggered. This puts the chip (da9062) in RESET mode.
>> Taken from DA9062 datasheet:
>> > In RESET mode, the internal supplies, and LDO1 (if configured as an always-on supply) are enabled.
>> > All other DA9062 supplies are disabled.
>> > DA9062 is in RESET mode whenever a complete application shutdown is required
>> > The DA9062’s register configuration will be re-loaded from OTP when leaving the RESET mode
>>
>> - if you set the WAKE_UP bit than the chip enters POWERDOWN mode on
>> watchdog timeout. I understand the POWERDOWN mode as a not that "deep"
>> mode as a RESET mode Device will go from RESET mode to POWERDOWN mode in
>> the sequence of powering-up.
>>
>> The above explanation is just my understanding after quick look, @Adam
>> please correct me if I'm talking nonsense.
>>
>> Please have a look at the DA9062 datasheet for more information. Sorry,
>> that I can't be more helpful here.
> 
> Yes, POWERDOWN doesn't go to RESET and thus doesn't re-read OTP, so some
> settings will persist. Also, depending on the state of NRES_MODE, the nRESET
> pin
> state may or may not be modified to reset the attached processor. The
> behaviour
> of POWERDOWN and which regulators are disabled is down to the OTP
> configuration
> of the device.
> 
> For transition to POWERDOWN, if the WAKE_UP bit is set then the device will
> immediately transition back out of POWERDOWN to ACTIVE and the WAKE_UP bit
> will
> be cleared after a time.

Hi Adam,

Many thanks for your clarification.

Best regards
Christoph
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2021-12-02 15:55 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-01  8:15 [PATCH v3 1/4] mfd: da9062: make register CONFIG_I writable Andrej Picej
2021-12-01  8:15 ` Andrej Picej
2021-12-01  8:15 ` [PATCH v3 2/4] watchdog: da9062: reset board on watchdog timeout Andrej Picej
2021-12-01  8:15   ` Andrej Picej
2021-12-01 14:11   ` Christoph Niedermaier
2021-12-02  7:43     ` Andrej Picej
2021-12-02  7:43       ` Andrej Picej
2021-12-02 12:12       ` Adam Thomson
2021-12-02 12:12         ` Adam Thomson
2021-12-02 15:46         ` Christoph Niedermaier [this message]
2021-12-02 15:37       ` Christoph Niedermaier
2021-12-01 20:05   ` Adam Thomson
2021-12-01 20:05     ` Adam Thomson
2021-12-02  8:31     ` Andrej Picej
2021-12-02  8:31       ` Andrej Picej
2021-12-01 21:26   ` Guenter Roeck
2021-12-01 21:26     ` Guenter Roeck
2021-12-02  8:34     ` Andrej Picej
2021-12-02  8:34       ` Andrej Picej
2021-12-01  8:15 ` [PATCH v3 3/4] dt-bindings: watchdog: da9062: add watchdog timeout mode Andrej Picej
2021-12-01  8:15   ` Andrej Picej
2021-12-01  8:15 ` [PATCH v3 4/4] ARM: dts: imx6: phycore-som: set watchdog timeout mode to shutdown Andrej Picej
2021-12-01  8:15   ` Andrej Picej

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=91ecb1bf010143d4987807811cab4bb6@dh-electronics.com \
    --to=cniedermaier@dh-electronics.com \
    --cc=Adam.Thomson.Opensource@diasemi.com \
    --cc=Support.Opensource@diasemi.com \
    --cc=andrej.picej@norik.com \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=robh+dt@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=wim@linux-watchdog.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.