From: Richard Acayan <mailingradian@gmail.com>
To: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
Rob Herring <robh@kernel.org>, Conor Dooley <conor+dt@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
Tianshu Qiu <tian.shu.qiu@intel.com>,
linux-media@vger.kernel.org, devicetree@vger.kernel.org,
linux-arm-msm@vger.kernel.org,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Robert Mader <robert.mader@collabora.com>,
Bryan O'Donoghue <bod@kernel.org>,
Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>,
David Heidelberg <david@ixit.cz>,
phone-devel@vger.kernel.org
Subject: Re: [PATCH v6 2/5] media: i2c: imx355: Support devicetree and power management
Date: Wed, 7 Jan 2026 23:15:06 -0500 [thread overview]
Message-ID: <aV8vSuCDhqCcuwuL@rdacayan> (raw)
In-Reply-To: <aV6qnjyXV-yTLqVl@kekkonen.localdomain>
On Wed, Jan 07, 2026 at 08:49:02PM +0200, Sakari Ailus wrote:
> Hi Richard,
> On Tue, Jan 06, 2026 at 11:30:41PM -0500, Richard Acayan wrote:
> > A device tree compatible makes it possible for this driver to be used on
> > Open Firmware devices. Initialization of power-managed resources such as
> > the reset GPIO and voltage regulators can be specified in the device
> > tree and handled by the driver. Add support for this so the Pixel 3a can
> > use the driver.
> >
> > Signed-off-by: Richard Acayan <mailingradian@gmail.com>
> > Nacked-by: Krzysztof Kozlowski <krzk@kernel.org>
>
> Uh-oh.
(snip)
> > +static int imx355_power_on(struct device *dev)
> > +{
> > + struct i2c_client *client = container_of(dev, struct i2c_client, dev);
> > + struct v4l2_subdev *sd = i2c_get_clientdata(client);
> > + struct imx355 *imx355 = to_imx355(sd);
> > + int ret;
> > +
> > + ret = clk_prepare_enable(imx355->clk);
> > + if (ret) {
> > + dev_err(dev, "failed to enable clocks: %d\n", ret);
> > + return ret;
> > + }
> > +
> > + ret = regulator_bulk_enable(ARRAY_SIZE(imx355_supplies),
> > + imx355->supplies);
> > + if (ret) {
> > + dev_err(dev, "failed to enable regulators: %d\n", ret);
> > + goto error_disable_clocks;
> > + }
> > +
> > + gpiod_set_value_cansleep(imx355->reset_gpio, 1);
> > + usleep_range(5000, 5100);
> > + gpiod_set_value_cansleep(imx355->reset_gpio, 0);
> > + usleep_range(8000, 8100);
>
> Where do these values come from? Apparently 1 ms is required (after lifting
> xshutdown) before reading identification register and 10 ms is required
> (from the same point of time) before streaming can be enabled.
I don't have the hardware specification. The sequence seemed to last
12-13 ms. Dividing the delays are a guess and the camera can usually
open at least a few times.
The final 8 ms wait can be extended to 10 ms (assuming xshutdown is the
same as the reset line). Is there a minimum time for asserting the reset
(currently 5 ms), or can it be reduced to 1 ms?
New sequence (maybe, if the docs support it):
gpiod_set_value_cansleep(imx355->reset_gpio, 1);
usleep_range(1000, 2000);
gpiod_set_value_cansleep(imx355->reset_gpio, 0);
usleep_range(10000, 11000);
next prev parent reply other threads:[~2026-01-08 4:14 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-07 4:30 [PATCH v6 0/5] media: i2c: IMX355 for the Pixel 3a Richard Acayan
2026-01-07 4:30 ` [PATCH v6 1/5] dt-bindings: media: i2c: Add Sony IMX355 Richard Acayan
2026-01-07 4:41 ` Vladimir Zapolskiy
2026-01-07 7:35 ` Krzysztof Kozlowski
2026-01-09 0:09 ` Richard Acayan
2026-01-07 4:30 ` [PATCH v6 2/5] media: i2c: imx355: Support devicetree and power management Richard Acayan
2026-01-07 4:55 ` Vladimir Zapolskiy
2026-01-07 7:34 ` Krzysztof Kozlowski
2026-01-08 3:28 ` Richard Acayan
2026-01-07 13:31 ` Bryan O'Donoghue
2026-01-07 18:49 ` Sakari Ailus
2026-01-08 4:15 ` Richard Acayan [this message]
2026-01-07 4:30 ` [PATCH v6 3/5] arm64: dts: qcom: sdm670: label the camss ports instead of endpoints Richard Acayan
2026-01-07 4:59 ` Vladimir Zapolskiy
2026-01-07 13:36 ` Bryan O'Donoghue
2026-01-07 4:30 ` [PATCH v6 4/5] arm64: dts: qcom: sdm670: add camera mclk pins Richard Acayan
2026-01-07 4:30 ` [PATCH v6 5/5] arm64: dts: qcom: sdm670-google-sargo: add imx355 front camera Richard Acayan
2026-01-07 5:05 ` Vladimir Zapolskiy
2026-01-07 13:37 ` Bryan O'Donoghue
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=aV8vSuCDhqCcuwuL@rdacayan \
--to=mailingradian@gmail.com \
--cc=andersson@kernel.org \
--cc=bod@kernel.org \
--cc=conor+dt@kernel.org \
--cc=david@ixit.cz \
--cc=devicetree@vger.kernel.org \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=phone-devel@vger.kernel.org \
--cc=robert.mader@collabora.com \
--cc=robh@kernel.org \
--cc=sakari.ailus@linux.intel.com \
--cc=tian.shu.qiu@intel.com \
--cc=vladimir.zapolskiy@linaro.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.