0001 # SPDX-License-Identifier: GPL-2.0
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/media/video-mux.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006
0007 title: Video Multiplexer
0008
0009 maintainers:
0010 - Sakari Ailus <sakari.ailus@linux.intel.com>
0011 - Laurent Pinchart <laurent.pinchart@ideasonboard.com>
0012
0013 description:
0014 Video multiplexers allow to select between multiple input ports. Video
0015 received on the active input port is passed through to the output port. Muxes
0016 described by this binding are controlled by a multiplexer controller.
0017
0018 properties:
0019 compatible:
0020 const: video-mux
0021
0022 mux-controls:
0023 maxItems: 1
0024
0025 '#address-cells':
0026 const: 1
0027
0028 '#size-cells':
0029 const: 0
0030
0031 ports:
0032 $ref: /schemas/graph.yaml#/properties/ports
0033
0034 patternProperties:
0035 '^port@':
0036 $ref: /schemas/graph.yaml#/properties/port
0037
0038 required:
0039 - port@0
0040 - port@1
0041 - port@2
0042
0043 patternProperties:
0044 '^port@':
0045 $ref: /schemas/graph.yaml#/properties/port
0046 description:
0047 At least three port nodes containing endpoints connecting to the source
0048 and sink devices according to of_graph bindings. The last port is the
0049 output port, all others are inputs.
0050
0051 required:
0052 - compatible
0053 - mux-controls
0054
0055 oneOf:
0056 - required:
0057 - ports
0058 - required:
0059 - port@0
0060 - port@1
0061 - port@2
0062
0063 additionalProperties: false
0064
0065 examples:
0066 - |
0067 #include <dt-bindings/gpio/gpio.h>
0068
0069 mux: mux-controller {
0070 compatible = "gpio-mux";
0071 #mux-control-cells = <0>;
0072
0073 mux-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
0074 };
0075
0076 video-mux {
0077 compatible = "video-mux";
0078 mux-controls = <&mux>;
0079 #address-cells = <1>;
0080 #size-cells = <0>;
0081
0082 port@0 {
0083 reg = <0>;
0084
0085 mux_in0: endpoint {
0086 remote-endpoint = <&video_source0_out>;
0087 };
0088 };
0089
0090 port@1 {
0091 reg = <1>;
0092
0093 mux_in1: endpoint {
0094 remote-endpoint = <&video_source1_out>;
0095 };
0096 };
0097
0098 port@2 {
0099 reg = <2>;
0100
0101 mux_out: endpoint {
0102 remote-endpoint = <&capture_interface_in>;
0103 };
0104 };
0105 };
0106 ...