From: Jonathan Cameron <jic23@kernel.org>
To: Stephan Costa Barros <stephanbrrs8@gmail.com>
Cc: "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>,
"Mike Looijmans" <mike.looijmans@topic.nl>,
"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: Sun, 25 Oct 2026 23:07:48 +0000 [thread overview]
Message-ID: <20261025230748.38e228db@jic23-hlaptop> (raw)
In-Reply-To: <20261024231335.280955-3-stephanbrrs8@gmail.com>
On Sat, 24 Oct 2026 20:13:31 -0300
Stephan Costa Barros <stephanbrrs8@gmail.com> wrote:
> Fix three issues with the power-up sequence and the device clock:
>
> - 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 binding describes one optional clock and no clock-names, but the
> driver asked for the clock named "clk". With a device tree that
> follows the binding, the lookup fails, the optional getter returns
> NULL, and a clock given in the device tree is never enabled, while the
> sampling frequency is computed from the nominal 2.048 MHz. Ask for the
> first clock of the node; a device tree with clock-names = "clk" still
> gets the same clock.
>
> - A command takes 4 cycles of the device clock to decode, the minimum
> reset pulse is 2 cycles, and the reset takes 18 more. These were
> converted with the nominal 2.048 MHz, so a command ends after a fixed
> 2 us, short of 4 cycles with an external clock below 2 MHz, which the
> ADS129x allows down to 1.94 MHz. Convert them with the rate of the
> clock in use. At 2.048 MHz the delays do not change.
>
> The clock lookup was seen to fail on a Raspberry Pi 4, with a
> fixed-clock in the device tree. The power-up order was found by review
> and reproduced on an emulated device only. The decode time was found
> with an emulated device; it is not seen on hardware running at
> 2.048 MHz.
>
> Fixes: 00ef7708fa60 ("iio: adc: ti-ads1298: Add driver")
> Signed-off-by: Stephan Costa Barros <stephanbrrs8@gmail.com>
As before, this is multiple issues so needs breaking into more
focused patches. That may come at the cost of some code
churn but it will make them easier to review.
Jonathan
next prev parent reply other threads:[~2026-10-25 23:07 UTC|newest]
Thread overview: 17+ 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-25 23:06 ` Jonathan Cameron
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 [this message]
2026-10-26 6:27 ` 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-25 23:26 ` Jonathan Cameron
2026-10-24 23:13 ` [PATCH v2 5/6] dt-bindings: iio: adc: ti,ads1298: add ADS1299 Stephan Costa Barros
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-25 23:34 ` Jonathan Cameron
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=20261025230748.38e228db@jic23-hlaptop \
--to=jic23@kernel.org \
--cc=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--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=stephanbrrs8@gmail.com \
--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®