1*b97ee269SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*b97ee269SEmmanuel Vadot%YAML 1.2
3*b97ee269SEmmanuel Vadot---
4*b97ee269SEmmanuel Vadot
5*b97ee269SEmmanuel Vadot$id: http://devicetree.org/schemas/display/msm/hdmi.yaml#
6*b97ee269SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
7*b97ee269SEmmanuel Vadot
8*b97ee269SEmmanuel Vadottitle: Qualcomm Adreno/Snapdragon HDMI output
9*b97ee269SEmmanuel Vadot
10*b97ee269SEmmanuel Vadotmaintainers:
11*b97ee269SEmmanuel Vadot  - Rob Clark <robdclark@gmail.com>
12*b97ee269SEmmanuel Vadot
13*b97ee269SEmmanuel Vadotproperties:
14*b97ee269SEmmanuel Vadot  compatible:
15*b97ee269SEmmanuel Vadot    enum:
16*b97ee269SEmmanuel Vadot      - qcom,hdmi-tx-8084
17*b97ee269SEmmanuel Vadot      - qcom,hdmi-tx-8660
18*b97ee269SEmmanuel Vadot      - qcom,hdmi-tx-8960
19*b97ee269SEmmanuel Vadot      - qcom,hdmi-tx-8974
20*b97ee269SEmmanuel Vadot      - qcom,hdmi-tx-8994
21*b97ee269SEmmanuel Vadot      - qcom,hdmi-tx-8996
22*b97ee269SEmmanuel Vadot
23*b97ee269SEmmanuel Vadot  clocks:
24*b97ee269SEmmanuel Vadot    minItems: 1
25*b97ee269SEmmanuel Vadot    maxItems: 5
26*b97ee269SEmmanuel Vadot
27*b97ee269SEmmanuel Vadot  clock-names:
28*b97ee269SEmmanuel Vadot    minItems: 1
29*b97ee269SEmmanuel Vadot    maxItems: 5
30*b97ee269SEmmanuel Vadot
31*b97ee269SEmmanuel Vadot  reg:
32*b97ee269SEmmanuel Vadot    minItems: 1
33*b97ee269SEmmanuel Vadot    maxItems: 3
34*b97ee269SEmmanuel Vadot
35*b97ee269SEmmanuel Vadot  reg-names:
36*b97ee269SEmmanuel Vadot    minItems: 1
37*b97ee269SEmmanuel Vadot    items:
38*b97ee269SEmmanuel Vadot      - const: core_physical
39*b97ee269SEmmanuel Vadot      - const: qfprom_physical
40*b97ee269SEmmanuel Vadot      - const: hdcp_physical
41*b97ee269SEmmanuel Vadot
42*b97ee269SEmmanuel Vadot  interrupts:
43*b97ee269SEmmanuel Vadot    maxItems: 1
44*b97ee269SEmmanuel Vadot
45*b97ee269SEmmanuel Vadot  phys:
46*b97ee269SEmmanuel Vadot    maxItems: 1
47*b97ee269SEmmanuel Vadot
48*b97ee269SEmmanuel Vadot  phy-names:
49*b97ee269SEmmanuel Vadot    enum:
50*b97ee269SEmmanuel Vadot      - hdmi_phy
51*b97ee269SEmmanuel Vadot      - hdmi-phy
52*b97ee269SEmmanuel Vadot    deprecated: true
53*b97ee269SEmmanuel Vadot
54*b97ee269SEmmanuel Vadot  core-vdda-supply:
55*b97ee269SEmmanuel Vadot    description: phandle to VDDA supply regulator
56*b97ee269SEmmanuel Vadot
57*b97ee269SEmmanuel Vadot  hdmi-mux-supply:
58*b97ee269SEmmanuel Vadot    description: phandle to mux regulator
59*b97ee269SEmmanuel Vadot    deprecated: true
60*b97ee269SEmmanuel Vadot
61*b97ee269SEmmanuel Vadot  core-vcc-supply:
62*b97ee269SEmmanuel Vadot    description: phandle to VCC supply regulator
63*b97ee269SEmmanuel Vadot
64*b97ee269SEmmanuel Vadot  hpd-gpios:
65*b97ee269SEmmanuel Vadot    maxItems: 1
66*b97ee269SEmmanuel Vadot    description: hpd pin
67*b97ee269SEmmanuel Vadot
68*b97ee269SEmmanuel Vadot  qcom,hdmi-tx-mux-en-gpios:
69*b97ee269SEmmanuel Vadot    maxItems: 1
70*b97ee269SEmmanuel Vadot    deprecated: true
71*b97ee269SEmmanuel Vadot    description: HDMI mux enable pin
72*b97ee269SEmmanuel Vadot
73*b97ee269SEmmanuel Vadot  qcom,hdmi-tx-mux-sel-gpios:
74*b97ee269SEmmanuel Vadot    maxItems: 1
75*b97ee269SEmmanuel Vadot    deprecated: true
76*b97ee269SEmmanuel Vadot    description: HDMI mux select pin
77*b97ee269SEmmanuel Vadot
78*b97ee269SEmmanuel Vadot  qcom,hdmi-tx-mux-lpm-gpios:
79*b97ee269SEmmanuel Vadot    maxItems: 1
80*b97ee269SEmmanuel Vadot    deprecated: true
81*b97ee269SEmmanuel Vadot    description: HDMI mux lpm pin
82*b97ee269SEmmanuel Vadot
83*b97ee269SEmmanuel Vadot  '#sound-dai-cells':
84*b97ee269SEmmanuel Vadot    const: 1
85*b97ee269SEmmanuel Vadot
86*b97ee269SEmmanuel Vadot  ports:
87*b97ee269SEmmanuel Vadot    type: object
88*b97ee269SEmmanuel Vadot    $ref: /schemas/graph.yaml#/properties/ports
89*b97ee269SEmmanuel Vadot    properties:
90*b97ee269SEmmanuel Vadot      port@0:
91*b97ee269SEmmanuel Vadot        $ref: /schemas/graph.yaml#/$defs/port-base
92*b97ee269SEmmanuel Vadot        description: |
93*b97ee269SEmmanuel Vadot          Input endpoints of the controller.
94*b97ee269SEmmanuel Vadot
95*b97ee269SEmmanuel Vadot      port@1:
96*b97ee269SEmmanuel Vadot        $ref: /schemas/graph.yaml#/$defs/port-base
97*b97ee269SEmmanuel Vadot        description: |
98*b97ee269SEmmanuel Vadot          Output endpoints of the controller.
99*b97ee269SEmmanuel Vadot
100*b97ee269SEmmanuel Vadot    required:
101*b97ee269SEmmanuel Vadot      - port@0
102*b97ee269SEmmanuel Vadot
103*b97ee269SEmmanuel Vadotrequired:
104*b97ee269SEmmanuel Vadot  - compatible
105*b97ee269SEmmanuel Vadot  - clocks
106*b97ee269SEmmanuel Vadot  - clock-names
107*b97ee269SEmmanuel Vadot  - reg
108*b97ee269SEmmanuel Vadot  - reg-names
109*b97ee269SEmmanuel Vadot  - interrupts
110*b97ee269SEmmanuel Vadot  - phys
111*b97ee269SEmmanuel Vadot
112*b97ee269SEmmanuel VadotallOf:
113*b97ee269SEmmanuel Vadot  - if:
114*b97ee269SEmmanuel Vadot      properties:
115*b97ee269SEmmanuel Vadot        compatible:
116*b97ee269SEmmanuel Vadot          contains:
117*b97ee269SEmmanuel Vadot            enum:
118*b97ee269SEmmanuel Vadot              - qcom,hdmi-tx-8960
119*b97ee269SEmmanuel Vadot              - qcom,hdmi-tx-8660
120*b97ee269SEmmanuel Vadot    then:
121*b97ee269SEmmanuel Vadot      properties:
122*b97ee269SEmmanuel Vadot        clocks:
123*b97ee269SEmmanuel Vadot          minItems: 3
124*b97ee269SEmmanuel Vadot          maxItems: 3
125*b97ee269SEmmanuel Vadot        clock-names:
126*b97ee269SEmmanuel Vadot          items:
127*b97ee269SEmmanuel Vadot            - const: core
128*b97ee269SEmmanuel Vadot            - const: master_iface
129*b97ee269SEmmanuel Vadot            - const: slave_iface
130*b97ee269SEmmanuel Vadot        core-vcc-supplies: false
131*b97ee269SEmmanuel Vadot
132*b97ee269SEmmanuel Vadot  - if:
133*b97ee269SEmmanuel Vadot      properties:
134*b97ee269SEmmanuel Vadot        compatible:
135*b97ee269SEmmanuel Vadot          contains:
136*b97ee269SEmmanuel Vadot            enum:
137*b97ee269SEmmanuel Vadot              - qcom,hdmi-tx-8974
138*b97ee269SEmmanuel Vadot              - qcom,hdmi-tx-8084
139*b97ee269SEmmanuel Vadot              - qcom,hdmi-tx-8994
140*b97ee269SEmmanuel Vadot              - qcom,hdmi-tx-8996
141*b97ee269SEmmanuel Vadot    then:
142*b97ee269SEmmanuel Vadot      properties:
143*b97ee269SEmmanuel Vadot        clocks:
144*b97ee269SEmmanuel Vadot          minItems: 5
145*b97ee269SEmmanuel Vadot        clock-names:
146*b97ee269SEmmanuel Vadot          items:
147*b97ee269SEmmanuel Vadot            - const: mdp_core
148*b97ee269SEmmanuel Vadot            - const: iface
149*b97ee269SEmmanuel Vadot            - const: core
150*b97ee269SEmmanuel Vadot            - const: alt_iface
151*b97ee269SEmmanuel Vadot            - const: extp
152*b97ee269SEmmanuel Vadot        hdmi-mux-supplies: false
153*b97ee269SEmmanuel Vadot
154*b97ee269SEmmanuel VadotadditionalProperties: false
155*b97ee269SEmmanuel Vadot
156*b97ee269SEmmanuel Vadotexamples:
157*b97ee269SEmmanuel Vadot  - |
158*b97ee269SEmmanuel Vadot    #include <dt-bindings/gpio/gpio.h>
159*b97ee269SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
160*b97ee269SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
161*b97ee269SEmmanuel Vadot    hdmi: hdmi@4a00000 {
162*b97ee269SEmmanuel Vadot      compatible = "qcom,hdmi-tx-8960";
163*b97ee269SEmmanuel Vadot      reg-names = "core_physical";
164*b97ee269SEmmanuel Vadot      reg = <0x04a00000 0x2f0>;
165*b97ee269SEmmanuel Vadot      interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_HIGH>;
166*b97ee269SEmmanuel Vadot      clock-names = "core",
167*b97ee269SEmmanuel Vadot                    "master_iface",
168*b97ee269SEmmanuel Vadot                    "slave_iface";
169*b97ee269SEmmanuel Vadot      clocks = <&clk 61>,
170*b97ee269SEmmanuel Vadot               <&clk 72>,
171*b97ee269SEmmanuel Vadot               <&clk 98>;
172*b97ee269SEmmanuel Vadot      hpd-gpios = <&msmgpio 72 GPIO_ACTIVE_HIGH>;
173*b97ee269SEmmanuel Vadot      core-vdda-supply = <&pm8921_hdmi_mvs>;
174*b97ee269SEmmanuel Vadot      hdmi-mux-supply = <&ext_3p3v>;
175*b97ee269SEmmanuel Vadot      pinctrl-names = "default", "sleep";
176*b97ee269SEmmanuel Vadot      pinctrl-0 = <&hpd_active  &ddc_active  &cec_active>;
177*b97ee269SEmmanuel Vadot      pinctrl-1 = <&hpd_suspend &ddc_suspend &cec_suspend>;
178*b97ee269SEmmanuel Vadot
179*b97ee269SEmmanuel Vadot      phys = <&hdmi_phy>;
180*b97ee269SEmmanuel Vadot    };
181*b97ee269SEmmanuel Vadot  - |
182*b97ee269SEmmanuel Vadot    #include <dt-bindings/clock/qcom,gcc-msm8996.h>
183*b97ee269SEmmanuel Vadot    #include <dt-bindings/clock/qcom,mmcc-msm8996.h>
184*b97ee269SEmmanuel Vadot    #include <dt-bindings/gpio/gpio.h>
185*b97ee269SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/irq.h>
186*b97ee269SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
187*b97ee269SEmmanuel Vadot    hdmi@9a0000 {
188*b97ee269SEmmanuel Vadot      compatible = "qcom,hdmi-tx-8996";
189*b97ee269SEmmanuel Vadot      reg = <0x009a0000 0x50c>,
190*b97ee269SEmmanuel Vadot            <0x00070000 0x6158>,
191*b97ee269SEmmanuel Vadot            <0x009e0000 0xfff>;
192*b97ee269SEmmanuel Vadot      reg-names = "core_physical",
193*b97ee269SEmmanuel Vadot                  "qfprom_physical",
194*b97ee269SEmmanuel Vadot                  "hdcp_physical";
195*b97ee269SEmmanuel Vadot
196*b97ee269SEmmanuel Vadot      interrupt-parent = <&mdss>;
197*b97ee269SEmmanuel Vadot      interrupts = <8 IRQ_TYPE_LEVEL_HIGH>;
198*b97ee269SEmmanuel Vadot
199*b97ee269SEmmanuel Vadot      clocks = <&mmcc MDSS_MDP_CLK>,
200*b97ee269SEmmanuel Vadot               <&mmcc MDSS_AHB_CLK>,
201*b97ee269SEmmanuel Vadot               <&mmcc MDSS_HDMI_CLK>,
202*b97ee269SEmmanuel Vadot               <&mmcc MDSS_HDMI_AHB_CLK>,
203*b97ee269SEmmanuel Vadot               <&mmcc MDSS_EXTPCLK_CLK>;
204*b97ee269SEmmanuel Vadot      clock-names = "mdp_core",
205*b97ee269SEmmanuel Vadot                    "iface",
206*b97ee269SEmmanuel Vadot                    "core",
207*b97ee269SEmmanuel Vadot                    "alt_iface",
208*b97ee269SEmmanuel Vadot                    "extp";
209*b97ee269SEmmanuel Vadot
210*b97ee269SEmmanuel Vadot      phys = <&hdmi_phy>;
211*b97ee269SEmmanuel Vadot      #sound-dai-cells = <1>;
212*b97ee269SEmmanuel Vadot
213*b97ee269SEmmanuel Vadot      pinctrl-names = "default", "sleep";
214*b97ee269SEmmanuel Vadot      pinctrl-0 = <&hdmi_hpd_active &hdmi_ddc_active>;
215*b97ee269SEmmanuel Vadot      pinctrl-1 = <&hdmi_hpd_suspend &hdmi_ddc_suspend>;
216*b97ee269SEmmanuel Vadot
217*b97ee269SEmmanuel Vadot      core-vdda-supply = <&vreg_l12a_1p8>;
218*b97ee269SEmmanuel Vadot      core-vcc-supply = <&vreg_s4a_1p8>;
219*b97ee269SEmmanuel Vadot
220*b97ee269SEmmanuel Vadot      ports {
221*b97ee269SEmmanuel Vadot        #address-cells = <1>;
222*b97ee269SEmmanuel Vadot        #size-cells = <0>;
223*b97ee269SEmmanuel Vadot
224*b97ee269SEmmanuel Vadot        port@0 {
225*b97ee269SEmmanuel Vadot          reg = <0>;
226*b97ee269SEmmanuel Vadot          endpoint {
227*b97ee269SEmmanuel Vadot            remote-endpoint = <&mdp5_intf3_out>;
228*b97ee269SEmmanuel Vadot          };
229*b97ee269SEmmanuel Vadot        };
230*b97ee269SEmmanuel Vadot      };
231*b97ee269SEmmanuel Vadot    };
232*b97ee269SEmmanuel Vadot...
233