xref: /freebsd/sys/contrib/device-tree/Bindings/display/mediatek/mediatek,hdmi.txt (revision 5def4c47d4bd90b209b9b4a4ba9faec15846d8fd)
1c66ec88fSEmmanuel VadotMediatek HDMI Encoder
2c66ec88fSEmmanuel Vadot=====================
3c66ec88fSEmmanuel Vadot
4c66ec88fSEmmanuel VadotThe Mediatek HDMI encoder can generate HDMI 1.4a or MHL 2.0 signals from
5c66ec88fSEmmanuel Vadotits parallel input.
6c66ec88fSEmmanuel Vadot
7c66ec88fSEmmanuel VadotRequired properties:
8c66ec88fSEmmanuel Vadot- compatible: Should be "mediatek,<chip>-hdmi".
96be33864SEmmanuel Vadot- the supported chips are mt2701, mt7623 and mt8173
10c66ec88fSEmmanuel Vadot- reg: Physical base address and length of the controller's registers
11c66ec88fSEmmanuel Vadot- interrupts: The interrupt signal from the function block.
12c66ec88fSEmmanuel Vadot- clocks: device clocks
13c66ec88fSEmmanuel Vadot  See Documentation/devicetree/bindings/clock/clock-bindings.txt for details.
14c66ec88fSEmmanuel Vadot- clock-names: must contain "pixel", "pll", "bclk", and "spdif".
15c66ec88fSEmmanuel Vadot- phys: phandle link to the HDMI PHY node.
16c66ec88fSEmmanuel Vadot  See Documentation/devicetree/bindings/phy/phy-bindings.txt for details.
17c66ec88fSEmmanuel Vadot- phy-names: must contain "hdmi"
18c66ec88fSEmmanuel Vadot- mediatek,syscon-hdmi: phandle link and register offset to the system
19c66ec88fSEmmanuel Vadot  configuration registers. For mt8173 this must be offset 0x900 into the
20c66ec88fSEmmanuel Vadot  MMSYS_CONFIG region: <&mmsys 0x900>.
21c66ec88fSEmmanuel Vadot- ports: A node containing input and output port nodes with endpoint
22c66ec88fSEmmanuel Vadot  definitions as documented in Documentation/devicetree/bindings/graph.txt.
23c66ec88fSEmmanuel Vadot- port@0: The input port in the ports node should be connected to a DPI output
24c66ec88fSEmmanuel Vadot  port.
25c66ec88fSEmmanuel Vadot- port@1: The output port in the ports node should be connected to the input
26c66ec88fSEmmanuel Vadot  port of a connector node that contains a ddc-i2c-bus property, or to the
27c66ec88fSEmmanuel Vadot  input port of an attached bridge chip, such as a SlimPort transmitter.
28c66ec88fSEmmanuel Vadot
29c66ec88fSEmmanuel VadotHDMI CEC
30c66ec88fSEmmanuel Vadot========
31c66ec88fSEmmanuel Vadot
32c66ec88fSEmmanuel VadotThe HDMI CEC controller handles hotplug detection and CEC communication.
33c66ec88fSEmmanuel Vadot
34c66ec88fSEmmanuel VadotRequired properties:
35c66ec88fSEmmanuel Vadot- compatible: Should be "mediatek,<chip>-cec"
366be33864SEmmanuel Vadot- the supported chips are mt7623 and mt8173
37c66ec88fSEmmanuel Vadot- reg: Physical base address and length of the controller's registers
38c66ec88fSEmmanuel Vadot- interrupts: The interrupt signal from the function block.
39c66ec88fSEmmanuel Vadot- clocks: device clock
40c66ec88fSEmmanuel Vadot
41c66ec88fSEmmanuel VadotHDMI DDC
42c66ec88fSEmmanuel Vadot========
43c66ec88fSEmmanuel Vadot
44c66ec88fSEmmanuel VadotThe HDMI DDC i2c controller is used to interface with the HDMI DDC pins.
45c66ec88fSEmmanuel VadotThe Mediatek's I2C controller is used to interface with I2C devices.
46c66ec88fSEmmanuel Vadot
47c66ec88fSEmmanuel VadotRequired properties:
48c66ec88fSEmmanuel Vadot- compatible: Should be "mediatek,<chip>-hdmi-ddc"
496be33864SEmmanuel Vadot- the supported chips are mt7623 and mt8173
50c66ec88fSEmmanuel Vadot- reg: Physical base address and length of the controller's registers
51c66ec88fSEmmanuel Vadot- clocks: device clock
52c66ec88fSEmmanuel Vadot- clock-names: Should be "ddc-i2c".
53c66ec88fSEmmanuel Vadot
54c66ec88fSEmmanuel VadotHDMI PHY
55c66ec88fSEmmanuel Vadot========
56*5def4c47SEmmanuel VadotSee phy/mediatek,hdmi-phy.yaml
57c66ec88fSEmmanuel Vadot
58c66ec88fSEmmanuel VadotExample:
59c66ec88fSEmmanuel Vadot
60c66ec88fSEmmanuel Vadotcec: cec@10013000 {
61c66ec88fSEmmanuel Vadot	compatible = "mediatek,mt8173-cec";
62c66ec88fSEmmanuel Vadot	reg = <0 0x10013000 0 0xbc>;
63c66ec88fSEmmanuel Vadot	interrupts = <GIC_SPI 167 IRQ_TYPE_LEVEL_LOW>;
64c66ec88fSEmmanuel Vadot	clocks = <&infracfg CLK_INFRA_CEC>;
65c66ec88fSEmmanuel Vadot};
66c66ec88fSEmmanuel Vadot
67c66ec88fSEmmanuel Vadothdmi_phy: hdmi-phy@10209100 {
68c66ec88fSEmmanuel Vadot	compatible = "mediatek,mt8173-hdmi-phy";
69c66ec88fSEmmanuel Vadot	reg = <0 0x10209100 0 0x24>;
70c66ec88fSEmmanuel Vadot	clocks = <&apmixedsys CLK_APMIXED_HDMI_REF>;
71c66ec88fSEmmanuel Vadot	clock-names = "pll_ref";
72c66ec88fSEmmanuel Vadot	clock-output-names = "hdmitx_dig_cts";
73c66ec88fSEmmanuel Vadot	mediatek,ibias = <0xa>;
74c66ec88fSEmmanuel Vadot	mediatek,ibias_up = <0x1c>;
75c66ec88fSEmmanuel Vadot	#clock-cells = <0>;
76c66ec88fSEmmanuel Vadot	#phy-cells = <0>;
77c66ec88fSEmmanuel Vadot};
78c66ec88fSEmmanuel Vadot
79c66ec88fSEmmanuel Vadothdmi_ddc0: i2c@11012000 {
80c66ec88fSEmmanuel Vadot	compatible = "mediatek,mt8173-hdmi-ddc";
81c66ec88fSEmmanuel Vadot	reg = <0 0x11012000 0 0x1c>;
82c66ec88fSEmmanuel Vadot	interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_LOW>;
83c66ec88fSEmmanuel Vadot	clocks = <&pericfg CLK_PERI_I2C5>;
84c66ec88fSEmmanuel Vadot	clock-names = "ddc-i2c";
85c66ec88fSEmmanuel Vadot};
86c66ec88fSEmmanuel Vadot
87c66ec88fSEmmanuel Vadothdmi0: hdmi@14025000 {
88c66ec88fSEmmanuel Vadot	compatible = "mediatek,mt8173-hdmi";
89c66ec88fSEmmanuel Vadot	reg = <0 0x14025000 0 0x400>;
90c66ec88fSEmmanuel Vadot	interrupts = <GIC_SPI 206 IRQ_TYPE_LEVEL_LOW>;
91c66ec88fSEmmanuel Vadot	clocks = <&mmsys CLK_MM_HDMI_PIXEL>,
92c66ec88fSEmmanuel Vadot		 <&mmsys CLK_MM_HDMI_PLLCK>,
93c66ec88fSEmmanuel Vadot		 <&mmsys CLK_MM_HDMI_AUDIO>,
94c66ec88fSEmmanuel Vadot		 <&mmsys CLK_MM_HDMI_SPDIF>;
95c66ec88fSEmmanuel Vadot	clock-names = "pixel", "pll", "bclk", "spdif";
96c66ec88fSEmmanuel Vadot	pinctrl-names = "default";
97c66ec88fSEmmanuel Vadot	pinctrl-0 = <&hdmi_pin>;
98c66ec88fSEmmanuel Vadot	phys = <&hdmi_phy>;
99c66ec88fSEmmanuel Vadot	phy-names = "hdmi";
100c66ec88fSEmmanuel Vadot	mediatek,syscon-hdmi = <&mmsys 0x900>;
101c66ec88fSEmmanuel Vadot	assigned-clocks = <&topckgen CLK_TOP_HDMI_SEL>;
102c66ec88fSEmmanuel Vadot	assigned-clock-parents = <&hdmi_phy>;
103c66ec88fSEmmanuel Vadot
104c66ec88fSEmmanuel Vadot	ports {
105c66ec88fSEmmanuel Vadot		#address-cells = <1>;
106c66ec88fSEmmanuel Vadot		#size-cells = <0>;
107c66ec88fSEmmanuel Vadot
108c66ec88fSEmmanuel Vadot		port@0 {
109c66ec88fSEmmanuel Vadot			reg = <0>;
110c66ec88fSEmmanuel Vadot
111c66ec88fSEmmanuel Vadot			hdmi0_in: endpoint {
112c66ec88fSEmmanuel Vadot				remote-endpoint = <&dpi0_out>;
113c66ec88fSEmmanuel Vadot			};
114c66ec88fSEmmanuel Vadot		};
115c66ec88fSEmmanuel Vadot
116c66ec88fSEmmanuel Vadot		port@1 {
117c66ec88fSEmmanuel Vadot			reg = <1>;
118c66ec88fSEmmanuel Vadot
119c66ec88fSEmmanuel Vadot			hdmi0_out: endpoint {
120c66ec88fSEmmanuel Vadot				remote-endpoint = <&hdmi_con_in>;
121c66ec88fSEmmanuel Vadot			};
122c66ec88fSEmmanuel Vadot		};
123c66ec88fSEmmanuel Vadot	};
124c66ec88fSEmmanuel Vadot};
125c66ec88fSEmmanuel Vadot
126c66ec88fSEmmanuel Vadotconnector {
127c66ec88fSEmmanuel Vadot	compatible = "hdmi-connector";
128c66ec88fSEmmanuel Vadot	type = "a";
129c66ec88fSEmmanuel Vadot	ddc-i2c-bus = <&hdmiddc0>;
130c66ec88fSEmmanuel Vadot
131c66ec88fSEmmanuel Vadot	port {
132c66ec88fSEmmanuel Vadot		hdmi_con_in: endpoint {
133c66ec88fSEmmanuel Vadot			remote-endpoint = <&hdmi0_out>;
134c66ec88fSEmmanuel Vadot		};
135c66ec88fSEmmanuel Vadot	};
136c66ec88fSEmmanuel Vadot};
137