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