1c66ec88fSEmmanuel Vadot* Texas Instruments TVP5150 and TVP5151 video decoders
2c66ec88fSEmmanuel Vadot
3c66ec88fSEmmanuel VadotThe TVP5150 and TVP5151 are video decoders that convert baseband NTSC and PAL
4c66ec88fSEmmanuel Vadot(and also SECAM in the TVP5151 case) video signals to either 8-bit 4:2:2 YUV
5c66ec88fSEmmanuel Vadotwith discrete syncs or 8-bit ITU-R BT.656 with embedded syncs output formats.
6c66ec88fSEmmanuel Vadot
7c66ec88fSEmmanuel VadotRequired Properties:
8c66ec88fSEmmanuel Vadot====================
9c66ec88fSEmmanuel Vadot- compatible:	Value must be "ti,tvp5150".
10c66ec88fSEmmanuel Vadot- reg:		I2C slave address.
11c66ec88fSEmmanuel Vadot
12c66ec88fSEmmanuel VadotOptional Properties:
13c66ec88fSEmmanuel Vadot====================
14c66ec88fSEmmanuel Vadot- pdn-gpios:	Phandle for the GPIO connected to the PDN pin, if any.
15c66ec88fSEmmanuel Vadot- reset-gpios:	Phandle for the GPIO connected to the RESETB pin, if any.
16c66ec88fSEmmanuel Vadot
17c66ec88fSEmmanuel VadotThe device node must contain one 'port' child node per device physical input
18c66ec88fSEmmanuel Vadotand output port, in accordance with the video interface bindings defined in
19c66ec88fSEmmanuel VadotDocumentation/devicetree/bindings/media/video-interfaces.txt. The port nodes
20c66ec88fSEmmanuel Vadotare numbered as follows
21c66ec88fSEmmanuel Vadot
22c66ec88fSEmmanuel Vadot	  Name		Type		Port
23c66ec88fSEmmanuel Vadot	--------------------------------------
24c66ec88fSEmmanuel Vadot	  AIP1A		sink		0
25c66ec88fSEmmanuel Vadot	  AIP1B		sink		1
26c66ec88fSEmmanuel Vadot	  Y-OUT		src		2
27c66ec88fSEmmanuel Vadot
28c66ec88fSEmmanuel VadotThe device node must contain at least one sink port and the src port. Each input
29c66ec88fSEmmanuel Vadotport must be linked to an endpoint defined in [1]. The port/connector layout is
30c66ec88fSEmmanuel Vadotas follows
31c66ec88fSEmmanuel Vadot
32c66ec88fSEmmanuel Vadottvp-5150 port@0 (AIP1A)
33c66ec88fSEmmanuel Vadot	endpoint@0 -----------> Comp0-Con  port
34c66ec88fSEmmanuel Vadot	endpoint@1 ------+----> Svideo-Con port
35c66ec88fSEmmanuel Vadottvp-5150 port@1 (AIP1B)  |
36c66ec88fSEmmanuel Vadot	endpoint@1 ------+
37c66ec88fSEmmanuel Vadot	endpoint@0 -----------> Comp1-Con  port
38c66ec88fSEmmanuel Vadottvp-5150 port@2
39c66ec88fSEmmanuel Vadot	endpoint (video bitstream output at YOUT[0-7] parallel bus)
40c66ec88fSEmmanuel Vadot
41c66ec88fSEmmanuel VadotRequired Endpoint Properties for parallel synchronization on output port:
42c66ec88fSEmmanuel Vadot=========================================================================
43c66ec88fSEmmanuel Vadot
44c66ec88fSEmmanuel Vadot- hsync-active:		Active state of the HSYNC signal. Must be <1> (HIGH).
45c66ec88fSEmmanuel Vadot- vsync-active:		Active state of the VSYNC signal. Must be <1> (HIGH).
46c66ec88fSEmmanuel Vadot- field-even-active:	Field signal level during the even field data
47c66ec88fSEmmanuel Vadot			transmission. Must be <0>.
48c66ec88fSEmmanuel Vadot
49c66ec88fSEmmanuel VadotNote: Do not specify any of these properties if you want to use the embedded
50c66ec88fSEmmanuel Vadot      BT.656 synchronization.
51c66ec88fSEmmanuel Vadot
52c66ec88fSEmmanuel VadotOptional Connector Properties:
53c66ec88fSEmmanuel Vadot==============================
54c66ec88fSEmmanuel Vadot
55c66ec88fSEmmanuel Vadot- sdtv-standards: Set the possible signals to which the hardware tries to lock
56*aa1a8ff2SEmmanuel Vadot                  instead of using the autodetection mechanism. Please look at
57c66ec88fSEmmanuel Vadot                  [1] for more information.
58c66ec88fSEmmanuel Vadot
596be33864SEmmanuel Vadot[1] Documentation/devicetree/bindings/display/connector/analog-tv-connector.yaml.
60c66ec88fSEmmanuel Vadot
61c66ec88fSEmmanuel VadotExample - three input sources:
62c66ec88fSEmmanuel Vadot#include <dt-bindings/display/sdtv-standards.h>
63c66ec88fSEmmanuel Vadot
64c66ec88fSEmmanuel Vadotcomp_connector_0 {
65c66ec88fSEmmanuel Vadot	compatible = "composite-video-connector";
66c66ec88fSEmmanuel Vadot	label = "Composite0";
67c66ec88fSEmmanuel Vadot	sdtv-standards = <SDTV_STD_PAL_M>; /* limit to pal-m signals */
68c66ec88fSEmmanuel Vadot
69c66ec88fSEmmanuel Vadot	port {
70c66ec88fSEmmanuel Vadot		composite0_to_tvp5150: endpoint {
71c66ec88fSEmmanuel Vadot			remote-endpoint = <&tvp5150_to_composite0>;
72c66ec88fSEmmanuel Vadot		};
73c66ec88fSEmmanuel Vadot	};
74c66ec88fSEmmanuel Vadot};
75c66ec88fSEmmanuel Vadot
76c66ec88fSEmmanuel Vadotcomp_connector_1 {
77c66ec88fSEmmanuel Vadot	compatible = "composite-video-connector";
78c66ec88fSEmmanuel Vadot	label = "Composite1";
79c66ec88fSEmmanuel Vadot	sdtv-standards = <SDTV_STD_NTSC_M>; /* limit to ntsc-m signals */
80c66ec88fSEmmanuel Vadot
81c66ec88fSEmmanuel Vadot	port {
82c66ec88fSEmmanuel Vadot		composite1_to_tvp5150: endpoint {
83c66ec88fSEmmanuel Vadot			remote-endpoint = <&tvp5150_to_composite1>;
84c66ec88fSEmmanuel Vadot		};
85c66ec88fSEmmanuel Vadot	};
86c66ec88fSEmmanuel Vadot};
87c66ec88fSEmmanuel Vadot
88c66ec88fSEmmanuel Vadotsvideo_connector {
89c66ec88fSEmmanuel Vadot	compatible = "svideo-connector";
90c66ec88fSEmmanuel Vadot	label = "S-Video";
91c66ec88fSEmmanuel Vadot
92c66ec88fSEmmanuel Vadot	port {
93c66ec88fSEmmanuel Vadot		#address-cells = <1>;
94c66ec88fSEmmanuel Vadot		#size-cells = <0>;
95c66ec88fSEmmanuel Vadot
96c66ec88fSEmmanuel Vadot		svideo_luma_to_tvp5150: endpoint@0 {
97c66ec88fSEmmanuel Vadot			reg = <0>;
98c66ec88fSEmmanuel Vadot			remote-endpoint = <&tvp5150_to_svideo_luma>;
99c66ec88fSEmmanuel Vadot		};
100c66ec88fSEmmanuel Vadot
101c66ec88fSEmmanuel Vadot		svideo_chroma_to_tvp5150: endpoint@1 {
102c66ec88fSEmmanuel Vadot			reg = <1>;
103c66ec88fSEmmanuel Vadot			remote-endpoint = <&tvp5150_to_svideo_chroma>;
104c66ec88fSEmmanuel Vadot		};
105c66ec88fSEmmanuel Vadot	};
106c66ec88fSEmmanuel Vadot};
107c66ec88fSEmmanuel Vadot
108c66ec88fSEmmanuel Vadot&i2c2 {
109c66ec88fSEmmanuel Vadot	tvp5150@5c {
110c66ec88fSEmmanuel Vadot		compatible = "ti,tvp5150";
111c66ec88fSEmmanuel Vadot		reg = <0x5c>;
112c66ec88fSEmmanuel Vadot		pdn-gpios = <&gpio4 30 GPIO_ACTIVE_LOW>;
113c66ec88fSEmmanuel Vadot		reset-gpios = <&gpio6 7 GPIO_ACTIVE_LOW>;
114c66ec88fSEmmanuel Vadot		#address-cells = <1>;
115c66ec88fSEmmanuel Vadot		#size-cells = <0>;
116c66ec88fSEmmanuel Vadot
117c66ec88fSEmmanuel Vadot		port@0 {
118c66ec88fSEmmanuel Vadot			#address-cells = <1>;
119c66ec88fSEmmanuel Vadot			#size-cells = <0>;
120c66ec88fSEmmanuel Vadot			reg = <0>;
121c66ec88fSEmmanuel Vadot
122c66ec88fSEmmanuel Vadot			tvp5150_to_composite0: endpoint@0 {
123c66ec88fSEmmanuel Vadot				reg = <0>;
124c66ec88fSEmmanuel Vadot				remote-endpoint = <&composite0_to_tvp5150>;
125c66ec88fSEmmanuel Vadot			};
126c66ec88fSEmmanuel Vadot
127c66ec88fSEmmanuel Vadot			tvp5150_to_svideo_luma: endpoint@1 {
128c66ec88fSEmmanuel Vadot				reg = <1>;
129c66ec88fSEmmanuel Vadot				remote-endpoint = <&svideo_luma_to_tvp5150>;
130c66ec88fSEmmanuel Vadot			};
131c66ec88fSEmmanuel Vadot		};
132c66ec88fSEmmanuel Vadot
133c66ec88fSEmmanuel Vadot		port@1 {
134c66ec88fSEmmanuel Vadot			#address-cells = <1>;
135c66ec88fSEmmanuel Vadot			#size-cells = <0>;
136c66ec88fSEmmanuel Vadot			reg = <1>;
137c66ec88fSEmmanuel Vadot
138c66ec88fSEmmanuel Vadot			tvp5150_to_composite1: endpoint@0 {
139c66ec88fSEmmanuel Vadot				reg = <0>;
140c66ec88fSEmmanuel Vadot                                remote-endpoint = <&composite1_to_tvp5150>;
141c66ec88fSEmmanuel Vadot			};
142c66ec88fSEmmanuel Vadot
143c66ec88fSEmmanuel Vadot			tvp5150_to_svideo_chroma: endpoint@1 {
144c66ec88fSEmmanuel Vadot				reg = <1>;
145c66ec88fSEmmanuel Vadot				remote-endpoint = <&svideo_chroma_to_tvp5150>;
146c66ec88fSEmmanuel Vadot			};
147c66ec88fSEmmanuel Vadot		};
148c66ec88fSEmmanuel Vadot
149c66ec88fSEmmanuel Vadot		port@2 {
150c66ec88fSEmmanuel Vadot			reg = <2>;
151c66ec88fSEmmanuel Vadot
152c66ec88fSEmmanuel Vadot			tvp5150_1: endpoint {
153c66ec88fSEmmanuel Vadot				remote-endpoint = <&ccdc_ep>;
154c66ec88fSEmmanuel Vadot			};
155c66ec88fSEmmanuel Vadot		};
156c66ec88fSEmmanuel Vadot	};
157c66ec88fSEmmanuel Vadot};
158