From: Ramshouriesh R <rshouriesh@gmail.com>
To: Mauro Carvalho Chehab <mchehab@kernel.org>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>
Cc: Jake Steinman <j@metarealtyinc.ca>,
Eduard Kulyk <kulikeduard89@gmail.com>,
Hans Verkuil <hverkuil+cisco@kernel.org>,
Bryan O'Donoghue <bod@kernel.org>,
Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>,
linux-media@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
Ramshouriesh R <rshouriesh@gmail.com>,
Conor Dooley <conor.dooley@microchip.com>
Subject: [PATCH v7 0/3] media: Add Himax HM1092 mono NIR sensor driver
Date: Tue, 13 Oct 2026 08:58:22 +0530 [thread overview]
Message-ID: <20261013-hm1092-driver-v7-0-d81a9b152ffd@gmail.com> (raw)
This adds a V4L2 subdev driver and DT binding for the Himax HM1092, a
1 megapixel monochrome near-infrared image sensor. On laptops it sits
behind the IR camera used for face unlock. It speaks a single MIPI CSI-2
data lane and outputs 10-bit RAW.
The driver exposes one fixed mode, test patterns, exposure, analogue
gain and digital gain controls, pixel-array selection targets and the
standard fwnode properties. The mode is selected by the external clock
rate, since each known platform pairs its clock with its own PLL setup
and init sequence:
24 MHz EXTCLK (Qualcomm, devicetree): 560x360, 180 MHz link frequency
19.2 MHz EXTCLK (Intel IPU, ACPI HIMX1092): 648x368, 180.48 MHz
Both run the single lane at about 360 Mbit/s and deliver about 30 frames per
second.
Patch 2 adds the driver with the 24 MHz configuration. It has been
tested on an ASUS Zenbook A14: the sensor probes, streams, changes
brightness across the full exposure and analogue gain ranges, accepts
digital gain updates while streaming, and returns to runtime suspend
after capture. Its register programming was extracted from
com.qti.sensormodule.hm1092.bin in the Qualcomm camera stack shipped for
that system. Jake Steinman independently identified the exposure,
analogue gain, digital gain and group-hold registers from Dell's
hm1092.sys. The available documentation does not identify the
test-pattern modes, so their menu names are based on output observed
during hardware testing.
Patch 3, from Jake Steinman, adds ACPI enumeration and the 19.2 MHz
configuration used on Intel IPU6/IPU7 laptops. It was posted on top of
v6 and is carried here at his suggestion. It has been tested on a Dell
XPS 16 (IPU7) and a Dell Latitude 7350 (IPU6).
One open point on patch 3: the 19.2 MHz configuration reads out
(0,0)/1294x734, which is what the vendor sequence programs and includes
the dummy border. That crop lies outside the (8,8)/1280x720 crop bounds,
which describe the active array. Reviewers' preference is welcome on
whether to widen the bounds to the native array or keep them as is.
The ipu-bridge entry for HM1092 was applied separately to media/next as
commit 4fdb0342f05e ("media: ipu-bridge: Add Himax HM1092 IR sensor").
Capturing Y10 on IPU7 also needs a staging/ipu7 format addition that
Jake posted alongside patch 3; it is independent of this series and not
included here. The board-level device tree and PHY work that wires this
camera up on the ASUS Zenbook A14 will be sent as its own series.
Signed-off-by: Ramshouriesh R <rshouriesh@gmail.com>
---
Changes in v7:
- Rebase onto next-20261012.
- hm1092: follow the sub-device pad op API change that added a
struct v4l2_subdev_client_info argument: take it in get_selection,
and drop .set_fmt, which only mirrored v4l2_subdev_get_fmt(), as done
for the other fixed-format drivers.
- hm1092: limit the digital gain control to 0x3ff. The register is a
10-bit 2.8 fixed-point value and the sensor ignores higher bits, so
1024 and above wrapped back to black frames (reported by Eduard Kulyk).
- hm1092: handle negative pm_runtime_get_if_in_use() returns without
touching unpowered hardware or dropping an unacquired runtime PM
reference.
- hm1092: credit Jake Steinman as a co-developer of the control support
and carry the requested coding-assistant disclosure.
- New patch 3 from Jake Steinman: ACPI enumeration and the 19.2 MHz
configuration, with Eduard Kulyk's Tested-by. Drop its
<linux/mod_devicetable.h> include as requested by Uwe Kleine-König.
- Cover: describe both configurations, document the separately applied
ipu-bridge entry and correct the v5 data-lanes history.
- Link to v6: https://patch.msgid.link/20260801-hm1092-driver-v6-0-5979f223748a@gmail.com
Changes in v6:
- dt-bindings: update the example to the PLL-derived 180 MHz link
frequency.
- hm1092: replace the inconsistent 400 MHz link frequency and derived
80 MHz pixel rate with 180 MHz and 36 MHz. The new values are derived
from the ASUS Windows configuration's 24 MHz external clock and the
sensor PLL dividers.
- hm1092: report the 1296x736 native array, 1280x720 active array and
1150x718 mode crop as distinct selection targets.
- hm1092: add exposure, analogue gain and digital gain controls using the
register map supplied by Jake Steinman. Keep multi-byte controls as
separate writes, use group hold, derive the exposure maximum from VTS,
and program the hardware-tested 500-line exposure default in both the
init table and control. Hardware-test the controls on the 560x360 mode.
- hm1092: do not power the sensor on in probe(). There is no I2C access
during probe, so leave it suspended and let runtime PM power it for
streaming.
- Link to v5: https://patch.msgid.link/20260709-hm1092-driver-v5-0-a1f5baa6fe08@gmail.com
Changes in v5:
- dt-bindings: drop the local data-lanes constraint and omit it from
the example. Keep the inherited video-interfaces.yaml property allowed,
even though it does not describe configurable hardware.
- hm1092: implement the get_selection pad op (CROP, CROP_DEFAULT,
CROP_BOUNDS and NATIVE_SIZE) reporting the sensor's pixel-array
geometry, as required by libcamera.
- Link to v4: https://patch.msgid.link/20260705-hm1092-driver-v4-0-0a13ec274d89@gmail.com
Changes in v4:
- dt-bindings: make data-lanes optional for the fixed single-lane sensor,
constrain explicit values to <1>, and omit it from the example.
- hm1092: add the copyright notice.
- hm1092: replace the private register representation and write helper
with CCI register sequences and direct CCI writes.
- hm1092: use descriptive test-pattern names based on hardware captures;
the available documentation does not identify these modes.
- hm1092: parse fwnode properties before creating controls and set
read-only flags after validating control creation.
- hm1092: use the generic get_fmt callback for the fixed sensor mode.
- hm1092: initialize endpoint parsing with the fixed one-lane default,
reject other lane configurations, and remove the redundant endpoint
presence check.
- hm1092: use fsleep() and null-safe GPIO calls, and apply the requested
declaration, brace, return-value and error-path formatting cleanups.
- Link to v3: https://patch.msgid.link/20260702-hm1092-driver-v3-0-85faa7ff4fec@gmail.com
Changes in v3:
- dt-bindings: add the Reviewed-by tag from Conor Dooley.
- hm1092: initialize RAW colorimetry fields in the pad format helper so
userspace values cannot leak into subdevice state.
- hm1092: return -ENXIO when the required firmware graph endpoint is
absent instead of deferring probe indefinitely.
- Link to v2: https://patch.msgid.link/20260702-hm1092-driver-v2-0-4f9f369d6a48@gmail.com
Changes in v2:
- hm1092: use pm_ptr() instead of pm_sleep_ptr() for the dev_pm_ops
pointer. The ops come from DEFINE_RUNTIME_DEV_PM_OPS(), so gating them
on CONFIG_PM_SLEEP dropped runtime PM on a CONFIG_PM=y, PM_SLEEP=n
build.
- hm1092: free the control handler on the error paths in
hm1092_init_controls(); the fwnode-parse and ctrl_hdlr->error returns
leaked the handler.
- Link to v1: https://patch.msgid.link/20260701-hm1092-driver-v1-0-d1bd81e233b5@gmail.com
---
Jake Steinman (1):
media: i2c: hm1092: Add ACPI enumeration and the 19.2 MHz configuration
Ramshouriesh R (2):
media: dt-bindings: Add Himax HM1092 NIR sensor
media: i2c: hm1092: add Himax HM1092 mono NIR sensor driver
.../bindings/media/i2c/himax,hm1092.yaml | 101 ++
MAINTAINERS | 7 +
drivers/media/i2c/Kconfig | 11 +
drivers/media/i2c/Makefile | 1 +
drivers/media/i2c/hm1092.c | 1138 ++++++++++++++++++++
5 files changed, 1258 insertions(+)
---
base-commit: 4eb2586bd40db27d77cc5b724ca9386ed0c71d53
change-id: 20260618-hm1092-driver-a6f2aaddf201
Best regards,
--
Ramshouriesh R <rshouriesh@gmail.com>
next reply other threads:[~2026-10-13 3:28 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-13 3:28 Ramshouriesh R [this message]
2026-10-13 3:28 ` [PATCH v7 1/3] media: dt-bindings: Add Himax HM1092 NIR sensor Ramshouriesh R
2026-10-13 3:28 ` [PATCH v7 2/3] media: i2c: hm1092: add Himax HM1092 mono NIR sensor driver Ramshouriesh R
2026-10-13 3:28 ` [PATCH v7 3/3] media: i2c: hm1092: Add ACPI enumeration and the 19.2 MHz configuration Ramshouriesh R
2026-10-13 3:36 ` sashiko-bot
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=20261013-hm1092-driver-v7-0-d81a9b152ffd@gmail.com \
--to=rshouriesh@gmail.com \
--cc=bod@kernel.org \
--cc=conor+dt@kernel.org \
--cc=conor.dooley@microchip.com \
--cc=devicetree@vger.kernel.org \
--cc=hverkuil+cisco@kernel.org \
--cc=j@metarealtyinc.ca \
--cc=krzk+dt@kernel.org \
--cc=kulikeduard89@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=robh@kernel.org \
--cc=sakari.ailus@linux.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox