Skip to content

Add bindings and driver for Sony IMX908

Lachlan Michael linux-devicetree linux-media lkml 6 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest2 patches 4 repliesIn review
  2. v52 patches 12 repliesSuperseded
  3. v42 patches 1 replySuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v32 patches14 repliesSuperseded
v22 patches12 repliesSuperseded
v12 patches13 repliesSuperseded

Changes in v6 from the cover letter

PATCH 1:
- Use unevaluatedProperties instead of additionalProperties to correctly handle properties evaluated by referenced schemas.

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2media: dt-bindings: imx908: Add Sony IMX908 sensorDocumentation/devicetree/bindings/media/i2c/sony,imx908.yaml MAINTAINERS+112 -03 replies
2/2media: i2c: Add Sony IMX908 image sensor driverMAINTAINERS drivers/media/i2c/Kconfig drivers/media/i2c/Makefile +1 more+1171 -01 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchLaurent PinchartConor DooleyJai Luthra
1/2R-b A-b A-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v6 thread

Cover letter [PATCH v6 0/2] Add bindings and driver for Sony IMX908

This series adds device tree bindings and a V4L2 sub-device driver for the Sony IMX908 image sensor.

The IMX908 is an 8.39 MP (3856x2176) CMOS image sensor with a MIPI CSI-2 output interface. The driver supports RAW10 and RAW12 output formats, exposure and analogue gain controls, image flipping, blanking controls and test pattern generation.

HDR modes and RAW16 output are not currently supported.

The driver has been tested with libcamera on Raspberry Pi 5 hardware.

---
Changes in v6:
PATCH 1:
- Use unevaluatedProperties instead of additionalProperties to correctly handle properties evaluated by referenced schemas.

PATCH 2:
- Simplify runtime PM handling by removing the CONFIG_PM conditionals.
- Rework probe power sequencing to power the sensor explicitly before identification and enable runtime PM after initialization.
- Parse the firmware node earlier in probe, before hardware resource acquisition and sensor initialization.
- Minor whitespace cleanups.

Link to v5: https://lore.kernel.org/linux-media/[email protected]/

Changes in v5:
PATCH 1:
- Add Reviewed-by and Acked-by tags omitted in v4.

PATCH 2:
- Add the IMX908 driver file to the MAINTAINERS entry (left out in v4)

Link to v4: https://lore.kernel.org/all/[email protected]/

Changes in v4:
PATCH 1:
- No changes from v3

PATCH 2:
- Refined sensor initialization for the updated settings, including register-address/value corrections and bit-depth-specific programming
- Removed crop support; the driver now reports the fixed 3856x2176 active-area format and no longer programs crop registers.
- Updated HBLANK and exposure control limits for fixed geometry, including exposure adjustment when VBLANK changes.
- Improved stream start/stop error handling and ensured failures during setup release the runtime-PM reference.
- Consolidated power-on/off into runtime-PM callbacks, corrected probe/ remove power sequencing, and added builds without CONFIG_PM.
- Cleanups and bugfixes from the v3 review comments (thanks to Sakari and Laurent).

Link to v3: https://lore.kernel.org/all/[email protected]/

Changes in v3:
PATCH 1:
- Adjust the binding description to match the actual hardware: the I2C target address is selected by the SLAMODE pins, not fixed to 0x1A.
- Add the standard video-interface schema reference so the endpoint and remote-endpoint validation match the media DT conventions.

PATCH 2:
- Correct link-frequency indexing mapping to match the sensor DATARATE_SEL values and the frequency ordering
- Changed the pixel_rate to 16-pixel-per-clocks based on datasheet mode values
- Clean up the constant names, register definitions and comments in response to review feedback.
- Remove various (uneeded) checks in code based on feedback
- Remove cached vmax/hmax and recalculated where necessary
- Drop pixel_rate and test_pattern pointers from struct
- Remove read-only controls set_ctrl switch
- Remove event handlers
- Remove uneeded delays at startup
- Simplify runtime_resume/suspend functions
- Remove the 4k recording-area in favour of larger active area
- Use the same constraints for VMAX for crop and all pixel mode to simplify the driver logic by removing branching
- Rework HMAX based on the fact that the whole line is always read even in crop mode. HMAX varies in all modes now, but not with horizontal crop.
- Minor edits and bugfixes

Link to v2: https://lore.kernel.org/r/[email protected]/

Changes in v2:
PATCH 1:
- Reword subject to drop the redundant "bindings" suffix.
- Reference video-interfaces.yaml for the endpoint and switch to unevaluatedProperties, fixing the remote-endpoint check.
- Drop "link-frequencies: true".
- MAINTAINERS: drop the L: line.
- MAINTAINERS: move the driver F: line to patch 2.

PATCH 2:
- Treat the pixel rate as a fixed sensor property (594 MHz, 8 px/clock), read-only.
- Compute HMAX from both the array and MIPI link floors.
- Express HBLANK in pixels with a step of 8; keep HMAX fixed in crop mode.
- Drop struct imx908_mode; cache hmax/vmax directly.
- Change the link-frequency table to s64.
- Fix the probe error-unwind ordering.
- Be silent on success (chip ID print is now dev_dbg).
- Drop redundant comments.
- Kconfig: fix a "module will be called" typo.

Link to v1: https://lore.kernel.org/r/[email protected]

Lachlan Michael (2):
media: dt-bindings: imx908: Add Sony IMX908 sensor
media: i2c: Add Sony IMX908 image sensor driver

 .../bindings/media/i2c/sony,imx908.yaml       |  107 ++
 MAINTAINERS                                   |    6 +
 drivers/media/i2c/Kconfig                     |   11 +
 drivers/media/i2c/Makefile                    |    1 +
 drivers/media/i2c/imx908.c                    | 1158 +++++++++++++++++
 5 files changed, 1283 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/media/i2c/sony,imx908.yaml
 create mode 100644 drivers/media/i2c/imx908.c
Signature · 1 line
2.47.3