From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: linux-media@vger.kernel.org
Cc: "Mauro Carvalho Chehab" <mchehab@kernel.org>,
"Laurent Pinchart" <laurent.pinchart@ideasonboard.com>,
"Sean Young" <sean@mess.org>,
"Ricardo Ribalda" <ribalda@chromium.org>,
"Nicolas Dufresne" <nicolas.dufresne@collabora.com>,
"Jacopo Mondi" <jacopo.mondi@ideasonboard.com>,
"Niklas Söderlund" <niklas.soderlund@ragnatech.se>,
"Tomi Valkeinen" <tomi.valkeinen@ideasonboard.com>,
"Alain Volmat" <alain.volmat@foss.st.com>,
"Bryan O'Donoghue" <bryan.odonoghue@linaro.org>,
"Dave Stevenson" <dave.stevenson@raspberrypi.com>,
"Daniel Almeida" <daniel.almeida@collabora.com>,
"Michael Tretter" <m.tretter@pengutronix.de>,
"Tomasz Figa" <tfiga@chromium.org>,
"Hu, Jerry W" <jerry.w.hu@intel.com>,
"Steve Cho" <stevecho@chromium.org>,
"Kieran Bingham" <kieran.bingham@ideasonboard.com>,
"Kevin Hilman" <khilman@baylibre.com>,
"Paul Kocialkowski" <paulk@sys-base.io>,
"Benjamin Mugnier" <benjamin.mugnier@foss.st.com>,
"Hans Verkuil" <hverkuil@xs4all.nl>,
"Arthur Vinchon" <arthur.vinchon@allegrodvt.com>,
"Marco Felsch" <m.felsch@pengutronix.de>,
"Jackson Lee" <jackson.lee@chipsnmedia.com>,
"Mirela Rabulea" <mirela.rabulea@nxp.com>,
"Hans de Goede" <hdegoede@redhat.com>,
"Jai Luthra" <jai.luthra@ideasonboard.com>,
"Devarsh Thakkar" <devarsht@ti.com>,
"Maxime Ripard" <mripard@kernel.org>,
"Stefan Klug" <stefan.klug@ideasonboard.com>,
"Sylvain Petinot" <sylvain.petinot@foss.st.com>,
"Naushir Patuck" <naush@raspberrypi.com>
Subject: [PATCH 1/1] media: dt-bindings: Add bindings for camera modules
Date: Wed, 7 May 2025 11:13:38 +0300 [thread overview]
Message-ID: <20250507081338.53614-1-sakari.ailus@linux.intel.com> (raw)
Add bindings for camera modules to allow telling especially the user space
which module is found in the system. Camera modules do not have a device
node so this is a property for the camera sensor device node. This allows
describing modules that contain a single camera sensor.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
Hi all,
Here's the patch to give some advance warning for the camera module
discussion. The good thing is that it's quite short.
The intent indeed is to address the regular use case where we have a
single sensor in a camera module. For cases where we have more, we'll need
something else, not based on individual properties. I believe this is
still the way to go, to address current issues and for a couple of
additional reasons:
- Cameras with more than one sensor tend to be collections of camera
modules so this is still relevant in most cases.
- It's much simpler to have a single property than begin having new nodes
in DT. In practice such nodes would be a poor fit for DT generally as
they have (few or) no functions.
The biggest difficulty is still in module identification. These components
tend to be often ignored and the best we have for a module name in that
case is random-looking string if even that. Besides DT bindings, we need
an additional (git?) tree to describe the modules that have no proper
names but it could be also useful for those that do, for instance to
include information on lens, field of view, IR filter, photos of the
module etc. There is some overlap with what libcamera needs, too.
- Sakari
.../bindings/media/camera-module.yaml | 52 +++++++++++++++++++
.../media/video-interface-devices.yaml | 3 ++
2 files changed, 55 insertions(+)
create mode 100644 Documentation/devicetree/bindings/media/camera-module.yaml
diff --git a/Documentation/devicetree/bindings/media/camera-module.yaml b/Documentation/devicetree/bindings/media/camera-module.yaml
new file mode 100644
index 000000000000..31b898c8c334
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/camera-module.yaml
@@ -0,0 +1,52 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright (C) 2025 Intel Corporation
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/media/camera-module.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Camera modules
+
+maintainers:
+ - Sakari Ailus <sakari.ailus@linux.intel.com>
+
+description: |
+ Camera modules are devices that embed one or more active devices, including
+ Camera Sensors, Voice Coil Motor (VCM) and possibly a flash LED as well as
+ other passive devices such as lenses and Ultra-Violet (UV) filters. While the
+ camera modules themselves have no OF nodes and have generally no module
+ specific functions, it still does matter for the software stack as a whole
+ which module the devices are a part of.
+
+ Two properties are used for this, depending on what is known of the module:
+
+ 1. The model of the module is known. In this case the name of the module uses
+ the format "vendor,model[,version]" where "vendor" is the manufacturer of the
+ module and "model" the name of the model. The version part is optional. In
+ such cases the property "camera-module-canonical" will be used. If the vendor
+ is not known, the "gpio" vendor prefix is used.
+
+ 2. The model of the module is unknown. In this case, the module has an
+ identifier only, and will be described in detail in the camera module
+ database. The property "camera-module-casual" is used to denote such modules.
+
+ Before including in this binding documentation, all modules shall also be
+ documented in add-URL-here.
+
+ All camera modules listed below shall have the name of the sensor as well as
+ other devices included in the module as DT compatible string mentioned in a
+ comment after the enumeration, separated by a whitespace (" ").
+
+ Always keep the enumeration alphabetically (1) or numerically (2) sorted.
+
+properties:
+ camera-module-canonical:
+ $ref: /schemas/types.yaml#/definitions/string
+ enum:
+ - "dell,0BF122N3" # onnn,ov01a10
+ camera-module-casual:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum:
+ - 1 # st,vs6555
+
+additionalProperties: true
diff --git a/Documentation/devicetree/bindings/media/video-interface-devices.yaml b/Documentation/devicetree/bindings/media/video-interface-devices.yaml
index cf7712ad297c..27fa6711367e 100644
--- a/Documentation/devicetree/bindings/media/video-interface-devices.yaml
+++ b/Documentation/devicetree/bindings/media/video-interface-devices.yaml
@@ -10,6 +10,9 @@ maintainers:
- Jacopo Mondi <jacopo@jmondi.org>
- Sakari Ailus <sakari.ailus@linux.intel.com>
+allOf:
+ - $ref: /schemas/media/camera-module.yaml#
+
properties:
flash-leds:
$ref: /schemas/types.yaml#/definitions/phandle-array
--
2.39.5
next reply other threads:[~2025-05-07 8:13 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-07 8:13 Sakari Ailus [this message]
2025-05-08 5:51 ` [PATCH 1/1] media: dt-bindings: Add bindings for camera modules Krzysztof Kozlowski
2025-05-09 8:55 ` Sakari Ailus
2025-05-08 17:00 ` Jacopo Mondi
2025-05-09 20:12 ` Sakari Ailus
2025-05-09 20:24 ` Jacopo Mondi
2025-05-09 20:35 ` Sakari Ailus
2025-05-09 20:44 ` Kieran Bingham
2025-05-19 11:56 ` Sakari Ailus
2025-08-27 15:45 ` Kieran Bingham
2025-09-24 16:07 ` Isaac Scott
2025-09-24 16:31 ` Isaac Scott
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=20250507081338.53614-1-sakari.ailus@linux.intel.com \
--to=sakari.ailus@linux.intel.com \
--cc=alain.volmat@foss.st.com \
--cc=arthur.vinchon@allegrodvt.com \
--cc=benjamin.mugnier@foss.st.com \
--cc=bryan.odonoghue@linaro.org \
--cc=daniel.almeida@collabora.com \
--cc=dave.stevenson@raspberrypi.com \
--cc=devarsht@ti.com \
--cc=hdegoede@redhat.com \
--cc=hverkuil@xs4all.nl \
--cc=jackson.lee@chipsnmedia.com \
--cc=jacopo.mondi@ideasonboard.com \
--cc=jai.luthra@ideasonboard.com \
--cc=jerry.w.hu@intel.com \
--cc=khilman@baylibre.com \
--cc=kieran.bingham@ideasonboard.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-media@vger.kernel.org \
--cc=m.felsch@pengutronix.de \
--cc=m.tretter@pengutronix.de \
--cc=mchehab@kernel.org \
--cc=mirela.rabulea@nxp.com \
--cc=mripard@kernel.org \
--cc=naush@raspberrypi.com \
--cc=nicolas.dufresne@collabora.com \
--cc=niklas.soderlund@ragnatech.se \
--cc=paulk@sys-base.io \
--cc=ribalda@chromium.org \
--cc=sean@mess.org \
--cc=stefan.klug@ideasonboard.com \
--cc=stevecho@chromium.org \
--cc=sylvain.petinot@foss.st.com \
--cc=tfiga@chromium.org \
--cc=tomi.valkeinen@ideasonboard.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