18c2ecf20Sopenharmony_ciVideo Multiplexer
28c2ecf20Sopenharmony_ci=================
38c2ecf20Sopenharmony_ci
48c2ecf20Sopenharmony_ciVideo multiplexers allow to select between multiple input ports. Video received
58c2ecf20Sopenharmony_cion the active input port is passed through to the output port. Muxes described
68c2ecf20Sopenharmony_ciby this binding are controlled by a multiplexer controller that is described by
78c2ecf20Sopenharmony_cithe bindings in Documentation/devicetree/bindings/mux/mux-controller.txt
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ciRequired properties:
108c2ecf20Sopenharmony_ci- compatible : should be "video-mux"
118c2ecf20Sopenharmony_ci- mux-controls : mux controller node to use for operating the mux
128c2ecf20Sopenharmony_ci- #address-cells: should be <1>
138c2ecf20Sopenharmony_ci- #size-cells: should be <0>
148c2ecf20Sopenharmony_ci- port@*: at least three port nodes containing endpoints connecting to the
158c2ecf20Sopenharmony_ci  source and sink devices according to of_graph bindings. The last port is
168c2ecf20Sopenharmony_ci  the output port, all others are inputs.
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_ciOptionally, #address-cells, #size-cells, and port nodes can be grouped under a
198c2ecf20Sopenharmony_ciports node as described in Documentation/devicetree/bindings/graph.txt.
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_ciExample:
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_ci	mux: mux-controller {
248c2ecf20Sopenharmony_ci		compatible = "gpio-mux";
258c2ecf20Sopenharmony_ci		#mux-control-cells = <0>;
268c2ecf20Sopenharmony_ci
278c2ecf20Sopenharmony_ci		mux-gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
288c2ecf20Sopenharmony_ci	};
298c2ecf20Sopenharmony_ci
308c2ecf20Sopenharmony_ci	video-mux {
318c2ecf20Sopenharmony_ci		compatible = "video-mux";
328c2ecf20Sopenharmony_ci		mux-controls = <&mux>;
338c2ecf20Sopenharmony_ci		#address-cells = <1>;
348c2ecf20Sopenharmony_ci		#size-cells = <0>;
358c2ecf20Sopenharmony_ci
368c2ecf20Sopenharmony_ci		port@0 {
378c2ecf20Sopenharmony_ci			reg = <0>;
388c2ecf20Sopenharmony_ci
398c2ecf20Sopenharmony_ci			mux_in0: endpoint {
408c2ecf20Sopenharmony_ci				remote-endpoint = <&video_source0_out>;
418c2ecf20Sopenharmony_ci			};
428c2ecf20Sopenharmony_ci		};
438c2ecf20Sopenharmony_ci
448c2ecf20Sopenharmony_ci		port@1 {
458c2ecf20Sopenharmony_ci			reg = <1>;
468c2ecf20Sopenharmony_ci
478c2ecf20Sopenharmony_ci			mux_in1: endpoint {
488c2ecf20Sopenharmony_ci				remote-endpoint = <&video_source1_out>;
498c2ecf20Sopenharmony_ci			};
508c2ecf20Sopenharmony_ci		};
518c2ecf20Sopenharmony_ci
528c2ecf20Sopenharmony_ci		port@2 {
538c2ecf20Sopenharmony_ci			reg = <2>;
548c2ecf20Sopenharmony_ci
558c2ecf20Sopenharmony_ci			mux_out: endpoint {
568c2ecf20Sopenharmony_ci				remote-endpoint = <&capture_interface_in>;
578c2ecf20Sopenharmony_ci			};
588c2ecf20Sopenharmony_ci		};
598c2ecf20Sopenharmony_ci	};
608c2ecf20Sopenharmony_ci};
61