Skip to content

meta: Track progress on moving video drivers and devicetree to use the video-interfaces binding and the endpoint DT macros #80514

@josuah

Description

@josuah

Describe the situation

Following #74415 and #80649, video drivers are in the middle of a migration away from an ad-hoc devicetree API.

Migration to use the video-interfaces binding and the endpoint DT macros is strongly recommended because of the following benefices:

  • We can actually use the remote-endpoint-label to retrieve the peer remote device object in the driver without the need of redundant direct phandle reference in DT.
  • We can avoid some sort of chicken-egg issue due to direct phandle reference as described here.
  • We can use the common properties defined in the video-interfaces binding to avoid declaring so many vendor custom properties in each vendor binding.

With the new video-interfaces binding, remote-endpoint must be replaced by remote-endpoint-label in the devicetree.
The reason for it was #57708 and the workaround is #74415. A final conversion from remote-endpoint-label to remote-endpoint will need to happen once #57708 is addressed, but will be trivial to propagate.

Old API, drivers that need conversion

&source_dev {
        status = "okay";
};

&sink_dev {
        source = <&source_dev>;
        /* or */
        sensor = <&source_dev>;
        /* or nothing */
};

New API, drivers that got converted

&source_dev {
        status = "okay";
        port {
                source_dev_ep_out: endpoint {
                        remote-endpoint-label = "sink_dev_ep_in";
                };
        };
};

&sink_dev {
        port {
                sink_dev_ep_in: endpoint {
                        remote-endpoint-label = "source_dev_ep_out";
                };
        };
};

Impact

  • Need to also convert the board and shields
  • Only one API through the sources, more similar to Linux.
  • A stable API that covers complex situations.

Additional context

Zephyr v4.0 is in feature-freeze: not possible to rush every vendor to complete the migration of their driver in time.

This can be done gradually as here, as commented in the following PR, for example:

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions