From: "Niklas Söderlund" <niklas.soderlund+renesas@ragnatech.se>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Dave Stevenson <dave.stevenson@raspberrypi.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
linux-media@vger.kernel.org, devicetree@vger.kernel.org,
imx@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] dt-bindings: media: i2c: imx219: Remove redundant description of data-lanes
Date: Wed, 2 Apr 2025 11:57:49 +0200 [thread overview]
Message-ID: <20250402095749.GJ1240431@ragnatech.se> (raw)
In-Reply-To: <20250402-real-enthusiastic-ostrich-dcc243@krzk-bin>
Hi Krzysztof,
Thanks for your feedback.
On 2025-04-02 10:21:42 +0200, Krzysztof Kozlowski wrote:
> On Tue, Apr 01, 2025 at 04:57:58PM +0200, Niklas Söderlund wrote:
> > The bindings already reference video-interfaces.yaml in the endpoint
> > node, there is no need to duplicate the description of the data-lanes
> > property.
> >
> > An array of physical data lane indexes. Position of an entry determines
> > the logical lane number, while the value of an entry indicates physical
> > lane, e.g. for 2-lane MIPI CSI-2 bus we could have "data-lanes = <1 2>;",
> > assuming the clock lane is on hardware lane 0. If the hardware does not
> > support lane reordering, monotonically incremented values shall be used
> > from 0 or 1 onwards, depending on whether or not there is also a clock
> > lane. This property is valid for serial busses only (e.g. MIPI CSI-2).
>
> Please do not quote bindings in commit. It's never helpful.
>
> >
> > What the generic binding do not cover is the behavior if the property
> > would be omitted. But the imx219 driver have never agreed with the
> > description neither. Before commit ceddfd4493b3 ("media: i2c: imx219:
>
> It did not have to agree. See discussion for v3 of patch adding this binding.
Thar discussion was in 2020, the common definition video-interfaces.yaml
was merged in 2021 AFIK.
>
> > Support four-lane operation") the driver errored out if not 2 lanes
> > where used, and after it if not 2 or 4 lanes where used.
>
> Then... fix the driver?
>
> This property describes hardware, not driver. Why current driver
> implementation, e.g. 1 year ago or now, would change the hardware (so
> the bindings)?
I agree, I thought that here we have a case where the bindings predate
the standardisation. The driver do not match the bindings, in fact it
breaks if the imx219 specific instructions are followed. So the risk of
breaking stuff is likely low. And this was an opportunity to align the
imx219 with video-interfaces.yaml.
I wasted time trying to use the imx219 bindings when bringing up a
device, only wanted to try to help others avoid that.
>
> >
> > Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
> > ---
> > Hello,
> >
> > The data-lanes property is a common property and the driver have always
> > operated as the common description, it seemed silly to break the driver
> > to adhere to odd specification, then to correct the bindings. However a
> > more correct solution would be to do the work on the driver of course.
> >
> > This is just a drive-by fix in the hope of sparing others the time to
> > discover this oddity themself. This is only tested by using the bindings
> > themself and by 'make dt_binding_check'.
> > ---
> > Documentation/devicetree/bindings/media/i2c/imx219.yaml | 9 ---------
> > 1 file changed, 9 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/media/i2c/imx219.yaml b/Documentation/devicetree/bindings/media/i2c/imx219.yaml
> > index 07d088cf66e0..31beeb2be2ea 100644
> > --- a/Documentation/devicetree/bindings/media/i2c/imx219.yaml
> > +++ b/Documentation/devicetree/bindings/media/i2c/imx219.yaml
> > @@ -55,15 +55,6 @@ properties:
> > unevaluatedProperties: false
> >
> > properties:
> > - data-lanes:
> > - description: |-
> > - The sensor supports either two-lane, or four-lane operation.
> > - If this property is omitted four-lane operation is assumed.
> > - For two-lane operation the property must be set to <1 2>.
> > - items:
> > - - const: 1
> > - - const: 2
>
> So 1 lane is also fine? 8 lanes are as well? Previously lack of the
> property in DTS meant 4 lanes, now lack of property means anything.
Good point, if this patch where to be followed the data-lanes should be
made a required property.
>
> Best regards,
> Krzysztof
>
--
Kind Regards,
Niklas Söderlund
next prev parent reply other threads:[~2025-04-02 9:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-01 14:57 [PATCH] dt-bindings: media: i2c: imx219: Remove redundant description of data-lanes Niklas Söderlund
2025-04-02 8:21 ` Krzysztof Kozlowski
2025-04-02 9:57 ` Niklas Söderlund [this message]
2025-04-02 10:29 ` Krzysztof Kozlowski
2025-04-02 11:08 ` Niklas Söderlund
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=20250402095749.GJ1240431@ragnatech.se \
--to=niklas.soderlund+renesas@ragnatech.se \
--cc=conor+dt@kernel.org \
--cc=dave.stevenson@raspberrypi.com \
--cc=devicetree@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=imx@lists.linux.dev \
--cc=kernel@pengutronix.de \
--cc=krzk+dt@kernel.org \
--cc=krzk@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=robh@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.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