From: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
To: Christoph Niedermaier <cniedermaier@dh-electronics.com>,
Adam Thomson <Adam.Thomson.Opensource@diasemi.com>,
Andrej Picej <andrej.picej@norik.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Cc: Support Opensource <Support.Opensource@diasemi.com>,
Wim Van Sebroeck <wim@linux-watchdog.org>,
"linux-watchdog@vger.kernel.org" <linux-watchdog@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Guenter Roeck <linux@roeck-us.net>
Subject: RE: [RFC PATCH] watchdog: da9062: Correct the timeout values [Klartext]
Date: Mon, 13 Dec 2021 14:53:52 +0000 [thread overview]
Message-ID: <DB9PR10MB4652D761596216F84AFF95EB80749@DB9PR10MB4652.EURPRD10.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <4254747d8cde4c5dbcbfdd00a3ecf701@dh-electronics.com>
On 13 December 2021 09:11, Christoph Niedermaier wrote:
> Resend with [Klartext] to turn off TLS encryption.
>
> From: Adam Thomson
> Sent: Monday, December 6, 2021 5:38 PM
> >> Thanks anyway, so now I know it must be
> >> problem with my DA9061 chip.
> >>
> >> @Adam
> >> Where can it come from?
> >> Can you give we a hint what to check?
> >
> > I've spoken internally and have been informed that this is down to the fact that
> > DA9061 runs only from an internal oscillator which may be slower. The
> indication
> > is that the values for TWDSCALE describe the window where if a kick/ping
> occurs
> > within that period then the watchdog is guaranteed *not* to timeout. The
> actual
> > timeout would be at some point after the selected timeout period, assuming
> no
> > ping/kick occurred.
> >
> > Table 8 in the datasheet specifies a minimum watchdog timeout of 2.5s
> (tWDMAX)
> > under specific operating conditions, so if the minimum 2s window was chosen
> > (TWDSCALE = 1) then earliest the watchdog would actually timeout, following a
> > ping, is 2.5s, assuming the conditions matched those described.
> >
> > If you have further questions it probably makes sense to contact
> Dialog/Renesas
> > support as they will be able to provide more detailed info on this.
>
> So a DA9061 runs only from an internal oscillator, whereas a DA9062
> can run on either an internal or an external oscillator. So this
> means that the DA9061 timeout values are differ from the DA9062
> with an external oscillator not only on my device but on all DA9061
> devices.
>
> This are the values (in seconds) in comparison:
> DA9062 (from driver): 0 2 4 8 16 32 65 131
> DA9061 (measured): 0 3 6 12 25 51 102 204
> =================================================
> Difference: 0 +1 +2 +4 +9 +19 +37 +73
>
> In my opinion, the differences in the higher values are very huge.
> If I expect that the watchdog triggers and I have to wait more than
> a minute for that to happen I ask myself is there something wrong.
>
> @Andrej
> I guess, you are using an external oscillator, aren't you?
>
> @Adam
> Is there a way to check in the driver which oscillator is in use?
A quick scan of the DA9062 datasheet shows that reg/field EN_32K/CRYSTAL will
indicate the presence of a 32KHz crystal oscillator. Obviously on DA9061 that
option isn't available.
I think the problem seems to lie around determining the internal oscillator's
frequency. Datasheet references 25Mhz in Table 9 (Watchdog Electrical
Characteristics), but that doesn't seem to tally with your timings and I don't
see an obvious way in the regmap to calculate this at run time. *If* the
oscillator frequency varies from part to part, or under different environmental
conditions, then it's going to be tough to tie this down, and you wouldn't want
to state a timeout value that's longer than reality.
prev parent reply other threads:[~2021-12-13 14:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-13 9:11 [RFC PATCH] watchdog: da9062: Correct the timeout values [Klartext] Christoph Niedermaier
2021-12-13 13:58 ` Guenter Roeck
2021-12-13 16:16 ` Christoph Niedermaier
2021-12-13 22:44 ` Christoph Niedermaier
2022-02-14 18:02 ` Christoph Niedermaier
2022-02-15 9:16 ` Adam Thomson
2021-12-13 14:31 ` Andrej Picej
2021-12-13 21:47 ` Christoph Niedermaier
2021-12-13 14:53 ` Adam Thomson [this message]
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=DB9PR10MB4652D761596216F84AFF95EB80749@DB9PR10MB4652.EURPRD10.PROD.OUTLOOK.COM \
--to=adam.thomson.opensource@diasemi.com \
--cc=Support.Opensource@diasemi.com \
--cc=andrej.picej@norik.com \
--cc=cniedermaier@dh-electronics.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=linux@roeck-us.net \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).