From: Christoph Niedermaier <cniedermaier@dh-electronics.com>
To: "linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Cc: Support Opensource <support.opensource@diasemi.com>,
Adam Thomson <Adam.Thomson.Opensource@diasemi.com>,
Wim Van Sebroeck <wim@linux-watchdog.org>,
Andrej Picej <andrej.picej@norik.com>,
"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
Date: Fri, 3 Dec 2021 17:31:10 +0000 [thread overview]
Message-ID: <4bfb6ab512cd45ee81c55361525987b7@dh-electronics.com> (raw)
In-Reply-To: <dc6a432c-79a3-881c-eac4-32620040d11b@roeck-us.net>
From: Guenter Roeck
Sent: Friday, December 3, 2021 5:52 PM
> On 12/3/21 8:35 AM, Christoph Niedermaier wrote:
>> I measured the timeout values of my DA9061 chip. According to the
>> information in the data sheet the formula should be:
>>
>> timeout = 2.048 * 2^(regval - 1)
>>
>> But my measured values differ from that.
>> Accoring to my measured values the formula must be:
>>
>> timeout = 3.2 * 2^(regval - 1)
>>
>> Is there something wrong with my chip, or has anyone else noticed this as well?
>
> The driver assumes a static and well defined clock rate. Maybe that rate
> is different in your system (if that is possible) ?
>
> Guenter
@Andrej
Do the values in the driver match what your chip does?
I have not changed anything. After power on, the chip behaves like this.
So I guess it either come from an OTP value or the wiring outside the chip.
Does anyone know what needs to be checked?
Thanks and regards
Christoph
>> Signed-off-by: Christoph Niedermaier <cniedermaier@dh-electronics.com>
>> Cc: Support Opensource <support.opensource@diasemi.com>
>> Cc: Adam Thomson <Adam.Thomson.Opensource@diasemi.com>
>> Cc: Wim Van Sebroeck <wim@linux-watchdog.org>
>> Cc: Guenter Roeck <linux@roeck-us.net>
>> Cc: Andrej Picej <andrej.picej@norik.com>
>> Cc: linux-watchdog@vger.kernel.org
>> Cc: linux-kernel@vger.kernel.org
>> To: linux-arm-kernel@lists.infradead.org
>> ---
>> drivers/watchdog/da9062_wdt.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/watchdog/da9062_wdt.c b/drivers/watchdog/da9062_wdt.c
>> index f02cbd530538..d2576aba9ca5 100644
>> --- a/drivers/watchdog/da9062_wdt.c
>> +++ b/drivers/watchdog/da9062_wdt.c
>> @@ -20,7 +20,8 @@
>> #include <linux/regmap.h>
>> #include <linux/of.h>
>>
>> -static const unsigned int wdt_timeout[] = { 0, 2, 4, 8, 16, 32, 65, 131 };
>> +static const unsigned int wdt_timeout[] = { 0, 3, 6, 12, 25, 51, 102, 204 };
>> +
>> #define DA9062_TWDSCALE_DISABLE 0
>> #define DA9062_TWDSCALE_MIN 1
>> #define DA9062_TWDSCALE_MAX (ARRAY_SIZE(wdt_timeout) - 1)
>>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2021-12-03 17:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-03 16:35 [RFC PATCH] watchdog: da9062: Correct the timeout values Christoph Niedermaier
2021-12-03 16:52 ` Guenter Roeck
2021-12-03 17:31 ` Christoph Niedermaier [this message]
2021-12-06 7:29 ` Andrej Picej
2021-12-06 7:47 ` Christoph Niedermaier
2021-12-06 16:37 ` Adam Thomson
2021-12-07 15:17 ` Christoph Niedermaier
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=4bfb6ab512cd45ee81c55361525987b7@dh-electronics.com \
--to=cniedermaier@dh-electronics.com \
--cc=Adam.Thomson.Opensource@diasemi.com \
--cc=andrej.picej@norik.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=support.opensource@diasemi.com \
--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).