18c2ecf20Sopenharmony_ciAnalog Devices ADV7511(W)/13/33/35 HDMI Encoders
28c2ecf20Sopenharmony_ci------------------------------------------------
38c2ecf20Sopenharmony_ci
48c2ecf20Sopenharmony_ciThe ADV7511, ADV7511W, ADV7513, ADV7533 and ADV7535 are HDMI audio and video
58c2ecf20Sopenharmony_citransmitters compatible with HDMI 1.4 and DVI 1.0. They support color space
68c2ecf20Sopenharmony_ciconversion, S/PDIF, CEC and HDCP. ADV7533/5 supports the DSI interface for input
78c2ecf20Sopenharmony_cipixels, while the others support RGB interface.
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ciRequired properties:
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ci- compatible: Should be one of:
128c2ecf20Sopenharmony_ci		"adi,adv7511"
138c2ecf20Sopenharmony_ci		"adi,adv7511w"
148c2ecf20Sopenharmony_ci		"adi,adv7513"
158c2ecf20Sopenharmony_ci		"adi,adv7533"
168c2ecf20Sopenharmony_ci		"adi,adv7535"
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_ci- reg: I2C slave addresses
198c2ecf20Sopenharmony_ci  The ADV7511 internal registers are split into four pages exposed through
208c2ecf20Sopenharmony_ci  different I2C addresses, creating four register maps. Each map has it own
218c2ecf20Sopenharmony_ci  I2C address and acts as a standard slave device on the I2C bus. The main
228c2ecf20Sopenharmony_ci  address is mandatory, others are optional and revert to defaults if not
238c2ecf20Sopenharmony_ci  specified.
248c2ecf20Sopenharmony_ci
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_ciThe ADV7511 supports a large number of input data formats that differ by their
278c2ecf20Sopenharmony_cicolor depth, color format, clock mode, bit justification and random
288c2ecf20Sopenharmony_ciarrangement of components on the data bus. The combination of the following
298c2ecf20Sopenharmony_ciproperties describe the input and map directly to the video input tables of the
308c2ecf20Sopenharmony_ciADV7511 datasheet that document all the supported combinations.
318c2ecf20Sopenharmony_ci
328c2ecf20Sopenharmony_ci- adi,input-depth: Number of bits per color component at the input (8, 10 or
338c2ecf20Sopenharmony_ci  12).
348c2ecf20Sopenharmony_ci- adi,input-colorspace: The input color space, one of "rgb", "yuv422" or
358c2ecf20Sopenharmony_ci  "yuv444".
368c2ecf20Sopenharmony_ci- adi,input-clock: The input clock type, one of "1x" (one clock cycle per
378c2ecf20Sopenharmony_ci  pixel), "2x" (two clock cycles per pixel), "ddr" (one clock cycle per pixel,
388c2ecf20Sopenharmony_ci  data driven on both edges).
398c2ecf20Sopenharmony_ci
408c2ecf20Sopenharmony_ciThe following input format properties are required except in "rgb 1x" and
418c2ecf20Sopenharmony_ci"yuv444 1x" modes, in which case they must not be specified.
428c2ecf20Sopenharmony_ci
438c2ecf20Sopenharmony_ci- adi,input-style: The input components arrangement variant (1, 2 or 3), as
448c2ecf20Sopenharmony_ci  listed in the input format tables in the datasheet.
458c2ecf20Sopenharmony_ci- adi,input-justification: The input bit justification ("left", "evenly",
468c2ecf20Sopenharmony_ci  "right").
478c2ecf20Sopenharmony_ci
488c2ecf20Sopenharmony_ci- avdd-supply: A 1.8V supply that powers up the AVDD pin on the chip.
498c2ecf20Sopenharmony_ci- dvdd-supply: A 1.8V supply that powers up the DVDD pin on the chip.
508c2ecf20Sopenharmony_ci- pvdd-supply: A 1.8V supply that powers up the PVDD pin on the chip.
518c2ecf20Sopenharmony_ci- dvdd-3v-supply: A 3.3V supply that powers up the pin called DVDD_3V
528c2ecf20Sopenharmony_ci  on the chip.
538c2ecf20Sopenharmony_ci- bgvdd-supply: A 1.8V supply that powers up the BGVDD pin. This is
548c2ecf20Sopenharmony_ci  needed only for ADV7511.
558c2ecf20Sopenharmony_ci
568c2ecf20Sopenharmony_ciThe following properties are required for ADV7533 and ADV7535:
578c2ecf20Sopenharmony_ci
588c2ecf20Sopenharmony_ci- adi,dsi-lanes: Number of DSI data lanes connected to the DSI host. It should
598c2ecf20Sopenharmony_ci  be one of 1, 2, 3 or 4.
608c2ecf20Sopenharmony_ci- a2vdd-supply: 1.8V supply that powers up the A2VDD pin on the chip.
618c2ecf20Sopenharmony_ci- v3p3-supply: A 3.3V supply that powers up the V3P3 pin on the chip.
628c2ecf20Sopenharmony_ci- v1p2-supply: A supply that powers up the V1P2 pin on the chip. It can be
638c2ecf20Sopenharmony_ci  either 1.2V or 1.8V for ADV7533 but only 1.8V for ADV7535.
648c2ecf20Sopenharmony_ci
658c2ecf20Sopenharmony_ciOptional properties:
668c2ecf20Sopenharmony_ci
678c2ecf20Sopenharmony_ci- interrupts: Specifier for the ADV7511 interrupt
688c2ecf20Sopenharmony_ci- pd-gpios: Specifier for the GPIO connected to the power down signal
698c2ecf20Sopenharmony_ci
708c2ecf20Sopenharmony_ci- adi,clock-delay: Video data clock delay relative to the pixel clock, in ps
718c2ecf20Sopenharmony_ci  (-1200 ps .. 1600 ps). Defaults to no delay.
728c2ecf20Sopenharmony_ci- adi,embedded-sync: The input uses synchronization signals embedded in the
738c2ecf20Sopenharmony_ci  data stream (similar to BT.656). Defaults to separate H/V synchronization
748c2ecf20Sopenharmony_ci  signals.
758c2ecf20Sopenharmony_ci- adi,disable-timing-generator: Only for ADV7533 and ADV7535. Disables the
768c2ecf20Sopenharmony_ci  internal timing generator. The chip will rely on the sync signals in the
778c2ecf20Sopenharmony_ci  DSI data lanes, rather than generate its own timings for HDMI output.
788c2ecf20Sopenharmony_ci- clocks: from common clock binding: reference to the CEC clock.
798c2ecf20Sopenharmony_ci- clock-names: from common clock binding: must be "cec".
808c2ecf20Sopenharmony_ci- reg-names : Names of maps with programmable addresses.
818c2ecf20Sopenharmony_ci	It can contain any map needing a non-default address.
828c2ecf20Sopenharmony_ci	Possible maps names are : "main", "edid", "cec", "packet"
838c2ecf20Sopenharmony_ci
848c2ecf20Sopenharmony_ciRequired nodes:
858c2ecf20Sopenharmony_ci
868c2ecf20Sopenharmony_ciThe ADV7511 has two video ports. Their connections are modelled using the OF
878c2ecf20Sopenharmony_cigraph bindings specified in Documentation/devicetree/bindings/graph.txt.
888c2ecf20Sopenharmony_ci
898c2ecf20Sopenharmony_ci- Video port 0 for the RGB, YUV or DSI input. In the case of ADV7533/5, the
908c2ecf20Sopenharmony_ci  remote endpoint phandle should be a reference to a valid mipi_dsi_host device
918c2ecf20Sopenharmony_ci  node.
928c2ecf20Sopenharmony_ci- Video port 1 for the HDMI output
938c2ecf20Sopenharmony_ci- Audio port 2 for the HDMI audio input
948c2ecf20Sopenharmony_ci
958c2ecf20Sopenharmony_ci
968c2ecf20Sopenharmony_ciExample
978c2ecf20Sopenharmony_ci-------
988c2ecf20Sopenharmony_ci
998c2ecf20Sopenharmony_ci	adv7511w: hdmi@39 {
1008c2ecf20Sopenharmony_ci		compatible = "adi,adv7511w";
1018c2ecf20Sopenharmony_ci		/*
1028c2ecf20Sopenharmony_ci		 * The EDID page will be accessible on address 0x66 on the I2C
1038c2ecf20Sopenharmony_ci		 * bus. All other maps continue to use their default addresses.
1048c2ecf20Sopenharmony_ci		 */
1058c2ecf20Sopenharmony_ci		reg = <0x39>, <0x66>;
1068c2ecf20Sopenharmony_ci		reg-names = "main", "edid";
1078c2ecf20Sopenharmony_ci		interrupt-parent = <&gpio3>;
1088c2ecf20Sopenharmony_ci		interrupts = <29 IRQ_TYPE_EDGE_FALLING>;
1098c2ecf20Sopenharmony_ci		clocks = <&cec_clock>;
1108c2ecf20Sopenharmony_ci		clock-names = "cec";
1118c2ecf20Sopenharmony_ci
1128c2ecf20Sopenharmony_ci		adi,input-depth = <8>;
1138c2ecf20Sopenharmony_ci		adi,input-colorspace = "rgb";
1148c2ecf20Sopenharmony_ci		adi,input-clock = "1x";
1158c2ecf20Sopenharmony_ci		adi,input-style = <1>;
1168c2ecf20Sopenharmony_ci		adi,input-justification = "evenly";
1178c2ecf20Sopenharmony_ci
1188c2ecf20Sopenharmony_ci		ports {
1198c2ecf20Sopenharmony_ci			#address-cells = <1>;
1208c2ecf20Sopenharmony_ci			#size-cells = <0>;
1218c2ecf20Sopenharmony_ci
1228c2ecf20Sopenharmony_ci			port@0 {
1238c2ecf20Sopenharmony_ci				reg = <0>;
1248c2ecf20Sopenharmony_ci				adv7511w_in: endpoint {
1258c2ecf20Sopenharmony_ci					remote-endpoint = <&dpi_out>;
1268c2ecf20Sopenharmony_ci				};
1278c2ecf20Sopenharmony_ci			};
1288c2ecf20Sopenharmony_ci
1298c2ecf20Sopenharmony_ci			port@1 {
1308c2ecf20Sopenharmony_ci				reg = <1>;
1318c2ecf20Sopenharmony_ci				adv7511_out: endpoint {
1328c2ecf20Sopenharmony_ci					remote-endpoint = <&hdmi_connector_in>;
1338c2ecf20Sopenharmony_ci				};
1348c2ecf20Sopenharmony_ci			};
1358c2ecf20Sopenharmony_ci
1368c2ecf20Sopenharmony_ci			port@2 {
1378c2ecf20Sopenharmony_ci				reg = <2>;
1388c2ecf20Sopenharmony_ci				codec_endpoint: endpoint {
1398c2ecf20Sopenharmony_ci					remote-endpoint = <&i2s0_cpu_endpoint>;
1408c2ecf20Sopenharmony_ci				};
1418c2ecf20Sopenharmony_ci			};
1428c2ecf20Sopenharmony_ci		};
1438c2ecf20Sopenharmony_ci	};
144