Re: [PATCH v5 0/2] media: Add Himax HM1092 mono NIR sensor driver
From: Ramshouriesh R
Date: Wed Jul 29 2026 - 01:03:47 EST
Hi Jake,
I have v6 ready now. I went back to the ASUS Windows files rather than
deriving the link frequency from an assumed 30 fps measurement.
The Qualcomm power sequence explicitly requests a 24 MHz EXTCLK. The
sensor initialization programs:
0x030d = 0x0c = 12 (PLL pre-divider)
0x030f = 0x5a = 90 (PLL multiplier)
The resulting CSI-2 DDR link frequency is:
link_freq
= EXTCLK * multiplier / pre-divider
= 24,000,000 * 90 / 12
= 180,000,000 Hz
Because CSI-2 D-PHY transfers on both clock edges, the per-lane bit rate is:
lane_bit_rate
= 2 * link_freq
= 2 * 180,000,000
= 360,000,000 bit/s
The mode uses one data lane and RAW10, so the corresponding pixel rate is:
pixel_rate
= lane_bit_rate * number_of_lanes / bits_per_pixel
= 360,000,000 * 1 / 10
= 36,000,000 pixels/s
The initialization table programs:
HTS = 0x0650 = 1616 pixel clocks per line
VTS = 0x02ee = 750 lines per frame
Therefore, the calculated frame rate is:
frame_rate
= pixel_rate / (HTS * VTS)
= 36,000,000 / (1616 * 750)
= 36,000,000 / 1,212,000
= 29.702970... fps
So v6 now reports:
link frequency: 180 MHz
lane bit rate: 360 Mbit/s
pixel rate: 36 MHz
frame rate: approximately 29.7 fps
The binding and driver both use the 180 MHz link frequency.
I folded exposure, analogue gain and digital gain into v6 using your
register map and notes:
exposure uses separate writes to 0x0202 and 0x0203
analogue gain uses 0x0205
digital gain uses separate writes to 0x020e and 0x020f
group hold uses 0x0104 = 1 before an update and 0x0104 = 0 afterward
The exposure maximum is derived from the frame length:
exposure_max
= VTS - margin
= 750 - 21
= 729 lines
The exposure range is therefore 2..729 lines. I selected 500 lines as
the default from unstretched illuminated captures on the ASUS system:
500 decimal = 0x01f4
The init sequence and control setup both program it as:
0x0202 = 0x01
0x0203 = 0xf4
This keeps the sensor state and V4L2 control default consistent.
Analogue gain has range 0..255 and default 0.
Digital gain has:
minimum: 0x0100 = 256 = 1.0x
maximum: 0x0fff = 4095
default: 0x0100
I tested exposure 2, 500 and 729 and analogue gain 0 and 255 on the
560x360 mode. Those settings were accepted and changed real frame
levels in the expected direction. I also exercised the digital-gain
endpoints while streaming and captured valid frames. Runtime PM
returned the sensor to suspend after capture.
Here is the ordered Qualcomm table you requested: 185 (address, value)
entries regenerated directly from com.qti.sensormodule.hm1092.bin:
https://gist.github.com/sppidy/8b6b57f047343c88d4bb6c8ef22a910d
Please post the comparison against your Dell hm1092.sys table when you have it.
For ipu-bridge, I would prefer a follow-up patch on top of v6. That
keeps the x86/IPU7 ownership and testing explicit, since I cannot
exercise that path on the A14.
I currently credit your findings in the commit body, with Reported-by
and links to both messages, and in the cover letter. If you think
Suggested-by is more appropriate for the control implementation, or
want Co-developed-by with your Signed-off-by, let me know before I
send v6.
Regards,
Ramshouriesh