Skip to content

Conversation

@sintjuri
Copy link

Problem

The OV9281 camera sensor driver fails to work on Rockchip RK3588-based
boards (like Radxa CM5 IO) because async subdev matching never completes.

The Rockchip CSI2 DPHY driver registers an async notifier waiting for
the sensor's endpoint fwnode, but the ov9281 driver was registering
with its device fwnode via v4l2_async_register_subdev_sensor().

This mismatch causes the DPHY to wait forever for the sensor, resulting in:

rockchip-csi2-dphy1:
[fwnode] dev=7-0060, node=/i2c@fec90000/ov9281@60/port/endpoint

Solution

Set sd->fwnode to the sensor's endpoint fwnode before registration,
and use v4l2_async_register_subdev() instead of the _sensor variant.

Testing

Tested on:

  • Board: Radxa CM5 IO Board
  • SoC: Rockchip RK3588S2
  • Camera: OV9281 1MP Global Shutter sensor
  • Kernel: linux-6.1-stan-rkr5

After this fix:

  • Sensor properly binds to CSI2 DPHY
  • Camera capture works via v4l2-ctl
  • Full media pipeline is established

Media topology after fix

m00_b_ov9281 7-0060 → rockchip-csi2-dphy1 → rockchip-mipi-csi2 → stream_cif_mipi_id0

The Rockchip CSI2 DPHY driver expects sensors to register with
endpoint fwnode for async matching to work. The ov9281 driver
was using v4l2_async_register_subdev_sensor() which registers
with device fwnode, causing the async matching to fail.

Fix this by explicitly setting sd->fwnode to the endpoint fwnode
before registration and using v4l2_async_register_subdev() instead.

Without this fix, the sensor is never bound to the DPHY and camera
capture fails on Rockchip RK3588 based boards like Radxa CM5.

Tested on Radxa CM5 IO Board with OV9281 camera module.

Signed-off-by: Iurii Sintiaev <sintjuri@yandex.ru>
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