Skip to content

OV5640: reduce rate according to maximum pixel clock

Hugues Fruchet linux-devicetree linux-media 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4media: ov5640: move parallel port pixel clock divider out of registers setdrivers/media/i2c/ov5640.c+46 -200 replies
2/4media: v4l2-core: add pixel clock max frequency parallel port propertydrivers/media/v4l2-core/v4l2-fwnode.c include/media/v4l2-fwnode.h+5 -00 replies
3/4media: dt-bindings: media: Document pclk-max-frequency propertyDocumentation/devicetree/bindings/media/video-interfaces.txt+2 -03 replies
4/4media: ov5640: reduce rate according to maximum pixel clock frequencydrivers/media/i2c/ov5640.c+12 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] OV5640: reduce rate according to maximum pixel clock

This patch serie aims to reduce parallel port rate according to maximum pixel clock frequency admissible by camera interface in front of the sensor. This allows to support any resolutions/framerate requests by decreasing the framerate according to maximum camera interface capabilities. This allows typically to enable 5Mp YUV/RGB frame capture even if 15fps framerate could not be reached by platform.

This work is based on OV5640 Maxime Ripard's runtime clock computing serie [1] which allows to adapt the clock tree registers according to maximum pixel clock.

Then the first patch adds handling of pclk divider registers DVP_PCLK_DIVIDER (0x3824) and VFIFO_CTRL0C (0x460c) in order to correlate the rate to the effective pixel clock output on parallel interface.

A new devicetree property "pclk-max-frequency" is introduced in order to inform sensor of the camera interface maximum admissible pixel clock. This new devicetree property handling is added to V4L2 core.

Then OV5640 ov5640_set_dvp_pclk() is modified to clip rate according to optional maximum pixel clock property.

References:
[1] [PATCH v3 00/12] media: ov5640: Misc cleanup and improvements https://www.mail-archive.com/[email protected]/msg131655.html

Hugues Fruchet (4):
media: ov5640: move parallel port pixel clock divider out of registers
set
media: v4l2-core: add pixel clock max frequency parallel port property
media: dt-bindings: media: Document pclk-max-frequency property
media: ov5640: reduce rate according to maximum pixel clock frequency

 .../devicetree/bindings/media/video-interfaces.txt |  2 +
 drivers/media/i2c/ov5640.c                         | 78 ++++++++++++++++------
 drivers/media/v4l2-core/v4l2-fwnode.c              |  3 +
 include/media/v4l2-fwnode.h                        |  2 +
 4 files changed, 65 insertions(+), 20 deletions(-)
Signature · 1 line
2.7.4