From: Stephan Costa Barros <stephanbrrs8@gmail.com>
To: Mike Looijmans <mike.looijmans@topic.nl>
Cc: "Jonathan Cameron" <jic23@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Andy Shevchenko" <andriy.shevchenko@intel.com>,
"Uwe Kleine-König" <u.kleine-koenig@baylibre.com>,
"Krzysztof Kozlowski" <krzk@kernel.org>,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/6] iio: adc: ti-ads1298: fix power-up and clock handling
Date: Tue, 27 Oct 2026 23:19:15 -0300 [thread overview]
Message-ID: <20261028021915.29695-1-stephanbrrs8@gmail.com> (raw)
In-Reply-To: <184780c8-6d87-4983-8399-6e509a250cfc@topic.nl>
Hi Mike,
On Mon, Oct 26, 2026 at 07:27:22AM +0100, Mike Looijmans wrote:
> On 25-10-2026 01:13, Stephan Costa Barros wrote:
> > - The datasheet powers up the supplies first, then the clock, then
> > waits t_POR = 2^18 clock cycles (128 ms at 2.048 MHz) before the
> > reset. The driver enabled an external clock and the vref supply
> > before AVDD, reset right away, and did not wait for the 150 ms
> > start-up of the internal reference. Follow the datasheet. Probe takes
> > about 280 ms longer.
>
> The driver followed the correct procedure: Keep reset asserted until the
> power is enabled.
>
> We've seen the chips misbehave when the power supplies ramp up
> erratically. Keeping them in reset until the power supplies are stable
> solves that issue, if a reset signal is available. The driver is based
> on real experience with these chips.
Thanks, that experience is what I lack here.
The patch keeps that: RESET is still requested asserted before anything
is enabled, and released only after AVDD, VREF and the clock are on.
What changes is that AVDD now comes before the clock and VREF, and that
the driver waits t_POR before releasing RESET. "reset right away" meant
releasing it without that wait; I'll reword it.
Is AVDD before the clock fine with you? Section 11.1 asks to keep all
digital inputs, CLK included, low until the supplies are stable.
> There is no need to wait for the internal reference startup. The
> internal reference only affects the ADC performance, it isn't required
> for digital communication. By the time userspace gets to use the driver,
> those 150 ms will have passed already.
Agreed, I'll drop that wait.
> We actually have 8 (or more) of these chips on a single board. If it
> takes 8x 280 ms extra to boot such a board, it will fail to meet medical
> specs (reboot in 5 seconds).
Understood. Without the reference wait it is t_POR alone, 128 ms per
chip at 2.048 MHz, still about 1 s for 8 chips probed one after another.
> The ADS1298 datasheet says "18" clock cycles, not "2^18". Quite a
> difference. We would definitely have noticed if the reset timeout was
> that far off.
I read 2^18 in the current revision, SBAS459K (August 2015), Table 38:
"t_POR, Wait after power up until reset, MIN 2^18 t_CLK", with the note
"When using an external clock, t_POR timing does not start until CLK is
valid". Its revision history lists "Changed power-up reset wait time in
Table 38", so older revisions may differ. The 18 t_CLK in Figure 105 is
the wait after the reset pulse, which the driver already does. The
ADS1299 datasheet (SBAS499C, Table 30) gives 2^18 t_CLK as well.
That said, I have not seen the missing wait cause a failure on hardware.
On my board the supplies are up long before the driver probes, so t_POR
has passed by then, and that may be the case on yours too. Does the
driver switch the supplies on your boards, or are they on from boot?
In v3 the supply order, the t_POR wait and the clock rate become
separate patches, as Jonathan asked, so each can be judged on its own.
Regards,
Stephan
next prev parent reply other threads:[~2026-10-28 2:19 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-24 23:13 [PATCH v2 0/6] iio: adc: ti-ads1298: fixes, and ADS1299 support Stephan Costa Barros
2026-10-24 23:13 ` [PATCH v2 1/6] iio: adc: ti-ads1298: fix the data read path Stephan Costa Barros
2026-10-25 20:14 ` Andy Shevchenko
2026-10-28 2:39 ` Stephan Costa Barros
2026-10-25 23:06 ` Jonathan Cameron
2026-10-28 2:19 ` Stephan Costa Barros
2026-10-24 23:13 ` [PATCH v2 2/6] iio: adc: ti-ads1298: fix power-up and clock handling Stephan Costa Barros
2026-10-25 20:18 ` Andy Shevchenko
2026-10-25 23:07 ` Jonathan Cameron
2026-10-26 6:27 ` Mike Looijmans
2026-10-28 2:19 ` Stephan Costa Barros [this message]
2026-10-28 6:47 ` Mike Looijmans
2026-10-24 23:13 ` [PATCH v2 3/6] iio: adc: ti-ads1298: fix scale, ID check, regmap and Kconfig Stephan Costa Barros
2026-10-25 23:12 ` Jonathan Cameron
2026-10-24 23:13 ` [PATCH v2 4/6] iio: adc: ti-ads1298: prepare for more chip families Stephan Costa Barros
2026-10-25 20:27 ` Andy Shevchenko
2026-10-28 2:22 ` Stephan Costa Barros
2026-10-25 23:26 ` Jonathan Cameron
2026-10-28 2:22 ` Stephan Costa Barros
2026-10-24 23:13 ` [PATCH v2 5/6] dt-bindings: iio: adc: ti,ads1298: add ADS1299 Stephan Costa Barros
2026-10-27 8:04 ` Krzysztof Kozlowski
2026-10-24 23:13 ` [PATCH v2 6/6] iio: adc: ti-ads1298: add ADS1299 support Stephan Costa Barros
2026-10-25 20:34 ` Andy Shevchenko
2026-10-28 2:30 ` Stephan Costa Barros
2026-10-25 23:34 ` Jonathan Cameron
2026-10-28 2:26 ` Stephan Costa Barros
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=20261028021915.29695-1-stephanbrrs8@gmail.com \
--to=stephanbrrs8@gmail.com \
--cc=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=krzk@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mike.looijmans@topic.nl \
--cc=nuno.sa@analog.com \
--cc=robh@kernel.org \
--cc=u.kleine-koenig@baylibre.com \
/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
all inboxes | Powered by JetHome®