[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aQm5fEB5YTyt2qgY@kekkonen.localdomain>
Date: Tue, 4 Nov 2025 10:29:48 +0200
From: Sakari Ailus <sakari.ailus@...ux.intel.com>
To: Matthias Fend <matthias.fend@...end.at>
Cc: Mauro Carvalho Chehab <mchehab@...nel.org>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Hans Verkuil <hverkuil@...nel.org>,
Hans de Goede <hansg@...nel.org>,
Ricardo Ribalda <ribalda@...omium.org>,
André Apitzsch <git@...tzsch.eu>,
Tarang Raval <tarang.raval@...iconsignals.io>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Benjamin Mugnier <benjamin.mugnier@...s.st.com>,
Sylvain Petinot <sylvain.petinot@...s.st.com>,
Dongcheng Yan <dongcheng.yan@...el.com>,
Bryan O'Donoghue <bryan.odonoghue@...aro.org>,
Alan Stern <stern@...land.harvard.edu>,
Jingjing Xiong <jingjing.xiong@...el.com>,
Heimir Thor Sverrisson <heimir.sverrisson@...il.com>,
Mehdi Djait <mehdi.djait@...ux.intel.com>,
Vladimir Zapolskiy <vladimir.zapolskiy@...aro.org>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Hardevsinh Palaniya <hardevsinh.palaniya@...iconsignals.io>,
linux-media@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, Hao Yao <hao.yao@...el.com>,
bsp-development.geo@...ca-geosystems.com
Subject: Re: [PATCH v4 2/2] media: i2c: add Himax HM1246 image sensor driver
Hi Matthias,
On Mon, Nov 03, 2025 at 05:19:47PM +0100, Matthias Fend wrote:
> > > > > > +static int hm1246_parse_fwnode(struct hm1246 *hm1246)
> > > > > > +{
> > > > > > + struct fwnode_handle *endpoint;
> > > > > > + struct v4l2_fwnode_endpoint bus_cfg = {
> > > > > > + .bus_type = V4L2_MBUS_PARALLEL,
> > > > > > + };
> > > > > > + int ret;
> > > > > > +
> > > > > > + endpoint =
> > > > > > fwnode_graph_get_endpoint_by_id(dev_fwnode(hm1246- >dev), 0,
> > > > > > + 0,
> > > > > > + FWNODE_GRAPH_ENDPOINT_NEXT);
> > > > > > + if (!endpoint)
> > > > > > + return dev_err_probe(hm1246->dev, -EINVAL,
> > > > > > + "missing endpoint node\n");
> > > > > > +
> > > > > > + ret = v4l2_fwnode_endpoint_parse(endpoint, &bus_cfg);
> > > > >
> > > > > What about validating the link frequencies? You can use
> > > > > v4l2_link_freq_to_bitmap(), too.
> > > >
> > > > I was under the impression that for sensors with a parallel interface,
> > > > no frequency information is provided in the device tree (because there's
> > > > no need for it). Since there are no frequency entries, they can't be
> > > > verified.
> > > >
> > > > Am I wrong, or did you perhaps mean something else?
> >
> > The current documentation
> > <URL:https://hverkuil.home.xs4all.nl/spec/driver-api/camera-sensor.html>
> > doesn't distinguish CSI-2 and parallel interfaces in this respect. It's a
> > good idea to ensure a safe frequency is used as the driver works the same
> > way in all cases, whether or not using one is mandatory.
>
> If I understand correctly, this means that in the bindings, the port
> property 'link-frequencies' should be marked as 'required', and the port in
> the example node should be extended with the line 'link-frequencies = /bits/
> 64 <42174000>;'.
> Then, during probe, it can be checked with v4l2_link_freq_to_bitmap()
> whether the link frequency entered in the device tree is supported (this
> also requires switching to v4l2_fwnode_endpoint_alloc_parse).
>
> Does this describe the desired change?
Yes, it does.
--
Regards,
Sakari Ailus
Powered by blists - more mailing lists