Skip to content

media: i2c: ov13858: add DT support, reset GPIO, and usable gain minimums - #207

Open
robertijtsma wants to merge 2 commits into
linux-surface:spx/v7.3from
robertijtsma:spx-media-i2c-ov13858
Open

robertijtsma wants to merge 2 commits into
linux-surface:spx/v7.3from
robertijtsma:spx-media-i2c-ov13858

Conversation

@robertijtsma

Copy link
Copy Markdown

Summary

Companion sensor PR to #206 enabling Device Tree bring-up of the rear 13 MP OmniVision OV13858 camera on Microsoft Surface Pro X (SC8180X / SQ2):

  1. dt-bindings: media: i2c: add OmniVision OV13858
    • Adds Documentation/devicetree/bindings/media/i2c/ovti,ov13858.yaml.
  2. media: i2c: ov13858: add DT support, reset GPIO, and usable gain minimums
    • Adds of_match_table for "ovti,ov13858".
    • Adds optional reset-gpios deassertion and clk_prepare_enable() / clk_disable_unprepare() with clean error-path unwinding and 5 ms post-reset settle delay.
    • Raises analog/digital gain minimums from 0 (pitch black) to 1x (0x80 / 0x400) with sensible defaults.
    • (Note: V4L2_CID_HFLIP/V4L2_CID_VFLIP are intentionally omitted here since they are already queued upstream for v7.4 / media: backport the IPU6 ov5693 clock-lane gate and ov13858 flip controls from v7.4-rc1 #193.)

Verification

  • ov13858.ko compiled cleanly with W=1 against Linux 7.3.1-1-surface (0 errors, 0 warnings).
  • ./scripts/checkpatch.pl --no-tree: 0 errors, 0 code style warnings.
  • Live-tested on Microsoft Surface Pro X SQ2 (SC8180X, rear 13 MP camera on CCI0 bus 0 @ 0x10, 4-lane CSIPHY2) with libcamera + PipeWire.

Add Devicetree binding schema for the OmniVision OV13858 13 MP MIPI
CSI-2 CMOS image sensor (used as the rear camera on Microsoft Surface
Pro X).

Signed-off-by: robertijtsma <37256770+robertijtsma@users.noreply.github.com>
…mums

Enable Device Tree probing (ovti,ov13858) for the rear 13 MP OV13858
sensor on Microsoft Surface Pro X (SC8180X / SQ2):

- Add of_match_table for "ovti,ov13858", optional reset-gpios
  deassertion, and external clock enable/disable with proper error
  unwind and post-reset settle delay.
- Set non-zero 1x minimum analog/digital gain (0x80 / 0x400) and usable
  defaults so libcamera/V4L2 streams do not start at zero gain.

Tested on Microsoft Surface Pro X SQ2 (SC8180X, Linux 7.3.1-1-surface).

Signed-off-by: robertijtsma <37256770+robertijtsma@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant